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

Ondrej Zizka ozizka at redhat.com
Mon Oct 19 20:39:01 EDT 2015


Right, of course, ID-10-T error :)  The exception message is being 
constructed after the parsing error occurs and the parseError is set.
So the vertex has that property, and during the query it doesn't have.

Good night,
Ondra



On 20.10.2015 02:21, Brad Davis wrote:
> Did you check the phase? Maybe it's executed before the parse error property is set?
>
> Sent from my iPhone
>
>> On Oct 19, 2015, at 8:13 PM, Ondrej Zizka <ozizka at redhat.com> wrote:
>>
>> 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
>> _______________________________________________
>> windup-dev mailing list
>> windup-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/windup-dev
> _______________________________________________
> windup-dev mailing list
> windup-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/windup-dev



More information about the windup-dev mailing list