mirror of
https://github.com/ethauvin/version-processor.git
synced 2025-04-24 15:37:12 -07:00
Fixed property file left open after reading.
This commit is contained in:
parent
c84e4dcd49
commit
5e5a8ce059
1 changed files with 4 additions and 1 deletions
|
@ -79,8 +79,10 @@ public class VersionProcessor extends AbstractProcessor {
|
|||
if (f.exists()) {
|
||||
log("Found " + f);
|
||||
Properties p = new Properties();
|
||||
p.load(new FileReader(f));
|
||||
FileReader r = new FileReader(f);
|
||||
p.load(r);
|
||||
String result = p.getProperty(version.propertyName());
|
||||
r.close();
|
||||
return result;
|
||||
} else {
|
||||
error("Couldn't find " + version.fileName());
|
||||
|
@ -90,6 +92,7 @@ public class VersionProcessor extends AbstractProcessor {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getSupportedAnnotationTypes() {
|
||||
Set<String> result = new HashSet<>();
|
||||
result.add(Version.class.getCanonicalName());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue