[
https://issues.apache.org/jira/browse/LUCENE-8345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16545039#comment-16545039
]
ASF subversion and git services commented on LUCENE-8345:
---------------------------------------------------------
Commit c97f27b06c1d7c250e9596a9bc7bf5ca11ef6ad3 in lucene-solr's branch
refs/heads/master from [~thetaphi]
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=c97f27b ]
Merge branch 'remove-constructor-wrapper-classes' of
https://github.com/michaelbraun/lucene-solr:
LUCENE-8345, GitHub PR #392: Remove instantiation of redundant wrapper classes
for primitives; add wrapper class constructors to forbiddenapis.
This closes #392
> 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
> Assignee: Uwe Schindler
> 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: [email protected]
For additional commands, e-mail: [email protected]