-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
11.0.2
-
x86_64
-
windows_10
ADDITIONAL SYSTEM INFORMATION :
64-bit Windows 10. Java runtime: Azul Zulu; Zulu 11.29+3 686fa9062e1b ; corresponding to JRE 11.0.2
A DESCRIPTION OF THE PROBLEM :
An invalid (too short) UUID string is parsed successfully, i.e., without exception.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Call UUID.fromString on a too short string, for example UUID.fromString("fecf3e99-0422-4936-9b9e-348a7e1fa5");
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Throws exception.
ACTUAL -
fromString("fecf3e99-0422-4936-9b9e-348a7e1fa5") succeeds and constructs an UUID object with the value fecf3e99-0422-4936-9b9e-00348a7e1fa5 (note the leading 00 in the last group).
CUSTOMER SUBMITTED WORKAROUND :
Manual check that the lengt of input string equals to 36 before calling UUID.fromString().
FREQUENCY : always
64-bit Windows 10. Java runtime: Azul Zulu; Zulu 11.29+3 686fa9062e1b ; corresponding to JRE 11.0.2
A DESCRIPTION OF THE PROBLEM :
An invalid (too short) UUID string is parsed successfully, i.e., without exception.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Call UUID.fromString on a too short string, for example UUID.fromString("fecf3e99-0422-4936-9b9e-348a7e1fa5");
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Throws exception.
ACTUAL -
fromString("fecf3e99-0422-4936-9b9e-348a7e1fa5") succeeds and constructs an UUID object with the value fecf3e99-0422-4936-9b9e-00348a7e1fa5 (note the leading 00 in the last group).
CUSTOMER SUBMITTED WORKAROUND :
Manual check that the lengt of input string equals to 36 before calling UUID.fromString().
FREQUENCY : always
- duplicates
-
JDK-8216407 java.util.UUID.fromString accepts input that does not match expected format
- Open