-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
8u40
-
generic
-
generic
The change for JDK-8046921 introduced a new utility class, OptimisticTypesPersistence, that makes use of a type in java.sql, java.sql.Date. This would appear to be a mistake, most likely by the IDE when automatically adding the import statements. I suspect that it should be "import java.util.Date".
Snippets below show the affected code, in OptimisticTypesPersistence.java:
import java.sql.Date;
....
private static String getVersionDirName() throws Exception {
....
return "dev-" + new SimpleDateFormat("yyyyMMdd-HHmmss").format(new Date(getLastModifiedClassFile(dir, 0L)));
....
}
This issue causes problems for modularity, as it creates a new dependency on a type in java.sql.
Snippets below show the affected code, in OptimisticTypesPersistence.java:
import java.sql.Date;
....
private static String getVersionDirName() throws Exception {
....
return "dev-" + new SimpleDateFormat("yyyyMMdd-HHmmss").format(new Date(getLastModifiedClassFile(dir, 0L)));
....
}
This issue causes problems for modularity, as it creates a new dependency on a type in java.sql.
- duplicates
-
JDK-8050964 OptimisticTypesPersistence.java should use java.util.Date instead of java.sql.Date
-
- Resolved
-
- relates to
-
JDK-8046921 Deoptimization type information peristence
-
- Resolved
-