diff options
Diffstat (limited to 'java/src/IceInternal/TraceUtil.java')
-rw-r--r-- | java/src/IceInternal/TraceUtil.java | 224 |
1 files changed, 112 insertions, 112 deletions
diff --git a/java/src/IceInternal/TraceUtil.java b/java/src/IceInternal/TraceUtil.java index 470be7744ef..6b57b96c540 100644 --- a/java/src/IceInternal/TraceUtil.java +++ b/java/src/IceInternal/TraceUtil.java @@ -67,9 +67,9 @@ public final class TraceUtil printHeader(s, str); int batchRequestNum = str.readInt(); - s.write("\nnumber of requests = " + batchRequestNum); - - for(int i = 0; i < batchRequestNum; ++i) + s.write("\nnumber of requests = " + batchRequestNum); + + for(int i = 0; i < batchRequestNum; ++i) { s.write("\nrequest #" + i + ':'); printRequestHeader(s, str); @@ -117,72 +117,72 @@ public final class TraceUtil case DispatchStatus._DispatchFacetNotExist: case DispatchStatus._DispatchOperationNotExist: { - switch(status) - { - case DispatchStatus._DispatchObjectNotExist: - { - s.write("(object not exist)"); - break; - } - - case DispatchStatus._DispatchFacetNotExist: - { - s.write("(facet not exist)"); - break; - } - - case DispatchStatus._DispatchOperationNotExist: - { - s.write("(operation not exist)"); - break; - } - - default: - { - assert(false); - break; - } - } - - printIdentityFacetOperation(s, str); - break; + switch(status) + { + case DispatchStatus._DispatchObjectNotExist: + { + s.write("(object not exist)"); + break; + } + + case DispatchStatus._DispatchFacetNotExist: + { + s.write("(facet not exist)"); + break; + } + + case DispatchStatus._DispatchOperationNotExist: + { + s.write("(operation not exist)"); + break; + } + + default: + { + assert(false); + break; + } + } + + printIdentityFacetOperation(s, str); + break; } - case DispatchStatus._DispatchUnknownException: - case DispatchStatus._DispatchUnknownLocalException: - case DispatchStatus._DispatchUnknownUserException: - { - switch(status) - { - case DispatchStatus._DispatchUnknownException: - { - s.write("(unknown exception)"); - break; - } - - case DispatchStatus._DispatchUnknownLocalException: - { - s.write("(unknown local exception)"); - break; - } - - case DispatchStatus._DispatchUnknownUserException: - { - s.write("(unknown user exception)"); - break; - } - - default: - { - assert(false); - break; - } - } - - String unknown = str.readString(); - s.write("\nunknown = " + unknown); - break; - } + case DispatchStatus._DispatchUnknownException: + case DispatchStatus._DispatchUnknownLocalException: + case DispatchStatus._DispatchUnknownUserException: + { + switch(status) + { + case DispatchStatus._DispatchUnknownException: + { + s.write("(unknown exception)"); + break; + } + + case DispatchStatus._DispatchUnknownLocalException: + { + s.write("(unknown local exception)"); + break; + } + + case DispatchStatus._DispatchUnknownUserException: + { + s.write("(unknown user exception)"); + break; + } + + default: + { + assert(false); + break; + } + } + + String unknown = str.readString(); + s.write("\nunknown = " + unknown); + break; + } default: { @@ -201,12 +201,12 @@ public final class TraceUtil synchronized static void traceSlicing(String kind, String typeId, String slicingCat, Ice.Logger logger) { - if(slicingIds.add(typeId)) - { - java.io.StringWriter s = new java.io.StringWriter(); - s.write("unknown " + kind + " type `" + typeId + "'"); - logger.trace(slicingCat, s.toString()); - } + if(slicingIds.add(typeId)) + { + java.io.StringWriter s = new java.io.StringWriter(); + s.write("unknown " + kind + " type `" + typeId + "'"); + logger.trace(slicingCat, s.toString()); + } } public static void @@ -291,7 +291,7 @@ public final class TraceUtil out.write("\nfacet = "); if(facet.length > 0) { - out.write(IceUtil.StringUtil.escapeString(facet[0], "")); + out.write(IceUtil.StringUtil.escapeString(facet[0], "")); } String operation = stream.readString(); @@ -306,38 +306,38 @@ public final class TraceUtil private static void printRequestHeader(java.io.Writer out, BasicStream stream) { - printIdentityFacetOperation(out, stream); + printIdentityFacetOperation(out, stream); try { byte mode = stream.readByte(); out.write("\nmode = " + (int)mode + ' '); - switch(mode) - { - case Ice.OperationMode._Normal: - { - out.write("(normal)"); - break; - } - - case Ice.OperationMode._Nonmutating: - { - out.write("(nonmutating)"); - break; - } - - case Ice.OperationMode._Idempotent: - { - out.write("(idempotent)"); - break; - } - - default: - { - out.write("(unknown)"); - break; - } - } + switch(mode) + { + case Ice.OperationMode._Normal: + { + out.write("(normal)"); + break; + } + + case Ice.OperationMode._Nonmutating: + { + out.write("(nonmutating)"); + break; + } + + case Ice.OperationMode._Idempotent: + { + out.write("(idempotent)"); + break; + } + + default: + { + out.write("(unknown)"); + break; + } + } int sz = stream.readSize(); out.write("\ncontext = "); @@ -363,18 +363,18 @@ public final class TraceUtil { try { - byte magic; - magic = stream.readByte(); // Don't bother printing the magic number - magic = stream.readByte(); - magic = stream.readByte(); - magic = stream.readByte(); - - byte pMajor = stream.readByte(); - byte pMinor = stream.readByte(); + byte magic; + magic = stream.readByte(); // Don't bother printing the magic number + magic = stream.readByte(); + magic = stream.readByte(); + magic = stream.readByte(); + + byte pMajor = stream.readByte(); + byte pMinor = stream.readByte(); // out.write("\nprotocol version = " + (int)pMajor + "." + (int)pMinor); - byte eMajor = stream.readByte(); - byte eMinor = stream.readByte(); + byte eMajor = stream.readByte(); + byte eMinor = stream.readByte(); // out.write("\nencoding version = " + (int)eMajor + "." + (int)eMinor); byte type = stream.readByte(); @@ -402,7 +402,7 @@ public final class TraceUtil case Protocol.closeConnectionMsg: { out.write("(close connection)"); - break; + break; } case Protocol.validateConnectionMsg: |