From 51874377b6350b80287730e6b8e0cc8a76c284c4 Mon Sep 17 00:00:00 2001 From: mkersten Date: Thu, 8 Sep 2005 19:19:11 +0000 Subject: Fix for Bug #109016: NullPointerException when building configuration --- ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java b/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java index 504f2b927..7be16e8dd 100644 --- a/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java +++ b/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java @@ -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); + } + } } } -- cgit v1.2.3