Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update Main.java
  • Loading branch information
martinschaef authored Feb 22, 2022
commit 70366497f19eb671a3ec4532ef7ad6e11d29f253
7 changes: 7 additions & 0 deletions src/main/java/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -187,4 +187,11 @@ public void pathTraversal2(HttpServletRequest request) throws IOException {

}
}

void formatStringNoncompliant(final File file) {
final long length = file.length();
// Noncompliant: avoids using the correct format strings for their argument types.
final String s = format("File length is %s", length);
log.info(s);
}
}