avoid double flushing of ObjectOutputStream when close is being called right afterwards anyway

master
Juergen Hoeller 14 years ago
parent 9114f80b68
commit cb434793d5
  1. 3
      org.springframework.web/src/main/java/org/springframework/remoting/httpinvoker/AbstractHttpInvokerRequestExecutor.java
  2. 4
      org.springframework.web/src/main/java/org/springframework/remoting/httpinvoker/HttpInvokerServiceExporter.java

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2008 the original author or authors. * Copyright 2002-2010 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -165,7 +165,6 @@ public abstract class AbstractHttpInvokerRequestExecutor
ObjectOutputStream oos = new ObjectOutputStream(decorateOutputStream(os)); ObjectOutputStream oos = new ObjectOutputStream(decorateOutputStream(os));
try { try {
doWriteRemoteInvocation(invocation, oos); doWriteRemoteInvocation(invocation, oos);
oos.flush();
} }
finally { finally {
oos.close(); oos.close();

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2007 the original author or authors. * Copyright 2002-2010 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -21,7 +21,6 @@ import java.io.InputStream;
import java.io.ObjectInputStream; import java.io.ObjectInputStream;
import java.io.ObjectOutputStream; import java.io.ObjectOutputStream;
import java.io.OutputStream; import java.io.OutputStream;
import javax.servlet.ServletException; import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -172,7 +171,6 @@ public class HttpInvokerServiceExporter extends RemoteInvocationSerializingExpor
ObjectOutputStream oos = createObjectOutputStream(decorateOutputStream(request, response, os)); ObjectOutputStream oos = createObjectOutputStream(decorateOutputStream(request, response, os));
try { try {
doWriteRemoteInvocationResult(result, oos); doWriteRemoteInvocationResult(result, oos);
oos.flush();
} }
finally { finally {
oos.close(); oos.close();

Loading…
Cancel
Save