title: java 8,Lambda Expressions working differently while same javassist is being used
body: <p>I have a list of student, <code>List&lt;Student&gt;</code>
  and I am using javassist-3.9.0.GA jar.</p>
  
  <p>when i am writing <code>list.stream().collect(Collectos.grouping(Student::getCode))</code>
  it is giving <code>Caused by: java.io.IOException: invalid constant type: 18</code> exception. When I change above statement as <code>list.stream().collect(Collectos.grouping(p-&gt;p.getCode()))</code> it works.</p>
  
  <p>Byte code manupulation of <code>p-&gt;p.getCode()</code> and <code>Student::getCode</code> are not same? </p>
  
  <p>how above two statement is working differently while same javassist is being used?</p>
  
  <p>Summary:
  I have a class Like:</p>
  
  <pre><code>class Student{
  
     private String code;
     private String name;
  
  
     public String getCode(){
         return code;
     }
     public void setCode(){
         this.code=code;
     }
  
     public String getName(){
        return name;
     }
     public void setName(String name){
        this.name=name;
     }
  }
  </code></pre>
  
  <p><code>List&lt;Student&gt; studentList=getStudentList();</code></p>
  
  <p>Now below statement is <strong>working fine</strong> on  javassist-3.9.0.GA jar</p>
  
  <pre><code>Map&lt;String,List&lt;TripDetail&gt;&gt; tripMap=studentList.stream().collect(Collectors.groupingBy(p -&gt; p.getCode()));
  </code></pre>
  
  <p>but with the same Jar below statement is giving <code>invalid constant type: 18</code> exception</p>
  
  <pre><code>Map&lt;String,List&lt;TripDetail&gt;&gt; tripMap=studentList.stream().collect(Collectors.groupingBy(Student::getCode));
  </code></pre>
  
  <p>So as per my knowledge <code>p -&gt; p.getCode()</code> and <code>Student::getCode</code> both are same,so either both should give that exception or both should be working.</p>