You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Zoran Regvart (JIRA)" <ji...@apache.org> on 2018/10/05 10:00:00 UTC
[jira] [Commented] (CAMEL-12851)
org.apache.camel.component.validator.CustomSchemaFactoryFeatureTest.testCustomSchemaFactory()
failing with JDK 10
[ https://issues.apache.org/jira/browse/CAMEL-12851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16639589#comment-16639589 ]
Zoran Regvart commented on CAMEL-12851:
---------------------------------------
Also noted here: https://issues.apache.org/jira/browse/CAMEL-12504?focusedCommentId=16531215&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16531215
> 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
> Components: tests
> Reporter: Aurélien Pupier
> Priority: Minor
> Fix For: 2.23.0
>
>
> 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)