@Test public void testJMSCorrelationIDNotInGetPropertyNamesWhenNotSet() throws JMSException { JmsMessageFacade facade = Mockito.mock(JmsMessageFacade.class); JmsMessage message = Mockito.mock(JmsMapMessage.class); Mockito.when(message.getFacade()).thenReturn(facade); assertFalse(JmsMessagePropertyIntercepter.getPropertyNames(message, false).contains(JMS_CORRELATIONID)); }
public static Set<String> getPropertyNames(JmsMessage message, boolean excludeStandardJMSHeaders) throws JMSException { Set<String> names = new HashSet<String>(); for (Entry<String, PropertyIntercepter> entry : PROPERTY_INTERCEPTERS.entrySet()) { if (excludeStandardJMSHeaders && STANDARD_HEADERS.contains(entry.getKey())) { continue; } if (entry.getValue().propertyExists(message)) { names.add(entry.getKey()); } } for (String name : message.getFacade().getPropertyNames()) { try { checkPropertyNameIsValid(name, message.isValidatePropertyNames()); } catch (IllegalArgumentException iae) { continue; } names.add(name); } return names; }
JmsMessagePropertyIntercepter { public static Set<String> getPropertyNames(JmsMessage message, boolean excludeStandardJMSHeaders) throws JMSException { Set<String> names = new HashSet<String>(); for (Entry<String, PropertyIntercepter> entry : PROPERTY_INTERCEPTERS.entrySet()) { if (excludeStandardJMSHeaders && STANDARD_HEADERS.contains(entry.getKey())) { continue; } if (entry.getValue().propertyExists(message)) { names.add(entry.getKey()); } } for (String name : message.getFacade().getPropertyNames()) { try { checkPropertyNameIsValid(name, message.isValidatePropertyNames()); } catch (IllegalArgumentException iae) { continue; } names.add(name); } return names; } }
JmsMessagePropertyIntercepter { public static Set<String> getPropertyNames(JmsMessage message, boolean excludeStandardJMSHeaders) throws JMSException { Set<String> names = new HashSet<String>(); for (Entry<String, PropertyIntercepter> entry : PROPERTY_INTERCEPTERS.entrySet()) { if (excludeStandardJMSHeaders && STANDARD_HEADERS.contains(entry.getKey())) { continue; } if (entry.getValue().propertyExists(message)) { names.add(entry.getKey()); } } for (String name : message.getFacade().getPropertyNames()) { try { checkPropertyNameIsValid(name, message.isValidatePropertyNames()); } catch (IllegalArgumentException iae) { continue; } names.add(name); } return names; }  }
JmsMessagePropertyIntercepter { public static Set<String> getPropertyNames(JmsMessage message, boolean excludeStandardJMSHeaders) throws JMSException { Set<String> names = new HashSet<String>(); for (Entry<String, PropertyIntercepter> entry : PROPERTY_INTERCEPTERS.entrySet()) { if (excludeStandardJMSHeaders && STANDARD_HEADERS.contains(entry.getKey())) { continue; } if (entry.getValue().propertyExists(message)) { names.add(entry.getKey()); } } for (String name : message.getFacade().getPropertyNames()) { try { checkPropertyNameIsValid(name, message.isValidatePropertyNames()); } catch (IllegalArgumentException iae) { continue; } names.add(name); } return names; }  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 Set<String> getPropertyNames(JmsMessage message, boolean excludeStandardJMSHeaders) throws JMSException { Set<String> names = new HashSet<String>(); for (Entry<String, PropertyIntercepter> entry : PROPERTY_INTERCEPTERS.entrySet()) { if (excludeStandardJMSHeaders && STANDARD_HEADERS.contains(entry.getKey())) { continue; } if (entry.getValue().propertyExists(message)) { names.add(entry.getKey()); } } for (String name : message.getFacade().getPropertyNames()) { try { checkPropertyNameIsValid(name, message.isValidatePropertyNames()); } catch (IllegalArgumentException iae) { continue; } names.add(name); } return names; }  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);  }