- if (temporaryTg != null)
- setProperty(MigrationStateKeys.CURRENT_TGS, initializeTransferableGraphSource(temporaryTg));
+ if (temporaryTg != null) {
+ TransferableGraphSource tgs = (TransferableGraphSource)properties.get(MigrationStateKeys.CURRENT_TGS);
+ if (tgs != null)
+ try {
+ tgs.close();
+ } catch (IOException e) {
+ Logger.defaultLogError(e);
+ }
+ setProperty(MigrationStateKeys.CURRENT_TGS, initializeTransferableGraphSource(temporaryTg, true));
+ }