Skip to content

Commit

Permalink
np fix of GEOT-6207
Browse files Browse the repository at this point in the history
  • Loading branch information
lislei committed May 15, 2019
1 parent de2429d commit 638bf75
Showing 1 changed file with 3 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1293,10 +1293,10 @@ public static void disposeSinglePlanarImage(PlanarImage planarImage) {
try {
// Check extended class first
if (planarImage instanceof WritableRenderedImageAdapter) {
cleanField(planarImage, "theWritableImage");
cleanField(planarImage, "theImage", true);
cleanField(planarImage, "theWritableImage", false);
// cleanField(planarImage, "theImage", true);
} else if (planarImage instanceof RenderedImageAdapter) {
cleanField(planarImage, "theImage");
// cleanField(planarImage, "theImage");
}
} catch (NoSuchFieldException | IllegalAccessException e) {
// fine, we tried
Expand All @@ -1309,18 +1309,6 @@ public static void disposeSinglePlanarImage(PlanarImage planarImage) {
planarImage.dispose();
}

/**
* Helper that cleans up a field
*
* @param theObject
* @param fieldName
* @throws NoSuchFieldException
* @throws IllegalAccessException
*/
private static void cleanField(Object theObject, String fieldName)
throws NoSuchFieldException, IllegalAccessException {
cleanField(theObject, fieldName, false);
}

/**
* Helper that cleans up a field
Expand Down

0 comments on commit 638bf75

Please sign in to comment.