Permalink
Browse files

#8 modify: renameTo() return unchecked, jar file lost

  • Loading branch information...
1 parent d8233ea commit 9162051b9daf24fef3f15b00c9805c222e086a71 @shadogray shadogray committed with n1hility Nov 2, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/java/org/jboss/jandex/JarIndexer.java
View
2 src/main/java/org/jboss/jandex/JarIndexer.java
@@ -128,7 +128,7 @@ public static Result createJarIndex(File jarFile, Indexer indexer, boolean modif
FileOutputStream fos = new FileOutputStream(new File(jarFile.getAbsolutePath()));
try {
byte[] b = new byte[1024];
- for (int count=0; (count = fis.read(b, 0, 1024)) >= 1024; ) {
+ for (int count=0; (count = fis.read(b, 0, 1024)) >= 0; ) {
fos.write(b, 0, count);
}
} finally {

0 comments on commit 9162051

Please sign in to comment.