ee/src/main/java/org/jboss/as/ee/utils/DescriptorUtils.java
public static String validateDescriptor(String descriptor) {
        if (descriptor.length() == 0) {
            throw EeLogger.ROOT_LOGGER.cannotBeEmpty("descriptors");
        }
        if (descriptor.length() > 1) {
            if (descriptor.startsWith("L")) {
                if (!descriptor.endsWith(";")) {
                    throw EeLogger.ROOT_LOGGER.invalidDescriptor(descriptor);
                }
            } else if (descriptor.startsWith("[")) {

            } else {
                    throw EeLogger.ROOT_LOGGER.invalidDescriptor(descriptor);
            }
        } else {
            char type = descriptor.charAt(0);
            switch (type) {
                case 'I':
                case 'Z':
                case 'S':
                case 'B':
                case 'F':
                case 'D':
                case 'V':
                case 'J':
                case 'C':
                    break;
                default:
                    throw EeLogger.ROOT_LOGGER.invalidDescriptor(descriptor);
            }
        }
        return descriptor;
    }
public static String validateDescriptor(String descriptor) {
        if (descriptor.length() == 0) {
            throw EeLogger.ROOT_LOGGER.cannotBeEmpty("descriptors");
        }
        if (descriptor.length() > 1) {
            if (descriptor.startsWith("L")) {
                if (!descriptor.endsWith(";")) {
                    throw EeLogger.ROOT_LOGGER.invalidDescriptor(descriptor);
                }
            } else if (descriptor.startsWith("[")) {

            } else {
                    throw EeLogger.ROOT_LOGGER.invalidDescriptor(descriptor);
            }
        } else {
            char type = descriptor.charAt(0);
            switch (type) {
                case 'I':
                case 'Z':
                case 'S':
                case 'B':
                case 'F':
                case 'D':
                case 'V':
                case 'J':
                case 'C':
                    break;
                default:
                    throw EeLogger.ROOT_LOGGER.invalidDescriptor(descriptor);
            }
        }
        return descriptor;
    }
public static String validateDescriptor ( String descriptor ) { if ( descriptor . length ( ) == 0 ) { throw EeLogger . ROOT_LOGGER . cannotBeEmpty ( "descriptors" ) ; } if ( descriptor . length ( ) > 1 ) { if ( descriptor . startsWith ( "L" ) ) { if ( ! descriptor . endsWith ( ";" ) ) { throw EeLogger . ROOT_LOGGER . invalidDescriptor ( descriptor ) ; } } else if ( descriptor . startsWith ( "[" ) ) { } else { throw EeLogger . ROOT_LOGGER . invalidDescriptor ( descriptor ) ; } } else { char type = descriptor . charAt ( 0 ) ; switch ( type ) { case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : break ; default : throw EeLogger . ROOT_LOGGER . invalidDescriptor ( descriptor ) ; } } return descriptor ; }
performs basic validation on a descriptor
performs basic validation on a descriptor