check boolean field first to reduce suggestedName() method invocation count idea/163.5972 rubymine/163.5969 rubymine/163.5970
authorSergey Simonchik <sergey.simonchik@jetbrains.com>
Sat, 8 Oct 2016 14:23:49 +0000 (17:23 +0300)
committerSergey Simonchik <sergey.simonchik@jetbrains.com>
Sat, 8 Oct 2016 14:23:49 +0000 (17:23 +0300)
platform/lang-api/src/com/intellij/execution/configurations/LocatableConfigurationBase.java

index 0233ba5433a203a7e83b32b03d280b1d7eacd8bb..0d0ac49f915552e17bf16372e1a0e3b01da1c38d 100644 (file)
@@ -42,7 +42,7 @@ public abstract class LocatableConfigurationBase extends RunConfigurationBase im
   @Override
   @Attribute("nameIsGenerated")
   public boolean isGeneratedName() {
-    return suggestedName() != null && myNameIsGenerated;
+    return myNameIsGenerated && suggestedName() != null;
   }
 
   /**