[Title] Fixed sonar violations (critical)
authordonghyuk.yang <donghyuk.yang@samsung.com>
Tue, 16 Apr 2013 07:45:06 +0000 (16:45 +0900)
committerdonghyuk.yang <donghyuk.yang@samsung.com>
Tue, 16 Apr 2013 07:45:06 +0000 (16:45 +0900)
org.tizen.nativeplatform/src/org/tizen/nativeplatform/launch/wizards/PlatformLaunchUtils.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgmgr/ui/AddRepoDialog.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkgmgr/ui/ModifyRepoDialog.java

index e6291f0..65ffd1c 100644 (file)
@@ -554,21 +554,16 @@ public class PlatformLaunchUtils {
                }               
        }
        
-       public boolean checkGdbServerInDevice(IDevice device, TizenLaunchCommand command) throws CoreException {
+       public boolean checkGdbServerInDevice(IDevice device, TizenLaunchCommand command) 
+                       throws CoreException, Exception {
                String resultCommand = TizenPlatformConstants.GDBSERVER_PLATFORM_CMD + " --version"
                 + TizenPlatformConstants.CMD_RESULT_CHECK;
-               try {
-                       command.run(resultCommand, "0");
-               } catch (Exception e) {
-            //LaunchUtils.newCoreException(NLS.bind(TizenLaunchMessages.CANNOT_FIND_GDBSERVER, device.getDeviceName()), e);
-               return false;
-               }
-        
+               command.run(resultCommand, "0");
         return true;
        }
        
        public void readyGdbServer(IDevice device, TizenLaunchCommand command, IPath srcPath) 
-                       throws CoreException, TimeoutException, SdbCommandRejectedException, IOException {
+                       throws CoreException, TimeoutException, SdbCommandRejectedException, IOException, Exception {
                File gdbserver = new File(srcPath.toOSString());
                
                if (!gdbserver.exists()) {
index d277649..152e02c 100644 (file)
@@ -237,14 +237,14 @@ public class AddRepoDialog extends Dialog {
        protected void okPressed() {
                if (remoteCheckBt.getSelection()) {
                        url = remoteText.getText();
-                       if (url.isEmpty() || url == null) {
+                       if (url == null || url.isEmpty()) {
                                DialogUtil.openErrorDialog(resources.getString("AddRepo.Msg.Error.URLEmpty"));
                                return;
                        }                       
                        type = RepoManager.REMOTE_REPO_TYPE;
                } else if (localCheckBt.getSelection()) {
                        url = localText.getText();
-                       if (url.isEmpty() || url == null) {
+                       if (url == null || url.isEmpty()) {
                                DialogUtil.openErrorDialog(resources.getString("AddRepo.Msg.Error.URLEmpty"));
                                return;
                        }
index 372a671..c690dc9 100644 (file)
@@ -299,14 +299,14 @@ public class ModifyRepoDialog extends Dialog {
                
                if (remoteCheckBt.getSelection()) {
                        newUrl = remoteText.getText();
-                       if (newUrl.isEmpty() || newUrl == null) {
+                       if (newUrl == null || newUrl.isEmpty()) {
                                DialogUtil.openErrorDialog(resources.getString("AddRepo.Msg.Error.URLEmpty"));
                                return;
                        }                       
                        type = RepoManager.REMOTE_REPO_TYPE;
                } else if (localCheckBt.getSelection()) {
                        newUrl = localText.getText();
-                       if (newUrl.isEmpty() ||newUrl == null) {
+                       if (newUrl == null || newUrl.isEmpty()) {
                                DialogUtil.openErrorDialog(resources.getString("AddRepo.Msg.Error.URLEmpty"));
                                return;
                        }