[Soot-list] "Operands in conditional operator does not match" using Soot eclipse plug-in

Joe Siponen joe.siponen at gmail.com
Wed Dec 2 06:26:00 EST 2009


The type of productiontotal is a primitive wrapper class for an integer:

private Integer productiontotal;

So, to my understanding, it should accept a null for its value as well as any integer value (both a primitive int or a Integer wrapper due to autoboxing in java 5 and onwards).


On Dec 2, 2009, at 11:23 , Jochen Wuttke wrote:

> 
> On Dec 2, 2009, at 11:09 AM, Joe Siponen wrote:
> 
>> Yes, the file is perfectly valid and fine otherwise.
>> 
>> All of the lines causing the semantic errors are simple ternary expression of the form "this.productiontotal = (productiontotal == null) ? null : productiontotal.intValue();" and all of these expressions reside in the same method (the original post includes the full method).
>> 
>> I cannot see why Soot's JastAdd frontend would fail to parse ternary expressions...
> 
> Well, the code above is not valid Java, that may be why (your assigning either an int or reference to the same attribute. AFAIK the JAVA compiler should tell you that that's wrong.
> 
> Not sure though, if this is the real reason for JastAdd to fail.
> 
> J.



More information about the Soot-list mailing list