diff --git a/src/main/java/net/spy/memcached/tapmessage/TapOpcode.java b/src/main/java/net/spy/memcached/tapmessage/TapOpcode.java index 7f7582860..24eec15c1 100644 --- a/src/main/java/net/spy/memcached/tapmessage/TapOpcode.java +++ b/src/main/java/net/spy/memcached/tapmessage/TapOpcode.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2009-2011 Couchbase, Inc. + * Copyright (C) 2009-2012 Couchbase, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -74,12 +74,12 @@ public enum TapOpcode { VBUCKETSET((byte) 0x45), /** - * Defines the start of a checkpoint + * Defines the start of a checkpoint. */ START_CHECKPOINT((byte) 0x46), /** - * Defines the end of a checkpoint + * Defines the end of a checkpoint. */ END_CHECKPOINT((byte) 0x47); @@ -124,8 +124,7 @@ public static TapOpcode getOpcodeByByte(byte b) { return TapOpcode.START_CHECKPOINT; } else if (b == TapOpcode.END_CHECKPOINT.opcode) { return TapOpcode.END_CHECKPOINT; - } - else { + } else { return null; } } diff --git a/src/test/java/net/spy/memcached/tapmessage/TapDeleteTest.java b/src/test/java/net/spy/memcached/tapmessage/TapDeleteTest.java index 71b3ad368..618d0872f 100644 --- a/src/test/java/net/spy/memcached/tapmessage/TapDeleteTest.java +++ b/src/test/java/net/spy/memcached/tapmessage/TapDeleteTest.java @@ -1,7 +1,27 @@ +/** + * Copyright (C) 2009-2012 Couchbase, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALING + * IN THE SOFTWARE. + */ + package net.spy.memcached.tapmessage; -import static org.junit.Assert.assertArrayEquals; -import static org.junit.Assert.assertEquals; import java.nio.ByteBuffer; import java.util.LinkedList; @@ -9,6 +29,12 @@ import org.junit.Before; import org.junit.Test; +import static org.junit.Assert.assertArrayEquals; +import static org.junit.Assert.assertEquals; + +/** + * Test ResponseMessage parsing returned by TapDelete. + */ public class TapDeleteTest extends ResponseMessageBaseCase { @Before @Override diff --git a/src/test/java/net/spy/memcached/util/UtilTest.java b/src/test/java/net/spy/memcached/util/UtilTest.java index 7d6a48493..e66b57d26 100644 --- a/src/test/java/net/spy/memcached/util/UtilTest.java +++ b/src/test/java/net/spy/memcached/util/UtilTest.java @@ -1,12 +1,37 @@ +/** + * Copyright (C) 2009-2012 Couchbase, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALING + * IN THE SOFTWARE. + */ + package net.spy.memcached.util; import java.util.Collection; import java.util.LinkedList; -import org.junit.Test; - import junit.framework.TestCase; +import org.junit.Test; + +/** + * Test various classes in the net.spy.memcached.util package. + */ public class UtilTest extends TestCase { public void setup() { // Empty