File tree Expand file tree Collapse file tree
org.omg.sysml/src/org/omg/sysml/adapter Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -359,15 +359,17 @@ public void removeUnnecessaryImplicitGeneralTypes() {
359359 implicitGeneralTypes .values ().forEach (implicitGenerals ::addAll );
360360 for (Object eClass : implicitGeneralTypes .keySet ().toArray ()) {
361361 List <Type > implicitEClassGenerals = implicitGeneralTypes .get (eClass );
362- if (eClass == SysMLPackage .eINSTANCE .getRedefinition ()) {
363- implicitEClassGenerals .removeAll (redefinedFeatures );
364- } else {
365- implicitEClassGenerals .removeIf (gen ->
366- generals .stream ().anyMatch (type ->specializesExcludingTarget (type , gen )) ||
367- implicitGenerals .stream ().anyMatch (type ->type != gen && specializesExcludingTarget (type , gen )));
368- }
369- if (implicitEClassGenerals .isEmpty ()) {
370- implicitGeneralTypes .remove (eClass );
362+ if (implicitEClassGenerals != null ) {
363+ if (eClass == SysMLPackage .eINSTANCE .getRedefinition ()) {
364+ implicitEClassGenerals .removeAll (redefinedFeatures );
365+ } else {
366+ implicitEClassGenerals .removeIf (gen ->
367+ generals .stream ().anyMatch (type ->specializesExcludingTarget (type , gen )) ||
368+ implicitGenerals .stream ().anyMatch (type ->type != gen && specializesExcludingTarget (type , gen )));
369+ }
370+ if (implicitEClassGenerals .isEmpty ()) {
371+ implicitGeneralTypes .remove (eClass );
372+ }
371373 }
372374 }
373375
You can’t perform that action at this time.
0 commit comments