title: Scala converters convert Java collections to Wrapper objects
body: <p>I have a scala function which returns a <code>util.Map[String], util.Set[String]</code>.</p>
  
  <pre><code>def getAcls(): Map[String, Set[String]] = {
  ((for (groupRole: GroupRoleAccess &lt;- groupRoleAccess;
       user &lt;- groupService.getGroup(groupRole.groupId).getUsers;
       permissions = roleService.getRole(groupRole.roleId)  .getPermissions)
    yield user.getUserId -&gt; permissions).groupBy(_._1).map { case (k,v) =&gt; (k, v.flatMap(_._2).asJava)})
  }
  </code></pre>
  
  <p>I am simply calling this method on a set of these objects to get a <code>util.Set[util.Map[String], util.Set[String]]</code>.</p>
  
  <pre><code>var unevaluatedacls = for (aclTemplate &lt;- aclTemplates)
    yield aclTemplate.getAcls
  </code></pre>
  
  <p>When I inspect <code>unevaluatedacls</code>, I see that it is of the type <code>HashSet</code>. But its elements are of the type  <code>Wrappers$MapWrapper</code> instead of <code>util.Map</code>. As a result of this, I am unable to persist this object. I cannot understand this behavior. When I try </p>
  
  <pre><code>var unevaluatedacls = (for (aclTemplate &lt;- aclTemplates)
    yield aclTemplate.getAcls).asJava
  </code></pre>
  
  <p>the <code>unevaluatedacls</code> also changes to <code>Wrapper$SetWrapper</code>. Is it because I am somehow trying to convert immutable scala collections to java collections? I know that only mutable scala collections are compatible to be converted to corresponding java collections using <code>JavaConverters</code></p>