File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/java.logging/share/classes/java/util/logging Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -231,6 +231,7 @@ public void publish(LogRecord record) {
231231 }
232232 }
233233 }
234+
234235 private void publish0 (LogRecord record ) {
235236 if (!isLoggable (record )) {
236237 return ;
@@ -246,6 +247,7 @@ private void publish0(LogRecord record) {
246247 }
247248
248249 try {
250+ Writer writer = this .writer ;
249251 if (!doneHeader ) {
250252 writer .write (getFormatter ().getHead (this ));
251253 doneHeader = true ;
@@ -295,7 +297,9 @@ public void flush() {
295297 }
296298 }
297299 }
300+
298301 private void flush0 () {
302+ Writer writer = this .writer ;
299303 if (writer != null ) {
300304 try {
301305 writer .flush ();
@@ -309,6 +313,7 @@ private void flush0() {
309313
310314 private void flushAndClose () throws SecurityException {
311315 checkPermission ();
316+ Writer writer = this .writer ;
312317 if (writer != null ) {
313318 try {
314319 if (!doneHeader ) {
@@ -323,8 +328,8 @@ private void flushAndClose() throws SecurityException {
323328 // report the exception to any registered ErrorManager.
324329 reportError (null , ex , ErrorManager .CLOSE_FAILURE );
325330 }
326- writer = null ;
327331 output = null ;
332+ this .writer = null ;
328333 }
329334 }
330335
You can’t perform that action at this time.
0 commit comments