< prev index next >

src/java.base/share/classes/java/nio/charset/Charset-X-Coder.java.template

Print this page
rev 51616 : [mq]: 8210285-CharsetDecoder-Encoder-s-constructor-does-not-reject-NaN

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2018, 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

@@ -187,14 +187,14 @@
                    float average$ItypesPerOtype$,
                    float max$ItypesPerOtype$,
                    $replType$ replacement)
     {
         this.charset = cs;
-        if (average$ItypesPerOtype$ <= 0.0f)
+        if (!(average$ItypesPerOtype$ > 0.0f))
             throw new IllegalArgumentException("Non-positive "
                                                + "average$ItypesPerOtype$");
-        if (max$ItypesPerOtype$ <= 0.0f)
+        if (!(max$ItypesPerOtype$ > 0.0f))
             throw new IllegalArgumentException("Non-positive "
                                                + "max$ItypesPerOtype$");
         if (average$ItypesPerOtype$ > max$ItypesPerOtype$)
             throw new IllegalArgumentException("average$ItypesPerOtype$"
                                                + " exceeds "
< prev index next >