]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.browsing.ui/src/org/simantics/browsing/ui/NodeContextPath.java
Lots of small fixes for the Simantics SDK build
[simantics/platform.git] / bundles / org.simantics.browsing.ui / src / org / simantics / browsing / ui / NodeContextPath.java
index 6b5fcbf874fd9736699abdaa7bb3826f8bfca44d..9c09bc4dde914ba88b200010fb936045202be091 100644 (file)
@@ -243,11 +243,11 @@ public final class NodeContextPath implements IAdaptable {
         return new NodeContextPath(childSegments);\r
     }\r
 \r
-    @SuppressWarnings("rawtypes")\r
+    @SuppressWarnings("unchecked")\r
     @Override\r
-    public Object getAdapter(Class adapter) {\r
+    public <T> T getAdapter(Class<T> adapter) {\r
         if (NodeContext.class == adapter)\r
-            return getLastSegment();\r
+            return (T) getLastSegment();\r
         NodeContext last = getLastSegment();\r
         if (last instanceof IAdaptable)\r
             return ((IAdaptable) last).getAdapter(adapter);\r