close possible handle leak generating .index.db
This commit is contained in:
parent
8a81237bd0
commit
c8c65530f2
|
@ -61,6 +61,12 @@ public class NpmPackageIndexBuilder {
|
||||||
|
|
||||||
psql = conn.prepareStatement("Insert into ResourceList (FileName, ResourceType, Id, Url, Version, Kind, Type, Supplements, Content, ValueSet) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
|
psql = conn.prepareStatement("Insert into ResourceList (FileName, ResourceType, Id, Url, Version, Kind, Type, Supplements, Content, ValueSet) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
if (conn != null) {
|
||||||
|
try {
|
||||||
|
conn.close();
|
||||||
|
} catch (SQLException e1) {
|
||||||
|
}
|
||||||
|
}
|
||||||
conn = null;
|
conn = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue