Code example for Splitter

Methods: split

0
        return attribute;
    } 
 
    private RpslAttribute replaceEmail(final AttributeType attributeType, final RpslAttribute attribute) {
        if (EMAIL_ATTRIBUTES.contains(attributeType)) {
            Iterator it = EMAIL_SPLITTER.split(attribute.getCleanValue().toString()).iterator();
            it.next();
            return new RpslAttribute(attributeType, "***@" + it.next());
        } 
        return attribute;
    } 
 
    // TODO: [AH] we should relay on a single implementation of Authentication Filter; this method duplicates FilterAuthFunction 
    private RpslAttribute replaceAuth(final AttributeType attributeType, final RpslAttribute attribute) {
        if (attributeType != AUTH) {
            return attribute;
        } 
 
        String passwordType = SPACE_SPLITTER.split(attribute.getCleanValue().toUpperCase()).iterator().next();
        if (passwordType.endsWith("-PW") || passwordType.startsWith("SSO")) {     // history table has CRYPT-PW, has to be able to dummify that too!
Stop searching for code, let great code find you!  Add Codota to your java IDE