Deprecation of LogRecord.getMillis in JDK9
jason_mehrens at hotmail.com
Mon Nov 30 17:04:42 UTC 2015
When JDK-8072645 - java.util.logging should use java.time to get more precise time stamps was commited the LogRecord.getMillis() method was marked as deprecated with the reason "To get the full nanosecond resolution event time, use getInstant". I can see marking LogRecord.setMillis as deprecated since using that would be an untended loss of precision. However, it seems excessive to deprecate LogRecord.getMillis when it could be treated as a convenience method that could simply note that if the caller wants nanosecond resolution use getInstant. It would be extremely helpful compatibility wise to have this undeprecated for libs that have support pre-Java 9. If it can't be undeprecated what is the proper way to target support as low as JDK7 but might end up executing on JDK9?
More information about the core-libs-dev