You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Simon Willnauer (JIRA)" <ji...@apache.org> on 2018/06/02 10:35:00 UTC
[jira] [Comment Edited] (LUCENE-8165) ban Arrays.copyOfRange with
forbidden APIs
[ https://issues.apache.org/jira/browse/LUCENE-8165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16497861#comment-16497861 ]
Simon Willnauer edited comment on LUCENE-8165 at 6/2/18 10:34 AM:
------------------------------------------------------------------
patch looks good to me. [~rcmuir] do you wanna go ahead and commit this and push a separate change for _Arrays#copyOf_?
was (Author: simonw):
patch looks good to me. [~rcmuir] do you wanna go ahead and commit this and push a separate change for _ Arrays#copyOf_?
> ban Arrays.copyOfRange with forbidden APIs
> ------------------------------------------
>
> Key: LUCENE-8165
> URL: https://issues.apache.org/jira/browse/LUCENE-8165
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Robert Muir
> Priority: Major
> Attachments: LUCENE-8165_copy_of_range.patch, LUCENE-8165_start.patch, LUCENE-8165_start.patch
>
>
> This method is no good, because instead of throwing AIOOBE for bad bounds, it will silently fill with zeros (essentially silent corruption). Unfortunately it is used in quite a few places so replacing it with e.g. arrayCopy may uncover some interesting surprises.
> See LUCENE-8164 for motivation.
--
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