title: Incoparable Java Types boolean and object
body: <p>I have this piece of code which worked in Java 6</p>
  
  <pre><code>if(false==sess.getAttribute("admin") || null==sess.getAttribute("admin"))
          {
              res.sendRedirect("/myapp/login.jsp?errmsg=You must log in as an administrator to manage resources");
              return;
          }
  </code></pre>
  
  <p>I want to familiarize myself with the new features of Java 7 and what it offers new in javaee hence I upgraded netbeans to 7.4 and jdk 7u45.
  My project opened successfully however the file with this code is marked as a java class with an error by netbeans. Running the project I get the error</p>
  
  <pre><code>java.lang.RuntimeException: Uncompilable source code - incomparable types: boolean and java.lang.Object 
  </code></pre>
  
  <p>What I want to ask is why this worked in java6 and doesn't work in java7</p>
  
  <p><strong>FYI</strong> <code>HttpSession sess = req.getSession();</code></p>