Skip to content

Commit

Permalink
0002054: NullPointerException happens during file sync pull
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Nov 6, 2014
1 parent 1c21ef3 commit 4498c4e
Showing 1 changed file with 10 additions and 7 deletions.
Expand Up @@ -637,13 +637,16 @@ protected List<IncomingBatch> processZip(InputStream is, String sourceNodeId,

Set<Long> batchIds = new TreeSet<Long>();
String[] files = unzipDir.list(DirectoryFileFilter.INSTANCE);
for (int i = 0; i < files.length; i++) {
try {
batchIds.add(Long.parseLong(files[i]));
} catch (NumberFormatException e) {
log.error(
"Unexpected directory name. Expected a number representing a batch id. Instead the directory was named '{}'",
files[i]);

if (files != null) {
for (int i = 0; i < files.length; i++) {
try {
batchIds.add(Long.parseLong(files[i]));
} catch (NumberFormatException e) {
log.error(
"Unexpected directory name. Expected a number representing a batch id. Instead the directory was named '{}'",
files[i]);
}
}
}

Expand Down

0 comments on commit 4498c4e

Please sign in to comment.