Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/codemining/CodeMiningProjectionViewerTest.java4
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SharedTextColors.java11
2 files changed, 3 insertions, 12 deletions
diff --git a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/codemining/CodeMiningProjectionViewerTest.java b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/codemining/CodeMiningProjectionViewerTest.java
index a8bd472b2..1eeaeb8c4 100644
--- a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/codemining/CodeMiningProjectionViewerTest.java
+++ b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/codemining/CodeMiningProjectionViewerTest.java
@@ -98,10 +98,6 @@ public class CodeMiningProjectionViewerTest {
public Color getColor(RGB rgb) {
return null;
}
-
- @Override
- public void dispose() {
- }
});
projectionSupport.install();
fViewer.doOperation(ProjectionViewer.TOGGLE);
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SharedTextColors.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SharedTextColors.java
index 7cf7550c0..f02ce7676 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SharedTextColors.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SharedTextColors.java
@@ -92,14 +92,9 @@ class SharedTextColors implements ISharedTextColors {
* @since 3.3
*/
private void dispose(Map<RGB, Color> colorTable) {
- if (colorTable == null)
- return;
-
- Iterator<Color> iter= colorTable.values().iterator();
- while (iter.hasNext())
- iter.next().dispose();
-
- colorTable.clear();
+ if (colorTable != null) {
+ colorTable.clear();
+ }
}
}

Back to the top