@Test public void testToMessageIdStringThrowsIAEWithUnexpectedType() { try { AmqpMessageIdHelper.toMessageIdString(new Object()); fail("expected exception not thrown"); } catch (IllegalArgumentException iae) { } }
public static String toMessageIdString(Object idObject) { if (idObject instanceof String) { final String stringId = (String) idObject; boolean hasMessageIdPrefix = hasMessageIdPrefix(stringId); if (!hasMessageIdPrefix) { return JMS_ID_PREFIX + AMQP_NO_PREFIX + stringId; } else if (hasTypeEncodingPrefix(stringId, JMS_ID_PREFIX_LENGTH)) { return JMS_ID_PREFIX + AMQP_STRING_PREFIX + stringId; } else { return stringId; } } else { return convertToIdString(idObject); } }
AmqpMessageIdHelper { public static String toMessageIdString(Object idObject) { if (idObject instanceof String) { final String stringId = (String) idObject; boolean hasMessageIdPrefix = hasMessageIdPrefix(stringId); if (!hasMessageIdPrefix) { return JMS_ID_PREFIX + AMQP_NO_PREFIX + stringId; } else if (hasTypeEncodingPrefix(stringId, JMS_ID_PREFIX_LENGTH)) { return JMS_ID_PREFIX + AMQP_STRING_PREFIX + stringId; } else { return stringId; } } else { return convertToIdString(idObject); } } }
AmqpMessageIdHelper { public static String toMessageIdString(Object idObject) { if (idObject instanceof String) { final String stringId = (String) idObject; boolean hasMessageIdPrefix = hasMessageIdPrefix(stringId); if (!hasMessageIdPrefix) { return JMS_ID_PREFIX + AMQP_NO_PREFIX + stringId; } else if (hasTypeEncodingPrefix(stringId, JMS_ID_PREFIX_LENGTH)) { return JMS_ID_PREFIX + AMQP_STRING_PREFIX + stringId; } else { return stringId; } } else { return convertToIdString(idObject); } }  }
AmqpMessageIdHelper { public static String toMessageIdString(Object idObject) { if (idObject instanceof String) { final String stringId = (String) idObject; boolean hasMessageIdPrefix = hasMessageIdPrefix(stringId); if (!hasMessageIdPrefix) { return JMS_ID_PREFIX + AMQP_NO_PREFIX + stringId; } else if (hasTypeEncodingPrefix(stringId, JMS_ID_PREFIX_LENGTH)) { return JMS_ID_PREFIX + AMQP_STRING_PREFIX + stringId; } else { return stringId; } } else { return convertToIdString(idObject); } }  static boolean hasMessageIdPrefix(String string); static String toMessageIdString(Object idObject); static String toCorrelationIdString(Object idObject); static Object toIdObject(final String origId); static byte[] convertHexStringToBinary(String hexString); static String convertBinaryToHexString(byte[] bytes); }
AmqpMessageIdHelper { public static String toMessageIdString(Object idObject) { if (idObject instanceof String) { final String stringId = (String) idObject; boolean hasMessageIdPrefix = hasMessageIdPrefix(stringId); if (!hasMessageIdPrefix) { return JMS_ID_PREFIX + AMQP_NO_PREFIX + stringId; } else if (hasTypeEncodingPrefix(stringId, JMS_ID_PREFIX_LENGTH)) { return JMS_ID_PREFIX + AMQP_STRING_PREFIX + stringId; } else { return stringId; } } else { return convertToIdString(idObject); } }  static boolean hasMessageIdPrefix(String string); static String toMessageIdString(Object idObject); static String toCorrelationIdString(Object idObject); static Object toIdObject(final String origId); static byte[] convertHexStringToBinary(String hexString); static String convertBinaryToHexString(byte[] bytes); static final String AMQP_STRING_PREFIX; static final String AMQP_UUID_PREFIX; static final String AMQP_ULONG_PREFIX; static final String AMQP_BINARY_PREFIX; static final String AMQP_NO_PREFIX; static final String JMS_ID_PREFIX; }