COMMON: Fix potential bug as prevent 14/11614/1
authorBon-Yong Lee <bonyong.lee@samsung.com>
Thu, 31 Oct 2013 07:01:50 +0000 (16:01 +0900)
committerBon-Yong Lee <bonyong.lee@samsung.com>
Thu, 31 Oct 2013 07:01:50 +0000 (16:01 +0900)
Change-Id: I85ad17db5ccce95fd3514d84b954d140aac4c6c9
Signed-off-by: Bon-Yong Lee <bonyong.lee@samsung.com>
org.tizen.common/src/org/tizen/common/core/application/InstallPathConfig.java
org.tizen.common/src/org/tizen/common/core/command/file/DirectoryCopyHandlingCommand.java
org.tizen.common/src/org/tizen/common/util/DeferredTaskManager.java

index e4d59d2..bfc9453 100755 (executable)
@@ -154,7 +154,12 @@ final public class InstallPathConfig {
     public static String getPlatformPath(ProfileInfo profile, String version) {
         if ( profile == null ) {
             profile = getLatestProfileInfo();
+            if ( null == profile )
+            {
+                return null;
+            }
         }
+        
         if ( version == null ) {
             version = profile.getLatestPlatformVersion();
         }
@@ -460,7 +465,13 @@ final public class InstallPathConfig {
 
         InputStream is = null;
         try {
-            Properties prop = new Properties() {
+            final Properties prop = new Properties() {
+                /**
+                 * 
+                 */
+                private static final long serialVersionUID =
+                    8616159524414427526L;
+
                 @Override
                 public void load(InputStream fis) throws IOException {
                     Scanner in = new Scanner(fis);
index 0c0171a..823955b 100755 (executable)
@@ -82,6 +82,10 @@ public class DirectoryCopyHandlingCommand extends FileHandlingCommand<Boolean> {
         if(policy == null)
             return;
         OptionPolicy optionPolicy = policy.adapt( OptionPolicy.class );
+        if ( null == optionPolicy )
+        {
+            return ;
+        }
         Option[] options = optionPolicy.getOptions();
         
         for(Option option: options) {
index 3e02299..5362e13 100755 (executable)
@@ -119,7 +119,7 @@ DeferredTaskManager
      * \r
      * @return idle time\r
      */\r
-    public\r
+    synchronized public\r
     long\r
     getIdleTime()\r
     {\r