JETTY-1157 Do not hold array passed in write bytes

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1147 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Greg Wilkins 2009-12-11 22:22:51 +00:00
parent 845443322b
commit 07e3fa3ac2
3 changed files with 7 additions and 3 deletions

View File

@ -4,6 +4,7 @@ jetty-7.0.2-SNAPSHOT
+ 296765 JMX Connector Server and ShutdownThread + 296765 JMX Connector Server and ShutdownThread
+ 297421 Hide server/system classes from WebAppClassLoader.getResources + 297421 Hide server/system classes from WebAppClassLoader.getResources
+ JETTY-1156 SSL blocking close with JVM Bug busy key fix + JETTY-1156 SSL blocking close with JVM Bug busy key fix
+ JETTY-1157 Don't hold array passed in write(byte[])
jetty-7.0.1.v20091125 25 November 2009 jetty-7.0.1.v20091125 25 November 2009
+ 274251 DefaultServlet supports exact match mode. + 274251 DefaultServlet supports exact match mode.

View File

@ -84,6 +84,7 @@ public class HttpOutput extends ServletOutputStream
{ {
_buf.wrap(b, off, len); _buf.wrap(b, off, len);
write(_buf); write(_buf);
_buf.wrap(AbstractGenerator.NO_BYTES);
} }
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
@ -95,6 +96,7 @@ public class HttpOutput extends ServletOutputStream
{ {
_buf.wrap(b); _buf.wrap(b);
write(_buf); write(_buf);
_buf.wrap(AbstractGenerator.NO_BYTES);
} }
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */

View File

@ -500,9 +500,9 @@ public class JSON
} }
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
protected Map newMap() protected Map<String,Object> newMap()
{ {
return new HashMap(); return new HashMap<String,Object>();
} }
/* ------------------------------------------------------------ */ /* ------------------------------------------------------------ */
@ -511,6 +511,7 @@ public class JSON
return new Object[size]; return new Object[size];
} }
/* ------------------------------------------------------------ */
protected JSON contextForArray() protected JSON contextForArray()
{ {
return this; return this;
@ -817,7 +818,7 @@ public class JSON
{ {
if (source.next()!='{') if (source.next()!='{')
throw new IllegalStateException(); throw new IllegalStateException();
Map map=newMap(); Map<String,Object> map=newMap();
char next=seekTo("\"}",source); char next=seekTo("\"}",source);