@Test public void testSetJMSReplyToConversionChecks() throws JMSException { JmsMessageFacade facade = Mockito.mock(JmsMessageFacade.class); JmsMessage message = Mockito.mock(JmsMapMessage.class); Mockito.when(message.getFacade()).thenReturn(facade); try { JmsMessagePropertyIntercepter.setProperty(message, JMS_REPLYTO, new byte[1]); fail("Should have thrown an exception for this call"); } catch (JMSException e) { } }
public static void setProperty(JmsMessage message, String name, Object value) throws JMSException { PropertyIntercepter jmsPropertyExpression = PROPERTY_INTERCEPTERS.get(name); if (jmsPropertyExpression == null || !jmsPropertyExpression.isAlwaysWritable()) { message.checkReadOnlyProperties(); } checkPropertyNameIsValid(name, message.isValidatePropertyNames()); checkValidObject(value); if (jmsPropertyExpression != null) { jmsPropertyExpression.setProperty(message, value); } else { message.getFacade().setProperty(name, value); } }
JmsMessagePropertyIntercepter { public static void setProperty(JmsMessage message, String name, Object value) throws JMSException { PropertyIntercepter jmsPropertyExpression = PROPERTY_INTERCEPTERS.get(name); if (jmsPropertyExpression == null || !jmsPropertyExpression.isAlwaysWritable()) { message.checkReadOnlyProperties(); } checkPropertyNameIsValid(name, message.isValidatePropertyNames()); checkValidObject(value); if (jmsPropertyExpression != null) { jmsPropertyExpression.setProperty(message, value); } else { message.getFacade().setProperty(name, value); } } }
JmsMessagePropertyIntercepter { public static void setProperty(JmsMessage message, String name, Object value) throws JMSException { PropertyIntercepter jmsPropertyExpression = PROPERTY_INTERCEPTERS.get(name); if (jmsPropertyExpression == null || !jmsPropertyExpression.isAlwaysWritable()) { message.checkReadOnlyProperties(); } checkPropertyNameIsValid(name, message.isValidatePropertyNames()); checkValidObject(value); if (jmsPropertyExpression != null) { jmsPropertyExpression.setProperty(message, value); } else { message.getFacade().setProperty(name, value); } }  }
JmsMessagePropertyIntercepter { public static void setProperty(JmsMessage message, String name, Object value) throws JMSException { PropertyIntercepter jmsPropertyExpression = PROPERTY_INTERCEPTERS.get(name); if (jmsPropertyExpression == null || !jmsPropertyExpression.isAlwaysWritable()) { message.checkReadOnlyProperties(); } checkPropertyNameIsValid(name, message.isValidatePropertyNames()); checkValidObject(value); if (jmsPropertyExpression != null) { jmsPropertyExpression.setProperty(message, value); } else { message.getFacade().setProperty(name, value); } }  static Object getProperty(JmsMessage message, String name); static void setProperty(JmsMessage message, String name, Object value); static boolean propertyExists(JmsMessage message, String name); static void clearProperties(JmsMessage message, boolean excludeStandardJMSHeaders); static Set<String> getAllPropertyNames(JmsMessage message); static Set<String> getPropertyNames(JmsMessage message, boolean excludeStandardJMSHeaders); }
JmsMessagePropertyIntercepter { public static void setProperty(JmsMessage message, String name, Object value) throws JMSException { PropertyIntercepter jmsPropertyExpression = PROPERTY_INTERCEPTERS.get(name); if (jmsPropertyExpression == null || !jmsPropertyExpression.isAlwaysWritable()) { message.checkReadOnlyProperties(); } checkPropertyNameIsValid(name, message.isValidatePropertyNames()); checkValidObject(value); if (jmsPropertyExpression != null) { jmsPropertyExpression.setProperty(message, value); } else { message.getFacade().setProperty(name, value); } }  static Object getProperty(JmsMessage message, String name); static void setProperty(JmsMessage message, String name, Object value); static boolean propertyExists(JmsMessage message, String name); static void clearProperties(JmsMessage message, boolean excludeStandardJMSHeaders); static Set<String> getAllPropertyNames(JmsMessage message); static Set<String> getPropertyNames(JmsMessage message, boolean excludeStandardJMSHeaders);  }