[Title] Refactoring as Protex's result
authorBonyong.lee <bonyong.lee@samsung.com>
Mon, 29 Jul 2013 02:23:40 +0000 (11:23 +0900)
committerBonyong.lee <bonyong.lee@samsung.com>
Mon, 29 Jul 2013 02:23:40 +0000 (11:23 +0900)
[Desc.]
[Issue]

org.tizen.nativeplatform/src/org/tizen/nativeplatform/pkg/commander/rpm/RpmCommanderDevice.java
org.tizen.nativeplatform/src/org/tizen/nativeplatform/util/PlatformLaunchUtil.java

index 5c30ebb..6bdc259 100644 (file)
@@ -27,8 +27,6 @@
 
 package org.tizen.nativeplatform.pkg.commander.rpm;
 
-import static org.tizen.sdblib.service.SyncServiceConstants.RESULT_OK;
-
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
@@ -86,7 +84,7 @@ public class RpmCommanderDevice extends RpmCommanderCommon {
                 return new CommandStatus(IStatus.ERROR, "", e.getMessage(), e);
             }
             SyncResult syncResult = syncService.push(filePath, device.getFileEntry( TMP_DIR ) );// Fixxed
-            if (syncResult.getCode() != RESULT_OK) {
+            if (!syncResult.isOk()) {
                 return new CommandStatus(IStatus.ERROR, "", syncResult.getMessage(), null);
             }
             value.add(pathOnDevice.toOSString());
index 9b8fb47..c647d05 100644 (file)
@@ -27,8 +27,6 @@
 
 package org.tizen.nativeplatform.util;
 
-import static org.tizen.sdblib.service.SyncServiceConstants.RESULT_OK;
-
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileNotFoundException;
@@ -173,7 +171,7 @@ public class PlatformLaunchUtil {
             throws CoreException, TimeoutException, SdbCommandRejectedException, IOException {
         String path = new Path(descPath).removeLastSegments(1).toOSString();
         SyncResult syncResult = device.getSyncService().push(srcPath, device.getFileEntry(path));
-        if (syncResult.getCode() != RESULT_OK) {
+        if (!syncResult.isOk()) {
             LaunchUtils.newCoreException(TizenLaunchMessages.CANNOT_TRANSFER_FILE, null);
         }
     }