You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Uwe Schindler (JIRA)" <ji...@apache.org> on 2018/07/16 10:29:00 UTC
[jira] [Comment Edited] (LUCENE-8345) Add wrapper class
constructors to forbiddenapis
[ https://issues.apache.org/jira/browse/LUCENE-8345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16545041#comment-16545041 ]
Uwe Schindler edited comment on LUCENE-8345 at 7/16/18 10:28 AM:
-----------------------------------------------------------------
Hi, I merged your branch into master and closed the PR. I will let jenkins run for a few hours and then try to cherry-pick to branch_7x. If there are major problems (quite many files touches), I will contact you, [~mbraun688]. No need to take action now.
was (Author: thetaphi):
Hi, I mreged your branch into master and closed the PR. I will let jenkins run for a few hours and then try to cherry-pick to branch_7x. If there are major problems (quite many files touches), I will contact you, [~mbraun688]. No need to take action now.
> 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: 0.5h
> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org