Multi-catch: Explanation of final

Paul Benedict pbenedict at apache.org
Wed Nov 25 08:28:55 PST 2009


>> Wouldn't this be an acceptable conclusion to lifting the final variable?
>>
>> catch(IOException|SQLException ex) {
>>   ex = new IllegalArgumentException(); // error since ex is not one
>> of the disjunctive supertypes
>
> Um, the premise here is how to do it without adding disjunctive types to the
> type system.
>

Neal, which of course means the use of "final" would prevent such
re-assignment. Got it.

Paul



More information about the coin-dev mailing list