src/main/java/org/apereo/cas/security/RequestParameterPolicyEnforcementFilter.java
static Set<Character> parseCharactersToForbid(String paramValue) {

        final Set<Character> charactersToForbid = new HashSet<Character>();

        if (null == paramValue) {
            paramValue = DEFAULT_CHARACTERS_BLOCKED;
        }

        if ("none".equals(paramValue)) {
            return charactersToForbid;
        }

        final String[] tokens = paramValue.split("\\s+");

        if (0 == tokens.length) {
            FilterUtils.logException(LOGGER, new IllegalArgumentException("Expected tokens when parsing [" + paramValue + "] but found no tokens."
                    + " If you really want to configure no characters, use the magic value 'none'."));
        }

        for (final String token : tokens) {

            if (token.length() > 1) {
                FilterUtils.logException(LOGGER, new IllegalArgumentException("Expected tokens of length 1 but found [" + token + "] when " +
                        "parsing [" + paramValue + "]"));
            }

            final Character character = token.charAt(0);
            charactersToForbid.add(character);
        }

        return charactersToForbid;
    }
static Set<Character> parseCharactersToForbid(String paramValue) {

        final Set<Character> charactersToForbid = new HashSet<Character>();

        if (null == paramValue) {
            paramValue = DEFAULT_CHARACTERS_BLOCKED;
        }

        if ("none".equals(paramValue)) {
            return charactersToForbid;
        }

        final String[] tokens = paramValue.split("\\s+");

        if (0 == tokens.length) {
            FilterUtils.logException(LOGGER, new IllegalArgumentException("Expected tokens when parsing [" + paramValue + "] but found no tokens."
                    + " If you really want to configure no characters, use the magic value 'none'."));
        }

        for (final String token : tokens) {

            if (token.length() > 1) {
                FilterUtils.logException(LOGGER, new IllegalArgumentException("Expected tokens of length 1 but found [" + token + "] when " +
                        "parsing [" + paramValue + "]"));
            }

            final Character character = token.charAt(0);
            charactersToForbid.add(character);
        }

        return charactersToForbid;
    }
static Set < Character > parseCharactersToForbid ( String paramValue ) { final Set < Character > charactersToForbid = new HashSet < Character > ( ) ; if ( null == paramValue ) { paramValue = DEFAULT_CHARACTERS_BLOCKED ; } if ( "none" . equals ( paramValue ) ) { return charactersToForbid ; } final String [ ] tokens = paramValue . split ( "\\s+" ) ; if ( 0 == tokens . length ) { FilterUtils . logException ( LOGGER , new IllegalArgumentException ( "Expected tokens when parsing [" + paramValue + "] but found no tokens." + " If you really want to configure no characters, use the magic value 'none'." ) ) ; } for ( final String token : tokens ) { if ( token . length ( ) > 1 ) { FilterUtils . logException ( LOGGER , new IllegalArgumentException ( "Expected tokens of length 1 but found [" + token + "] when " + "parsing [" + paramValue + "]" ) ) ; } final Character character = token . charAt ( 0 ) ; charactersToForbid . add ( character ) ; } return charactersToForbid ; }
Parse a whitespace delimited set of Characters from a String.
<p>
If the String is null (init param was not set) default to DEFAULT_CHARACTERS_BLOCKED.
If the String is "none" parse to empty set meaning block no characters.
If the String is empty throw, to avoid configurer accidentally configuring not to block any characters.

@param paramValue value of the init param to parse
@return non-null Set of zero or more Characters to block
Parse a whitespace delimited set of Characters from a String . <p > If the String is null ( init param was not set ) default to DEFAULT_CHARACTERS_BLOCKED . If the String is none parse to empty set meaning block no characters . If the String is empty throw to avoid configurer accidentally configuring not to block any characters .