File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
src/main/java/com/fasterxml/jackson/core/util Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 7
7
/**
8
8
* Helper entity used to control access to simple buffer recyling scheme used for
9
9
* some encoding, decoding tasks.
10
- *
10
+ *
11
11
* @see BufferRecycler
12
12
* @see JsonStringEncoder
13
13
*
@@ -36,10 +36,13 @@ public class BufferRecyclers
36
36
*/
37
37
private final static ThreadLocalBufferManager _bufferRecyclerTracker ;
38
38
static {
39
- _bufferRecyclerTracker = "true" .equals (System .getProperty (SYSTEM_PROPERTY_TRACK_REUSABLE_BUFFERS ))
40
- ? ThreadLocalBufferManager .instance ()
41
- : null ;
42
- }
39
+ boolean trackReusableBuffers = false ;
40
+ try {
41
+ trackReusableBuffers = "true" .equals (System .getProperty (SYSTEM_PROPERTY_TRACK_REUSABLE_BUFFERS ));
42
+ } catch (SecurityException e ) { }
43
+
44
+ _bufferRecyclerTracker = trackReusableBuffers ? ThreadLocalBufferManager .instance () : null ;
45
+ }
43
46
44
47
/*
45
48
/**********************************************************
You can’t perform that action at this time.
0 commit comments