From 845dab4f45525dafadda744b083815d75f574357 Mon Sep 17 00:00:00 2001
From: Florian Hoelzl <hoelzl@fortiss.org>
Date: Tue, 17 Jan 2012 09:57:10 +0000
Subject: [PATCH] another bugfix => YELLOW refs 307

---
 .../tooling/kernel/ui/internal/MarkerService.java        | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/MarkerService.java b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/MarkerService.java
index ccae8cf20..bd8681e3d 100644
--- a/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/MarkerService.java
+++ b/org.fortiss.tooling.kernel.ui/trunk/src/org/fortiss/tooling/kernel/ui/internal/MarkerService.java
@@ -57,7 +57,7 @@ import org.fortiss.tooling.kernel.ui.service.IMarkerService;
  * @author hoelzl
  * @author $Author$
  * @version $Rev$
- * @ConQAT.Rating YELLOW Hash: 242B488A1C4D7DDB614EB3E75F8D9294
+ * @ConQAT.Rating YELLOW Hash: 06F2B175D60D592B0950ADF9E0B00CCA
  */
 public class MarkerService implements IMarkerService,
 		IPersistencyServiceListener, ILightweightLabelDecorator {
@@ -158,7 +158,7 @@ public class MarkerService implements IMarkerService,
 		ITopLevelElement top = IPersistencyService.INSTANCE
 				.getTopLevelElementFor(element);
 		if (top == null) {
-			return null;
+			return ESeverity.lowest();
 		}
 		return getCacheEntry(top).getHighestSeverity(element);
 	}
@@ -318,10 +318,11 @@ public class MarkerService implements IMarkerService,
 
 		/** Returns the highest severity for the given element. */
 		public ESeverity getHighestSeverity(EObject element) {
-			if (!highestSeverityMap.containsKey(element)) {
+			ESeverity sev = highestSeverityMap.get(element);
+			if (sev == null) {
 				return ESeverity.lowest();
 			}
-			return highestSeverityMap.get(element);
+			return sev;
 		}
 
 		/** Updates the cache entry. */
-- 
GitLab