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 5
5
/**
6
6
* Helper entity used to control access to simple buffer recyling scheme used for
7
7
* some encoding, decoding tasks.
8
- *
8
+ *
9
9
* @see BufferRecycler
10
10
*
11
11
* @since 2.9.2
@@ -33,10 +33,13 @@ public class BufferRecyclers
33
33
*/
34
34
private final static ThreadLocalBufferManager _bufferRecyclerTracker ;
35
35
static {
36
- _bufferRecyclerTracker = "true" .equals (System .getProperty (SYSTEM_PROPERTY_TRACK_REUSABLE_BUFFERS ))
37
- ? ThreadLocalBufferManager .instance ()
38
- : null ;
39
- }
36
+ boolean trackReusableBuffers = false ;
37
+ try {
38
+ trackReusableBuffers = "true" .equals (System .getProperty (SYSTEM_PROPERTY_TRACK_REUSABLE_BUFFERS ));
39
+ } catch (SecurityException e ) { }
40
+
41
+ _bufferRecyclerTracker = trackReusableBuffers ? ThreadLocalBufferManager .instance () : null ;
42
+ }
40
43
41
44
/*
42
45
/**********************************************************
You can’t perform that action at this time.
0 commit comments