File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
src/main/java/com/github/fge/jackson Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -95,11 +95,11 @@ public static JsonNodeFactory nodeFactory()
95
95
*/
96
96
public static Map <String , JsonNode > asMap (final JsonNode node )
97
97
{
98
+ final Map <String , JsonNode > ret = Maps .newHashMap ();
98
99
if (!node .isObject ())
99
- return Collections . emptyMap () ;
100
+ return ret ;
100
101
101
102
final Iterator <Map .Entry <String , JsonNode >> iterator = node .fields ();
102
- final Map <String , JsonNode > ret = Maps .newHashMap ();
103
103
104
104
Map .Entry <String , JsonNode > entry ;
105
105
Original file line number Diff line number Diff line change 23
23
import com .github .fge .msgsimple .load .MessageBundles ;
24
24
import com .google .common .collect .ImmutableList ;
25
25
26
- import javax .annotation .concurrent .Immutable ;
27
26
import java .nio .CharBuffer ;
28
27
import java .util .List ;
28
+ import javax .annotation .concurrent .Immutable ;
29
29
30
30
31
31
/**
@@ -55,14 +55,14 @@ public final class ReferenceToken
55
55
/**
56
56
* List of encoding characters in a cooked token
57
57
*/
58
- private static final List <Character > ENCODED = ImmutableList .of ('0' , '1' );
58
+ private static final ImmutableList <Character > ENCODED = ImmutableList .of ('0' , '1' );
59
59
60
60
/**
61
61
* List of sequences to encode in a raw token
62
62
*
63
63
* <p>This list and {@link #ENCODED} have matching indices on purpose.</p>
64
64
*/
65
- private static final List <Character > DECODED = ImmutableList .of ('~' , '/' );
65
+ private static final ImmutableList <Character > DECODED = ImmutableList .of ('~' , '/' );
66
66
67
67
/**
68
68
* The cooked representation of that token
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ public final boolean equals(final Object obj)
90
90
return false ;
91
91
if (this == obj )
92
92
return true ;
93
- if (getClass () != obj . getClass ( ))
93
+ if (!( obj instanceof TokenResolver ))
94
94
return false ;
95
95
final TokenResolver <?> other = (TokenResolver <?>) obj ;
96
96
return token .equals (other .token );
Original file line number Diff line number Diff line change 29
29
import com .google .common .collect .ImmutableList ;
30
30
import com .google .common .collect .Lists ;
31
31
32
- import javax .annotation .concurrent .ThreadSafe ;
33
32
import java .util .Iterator ;
34
33
import java .util .List ;
34
+ import javax .annotation .concurrent .ThreadSafe ;
35
35
36
36
/**
37
37
* A pointer into a {@link TreeNode}
@@ -174,7 +174,7 @@ public final boolean equals(final Object obj)
174
174
return false ;
175
175
if (this == obj )
176
176
return true ;
177
- if (getClass () != obj . getClass ( ))
177
+ if (!( obj instanceof TreePointer ))
178
178
return false ;
179
179
final TreePointer <?> other = (TreePointer <?>) obj ;
180
180
return tokenResolvers .equals (other .tokenResolvers );
You can’t perform that action at this time.
0 commit comments