File tree 1 file changed +4
-6
lines changed
src/main/java/com/fasterxml/jackson/core/util
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 1
1
package com .fasterxml .jackson .core .util ;
2
2
3
- import java .util .LinkedHashMap ;
4
3
import java .util .concurrent .ConcurrentHashMap ;
5
4
6
5
/**
7
- * Singleton class that adds a simple first-level cache in front of
8
- * regular String.intern() functionality. This is done as a minor
9
- * performance optimization, to avoid calling native intern() method
6
+ * Singleton class that adds string deduplication functionality.
7
+ * This is done as a minor performance optimization, to avoid extra memory footprint
10
8
* in cases where same String is being interned multiple times.
11
9
*<p>
12
- * Note: that this class extends {@link LinkedHashMap } is an implementation
10
+ * Note: that this class extends {@link ConcurrentHashMap } is an implementation
13
11
* detail -- no code should ever directly call Map methods.
14
12
*/
15
13
@ SuppressWarnings ("serial" )
@@ -58,7 +56,7 @@ public String intern(String input) {
58
56
}
59
57
}
60
58
}
61
- result = input . intern () ;
59
+ result = input ;
62
60
put (result , result );
63
61
return result ;
64
62
}
You can’t perform that action at this time.
0 commit comments