You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2014/01/30 06:22:13 UTC
[jira] [Created] (ACCUMULO-2284)
DirectoryDecommissioner#getBackupName() shouldn't compute absolute value of
signed random integer
Ted Yu created ACCUMULO-2284:
--------------------------------
Summary: DirectoryDecommissioner#getBackupName() shouldn't compute absolute value of signed random integer
Key: ACCUMULO-2284
URL: https://issues.apache.org/jira/browse/ACCUMULO-2284
Project: Accumulo
Issue Type: Bug
Reporter: Ted Yu
Priority: Minor
{code}
return new Path(path.getParent(), path.getName() + "_" + System.currentTimeMillis() + "_" + Math.abs(rand.nextInt()) + ".bak");
{code}
this is because Math.abs can actually return negative result for integer input:
{code}
assertTrue( Math.abs(Integer.MIN_VALUE) < 0 );
{code}
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)