Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-2280

Resolving rule unit classnames depends on File.separator character

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • None
    • 7.5.0.Final
    • core engine
    • NEW
    • NEW

      When running testNamingConventionOnDrlFile test on Windows, it fails on NPE, because the engine cannot find the rule unit "org/kie/test/MyRuleUnit" defined in the test, because it contains "/" separator character. The method that resolves the classname searches for File.separator character in the mentioned string, which is "\" on Windows [1].

      This is a bug, because e.g. MemoryFileSystem uses "/" also when running on Windows. The classname resolution should be OS independent.

      [1] https://github.com/kiegroup/drools/blob/5fad04919f255933bdd34afdb8da10b94f2c8c43/drools-compiler/src/main/java/org/drools/compiler/rule/builder/RuleBuildContext.java#L184

              tzimanyi@redhat.com Tibor Zimányi
              tzimanyi@redhat.com Tibor Zimányi
              Tibor Zimányi Tibor Zimányi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: