()
| 96 | } |
| 97 | |
| 98 | protected static final Optional<?>[] save() { |
| 99 | if (threadLocal == null) |
| 100 | return EMPTY; |
| 101 | else { |
| 102 | Optional<?>[] state = threadLocal.get(); |
| 103 | if (state == null) |
| 104 | return EMPTY; |
| 105 | else |
| 106 | return state; |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | protected static final void restore(final Optional<?>[] saved) { |
| 111 | if (threadLocal != null) |