Thanks Jeff ! There are more commented line. Need to touch-base with Julien to check if some of them need to be enabled for debugging. Some of them can be worthy debug statements.
On Thu, Jul 25, 2013 at 8:07 PM, Jeff MAURY <[email protected]> wrote: > There is still one line of commented code in CoapDecoder > > > Jeff > — > Sent from Mailbox for iPhone > > On Thu, Jul 25, 2013 at 3:00 PM, null <[email protected]> wrote: > > > Updated Branches: > > refs/heads/trunk 51dd5213d -> 52009f32f > > fixed sonar violations > > Project: http://git-wip-us.apache.org/repos/asf/mina/repo > > Commit: http://git-wip-us.apache.org/repos/asf/mina/commit/52009f32 > > Tree: http://git-wip-us.apache.org/repos/asf/mina/tree/52009f32 > > Diff: http://git-wip-us.apache.org/repos/asf/mina/diff/52009f32 > > Branch: refs/heads/trunk > > Commit: 52009f32fb0329129d12f3812b4ee886c8a9fbac > > Parents: 51dd521 > > Author: paliwalashish <[email protected]> > > Authored: Thu Jul 25 18:29:45 2013 +0530 > > Committer: paliwalashish <[email protected]> > > Committed: Thu Jul 25 18:29:45 2013 +0530 > > ---------------------------------------------------------------------- > > .../java/org/apache/mina/coap/codec/CoapDecoder.java | 12 > ------------ > > .../org/apache/mina/coap/resource/CoapResponse.java | 6 +++--- > > 2 files changed, 3 insertions(+), 15 deletions(-) > > ---------------------------------------------------------------------- > > > http://git-wip-us.apache.org/repos/asf/mina/blob/52009f32/coap/src/main/java/org/apache/mina/coap/codec/CoapDecoder.java > > ---------------------------------------------------------------------- > > diff --git > a/coap/src/main/java/org/apache/mina/coap/codec/CoapDecoder.java > b/coap/src/main/java/org/apache/mina/coap/codec/CoapDecoder.java > > index 603f311..616f683 100644 > > --- a/coap/src/main/java/org/apache/mina/coap/codec/CoapDecoder.java > > +++ b/coap/src/main/java/org/apache/mina/coap/codec/CoapDecoder.java > > @@ -78,10 +78,6 @@ public class CoapDecoder implements > StatelessProtocolDecoder<ByteBuffer, CoapMes > > // LOG.debug("id : {}", id); > > input.get(token); > > > > - // if (LOG.isDebugEnabled()) { > > - // LOG.debug("token : {}", > ByteBufferDumper.toHex(ByteBuffer.wrap(token))); > > - // } > > - > > // decode options > > int optionCode = 0; > > byte[] payload = EMPTY_PAYLOAD; > > @@ -94,9 +90,6 @@ public class CoapDecoder implements > StatelessProtocolDecoder<ByteBuffer, CoapMes > > // LOG.debug("start of payload"); > > payload = new byte[input.remaining()]; > > input.get(payload); > > - // if (LOG.isDebugEnabled()) { > > - // LOG.debug("payload : {}", > ByteBufferDumper.dump(ByteBuffer.wrap(payload))); > > - // } > > break; > > } else { > > int optionDeltaQuartet = (next >> 4) & 0xF; > > @@ -122,7 +115,6 @@ public class CoapDecoder implements > StatelessProtocolDecoder<ByteBuffer, CoapMes > > input.get(optionValue); > > > > options.add(new CoapOption(optType, optionValue)); > > - ; > > } > > } > > > > @@ -144,10 +136,6 @@ public class CoapDecoder implements > StatelessProtocolDecoder<ByteBuffer, CoapMes > > if (value < 13) { > > return value; > > } else if (value == 13) { > > - // if (LOG.isDebugEnabled()) { > > - // int val = input.get(input.position()) & 0xFF; > > - // LOG.debug("byte : {}", val); > > - // } > > return (input.get() & 0xFF) + 13; > > } else if (value == 14) { > > return (input.getShort() & 0xFFFF) + 269; > > > http://git-wip-us.apache.org/repos/asf/mina/blob/52009f32/coap/src/main/java/org/apache/mina/coap/resource/CoapResponse.java > > ---------------------------------------------------------------------- > > diff --git > a/coap/src/main/java/org/apache/mina/coap/resource/CoapResponse.java > b/coap/src/main/java/org/apache/mina/coap/resource/CoapResponse.java > > index b9bb658..9ebeb79 100644 > > --- a/coap/src/main/java/org/apache/mina/coap/resource/CoapResponse.java > > +++ b/coap/src/main/java/org/apache/mina/coap/resource/CoapResponse.java > > @@ -31,10 +31,10 @@ import org.apache.mina.coap.CoapOption; > > */ > > public class CoapResponse { > > > > - public int code; > > - public byte[] content; > > + private int code; > > + private byte[] content; > > > > - public CoapOption[] options; > > + private CoapOption[] options; > > > > /** > > * Create the CoAP response for a resource request. > -- thanks ashish Blog: http://www.ashishpaliwal.com/blog My Photo Galleries: http://www.pbase.com/ashishpaliwal
