Skip to content

Commit

Permalink
squid:S00108 - Nested blocks of code should not be left empty - fix 2
Browse files Browse the repository at this point in the history
  • Loading branch information
georgekankava committed Feb 2, 2016
1 parent a12a312 commit 159341f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
8 changes: 2 additions & 6 deletions src/main/java/org/bytedeco/javacpp/Loader.java
Original file line number Diff line number Diff line change
Expand Up @@ -595,9 +595,7 @@ public static String loadLibrary(URL[] urls, String libnameversion) {
// ... else wait until the file is at least 1 second old ...
try {
Thread.sleep(1000);
} catch (InterruptedException ex) {
logger.error("Thread was interrupted : " + ex.getMessage());
}
} catch (InterruptedException ex) { }
}
}
if (file != null && file.exists()) {
Expand Down Expand Up @@ -695,9 +693,7 @@ public static void main(String[] args) {
while (file.exists() && !file.delete()) {
try {
Thread.sleep(100);
} catch (InterruptedException e) {
logger.error("Thread was interrupted : " + e.getMessage());
}
} catch (InterruptedException e) { }
}
}
tempDir.delete();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/bytedeco/javacpp/Pointer.java
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ public int offsetof(String member) {
offset = Loader.offsetof(c, member);
}
} catch (NullPointerException e) {
logger.error("Null object required : " + e.getMessage());
return offset;
}
return offset;
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/bytedeco/javacpp/tools/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -2688,9 +2688,9 @@ public File parse(File outputDirectory, String[] classPath, Class cls) throws IO
try {
((InfoMapper)c.newInstance()).map(infoMap);
} catch (ClassCastException e) {
logger.error("Could not accomplish cast : " + e.getMessage());

} catch (InstantiationException e) {
logger.error("Exception while creating instance : " + e.getMessage());

} catch (IllegalAccessException e) {
// fail silently as if the interface wasn't implemented
}
Expand Down

0 comments on commit 159341f

Please sign in to comment.