title: Java compiler not optimizing string concatenation
body: <p>I have noticed that Java compiler does not converting String addition (+) to StringBuilder.append() method. I have created a class which has only one method</p>
  
  <pre><code>public void doSomething(String a, String b) {
      String c = a + "a";
      String d = b + "b";
      String e = c + d;
      String f = e;
      System.out.println(f);
  }
  </code></pre>
  
  <p>After compilation and decompilation my method looked like this:</p>
  
  <pre><code>public void doSomething(String paramString1, String paramString2)
  {
      String str1 = paramString1 + "a";
      String str2 = paramString2 + "b";
      String str3 = str1 + str2;
      String str4 = str3;
      System.out.println(str4);
  }
  </code></pre>
  
  <p>Why compiler not optimizing my code? I am using ant for packaging and debug setting is false. I've also tried javac for single java file but result is the same.</p>