Skip to content

Fix compilation warning on JDK 9: use deprecated method LogRecord.setMillis [SPR-15453] #20014

Closed
@spring-projects-issues

Description

@spring-projects-issues

Brian Clozel opened SPR-15453 and commented

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?


Affects: 5.0 RC1

Reference URL: http://download.java.net/java/jdk9/docs/api/java/util/logging/LogRecord.html#setMillis-long-

Issue Links:

Referenced from: commits d50dab6

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: taskA general task

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions