We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5ec064e + f5d35e1 commit fcbf203Copy full SHA for fcbf203
src/main/java/org/owasp/benchmark/helpers/ThingFactory.java
@@ -29,8 +29,7 @@ public static ThingInterface createThing() {
29
Properties props = new Properties();
30
31
// create a thing using reflection
32
- try {
33
- InputStream thingproperties = ThingFactory.class.getClassLoader().getResourceAsStream("thing.properties");
+ try (InputStream thingproperties = ThingFactory.class.getClassLoader().getResourceAsStream("thing.properties")) {
34
if (thingproperties == null) {
35
System.out.println("Can't find thing.properties");
36
return new Thing2();
0 commit comments