plugins/org.symbian.tools.tmw.ui/src/org/symbian/tools/tmw/internal/ui/project/ProjectTemplateManagerImpl.java
changeset 484 f5df819c1852
parent 483 109da596fa9d
child 494 6786e27ef30a
--- a/plugins/org.symbian.tools.tmw.ui/src/org/symbian/tools/tmw/internal/ui/project/ProjectTemplateManagerImpl.java	Thu Sep 02 10:50:38 2010 -0700
+++ b/plugins/org.symbian.tools.tmw.ui/src/org/symbian/tools/tmw/internal/ui/project/ProjectTemplateManagerImpl.java	Thu Sep 02 15:18:58 2010 -0700
@@ -51,7 +51,11 @@
             if (o1.getWeight() == o2.getWeight()) {
                 return o1.getName().compareTo(o2.getName());
             } else {
-                return o1.getWeight() > o2.getWeight() ? 1 : -1;
+                if (o1.getWeight() > o2.getWeight()) {
+                    return 1;
+                } else {
+                    return -1;
+                }
             }
         }
     }
@@ -62,7 +66,11 @@
 
     public IProjectTemplate getDefaultTemplate(IMobileWebRuntime runtime) {
         final IProjectTemplate[] projectTemplates = getProjectTemplates(runtime);
-        return projectTemplates != null && projectTemplates.length > 0 ? projectTemplates[0] : null;
+        if (projectTemplates != null && projectTemplates.length > 0) {
+            return projectTemplates[0];
+        } else {
+            return null;
+        }
     }
 
     public ITemplateInstaller getEmptyProjectTemplate(IMobileWebRuntime runtime) {
@@ -80,7 +88,11 @@
             templates = readExtensions();
         }
         final IProjectTemplate[] runtimeTemplates = templates.get(runtime);
-        return runtimeTemplates == null ? new IProjectTemplate[0] : runtimeTemplates;
+        if (runtimeTemplates == null) {
+            return new IProjectTemplate[0];
+        } else {
+            return runtimeTemplates;
+        }
     }
 
     private Map<IMobileWebRuntime, IProjectTemplate[]> readExtensions() {