Skip to content

Commit c053ff6

Browse files
committed
Fixed NPE.
1 parent d83230e commit c053ff6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/javax/money/AbstractQuery.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public Long getTimestampMillis() {
9898
* @return the current timestamp, or null.
9999
*/
100100
public TemporalAccessor getTimestamp() {
101-
Object value = get(KEY_QUERY_TIMESTAMP, null);
101+
Object value = get(KEY_QUERY_TIMESTAMP, Object.class);
102102
if (value instanceof TemporalAccessor) {
103103
return (TemporalAccessor) value;
104104
} else if (value instanceof Long) {

src/test/java/javax/money/AbstractContextTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public void testGetKeys() {
109109
Set<String> keys = ctx.getKeys(String.class);
110110
assertNotNull(keys);
111111
assertFalse(keys.isEmpty());
112-
assertEquals(String.class, keys.iterator().next());
112+
assertEquals(String.class.getName(), keys.iterator().next());
113113
keys = ctx.getKeys(Integer.class);
114114
assertNotNull(keys);
115115
assertTrue(keys.size() == 2);

0 commit comments

Comments
 (0)