detectAndUpgrade() shortcut on empty buffer
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
parent
37edc016d2
commit
58b1db610c
|
@ -218,6 +218,13 @@ public class DetectorConnectionFactory extends AbstractConnectionFactory impleme
|
||||||
*/
|
*/
|
||||||
private boolean detectAndUpgrade()
|
private boolean detectAndUpgrade()
|
||||||
{
|
{
|
||||||
|
if (BufferUtil.isEmpty(_buffer))
|
||||||
|
{
|
||||||
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("Detector {} skipping detection on an empty buffer", getProtocol());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
LOG.debug("Detector {} performing detection with {} bytes", getProtocol(), _buffer.remaining());
|
LOG.debug("Detector {} performing detection with {} bytes", getProtocol(), _buffer.remaining());
|
||||||
boolean notRecognized = true;
|
boolean notRecognized = true;
|
||||||
|
|
Loading…
Reference in New Issue