title: Exception in StringConcatFactory - Java 9
body: <p>While learning java9 <code>StringConcatFactory</code> class I am unable to understand why following code with  <code>MethodHandles.publicLookup()</code> throws  <code>StringConcatException</code> exception while if <code>MethodHandles.lookup()</code> is used everything is working fine.</p>
  
  <p>As per java docs of lookup:</p>
  
  <blockquote>
    <p>"lookup - Represents a lookup context with the accessibility
    privileges of the caller"</p>
  </blockquote>
  
  <pre><code>StringConcatFactory.makeConcat(MethodHandles.publicLookup(),
  "abc",MethodType.methodType(String.class));//Exception Here
  
  
  StringConcatFactory.makeConcat(MethodHandles.lookup(), 
  "abc", MethodType.methodType(String.class)); //Working fine
  </code></pre>
  
  <p>I am not sure where I am mistaken? Please help me understand this behavior.</p>