You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by br...@apache.org on 2010/10/28 01:39:58 UTC

svn commit: r1028140 - /incubator/thrift/trunk/lib/java/src/org/apache/thrift/protocol/TProtocolUtil.java

Author: bryanduxbury
Date: Wed Oct 27 23:39:58 2010
New Revision: 1028140

URL: http://svn.apache.org/viewvc?rev=1028140&view=rev
Log:
improve formatting in TProtocolUtil.skip

Modified:
    incubator/thrift/trunk/lib/java/src/org/apache/thrift/protocol/TProtocolUtil.java

Modified: incubator/thrift/trunk/lib/java/src/org/apache/thrift/protocol/TProtocolUtil.java
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/java/src/org/apache/thrift/protocol/TProtocolUtil.java?rev=1028140&r1=1028139&r2=1028140&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/java/src/org/apache/thrift/protocol/TProtocolUtil.java (original)
+++ incubator/thrift/trunk/lib/java/src/org/apache/thrift/protocol/TProtocolUtil.java Wed Oct 27 23:39:58 2010
@@ -74,43 +74,35 @@ public class TProtocolUtil {
       throw new TException("Maximum skip depth exceeded");
     }
     switch (type) {
-    case TType.BOOL:
-      {
+      case TType.BOOL:
         prot.readBool();
         break;
-      }
-    case TType.BYTE:
-      {
+
+      case TType.BYTE:
         prot.readByte();
         break;
-      }
-    case TType.I16:
-      {
+
+      case TType.I16:
         prot.readI16();
         break;
-      }
-    case TType.I32:
-      {
+
+      case TType.I32:
         prot.readI32();
         break;
-      }
-    case TType.I64:
-      {
+
+      case TType.I64:
         prot.readI64();
         break;
-      }
-    case TType.DOUBLE:
-      {
+
+      case TType.DOUBLE:
         prot.readDouble();
         break;
-      }
-    case TType.STRING:
-      {
+
+      case TType.STRING:
         prot.readBinary();
         break;
-      }
-    case TType.STRUCT:
-      {
+
+      case TType.STRUCT:
         prot.readStructBegin();
         while (true) {
           TField field = prot.readFieldBegin();
@@ -122,9 +114,8 @@ public class TProtocolUtil {
         }
         prot.readStructEnd();
         break;
-      }
-    case TType.MAP:
-      {
+
+      case TType.MAP:
         TMap map = prot.readMapBegin();
         for (int i = 0; i < map.size; i++) {
           skip(prot, map.keyType, maxDepth - 1);
@@ -132,27 +123,25 @@ public class TProtocolUtil {
         }
         prot.readMapEnd();
         break;
-      }
-    case TType.SET:
-      {
+
+      case TType.SET:
         TSet set = prot.readSetBegin();
         for (int i = 0; i < set.size; i++) {
           skip(prot, set.elemType, maxDepth - 1);
         }
         prot.readSetEnd();
         break;
-      }
-    case TType.LIST:
-      {
+
+      case TType.LIST:
         TList list = prot.readListBegin();
         for (int i = 0; i < list.size; i++) {
           skip(prot, list.elemType, maxDepth - 1);
         }
         prot.readListEnd();
         break;
-      }
-    default:
-      break;
+
+      default:
+        break;
     }
   }