naming/src/main/java/org/jboss/as/naming/util/NamingUtils.java
public static boolean isEmpty(final Name name) {
        return name.isEmpty() || (name.size() == 1 && "".equals(name.get(0)));
    }
public static boolean isEmpty(final Name name) {
        return name.isEmpty() || (name.size() == 1 && "".equals(name.get(0)));
    }
Determine if a name is empty, or if ot contains only one component which is the empty string.

@param name the name
@return {@code true} if the name is empty or contains one empty component