diff mx/mx_graal.py @ 21537:ca14581fadc4

handle duplicates when extracting service files
author Doug Simon <doug.simon@oracle.com>
date Mon, 25 May 2015 17:09:00 +0200
parents 6420ac0cbe3c
children 5324104ac4f3
line wrap: on
line diff
--- a/mx/mx_graal.py	Mon May 25 11:06:22 2015 +0200
+++ b/mx/mx_graal.py	Mon May 25 17:09:00 2015 +0200
@@ -620,7 +620,7 @@
                         classification[className] = False
                         break
                     superInterfaces = afterName[len(' extends '):-len(' {')].split(',')
-                    if 'com.oracle.graal.api.runtime.Service' in superInterfaces:
+                    if 'com.oracle.jvmci.runtime.Service' in superInterfaces:
                         classification[className] = True
                         break
                     maybe = [_eraseGenerics(superInterface) for superInterface in superInterfaces]
@@ -632,11 +632,11 @@
     return classification
 
 def _extractMaybes(classification):
-    maybes = []
+    maybes = set()
     for v in classification.values():
         if isinstance(v, list):
-            maybes.extend(v)
-    return maybes
+            maybes.update(v)
+    return list(maybes)
 
 def _mergeClassification(classification, newClassification):
     for className, value in classification.items():