accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vikram Srivastava (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (ACCUMULO-2187) Scanner is left unclosed in AddSplitsCommand#execute()
Date Wed, 29 Jan 2014 08:48:09 GMT

     [ https://issues.apache.org/jira/browse/ACCUMULO-2187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Vikram Srivastava reassigned ACCUMULO-2187:
-------------------------------------------

    Assignee: Vikram Srivastava

> Scanner is left unclosed in AddSplitsCommand#execute()
> ------------------------------------------------------
>
>                 Key: ACCUMULO-2187
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-2187
>             Project: Accumulo
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: Vikram Srivastava
>            Priority: Minor
>              Labels: newbie
>         Attachments: ACCUMULO-2187.v1.patch.txt
>
>
> Here is related code:
> {code}
>       java.util.Scanner file = new java.util.Scanner(new File(f));
>       while (file.hasNextLine()) {
>         line = file.nextLine();
>         if (!line.isEmpty()) {
>           splits.add(decode ? new Text(Base64.decodeBase64(line.getBytes())) : new Text(line));
>         }
>       }
> {code}
> file should be closed upon return.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message