< prev index next >

src/java.base/share/classes/java/util/Properties.java

Print this page

        

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

@@ -639,20 +639,15 @@
         out.append(in, start, off - start);
 
         while (off < end) {
             aChar = in[off++];
             if (aChar == '\\') {
-                // No need to bounds check since LineReader::readLine excludes
-                // unescaped \s at the end of the line
                 aChar = in[off++];
                 if(aChar == 'u') {
                     // Read the xxxx
-                    if (off > end - 4)
-                        throw new IllegalArgumentException(
-                                     "Malformed \\uxxxx encoding.");
-                    int value = 0;
-                    for (int i = 0; i < 4; i++) {
+                    int value=0;
+                    for (int i=0; i<4; i++) {
                         aChar = in[off++];
                         switch (aChar) {
                           case '0': case '1': case '2': case '3': case '4':
                           case '5': case '6': case '7': case '8': case '9':
                              value = (value << 4) + aChar - '0';
< prev index next >