diff options
Diffstat (limited to 'java/src/Ice/UserExceptionWriter.java')
-rw-r--r-- | java/src/Ice/UserExceptionWriter.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/java/src/Ice/UserExceptionWriter.java b/java/src/Ice/UserExceptionWriter.java index d05e3387101..4b4909cc215 100644 --- a/java/src/Ice/UserExceptionWriter.java +++ b/java/src/Ice/UserExceptionWriter.java @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. @@ -25,7 +25,11 @@ public abstract class UserExceptionWriter extends UserException public void __write(IceInternal.BasicStream os) { - OutputStream stream = new OutputStreamI(_communicator, os); + OutputStream stream = (OutputStream)os.closure(); + if(stream == null) + { + stream = new OutputStreamI(_communicator, os); + } write(stream); } |