]> source.dussan.org Git - aspectj.git/commitdiff
Fix for Bug #109016: NullPointerException when building configuration
authormkersten <mkersten>
Thu, 8 Sep 2005 19:19:11 +0000 (19:19 +0000)
committermkersten <mkersten>
Thu, 8 Sep 2005 19:19:11 +0000 (19:19 +0000)
ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java

index 504f2b927ae176324fb13004f5f9793a82ebc226..7be16e8ddc2e43618383244887f98e887dadbbdd 100644 (file)
@@ -292,11 +292,13 @@ public class CompilerAdapter {
                        if (sourceLevel.equals(CompilerOptions.VERSION_1_5)) {
                            optionsToSet.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);       
                        } else {
-                               String setCompliance = (String) optionsToSet.get( CompilerOptions.OPTION_Compliance);
-                               if ( ! (setCompliance.equals(CompilerOptions.VERSION_1_4 )
-                                && slVersion.equals(CompilerOptions.VERSION_1_3)) ) {
-                                   optionsToSet.put(CompilerOptions.OPTION_Source, slVersion);         
-                               } 
+                               if (optionsToSet.containsKey(CompilerOptions.OPTION_Compliance)) {
+                                       String setCompliance = (String) optionsToSet.get(CompilerOptions.OPTION_Compliance);
+                                       if ( ! (setCompliance.equals(CompilerOptions.VERSION_1_4 )
+                                        && slVersion.equals(CompilerOptions.VERSION_1_3)) ) {
+                                           optionsToSet.put(CompilerOptions.OPTION_Source, slVersion);         
+                                       } 
+                               }
                        }
                }