You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix compilation warning on JDK 9: use deprecated method LogRecord.setMillis [SPR-15453] #20014
It seems we're using a deprecated method in the spring-core module.
This fails the JDK9 build for now (see SPR-JDK9-180):
error 14-Apr-2017 00:03:04 /opt/bamboo-home/xml-data/build-dir/SPR-JDK9-JOB1/spring-core/src/main/java/org/apache/commons/logging/LogFactory.java:635: warning: [deprecation] setMillis(long) in LogRecord has been deprecated
error 14-Apr-2017 00:03:04 serialized.setMillis(getMillis());
error 14-Apr-2017 00:03:04 ^
error 14-Apr-2017 00:03:04 error: warnings found and -Werror specified
The setInstant variant (introduced in JDK9) is the preferred one. In the meantime, can we ignore that warning so that the build is green with JDK9 again?
Activity
spring-projects-issues commentedon Apr 14, 2017
Juergen Hoeller commented
Good catch! We're just using this in a copy constructor for
LogRecordserialization, so I've simply suppressed the deprecation warning there.I intend to revisit our JDK 9 alignment story - in particular dedicated documentation on JDK 9 use - soon... probably after 5.0 RC1 though.