title: Diamond Operator Compiles under OpenJDK but not SunJDK 7
body: <p>Hopefully this isn't a duplicate, I've searched and found some with related issues but not about the differences in Java.</p>
  
  <pre><code>private List&lt;Stuff&gt; apps = new ArrayList&lt;Stuff&gt;();
  // compiles under both
  
  
  private List&lt;Stuff&gt; apps = new ArrayList&lt;&gt;();
  // compiles under OpenJDK 7
  // SunJDK 7 Error raised is : Syntax error on token "&lt;", ? expected after this token
  </code></pre>
  
  <p>Any ideas why this is the case? I like to use OpenJDK on my *nix servers and dev boxes but sometimes I use someone else's Windows laptop for dev and testing and this is the first time I've had a problem between the two versions. Would appreciate any advice or thoughts!</p>
  
  <p>Also I use Netbeans 7.2 (which does not flag an error on Windows or Debain). The program uses the Play Framework 1.2.5 and has the java source set to 1.7.</p>
  
  <pre><code>javac -version
  javac 1.7.0_01
  </code></pre>
  
  <p>and</p>
  
  <pre><code>java -version
  java version "1.7.0_01"
  Java&lt;TM&gt; SE Runtime-Environment &lt;build 1.7.0_01-b08&gt;
  </code></pre>
  
  <p>and checked Netbeans everywhere I could an source is 1.7 everywhere I can tell. Compiling via the command line produced the same error described above.</p>
  
  <p>ANSWER?</p>
  
  <p>I updated to the latest version of SunJDK/Java (1.7.0_13) and the issue resolved for me.</p>