[windup-dev] Query.fromType(...).has() ignores has()?

Ondrej Zizka ozizka at redhat.com
Mon Oct 19 20:13:25 EDT 2015


Hi,

In BeforeDecompileClassesRuleProvider, I have

         .addRule()
         .when(Query.fromType(JavaClassFileModel.class)
                 .withoutProperty(FileModel.PARSE_ERROR)
         )
         .perform(new ClassFilePreDecompilationScan());

which translates to (verified)  :

         case NOT_DEFINED:
             pipeline.hasNot(this.propertyName);
             break;

And yet, when this query is executed, it iterates over a vertex:

Failed when iterating [v[76032]={skipDecompilation: true, isDirectory: 
false, filePath: 
/tmp/Windup/resJee2d/archives/jee-example-services.jar/com/NonParsable.class, 
fileName: NonParsable.class, w:vertextype: [FileResource, 
JavaClassFileModel], parseError: BCEL was unable to parse class file 
'/tmp/Windup/resJee2d/archives/jee-example-services.jar/com/NonParsable.class':
/tmp/Windup/resJee2d/archives/jee-example-services.jar/com/NonParsable.class 
is not a Java .class file}]:

As you may notice, the "parseError" is set.
Any idea why the hasNot() is ignored?

Thanks,
Ondra


More information about the windup-dev mailing list