title: Spring Security UsernamePasswordAuthenticationToken throws Exception before invoking super class method
body: <p>Why would one calls the super class method after an exception occurs? And if the exception occurs, the call stack would returns to the caller instead of executing the super class method?</p>
  
  <pre><code>public void setAuthenticated(boolean isAuthenticated) throws IllegalArgumentException {
          if (isAuthenticated) {
              throw new IllegalArgumentException(
                      "Cannot set this token to trusted - use constructor which takes a GrantedAuthority list instead");
          }
  
          super.setAuthenticated(false);
      }
  </code></pre>
  
  <p><a href="https://github.com/spring-projects/spring-security/blob/master/core/src/main/java/org/springframework/security/authentication/UsernamePasswordAuthenticationToken.java" rel="nofollow noreferrer">https://github.com/spring-projects/spring-security/blob/master/core/src/main/java/org/springframework/security/authentication/UsernamePasswordAuthenticationToken.java</a> </p>