Skip to content

Commit 8b89d3d

Browse files
author
Andrew Binstock
committed
Cleaned up Javadoc, updated version number to 1.0, and got rid of minor warnings
1 parent f08912f commit 8b89d3d

File tree

2 files changed

+29
-3
lines changed

2 files changed

+29
-3
lines changed

pom.xml

+25-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
<maven.compiler.source>1.8</maven.compiler.source>
1616
<maven.compiler.target>1.8</maven.compiler.target>
1717
<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>
1823
</properties>
1924

2025
<description>
@@ -45,13 +50,31 @@
4550
<version>3.2.0</version>
4651
<configuration>
4752
<show>private</show>
53+
<footer>Generated ${maven.build.timestamp}, (c) Copyright 2020 Andrew Binstock</footer>
4854
</configuration>
4955
</plugin>
5056
</plugins>
51-
52-
5357
</build>
5458

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+
5578
<dependencies>
5679
<dependency>
5780
<groupId>junit</groupId>

src/main/java/org/pz/filededupe/FileChecksum.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ long calculate() throws IOException {
4343
FileInputStream file;
4444

4545
try {
46-
file = new FileInputStream(filename);
46+
file = new FileInputStream( filename );
4747
} catch( FileNotFoundException e ) {
4848
System.err.println( "Error: File " + filename + " not found.");
4949
throw( new IOException( e.toString() ));
@@ -59,6 +59,9 @@ long calculate() throws IOException {
5959
in.close();
6060
} catch( IOException e ) {
6161
System.err.println( "Error reading file: " + filename );
62+
check.close();
63+
in.close();
64+
file.close();
6265
throw( new IOException( e.toString() ));
6366
}
6467

0 commit comments

Comments
 (0)