- Use runtime casts and casted instanceof to workaround related bugs in JDK versions prior to 1.5.0_08.
These changes were ok'ed by Matt on condition that once Mac users have fixed JDK release i agree to
track and remove all that "just plain ugly" stuff.
| | |
| | | * definition is the {@link TopCfgDefn}. |
| | | */ |
| | | public final boolean isTop() { |
| | | return (this == TopCfgDefn.getInstance()); |
| | | // Casting to Object and instanceof check are required |
| | | // to workaround a bug in JDK versions prior to 1.5.0_08. |
| | | return ((Object) this instanceof TopCfgDefn); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | for (PropertyDefinition<?> pd : d.getAllPropertyDefinitions()) { |
| | | if (pd instanceof AggregationPropertyDefinition) { |
| | | // Runtime cast is required to workaround a |
| | | // bug in JDK versions prior to 1.5.0_08. |
| | | AggregationPropertyDefinition<?, ?> apd = |
| | | (AggregationPropertyDefinition<?, ?>) pd; |
| | | AggregationPropertyDefinition.class.cast(pd); |
| | | |
| | | // Skip this aggregation if it doesn't have an enable |
| | | // property. |
| | |
| | | |
| | | for (PropertyDefinition<?> pd : d.getAllPropertyDefinitions()) { |
| | | if (pd instanceof AggregationPropertyDefinition) { |
| | | // Runtime cast is required to workaround a |
| | | // bug in JDK versions prior to 1.5.0_08. |
| | | AggregationPropertyDefinition<?, ?> apd = |
| | | (AggregationPropertyDefinition<?, ?>) pd; |
| | | AggregationPropertyDefinition.class.cast(pd); |
| | | |
| | | // Skip this aggregation if it doesn't have an enable |
| | | // property. |