oracle / opengrok

OpenGrok is a fast and usable source code search and cross reference engine, written in Java
http://oracle.github.io/opengrok/
Other
4.36k stars 747 forks source link

Deprecated warnings cause build failures with JDK 20 #4312

Open WorMzy opened 1 year ago

WorMzy commented 1 year ago

OS: Arch Linux

Package versions:

Several deprecated warnings are generated when running mvn:

[WARNING] COMPILATION WARNING : 
[INFO] -------------------------------------------------------------
[WARNING] /build/opengrok/src/opengrok/opengrok-indexer/src/main/java/org/opengrok/indexer/framework/PluginFramework.java:[385,18] java.security.AccessController in java.security has been deprecated and marked for removal
[WARNING] /build/opengrok/src/opengrok/opengrok-indexer/src/main/java/org/opengrok/indexer/util/Executor.java:[402,43] getId() in java.lang.Thread has been deprecated
[WARNING] /build/opengrok/src/opengrok/opengrok-indexer/src/main/java/org/opengrok/indexer/logger/formatter/LogFormatter.java:[96,23] getThreadID() in java.util.logging.LogRecord has been deprecated
[WARNING] /build/opengrok/src/opengrok/opengrok-indexer/src/main/java/org/opengrok/indexer/configuration/OpenGrokThreadFactory.java:[47,59] getId() in java.lang.Thread has been deprecated
[WARNING] /build/opengrok/src/opengrok/opengrok-indexer/src/main/java/org/opengrok/indexer/web/Util.java:[682,19] URL(java.lang.String) in java.net.URL has been deprecated
[WARNING] /build/opengrok/src/opengrok/opengrok-indexer/src/main/java/org/opengrok/indexer/web/Util.java:[1457,19] URL(java.lang.String) in java.net.URL has been deprecated
[WARNING] /build/opengrok/src/opengrok/opengrok-indexer/src/main/java/org/opengrok/indexer/web/Util.java:[1474,19] URL(java.lang.String) in java.net.URL has been deprecated
[INFO] 7 warnings 
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /build/opengrok/src/opengrok/opengrok-indexer/src/main/java/org/opengrok/indexer/authorization/AuthorizationFramework.java: warnings found and -Werror specified
[INFO] 1 error

Full build log: opengrok-1.11.7-1-x86_64-build.log

vladak commented 1 year ago

Thanks for the report ! While OpenGrok is currently on Java 11 (and the switch to Java 17 is considered - #3899), it definitely would not hurt to address these. Is this something you'd like to work on ?

WorMzy commented 1 year ago

Unfortunately I've not touched java code in over 15 years, so this is just a friendly heads-up rather than a volunteer to fix it. :)

Thanks for working on Opengrok!

xbreizh commented 1 year ago

@vladak Hi, I can take a look if that's fine?

vladak commented 1 year ago

@vladak Hi, I can take a look if that's fine?

Sure, all issues are generally open to public :-)