Aurélien Pupier created CAMEL-12851:
---------------------------------------

             Summary: 
org.apache.camel.component.validator.CustomSchemaFactoryFeatureTest.testCustomSchemaFactory()
 failing with JDK 10
                 Key: CAMEL-12851
                 URL: https://issues.apache.org/jira/browse/CAMEL-12851
             Project: Camel
          Issue Type: Bug
            Reporter: Aurélien Pupier


creating an issue to discuss a bit more about it.

the code is:

{quote} ValidatorComponent v = new ValidatorComponent();
        v.setCamelContext(context);
        
v.createEndpoint("validator:org/apache/camel/component/validator/unsecuredSchema.xsd?schemaFactory=#MySchemaFactory");
       
        try {
            
v.createEndpoint("validator:org/apache/camel/component/validator/unsecuredSchema.xsd");
            // we should get an security exception in JDK 7 with Oracle or Sun 
JDK
            String jdkVendor = System.getProperty("java.vm.vendor");
            if (jdkVendor != null && (jdkVendor.indexOf("Oracle") > 0 || 
jdkVendor.indexOf("Sun") > 0)) {
                fail("Expect exception here");
            }
        } catch (Exception ex) {
            // do nothing here
        }{quote}

in fact, it seems that there is never an exception that is thrown. it is not 
failing because jdkVendor.indexOf("oracle") returns 0 and the check is against 
> 0. i think it should be > -1

So I would say that there is no exception thrown for a long time, perhaps even 
when it was added (would worth trying to set back to this almost years commit)

There is no bug number so don't know why an exception was expected exactly



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to