title: Spring Security add Authorities
body: <p>We have migrated from Spring security 3.0.5 to 3.2.5. We were using below code for adding authorities.</p>
  
  <pre><code> UserDetails loadedUser = new UserDetails();
   loadedUser.getAuthorities().add(new GrantedAuthorityImpl("ROLE_ADMIN"));
  </code></pre>
  
  <p>Now this code is giving below error</p>
  
  <p>The method add(capture#1-of ? extends GrantedAuthority) in the type Collection is not applicable for the arguments (GrantedAuthorityImpl)</p>
  
  <p>Can some one please help me with this issue ?</p>