- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {DateTime d =
new DateTime()
DateTimeFormatter formatter;String text;formatter.parseDateTime(text)
Object instant;new DateTime(instant)
- Smart code suggestions by Codota
}
@Test public void testEntryNotModified() { Map<String, Object> entries = new HashMap<>(); entries.put(KEY, VALUE); JaxbMap jaxbMap = new JaxbMap(entries); assertThat(jaxbMap.getEntries()).containsKey(KEY); assertThat(entries).containsEntry(KEY, VALUE); }
public static Object wrapSkipPrimitives(Object object) { if (object == null) { return null; } if (object instanceof List) { return new JaxbList((List) object); } else if (object instanceof Map) { return new JaxbMap((Map) object); } else if (object instanceof Date) { return new JaxbDate((Date) object); } else if (object instanceof CommandScript) { for (KieServerCommand cmd : ((CommandScript) object).getCommands()) { if (cmd instanceof DescriptorCommand) { List<Object> arguments = new ArrayList<Object>(); for (Object o : ((DescriptorCommand) cmd).getArguments()) { arguments.add(wrap(o)); } ((DescriptorCommand) cmd).setArguments(arguments); } } } return object; }
@Test public void testImmutableMap() { Map<String, Object> entries = Collections.singletonMap(KEY, VALUE); // used to throw UnsupportedOperationException here JaxbMap jaxbMap = new JaxbMap(entries); assertThat(jaxbMap.getEntries()).containsKey(KEY); }