We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5509eb7 commit 9f52fe4Copy full SHA for 9f52fe4
1 file changed
src/main/java/org/apache/commons/io/IOUtils.java
@@ -144,7 +144,10 @@ public class IOUtils {
144
145
// Allocated in the relevant skip method if necessary.
146
/*
147
- * N.B. no need to synchronize these because:
+ * These buffers are static and are shared between threads.
148
+ * This is possible because the buffers are write-only - the contents are never read.
149
+ *
150
+ * N.B. there is no need to synchronize when creating these because:
151
* - we don't care if the buffer is created multiple times (the data is ignored)
152
* - we always use the same size buffer, so if it it is recreated it will still be OK
153
* (if the buffer size were variable, we would need to synch. to ensure some other thread
0 commit comments