[Title] Fixed sonar violations
authordonghyuk.yang <donghyuk.yang@samsung.com>
Wed, 3 Jul 2013 05:54:04 +0000 (14:54 +0900)
committerdonghyuk.yang <donghyuk.yang@samsung.com>
Wed, 3 Jul 2013 05:54:04 +0000 (14:54 +0900)
org.tizen.nativeplatform/src/org/tizen/nativeplatform/build/PlatformMakeGenerator.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/PlatformLaunchDelegate.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/PlatformLaunchDelegateForAttach.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/PlatformLaunchConfigurationTabGroup.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/PlatformMainAttachTab.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/PlatformMainTab.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/shortcut/PlatformProjectCommonLaunchShortcut.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/shortcut/PlatformPropertyTester.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/ui/shortcut/TizenPathInputDialog.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizard/pages/PlatformLaunchSettingBinPage.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/preferences/PreferencesManager.java

index 7b019ce..1108391 100644 (file)
@@ -154,10 +154,11 @@ public class PlatformMakeGenerator implements IManagedBuilderMakefileGenerator2
                                folder.create(true, true, null);
                        }
                        catch (CoreException e) {
-                               if (e.getStatus().getCode() == IResourceStatus.PATH_OCCUPIED)
+                               if (e.getStatus().getCode() == IResourceStatus.PATH_OCCUPIED) {
                                        folder.refreshLocal(IResource.DEPTH_ZERO, null);
-                               else
+                               } else {
                                        throw e;
+                               }
                        }
 
                        // Make sure the folder is marked as derived so it is not added to CM
index 0b5cb05..5c77dff 100644 (file)
@@ -176,8 +176,9 @@ public class PlatformLaunchDelegate extends AbstractCLaunchDelegate {
             if (mode.equals(ILaunchManager.DEBUG_MODE)) {
                 processPostDebug(config);
             } else {
-                if (!launch.isTerminated())
+                if (!launch.isTerminated()) {
                     launch.terminate();
+                }
                 ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
                 launchManager.removeLaunch(launch);
             }
index 5b27a17..d4d7090 100644 (file)
@@ -253,7 +253,6 @@ public class PlatformLaunchDelegateForAttach extends PlatformLaunchDelegate {
     }
 
     private void setAttachProcess(ILaunchConfiguration config) throws CoreException {
-        final PlatformLaunchUtils launchUtils = new PlatformLaunchUtils(target);
         String processName = config.getAttribute(
                 ITizenLaunchConfigurationConstants.ATTR_PROCESSNAME_OPTION, "");
 
index 6ef439d..f1d11ef 100644 (file)
@@ -38,11 +38,12 @@ public class PlatformLaunchConfigurationTabGroup extends AbstractLaunchConfigura
     public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
         ILaunchConfigurationTab[] tabs = null;
 
-        if (mode.equals("debug"))
+        if (mode.equals("debug")) {
             tabs = new ILaunchConfigurationTab[] { new TizenDebuggerTab(false),
                     new SourceLookupTab() };
-        else
+        } else {
             tabs = new ILaunchConfigurationTab[] {};
+        }
 
         setTabs(tabs);
     }
index ee1615b..c55bfc2 100644 (file)
@@ -115,8 +115,9 @@ public class PlatformMainAttachTab extends CMainTab {
         createProcessGroup(comp, 1);
         createOptionGroupComposite(comp);
 
-        if (fSpecifyCoreFile)
+        if (fSpecifyCoreFile) {
             createCoreFileGroup(comp, 1);
+        }
         createVerticalSpacer(comp, 1);
     }
 
@@ -325,8 +326,9 @@ public class PlatformMainAttachTab extends CMainTab {
                         FileEntry selectedFile = dlg.getSelectedFileEntry();
                         filePath = selectedFile.getFullPath();
                         fProgText.setText(filePath);
-                    } else
+                    } else {
                         filePath = null;
+                    }
                 }
             });
         }
index f75255b..a142c6f 100644 (file)
@@ -507,8 +507,9 @@ public class PlatformMainTab extends CMainTab {
                         FileEntry selectedFile = dlg.getSelectedFileEntry();
                         filePath = selectedFile.getFullPath();
                         fProgText.setText(filePath);
-                    } else
+                    } else {
                         filePath = null;
+                    }
                 }
             });
         }
index c8f363b..48bd215 100644 (file)
@@ -165,15 +165,17 @@ abstract public class PlatformProjectCommonLaunchShortcut extends CApplicationLa
             for (int i = 0; i < debugConfigs.length; i++) {
                 if (debugConfigs[i]
                         .supportsMode(ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN)) {
-                    if (debugConfigs[i].getName().contains("Tizen")) //$NON-NLS-1$
+                    if (debugConfigs[i].getName().contains("Tizen")) {
                         debugList.add(debugConfigs[i]);
+                    }
                 }
             }
             debugConfigs = (ICDebugConfiguration[]) debugList.toArray(new ICDebugConfiguration[0]);
-            if (debugConfigs.length == 1)
+            if (debugConfigs.length == 1) {
                 debugConfig = debugConfigs[0];
-            else if (debugConfigs.length > 1)
+            } else if (debugConfigs.length > 1) {
                 debugConfig = chooseDebugConfig(debugConfigs, mode);
+            }
         }
 
         configuration = createConfiguration(project, debugConfig, mode);
index 1a53882..c55b1d6 100644 (file)
@@ -72,10 +72,11 @@ public class PlatformPropertyTester extends PropertyTester {
             if (projectArtifactType
                     .equals(PlatformConfigurationManager.TIZEN_PLATFORM_ARTIFACT_TYPE)
                     || projectArtifactType
-                            .equals(PlatformConfigurationManager.OLD_SLP_CUSTOM_DEBIAN_ARTIFACT_TYPE))
+                            .equals(PlatformConfigurationManager.OLD_SLP_CUSTOM_DEBIAN_ARTIFACT_TYPE)) {
                 return true;
-            else
+            } else {
                 return false;
+            }
         } else {
             return false;
         }
index a7e7a2e..f513cfb 100644 (file)
@@ -270,8 +270,9 @@ public class TizenPathInputDialog extends Dialog {
                                        if(dlg.open() == TizenRemoteFileDialogResult.OK) {
                                                FileEntry selectedFile = dlg.getSelectedFileEntry();
                                                filePath = selectedFile.getFullPath();
-                                       } else
+                                       } else {
                                                filePath = null;
+                                       }
                                }
                        });
                }
index 96abcba..2c9348e 100644 (file)
@@ -124,8 +124,9 @@ public class PlatformLaunchSettingBinPage extends WizardPage {
                     if (dlg.open() == TizenRemoteFileDialogResult.OK) {
                         FileEntry selectedFile = dlg.getSelectedFileEntry();
                         filePath = selectedFile.getFullPath().trim();
-                    } else
+                    } else {
                         filePath = null;
+                    }
                 }
             });
         }
index b057512..d2f96c3 100644 (file)
@@ -386,8 +386,9 @@ public class PreferencesManager {
         newList.add(proxyURL);
         saveProxyURLs(newList);
 
-        if (newList.size() == 1)
+        if (newList.size() == 1) {
             setActiveSiteConfiguration(0);
+        }
     }
 
     public static synchronized void updateSiteConfiguration(int id, String name, String baseURI,