< prev index next >
test/jdk/java/util/UUID/UUIDTest.java
Print this page
rev 53213 : imported patch 8216407-java-util-UUID-fromString-accepts-input-that-does-not-match-expected-format
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2019, 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.
@@ -20,11 +20,11 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* @test
- * @bug 4173528 5068772 8148936
+ * @bug 4173528 5068772 8148936 8216407
* @summary Unit tests for java.util.UUID
* @key randomness
* @run main/othervm -XX:+CompactStrings UUIDTest
* @run main/othervm -XX:-CompactStrings UUIDTest
*/
@@ -105,10 +105,15 @@
testFromStringError("----");
testFromStringError("-0-0-0-0");
testFromStringError("0-0-0-0-");
testFromStringError("0-0-0-0-0-");
testFromStringError("0-0-0-0-x");
+ testFromStringError("123456789-0-0-0-0");
+ testFromStringError("0-1abcd-0-0-0");
+ testFromStringError("0-0-1ef01-0-0");
+ testFromStringError("0-0-0-12345-0");
+ testFromStringError("0-0-0-0-f1234567890ab");
}
private static void testFromStringError(String str) {
try {
UUID test = UUID.fromString(str);
< prev index next >