FULL PRODUCT VERSION :
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b20)
Java HotSpot(TM) Client VM (build 24.65-b04, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Windows 7 32-bit SP1
A DESCRIPTION OF THE PROBLEM :
I tried to use the parse method in the SimpleDateFormat class withe value of '2014-15-45' there is no exception throw, but return as follows,
C:\terry>java TestDate 2014-15-45
Tue Apr 14 00:00:00 CST 2015
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
I tried to use the parse method in the SimpleDateFormat class withe value of '2014-15-45' there is no exception throw, but return as follows,
C:\terry>java TestDate 2014-15-45
Tue Apr 14 00:00:00 CST 2015
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
throw exception
ACTUAL -
Tue Apr 14 00:00:00 CST 2015
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.text.*;
public class TestDate {
public static void main(String[] args) throws Exception {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
System.out.println(sdf.parse(args[0]).toString());
}
}
---------- END SOURCE ----------
SUPPORT :
YES
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b20)
Java HotSpot(TM) Client VM (build 24.65-b04, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Windows 7 32-bit SP1
A DESCRIPTION OF THE PROBLEM :
I tried to use the parse method in the SimpleDateFormat class withe value of '2014-15-45' there is no exception throw, but return as follows,
C:\terry>java TestDate 2014-15-45
Tue Apr 14 00:00:00 CST 2015
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
I tried to use the parse method in the SimpleDateFormat class withe value of '2014-15-45' there is no exception throw, but return as follows,
C:\terry>java TestDate 2014-15-45
Tue Apr 14 00:00:00 CST 2015
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
throw exception
ACTUAL -
Tue Apr 14 00:00:00 CST 2015
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.text.*;
public class TestDate {
public static void main(String[] args) throws Exception {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
System.out.println(sdf.parse(args[0]).toString());
}
}
---------- END SOURCE ----------
SUPPORT :
YES
- relates to
-
JDK-8055689 SimpleDateFormat.format returns wrong form of month (standalone instead of context-sensitive) for "MMMM" template
-
- Closed
-