mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

abobrov
20.58.2007 45d74a617ec7e631da286648024bc84fad984479
- 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.
3 files modified
12 ■■■■ changed files
opends/src/server/org/opends/server/admin/AbstractManagedObjectDefinition.java 4 ●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/dsconfig/CreateSubCommandHandler.java 4 ●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/dsconfig/SetPropSubCommandHandler.java 4 ●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/admin/AbstractManagedObjectDefinition.java
@@ -667,7 +667,9 @@
   *         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);
  }
opends/src/server/org/opends/server/tools/dsconfig/CreateSubCommandHandler.java
@@ -456,8 +456,10 @@
    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.
opends/src/server/org/opends/server/tools/dsconfig/SetPropSubCommandHandler.java
@@ -342,8 +342,10 @@
    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.