peichhorn/lombok-pg — Issue #28: Yield(er) unused warning(s)
Author: nicholas22
Created: 2011-10-08 08:29:51+00:00
State: open

Yield generates a field for caught exceptions that could potentially be annotated with @SupressWarning("unused") to prevent eclipse to emit a warning about its lack of use:

Warning: The value of the field $YielderOfType.cce is not used

Code:

public static Iterable ofType(final Iterable values, final Class destinationClass)
{
for(TSource item : values)
{
TDest temp = null;
try
{
temp = destinationClass.cast(item);
}
catch(ClassCastException cce)
{
}

yield(temp);
}
}