private void validateContextName(String name) {
		if (name == null || name.isEmpty()) {
			throw new IllegalContextNameException(
					IllegalContextNameException.Reason.EMPTY_NAME,
					"The context name must not be null nor empty.");
		}

		if (getContext(name) != null) {
			throw new IllegalContextNameException(
					IllegalContextNameException.Reason.DUPLICATED_NAME,
					"A context with the given name [" + name + "] already exists.");
		}
	}
private void validateContextName ( String name ) { if ( name == null || name . isEmpty ( ) ) { throw new IllegalContextNameException ( IllegalContextNameException . Reason . EMPTY_NAME , "The context name must not be null nor empty." ) ; } if ( getContext ( name ) != null ) { throw new IllegalContextNameException ( IllegalContextNameException . Reason . DUPLICATED_NAME , "A context with the given name [" + name + "] already exists." ) ; } }
Validates the given name is not {@code null} nor empty and that no context already exists with the given name.

@param name the name to be validated
@throws IllegalContextNameException if the given name is {@code null} or empty or if a context with the given name
already exists.