Disable gathering writes till we want to release 3.5.0.Final

This commit is contained in:
norman 2012-04-27 08:57:52 +02:00
parent 3454cbbc03
commit a67194fc2c
2 changed files with 7 additions and 4 deletions

View File

@ -277,9 +277,12 @@ public class CompositeChannelBuffer extends AbstractChannelBuffer {
public int getBytes(int index, GatheringByteChannel out, int length) public int getBytes(int index, GatheringByteChannel out, int length)
throws IOException { throws IOException {
// Disable till 3.5.0.Final
/*
if (DetectionUtil.javaVersion() >= 7) { if (DetectionUtil.javaVersion() >= 7) {
return (int) out.write(toByteBuffers(index, length)); return (int) out.write(toByteBuffers(index, length));
} }*/
// XXX Gathering write is not supported because of a known issue. // XXX Gathering write is not supported because of a known issue.
// See http://bugs.sun.com/view_bug.do?bug_id=6210541 // See http://bugs.sun.com/view_bug.do?bug_id=6210541
// This issue appeared in 2004 and is still unresolved!? // This issue appeared in 2004 and is still unresolved!?

View File

@ -24,10 +24,8 @@ import java.nio.channels.GatheringByteChannel;
import java.nio.channels.WritableByteChannel; import java.nio.channels.WritableByteChannel;
import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.CompositeChannelBuffer;
import org.jboss.netty.channel.DefaultFileRegion; import org.jboss.netty.channel.DefaultFileRegion;
import org.jboss.netty.channel.FileRegion; import org.jboss.netty.channel.FileRegion;
import org.jboss.netty.util.internal.DetectionUtil;
final class SocketSendBufferPool { final class SocketSendBufferPool {
@ -68,9 +66,11 @@ final class SocketSendBufferPool {
return EMPTY_BUFFER; return EMPTY_BUFFER;
} }
// Disable till 3.5.0.Final
/*
if (src instanceof CompositeChannelBuffer && DetectionUtil.javaVersion() >= 7) { if (src instanceof CompositeChannelBuffer && DetectionUtil.javaVersion() >= 7) {
return new GatheringSendBuffer(src.toByteBuffers()); return new GatheringSendBuffer(src.toByteBuffers());
} }*/
if (src.isDirect()) { if (src.isDirect()) {
return new UnpooledSendBuffer(src.toByteBuffer()); return new UnpooledSendBuffer(src.toByteBuffer());
} }