File tree 2 files changed +29
-3
lines changed
src/main/java/org/pz/filededupe
2 files changed +29
-3
lines changed Original file line number Diff line number Diff line change 15
15
<maven .compiler.source>1.8</maven .compiler.source>
16
16
<maven .compiler.target>1.8</maven .compiler.target>
17
17
<java .version>1.8</java .version>
18
+
19
+ <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
20
+ <project .reporting.outputEncoding>UTF-8</project .reporting.outputEncoding>
21
+
22
+ <maven .build.timestamp.format>MMM d, YYYY h:mm a z</maven .build.timestamp.format>
18
23
</properties >
19
24
20
25
<description >
45
50
<version >3.2.0</version >
46
51
<configuration >
47
52
<show >private</show >
53
+ <footer >Generated ${maven.build.timestamp} , (c) Copyright 2020 Andrew Binstock</footer >
48
54
</configuration >
49
55
</plugin >
50
56
</plugins >
51
-
52
-
53
57
</build >
54
58
59
+ <reporting >
60
+ <plugins >
61
+ <plugin >
62
+ <groupId >com.github.spotbugs</groupId >
63
+ <artifactId >spotbugs-maven-plugin</artifactId >
64
+ <version >4.0.4</version >
65
+ <configuration >
66
+ <effort >Max</effort >
67
+ <threshold >Low</threshold >
68
+ </configuration >
69
+ </plugin >
70
+ <plugin >
71
+ <groupId >org.apache.maven.plugins</groupId >
72
+ <artifactId >maven-project-info-reports-plugin</artifactId >
73
+ <version >2.7</version >
74
+ </plugin >
75
+ </plugins >
76
+ </reporting >
77
+
55
78
<dependencies >
56
79
<dependency >
57
80
<groupId >junit</groupId >
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ long calculate() throws IOException {
43
43
FileInputStream file ;
44
44
45
45
try {
46
- file = new FileInputStream (filename );
46
+ file = new FileInputStream ( filename );
47
47
} catch ( FileNotFoundException e ) {
48
48
System .err .println ( "Error: File " + filename + " not found." );
49
49
throw ( new IOException ( e .toString () ));
@@ -59,6 +59,9 @@ long calculate() throws IOException {
59
59
in .close ();
60
60
} catch ( IOException e ) {
61
61
System .err .println ( "Error reading file: " + filename );
62
+ check .close ();
63
+ in .close ();
64
+ file .close ();
62
65
throw ( new IOException ( e .toString () ));
63
66
}
64
67
You can’t perform that action at this time.
0 commit comments