Mercurial Hosting > luan
comparison src/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java @ 1037:3c4c7cc7904f
rename Buffer.hasContent() to hasRemaining()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 03 Nov 2016 21:54:34 -0600 |
parents | 35d04ac3fd0b |
children | 2b769da7f67d |
comparison
equal
deleted
inserted
replaced
1036:b87f97f6418a | 1037:3c4c7cc7904f |
---|---|
167 public int flush(Buffer header, Buffer buffer, Buffer trailer) throws IOException | 167 public int flush(Buffer header, Buffer buffer, Buffer trailer) throws IOException |
168 { | 168 { |
169 int l = super.flush(header, buffer, trailer); | 169 int l = super.flush(header, buffer, trailer); |
170 | 170 |
171 // If there was something to write and it wasn't written, then we are not writable. | 171 // If there was something to write and it wasn't written, then we are not writable. |
172 if (l==0 && ( header!=null && header.hasContent() || buffer!=null && buffer.hasContent() || trailer!=null && trailer.hasContent())) | 172 if (l==0 && ( header!=null && header.hasRemaining() || buffer!=null && buffer.hasRemaining() || trailer!=null && trailer.hasRemaining())) |
173 { | 173 { |
174 synchronized (this) | 174 synchronized (this) |
175 { | 175 { |
176 _writable = false; | 176 _writable = false; |
177 if( !isDispatched ) | 177 if( !isDispatched ) |
189 public int flush(Buffer buffer) throws IOException | 189 public int flush(Buffer buffer) throws IOException |
190 { | 190 { |
191 int l = super.flush(buffer); | 191 int l = super.flush(buffer); |
192 | 192 |
193 // If there was something to write and it wasn't written, then we are not writable. | 193 // If there was something to write and it wasn't written, then we are not writable. |
194 if (l==0 && buffer!=null && buffer.hasContent()) | 194 if (l==0 && buffer!=null && buffer.hasRemaining()) |
195 { | 195 { |
196 synchronized (this) | 196 synchronized (this) |
197 { | 197 { |
198 _writable = false; | 198 _writable = false; |
199 if( !isDispatched ) | 199 if( !isDispatched ) |