@Test(expected = IllegalArgumentException.class) public void testCheckPropertyNameIsValidWithNullName() throws JMSException { JMSMessagePropertySupport.checkPropertyNameIsValid(null, true); }
public static void checkPropertyNameIsValid(String propertyName, boolean validateNames) throws IllegalArgumentException { if (propertyName == null) { throw new IllegalArgumentException("Property name must not be null"); } else if (propertyName.length() == 0) { throw new IllegalArgumentException("Property name must not be the empty string"); } if (validateNames) { checkIdentifierLetterAndDigitRequirements(propertyName); checkIdentifierIsntNullTrueFalse(propertyName); checkIdentifierIsntLogicOperator(propertyName); } }
JMSMessagePropertySupport { public static void checkPropertyNameIsValid(String propertyName, boolean validateNames) throws IllegalArgumentException { if (propertyName == null) { throw new IllegalArgumentException("Property name must not be null"); } else if (propertyName.length() == 0) { throw new IllegalArgumentException("Property name must not be the empty string"); } if (validateNames) { checkIdentifierLetterAndDigitRequirements(propertyName); checkIdentifierIsntNullTrueFalse(propertyName); checkIdentifierIsntLogicOperator(propertyName); } } }
JMSMessagePropertySupport { public static void checkPropertyNameIsValid(String propertyName, boolean validateNames) throws IllegalArgumentException { if (propertyName == null) { throw new IllegalArgumentException("Property name must not be null"); } else if (propertyName.length() == 0) { throw new IllegalArgumentException("Property name must not be the empty string"); } if (validateNames) { checkIdentifierLetterAndDigitRequirements(propertyName); checkIdentifierIsntNullTrueFalse(propertyName); checkIdentifierIsntLogicOperator(propertyName); } }  }
JMSMessagePropertySupport { public static void checkPropertyNameIsValid(String propertyName, boolean validateNames) throws IllegalArgumentException { if (propertyName == null) { throw new IllegalArgumentException("Property name must not be null"); } else if (propertyName.length() == 0) { throw new IllegalArgumentException("Property name must not be the empty string"); } if (validateNames) { checkIdentifierLetterAndDigitRequirements(propertyName); checkIdentifierIsntNullTrueFalse(propertyName); checkIdentifierIsntLogicOperator(propertyName); } }  @SuppressWarnings("unchecked") static T convertPropertyTo(String name, Object value, Class<T> target); static void checkPropertyNameIsValid(String propertyName, boolean validateNames); static void checkIdentifierIsntLogicOperator(String identifier); static void checkIdentifierIsntNullTrueFalse(String identifier); static void checkIdentifierLetterAndDigitRequirements(String identifier); static void checkValidObject(Object value); }
JMSMessagePropertySupport { public static void checkPropertyNameIsValid(String propertyName, boolean validateNames) throws IllegalArgumentException { if (propertyName == null) { throw new IllegalArgumentException("Property name must not be null"); } else if (propertyName.length() == 0) { throw new IllegalArgumentException("Property name must not be the empty string"); } if (validateNames) { checkIdentifierLetterAndDigitRequirements(propertyName); checkIdentifierIsntNullTrueFalse(propertyName); checkIdentifierIsntLogicOperator(propertyName); } }  @SuppressWarnings("unchecked") static T convertPropertyTo(String name, Object value, Class<T> target); static void checkPropertyNameIsValid(String propertyName, boolean validateNames); static void checkIdentifierIsntLogicOperator(String identifier); static void checkIdentifierIsntNullTrueFalse(String identifier); static void checkIdentifierLetterAndDigitRequirements(String identifier); static void checkValidObject(Object value);  }