mil.dod.th.ose.core/src/mil/dod/th/ose/core/impl/ccomm/AddressManagerServiceImpl.java
private String[] splitDescription(final String addressDescription) throws IllegalArgumentException
    {
        Preconditions.checkNotNull(addressDescription);
        
        final String splitter = ":";
        
        final String[] addressParts = addressDescription.split(splitter, 2);

        final String errorMessage = String.format(
                "The address description [%s] is invalid as it does not contain a prefix and a suffix",
                addressDescription);
        
        if (addressParts.length != 2)
        {
            throw new IllegalArgumentException(errorMessage);
        }
        
        final String prefix = addressParts[0];
        final String suffix = addressParts[1];
        
        if (prefix.isEmpty() || suffix.isEmpty())
        {
            throw new IllegalArgumentException(errorMessage);
        }
        
        return addressParts;
    }
/**
     * Split the address string into a prefix and everything else.
     * @param addressDescription
     *          the address that needs to be split
     * @return
     *          the string, split into two parts
     * @throws IllegalArgumentException
     *         if the address description is null or incomplete
     */
Split the address string into a prefix and everything else.
@param addressDescription
the address that needs to be split
@return
the string, split into two parts
@throws IllegalArgumentException
if the address description is null or incomplete
Split the address string into a prefix and everything else . @param addressDescription the address that needs to be split @return the string split into two parts @throws IllegalArgumentException if the address description is null or incomplete
private String[] splitDescription(final String addressDescription) throws IllegalArgumentException
    {
        Preconditions.checkNotNull(addressDescription);
        final String splitter = ":";
        final String[] addressParts = addressDescription.split(splitter, 2);
        final String errorMessage = String.format(
                "The address description [%s] is invalid as it does not contain a prefix and a suffix",
                addressDescription);
        if (addressParts.length != 2)
        {
            throw new IllegalArgumentException(errorMessage);
        }
        final String prefix = addressParts[0];
        final String suffix = addressParts[1];
        if (prefix.isEmpty() || suffix.isEmpty())
        {
            throw new IllegalArgumentException(errorMessage);
        }
        return addressParts;
    }
private String [ ] splitDescription ( final String addressDescription ) throws IllegalArgumentException { Preconditions . checkNotNull ( addressDescription ) ; final String splitter = ":" ; final String [ ] addressParts = addressDescription . split ( splitter , 2 ) ; final String errorMessage = String . format ( "The address description [%s] is invalid as it does not contain a prefix and a suffix" , addressDescription ) ; if ( addressParts . length != 2 ) { throw new IllegalArgumentException ( errorMessage ) ; } final String prefix = addressParts [ 0 ] ; final String suffix = addressParts [ 1 ] ; if ( prefix . isEmpty ( ) || suffix . isEmpty ( ) ) { throw new IllegalArgumentException ( errorMessage ) ; } return addressParts ; }
Split the address string into a prefix and everything else.
Split the address string into a prefix and everything else .