[
https://issues.apache.org/jira/browse/ACCUMULO-1958?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13846411#comment-13846411
]
ASF subversion and git services commented on ACCUMULO-1958:
-----------------------------------------------------------
Commit cc68925ec08cb0ff14f30118526fb486449baf84 in branch
refs/heads/1.5.1-SNAPSHOT from [~bhavanki]
[ https://git-wip-us.apache.org/repos/asf?p=accumulo.git;h=cc68925 ]
ACCUMULO-1958 Make Range constructor safe
The public six-argument Range constructor lacked a check for the stop
key being before the start key. This change adds the check, plus a
similar, new protected constructor without the check for use by
constructors which do not need it. Checks are also included for
construction from Thrift and population via readFields.
Signed-off-by: Eric Newton <[email protected]>
> Range constructor lacks key checks, should be non-public
> --------------------------------------------------------
>
> Key: ACCUMULO-1958
> URL: https://issues.apache.org/jira/browse/ACCUMULO-1958
> Project: Accumulo
> Issue Type: Bug
> Affects Versions: 1.4.0
> Reporter: Bill Havanki
> Assignee: Bill Havanki
> Fix For: 1.4.5, 1.5.1, 1.6.0
>
> Attachments: ACCUMULO-1958.patch
>
>
> This ticket pertains to the Range class constructor with the following
> signature:
> {noformat}
> public Range(Key, Key, boolean, boolean, boolean, boolean)
> {noformat}
> The constructor does not check that the start key is before the end key, like
> every other constructor in the class. Since the constructor is public, this
> makes it possible for a caller to create invalid ranges.
> The constructor is used by other constructors that take in existing range
> objects, where the key check has implicitly been done, and so it would make
> sense to skip the check in this one, but then the constructor visibility
> should be at least protected.
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)