SVACE: The standard has been applied(Major).
authorJaeMin Kim <jm.jemin.kim@samsung.com>
Wed, 30 Aug 2017 06:21:48 +0000 (15:21 +0900)
committer허형석/개발플랫폼팀/L5/ <harry.heo@samsung.com>
Fri, 1 Sep 2017 07:40:26 +0000 (16:40 +0900)
FB.UUF_UNUSED_FIELD(256382) PlatformLaunchDelegateForInstallAs
DEREF_OF_NULL.RET.LIB(256421) PlatformLaunchUtil
DEREF_OF_NULL.RET.LIB(256424) CSFileReader
DEREF_OF_NULL.RET.LIB(256425) RootstrapImporter
DEREF_OF_NULL.RET.USER(256502) RootstrapInitializer
DEREF_OF_NULL.RET.USER(256503) ConnectionConfigurationDialog
DEREF_OF_NULL.RET.USER(256504) ConnectionConfigurationDialog
DEREF_OF_NULL.RET.USER(256505) ConnectionConfigurationDialog
DEREF_OF_NULL.RET.USER(256506) PlatformBuildTargetManager
DEREF_OF_NULL.RET.USER(256507) PlatformInstances
DEREF_OF_NULL.RET.USER(256508) PlatformInstances
DEREF_OF_NULL.RET.USER(256509) PlatformInstances
DEREF_OF_NULL.RET.USER(256510) PlatformInstances
DEREF_OF_NULL.RET.USER(256511) PlatformInstances
DEREF_OF_NULL.RET.USER(256512) CommonRootstrapManager

Signed-off-by: JaeMin Kim <jm.jemin.kim@samsung.com>
org.tizen.nativeplatform.launcher/src/org/tizen/nativeplatform/launcher/coredump/CSFileReader.java
org.tizen.nativeplatform.launcher/src/org/tizen/nativeplatform/launcher/delegate/PlatformLaunchDelegateForInstallAs.java
org.tizen.nativeplatform.linux/src/org/tizen/nativeplatform/linux/rootstrap/core/RootstrapImporter.java
org.tizen.nativeplatform.rootstrap/src/org/tizen/nativeplatform/rootstrap/CommonRootstrapManager.java
org.tizen.nativeplatform.win/src/org/tizen/nativeplatform/win/remote/connection/history/ConnectionConfigurationDialog.java
org.tizen.nativeplatform.win/src/org/tizen/nativeplatform/win/rootstrap/RootstrapInitializer.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/PlatformBuildTargetManager.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/PlatformInstances.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/util/PlatformLaunchUtil.java

