Skip to content

Commit 8c7c1f8

Browse files
author
Developer
committed
Fix static method declarations
- Made isInSubnet method static in DenylistFileProvider.java - Made getZipInputStream method static in ZipFileProvider.java These methods don't use instance variables and can be declared as static.
1 parent 47872ac commit 8c7c1f8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/de/rub/nds/crawler/denylist/DenylistFileProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public DenylistFileProvider(String denylistFilename) {
5858
}
5959
}
6060

61-
private boolean isInSubnet(String ip, SubnetUtils.SubnetInfo subnetInfo) {
61+
private static boolean isInSubnet(String ip, SubnetUtils.SubnetInfo subnetInfo) {
6262
try {
6363
return subnetInfo.isInRange(ip);
6464
} catch (IllegalArgumentException e) {

src/main/java/de/rub/nds/crawler/targetlist/ZipFileProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public List<String> getTargetList() {
9191
return targetList;
9292
}
9393

94-
private InflaterInputStream getZipInputStream(String filename) throws IOException {
94+
private static InflaterInputStream getZipInputStream(String filename) throws IOException {
9595
if (filename.contains(".gz")) {
9696
return new GZIPInputStream(new FileInputStream(filename));
9797
} else {

0 commit comments

Comments
 (0)