< prev index next >
src/java.desktop/share/classes/com/sun/media/sound/UlawCodec.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 25,34 ****
--- 25,35 ----
package com.sun.media.sound;
import java.io.IOException;
+ import java.util.Objects;
import java.util.Vector;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.AudioInputStream;
*** 104,113 ****
--- 105,116 ----
/**
*/
public AudioFormat[] getTargetFormats(AudioFormat.Encoding targetEncoding, AudioFormat sourceFormat){
+ Objects.requireNonNull(targetEncoding);
+ Objects.requireNonNull(sourceFormat);
if( (AudioFormat.Encoding.PCM_SIGNED.equals(targetEncoding)
&& AudioFormat.Encoding.ULAW.equals(sourceFormat.getEncoding()))
||
(AudioFormat.Encoding.ULAW.equals(targetEncoding)
&& AudioFormat.Encoding.PCM_SIGNED.equals(sourceFormat.getEncoding()))) {
< prev index next >