index 309b8d1..f460ad0 100644 (file)
@@ -101,7 +101,9 @@ public class CSFileReader {
                 // $OUTPUT_FILE
                 sbFile.delete(0, sbFile.length());
                 sbFile.append("\"");//$NON-NLS-1$
-                sbFile.append(csFile.getParentFile().getCanonicalPath());
+                if(csFile.getParentFile().exists()){
+                    sbFile.append(csFile.getParentFile().getCanonicalPath());                    
+                }
                 sbFile.append(File.separator);
                 sbFile.append("copy_");//$NON-NLS-1$
                 sbFile.append(csFile.getName());
index 74f5e6e..e9c5774 100644 (file)
@@ -67,8 +67,6 @@ public class PlatformLaunchDelegateForInstallAs extends AbstractCLaunchDelegate
     protected static final int defaultTimeOut = 60000;
     protected Shell shell;
     protected IProject project;
-    private boolean result;
-    private String programPath;
     protected boolean isLaunchFailed = false;
     protected boolean isCoredump = false;
     protected TizenLaunchCommand tizenCommand = null;
index c88db6f..00bfcea 100755 (executable)
@@ -113,7 +113,7 @@ public class RootstrapImporter {
             // extracting file system
             rootstrapPath = result.getPath();
             File baseDirDir = new File(rootstrapPath).getParentFile();
-            if (!baseDirDir.exists()) {
+            if (null != baseDirDir && !baseDirDir.exists()) {
                 if (!baseDirDir.mkdirs()) {
                     throw new InterruptedException(String.format("Failed to make directory: %s",
                             baseDirDir.toString()));
index c32ec4b..7a6d910 100644 (file)
@@ -9,7 +9,7 @@ import org.tizen.nativeplatform.model.PlatformRootstrap;
 public class CommonRootstrapManager {
 
     public static List<PlatformRootstrap> getRootstraps() {
-        return RootstrapInstances.getRootstrapManager().getRootstraps();
+        return RootstrapInstances.getRootstrapManager() != null ? RootstrapInstances.getRootstrapManager().getRootstraps() : null;
     }
 
     public static PlatformRootstrap getRootstrap(String id) {
index 6593aef..ebdd5dd 100644 (file)
@@ -228,7 +228,7 @@ public class ConnectionConfigurationDialog extends TitleAreaDialog {
                         .getFirstElement();
 
                 // disable remove action if connection is root connection
-                if (conn.getDepth() == 0) {
+                if (null != conn && conn.getDepth() == 0) {
                     removeAction.setEnabled(false);
                 } else {
                     removeAction.setEnabled(true);
@@ -676,7 +676,7 @@ public class ConnectionConfigurationDialog extends TitleAreaDialog {
             ISelection sel = connectionTree.getSelection();
             TreeSelection selection = (TreeSelection) sel;
             ConnectionConfiguration conn = (ConnectionConfiguration) selection.getFirstElement();
-            if (conn.getType().equals(ConnectionConfiguration.Type.Remote)) {
+            if (null != conn && conn.getType().equals(ConnectionConfiguration.Type.Remote)) {
                 currentConnection = new ConnectionConfiguration();
                 currentConnection.setName(getTempConnectionName());
                 currentConnection.setDepth(1);
@@ -704,23 +704,26 @@ public class ConnectionConfigurationDialog extends TitleAreaDialog {
             ISelection sel = connectionTree.getSelection();
             TreeSelection selection = (TreeSelection) sel;
             ConnectionConfiguration conn = (ConnectionConfiguration) selection.getFirstElement();
-
-            // return if connection is root connection
-            if (conn.getDepth() == 0) {
-                return;
-            }
-            if (conn.getType().equals(ConnectionConfiguration.Type.Remote)) {
-                if (MessageDialog.openConfirm(shell, resources.getString("ConnDlg.dlg.title.removeConnection"),
-                        resources.getString("ConnDlg.dlg.desc.removeConnection"))) {
-                    ConnectionHistory.removeConnectionFromList(conn);
-                    connectionTree.setInput(getTreeInput());
-                    connectionTree.expandAll();
-
-                    // set isApplied to write a new connection to file.
-                    isApplied = true;
+            if (null != conn) {
+                // return if connection is root connection
+                if (conn.getDepth() == 0) {
+                    return;
                 }
-            } else if (conn.getType().equals(ConnectionConfiguration.Type.Local)) {
-                DialogUtil.openMessageDialog(resources.getString("ConnDlg.info.notSupported"));
+                if (conn.getType().equals(ConnectionConfiguration.Type.Remote)) {
+                    if (MessageDialog.openConfirm(shell, resources.getString("ConnDlg.dlg.title.removeConnection"),
+                            resources.getString("ConnDlg.dlg.desc.removeConnection"))) {
+                        ConnectionHistory.removeConnectionFromList(conn);
+                        connectionTree.setInput(getTreeInput());
+                        connectionTree.expandAll();
+
+                        // set isApplied to write a new connection to file.
+                        isApplied = true;
+                    }
+                } else if (conn.getType().equals(ConnectionConfiguration.Type.Local)) {
+                    DialogUtil.openMessageDialog(resources.getString("ConnDlg.info.notSupported"));
+                }
+            } else {
+                return;
             }
         }
     }
index a35f880..34acf54 100644 (file)
@@ -112,7 +112,7 @@ public class RootstrapInitializer {
             List<Rootstrap> cloneRootstrapList = new ArrayList<Rootstrap>(pm.getRootstrapList());
             for (Rootstrap r : cloneRootstrapList) {
                 String type = r.getSupportToolchainType();
-                if (!type.equals(PlatformRootstrap.SUPPORTED_TOOLCHAIN_TYPE)) {
+                if (null != type && !type.equals(PlatformRootstrap.SUPPORTED_TOOLCHAIN_TYPE)) {
                     continue;
                 }
                 if (!remotelists.contains(r.getId())) {
index 37c1eb1..b34998b 100644 (file)
@@ -66,15 +66,17 @@ public class PlatformBuildTargetManager extends CommonBuildTargetManager {
             String version = rs.getProfileVersion().toLowerCase();
             String supportType = rs.getSupportToolchainType();
 
-            if (platformName == null) {
-                if (supportType.endsWith(toolChainType) && containValue(archs, rs.getArchitecture())) {
-                    return rs.getId();
-                }
-            } else {
-                if (supportType.endsWith(toolChainType) && containValue(archs, rs.getArchitecture())
-                        && platformName.toLowerCase().startsWith(profile)
-                        && platformName.toLowerCase().endsWith(version)) {
-                    return rs.getId();
+            if (null != supportType && "" != supportType) {
+                if (platformName == null) {
+                    if (supportType.endsWith(toolChainType) && containValue(archs, rs.getArchitecture())) {
+                        return rs.getId();
+                    }
+                } else {
+                    if (supportType.endsWith(toolChainType) && containValue(archs, rs.getArchitecture())
+                            && platformName.toLowerCase().startsWith(profile)
+                            && platformName.toLowerCase().endsWith(version)) {
+                        return rs.getId();
+                    }
                 }
             }
         }
index 5d812ad..a8ab61c 100644 (file)
@@ -19,23 +19,23 @@ public class PlatformInstances {
     }
 
     public static IBuildCommandUtil getBuildCommandUtil(IConfiguration config) {
-        return getPlatformUtility().getBuildCommandUtil(config);
+        return getPlatformUtility() != null ? getPlatformUtility().getBuildCommandUtil(config) : null;
     }
 
     public static IBuildCommandUtil getBuildCommandUtil() {
-        return getPlatformUtility().getBuildCommandUtil();
+        return getPlatformUtility() != null ? getPlatformUtility().getBuildCommandUtil() : null;
     }
 
     public static IPackageUtil getPackageUtil() {
-        return getPlatformUtility().getPackageUtil();
+        return getPlatformUtility() != null ? getPlatformUtility().getPackageUtil() : null;
     }
 
     public static ILaunchCommandUtil getLaunchCommandUtil() {
-        return getPlatformUtility().getLaunchCommandUtil();
+        return getPlatformUtility() != null ? getPlatformUtility().getLaunchCommandUtil() : null;
     }
 
     public static IScriptProvider getScriptProvider() {
-        return getPlatformUtility().getScriptProvider();
+        return getPlatformUtility() != null ? getPlatformUtility().getScriptProvider() : null;
     }
 
 }
index f07dbc6..5c070ed 100644 (file)
@@ -154,7 +154,7 @@ public class PlatformLaunchUtil {
         IFolder folder = project.getFolder("packaging");
         File dir = new File(folder.getLocation().toOSString());
         File specfile = null;
-        if (dir.exists()) {
+        if (dir.exists() && dir.listFiles().length > 1) {
             for (File f : dir.listFiles()) {
                 if (f.isFile() && f.getName().endsWith(".spec")) {
                     specfile = f;