Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-12851

org.apache.camel.component.validator.CustomSchemaFactoryFeatureTest.testCustomSchemaFactory() failing with JDK 10

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 3.0.0.RC1
    • tests
    • None
    • Unknown

    Description

      creating an issue to discuss a bit more about it.

      the code is:

      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))

      Unknown macro: { fail("Expect exception here"); }

      } catch (Exception ex)

      Unknown macro: { // do nothing here }

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            apupier Aurélien Pupier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: