fix NPEs when SBSv2ConfigQueryData does not exist due to it's EPOCROOT no longer existing (e.g. removing the subst)
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java Mon Jul 19 21:06:20 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java Tue Jul 20 13:38:47 2010 -0500
@@ -50,6 +50,7 @@
import com.nokia.carbide.cpp.internal.api.sdk.BuildContextSBSv1;
import com.nokia.carbide.cpp.internal.api.sdk.ISBSv1BuildInfo;
import com.nokia.carbide.cpp.internal.api.sdk.SDKManagerInternalAPI;
+import com.nokia.carbide.cpp.internal.api.sdk.sbsv2.SBSv2QueryUtils;
import com.nokia.carbide.cpp.sdk.core.ISBSv1BuildContext;
import com.nokia.carbide.cpp.sdk.core.ISBSv2BuildContext;
import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
@@ -456,7 +457,11 @@
public IPath getTargetOutputDirectory() {
if (context instanceof ISBSv2BuildContext){
- return new Path(((ISBSv2BuildContext)context).getConfigQueryData().getOutputPathString());
+ if (((ISBSv2BuildContext) context).getConfigQueryData() != null){
+ return new Path(((ISBSv2BuildContext)context).getConfigQueryData().getOutputPathString());
+ } else {
+ return new Path("/" + SBSv2QueryUtils.BAD_EPOCROOT);
+ }
} else {
ISymbianSDK sdk = getSDK();
ISBSv1BuildContext v1Context = (ISBSv1BuildContext)context;
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/BuildContextSBSv2.java Mon Jul 19 21:06:20 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/BuildContextSBSv2.java Tue Jul 20 13:38:47 2010 -0500
@@ -313,8 +313,9 @@
@Override
public String getToolChain() {
- Map<String, String> buildMacros = configQueryData.getBuildMacros();
- if (buildMacros != null) {
+
+ if (configQueryData != null) {
+ Map<String, String> buildMacros = configQueryData.getBuildMacros();
// try to figure out the tool chain using macros from Raptor config query
if (buildMacros.containsKey(MACRO_ARM)) {
return TOOLCHAIN_ARM;
@@ -324,7 +325,7 @@
return TOOLCHAIN_WINSCW;
}
} else {
- // if no macros available, use alais name instead
+ // if no macros available, use alias name instead
if (sbsv2Alias.toUpperCase().contains(TOOLCHAIN_ARM)) {
return TOOLCHAIN_ARM;
} else if (sbsv2Alias.toUpperCase().contains(TOOLCHAIN_GCCE)) {