Thu 10 Jul 2014 03:11:43 PM UTC, comment #3:
> The Exception was not about a kawa-generated field, but one in the Eclipse classes.
I know, I though it was clear in my first email, sorry.
> I actually checked in two fixes, either of which should work, but both make sense for performance reasons
I don't think it's enough. It will work with this particular test case, but if another similar classes is encountered, but this time has a protected or public field, it will still fail.
The `rfield.getGenericType()` now in `gnu/bytecode/Field.java` will still throw an exception in such potential case.
It sure it ain't Kawa faults if the class is malformed, but Kawa should deal with it the best it can.
The call to `getGenericType` should be wrap in a try/catch to traps `MalformedParameterizedTypeException` and act accordingly when it happens. When such exception is raised, Kawa could assume the field is not generic, assume the field's generic type is Object or stop compilation with a more "user-friendly" message.
|