Skip to content

Commit

Permalink
Improve exclusion file reader error messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsaglam committed Aug 4, 2021
1 parent b8c746c commit 4acc602
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions jplag/src/main/java/jplag/JPlag.java
Original file line number Diff line number Diff line change
Expand Up @@ -438,16 +438,16 @@ private void readExclusionFile() {
excludedFileNames = new HashSet<>();

try {
BufferedReader in = new BufferedReader(new FileReader(options.getExclusionFileName()));
BufferedReader reader = new BufferedReader(new FileReader(options.getExclusionFileName()));
String line;

while ((line = in.readLine()) != null) {
while ((line = reader.readLine()) != null) {
excludedFileNames.add(line.trim());
}

in.close();
} catch (IOException e) {
System.out.println("Could not read exclusion file: " + options.getExclusionFileName());
reader.close();
} catch (IOException exception) {
System.out.println("Could not read exclusion file: "+ exception.getMessage());
}

if (options.getVerbosity() == LONG) {
Expand Down

0 comments on commit 4acc602

Please sign in to comment.