< prev index next >
src/java.desktop/share/classes/com/sun/media/sound/PCMtoPCMCodec.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -24,10 +24,11 @@
*/
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.AudioInputStream;
import javax.sound.sampled.AudioSystem;
@@ -85,10 +86,11 @@
/**
*/
public AudioFormat[] getTargetFormats(AudioFormat.Encoding targetEncoding, AudioFormat sourceFormat){
+ Objects.requireNonNull(targetEncoding);
// filter out targetEncoding from the old getOutputFormats( sourceFormat ) method
AudioFormat[] formats = getOutputFormats( sourceFormat );
Vector<AudioFormat> newFormats = new Vector<>();
< prev index next >