public void removeAttribute(String name) {
    if (name == null || name.length() < 1) {
      return;
    }
    synchronized (attributes) {
      List attributesList = new ArrayList(attributes.length);
      for (final AttributeInfo attribute : attributes) {
        if (!name.equals(attribute.getName())) {
          attributesList.add(attribute);
        }
      }
      attributes =
          (AttributeInfo[]) attributesList.toArray(new AttributeInfo[0]);

      /*
       * super.info should be nulled out anytime the structure is changed, such as altering the
       * attributes, operations, or notifications
       *
       * however super.info is private, so we need the following hack to cause the super class to
       * null it out for us...
       */
      setType(type); // causes this in super: "this.info = null;"
    }
  }
Removes an attribute from this ManagedBean's attribute descriptor list.

@param name the attribute to be removed
geode-core/src/main/java/org/apache/geode/admin/jmx/internal/DynamicManagedBean.java