[bug-69714] refactor thread-local

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1926469 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2025-06-16 12:05:42 +00:00
parent 4080ab8f3f
commit 2ceb5f9020

View File

@ -63,7 +63,11 @@ public final class TempFile {
* @since POI 5.4.2
*/
public static void setThreadLocalTempFileCreationStrategy(TempFileCreationStrategy strategy) {
threadLocalStrategy.set(strategy);
if (strategy == null) {
threadLocalStrategy.remove();
} else {
threadLocalStrategy.set(strategy);
}
}
/**