mirror of
https://github.com/ethauvin/version-processor.git
synced 2025-04-24 23:47:11 -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()) {
|
if (f.exists()) {
|
||||||
log("Found " + f);
|
log("Found " + f);
|
||||||
Properties p = new Properties();
|
Properties p = new Properties();
|
||||||
p.load(new FileReader(f));
|
FileReader r = new FileReader(f);
|
||||||
|
p.load(r);
|
||||||
String result = p.getProperty(version.propertyName());
|
String result = p.getProperty(version.propertyName());
|
||||||
|
r.close();
|
||||||
return result;
|
return result;
|
||||||
} else {
|
} else {
|
||||||
error("Couldn't find " + version.fileName());
|
error("Couldn't find " + version.fileName());
|
||||||
|
@ -90,6 +92,7 @@ public class VersionProcessor extends AbstractProcessor {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Set<String> getSupportedAnnotationTypes() {
|
public Set<String> getSupportedAnnotationTypes() {
|
||||||
Set<String> result = new HashSet<>();
|
Set<String> result = new HashSet<>();
|
||||||
result.add(Version.class.getCanonicalName());
|
result.add(Version.class.getCanonicalName());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue