title: Java Auto Boxing and conditional operator
body: <p>In sonar i see a major violation warning for code </p>
  
  <pre><code>  public Long getValue(FieldType fieldType) {
      Long value = paramLevelMap.get(fieldType); // ok returns Long not long
      return value == null ? UNSPECIFIED_PARAMETER_KEY : value; // complaints here
    } 
  </code></pre>
  
  <p>Where 'UNSPECIFIED_PARAMETER_KEY' is pvt static long , and 'value' is also long.</p>
  
  <blockquote>
    <p>Boxed value is unboxed and then immediately reboxed</p>
  </blockquote>
  
  <p>Its complaining on the 2nd line. I didn't quite understand it , when &amp; how is primitive long being converted to corresponding class object ? and back ?</p>