Skip to content

Commit

Permalink
feat(#60): clean for pmd
Browse files Browse the repository at this point in the history
  • Loading branch information
h1alexbel committed Nov 29, 2024
1 parent 520be98 commit d7ec2b1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/org/eolang/lints/Defect.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
*/
package org.eolang.lints;

import java.io.FileReader;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;

Expand Down Expand Up @@ -136,7 +137,9 @@ public String text() {

@Override
public String version() throws IOException, XmlPullParserException {
return new MavenXpp3Reader().read(new FileReader("pom.xml")).getVersion();
return new MavenXpp3Reader().read(
Files.newInputStream(Paths.get("pom.xml"))
).getVersion();
}
}

Expand Down

0 comments on commit d7ec2b1

Please sign in to comment.