mirror of
https://github.com/apache/poi.git
synced 2026-02-27 20:40:08 +08:00
[bug-69714] refactor thread-local
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926472 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f51cff5e76
commit
779358f309
@ -120,7 +120,12 @@ public final class TempFile {
|
||||
}
|
||||
|
||||
private static TempFileCreationStrategy getStrategy() {
|
||||
TempFileCreationStrategy s = threadLocalStrategy.get();
|
||||
return s == null ? strategy : s;
|
||||
final TempFileCreationStrategy s = threadLocalStrategy.get();
|
||||
if (s == null) {
|
||||
threadLocalStrategy.remove();
|
||||
return strategy;
|
||||
} else {
|
||||
return s;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user