[ https://issues.apache.org/jira/browse/LUCENE-8345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16501933#comment-16501933 ]
Uwe Schindler commented on LUCENE-8345: --------------------------------------- Hi, looks fine! I compared it with the autogenerated Java 9 deprecations already shipped with forbiddenapis: - https://github.com/policeman-tools/forbidden-apis/blob/master/src/main/resources/de/thetaphi/forbiddenapis/signatures/jdk-deprecated-9.txt#L185-L193 - https://github.com/policeman-tools/forbidden-apis/blob/master/src/main/resources/de/thetaphi/forbiddenapis/signatures/jdk-deprecated-9.txt#L185-L193 - https://github.com/policeman-tools/forbidden-apis/blob/master/src/main/resources/de/thetaphi/forbiddenapis/signatures/jdk-deprecated-9.txt#L214-L215 You also added the Character ctor, cool! I will take this issue, but I am on travel at the moment, so I will commit that tomorrow! > Add wrapper class constructors to forbiddenapis > ----------------------------------------------- > > Key: LUCENE-8345 > URL: https://issues.apache.org/jira/browse/LUCENE-8345 > Project: Lucene - Core > Issue Type: Improvement > Reporter: Michael Braun > Priority: Minor > Time Spent: 20m > Remaining Estimate: 0h > > Wrapper classes for the Java primitives (Boolean, Byte, Short, Character, > Integer, Long, Float, Double) have constructors which will always create new > objects. These constructors are officially deprecated as of Java 9 and it is > recommended to use the public static methods since these can reuse the same > underlying objects. In 99% of cases we should be doing this, so these > constructors should be added to forbiddenapis and code corrected to use > autoboxing or call the static methods (.valueOf, .parse*) explicitly. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org