Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/663#discussion_r31220469
  
    --- Diff: 
usage/rest-server/src/main/java/brooklyn/rest/security/provider/DelegatingSecurityProvider.java
 ---
    @@ -94,10 +97,16 @@ private synchronized SecurityProvider loadDelegate() {
                     delegate = constructor.newInstance(mgmt);
                 } catch (Exception e) {
                     constructor = clazz.getConstructor();
    -                delegate = constructor.newInstance();
    +                Object delegateO = constructor.newInstance();
    +                if (!(delegateO instanceof SecurityProvider)) {
    +                    // if classloaders get mangled it will be a different 
CL's SecurityProvider
    +                    throw new ClassCastException("Delegate is either not a 
security provider or has an incompatible classloader: "+delegateO);
    --- End diff --
    
    I can't see any reason for it.  Makes sense to me to remove all the 
`target/test-rest-server` references, including in the pom.
    
    It seems to work with them removed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to