Skip to content

Commit

Permalink
Fixed misc checkstyle errors which crept in.
Browse files Browse the repository at this point in the history
Change-Id: I72161b5867b12aa31206a8924f46651cc0566d11
Reviewed-on: http://review.couchbase.org/19035
Tested-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Raghavan N. Srinivas <raghavan.srinivas@gmail.com>
  • Loading branch information
ingenthr authored and ragss committed Jul 30, 2012
1 parent 807e2ea commit bda95ec
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 9 deletions.
9 changes: 4 additions & 5 deletions 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 * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -74,12 +74,12 @@ public enum TapOpcode {
VBUCKETSET((byte) 0x45), VBUCKETSET((byte) 0x45),


/** /**
* Defines the start of a checkpoint * Defines the start of a checkpoint.
*/ */
START_CHECKPOINT((byte) 0x46), START_CHECKPOINT((byte) 0x46),


/** /**
* Defines the end of a checkpoint * Defines the end of a checkpoint.
*/ */
END_CHECKPOINT((byte) 0x47); END_CHECKPOINT((byte) 0x47);


Expand Down Expand Up @@ -124,8 +124,7 @@ public static TapOpcode getOpcodeByByte(byte b) {
return TapOpcode.START_CHECKPOINT; return TapOpcode.START_CHECKPOINT;
} else if (b == TapOpcode.END_CHECKPOINT.opcode) { } else if (b == TapOpcode.END_CHECKPOINT.opcode) {
return TapOpcode.END_CHECKPOINT; return TapOpcode.END_CHECKPOINT;
} } else {
else {
return null; return null;
} }
} }
Expand Down
30 changes: 28 additions & 2 deletions src/test/java/net/spy/memcached/tapmessage/TapDeleteTest.java
@@ -1,14 +1,40 @@
/**
* 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; package net.spy.memcached.tapmessage;


import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;


import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.util.LinkedList; import java.util.LinkedList;


import org.junit.Before; import org.junit.Before;
import org.junit.Test; 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 { public class TapDeleteTest extends ResponseMessageBaseCase {
@Before @Before
@Override @Override
Expand Down
29 changes: 27 additions & 2 deletions 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; package net.spy.memcached.util;


import java.util.Collection; import java.util.Collection;
import java.util.LinkedList; import java.util.LinkedList;


import org.junit.Test;

import junit.framework.TestCase; import junit.framework.TestCase;


import org.junit.Test;

/**
* Test various classes in the net.spy.memcached.util package.
*/
public class UtilTest extends TestCase { public class UtilTest extends TestCase {
public void setup() { public void setup() {
// Empty // Empty
Expand Down

0 comments on commit bda95ec

Please sign in to comment.