summaryrefslogtreecommitdiffstats
path: root/pki/base/util/src/netscape/security/util/ByteArrayTagOrder.java
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2011-12-08 21:15:59 -0500
committerAde Lee <alee@redhat.com>2011-12-08 21:15:59 -0500
commit171aaece4f23709d33d180cf36eb3af5e454b0c9 (patch)
tree1485f9f0a7bd10de4ff25030db575dbb8dafae74 /pki/base/util/src/netscape/security/util/ByteArrayTagOrder.java
parentadad2fcee8a29fdb82376fbce07dedb11fccc182 (diff)
downloadpki-171aaece4f23709d33d180cf36eb3af5e454b0c9.tar.gz
pki-171aaece4f23709d33d180cf36eb3af5e454b0c9.tar.xz
pki-171aaece4f23709d33d180cf36eb3af5e454b0c9.zip
Revert "Formatting"
This reverts commit 32150d3ee32f8ac27118af7c792794b538c78a2f.
Diffstat (limited to 'pki/base/util/src/netscape/security/util/ByteArrayTagOrder.java')
-rw-r--r--pki/base/util/src/netscape/security/util/ByteArrayTagOrder.java33
1 files changed, 17 insertions, 16 deletions
diff --git a/pki/base/util/src/netscape/security/util/ByteArrayTagOrder.java b/pki/base/util/src/netscape/security/util/ByteArrayTagOrder.java
index 81235d00..81f43747 100644
--- a/pki/base/util/src/netscape/security/util/ByteArrayTagOrder.java
+++ b/pki/base/util/src/netscape/security/util/ByteArrayTagOrder.java
@@ -22,27 +22,28 @@ import java.util.Comparator;
public class ByteArrayTagOrder implements Comparator {
/**
- * Compare two byte arrays, by the order of their tags, as defined in ITU-T
- * X.680, sec. 6.4. (First compare tag classes, then tag numbers, ignoring
- * the constructivity bit.)
- *
- * @param obj1 first byte array to compare.
- * @param obj2 second byte array to compare.
- * @return negative number if obj1 < obj2, 0 if obj1 == obj2, positive
- * number if obj1 > obj2.
- *
- * @exception <code>ClassCastException</code> if either argument is not a
- * byte array.
+ * Compare two byte arrays, by the order of their tags,
+ * as defined in ITU-T X.680, sec. 6.4. (First compare
+ * tag classes, then tag numbers, ignoring the constructivity bit.)
+ *
+ * @param obj1 first byte array to compare.
+ * @param obj2 second byte array to compare.
+ * @return negative number if obj1 < obj2, 0 if obj1 == obj2,
+ * positive number if obj1 > obj2.
+ *
+ * @exception <code>ClassCastException</code>
+ * if either argument is not a byte array.
*/
public final int compare(Object obj1, Object obj2) {
- byte[] bytes1 = (byte[]) obj1;
- byte[] bytes2 = (byte[]) obj2;
+ byte[] bytes1 = (byte[]) obj1;
+ byte[] bytes2 = (byte[]) obj2;
- // tag order is same as byte order ignoring any difference in
- // the constructivity bit (0x02)
- return (bytes1[0] | 0x20) - (bytes2[0] | 0x20);
+ // tag order is same as byte order ignoring any difference in
+ // the constructivity bit (0x02)
+ return (bytes1[0] | 0x20) - (bytes2[0] | 0x20);
}
+
}