File tree Expand file tree Collapse file tree
src/java/org/apache/commons/codec Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7070 *
7171 * @author Tim O'Brien
7272 * @author Gary Gregory
73- * @version $Id: StringEncoderComparator.java,v 1.7 2003/10/12 01:34:06 tobrien Exp $
73+ * @version $Id: StringEncoderComparator.java,v 1.8 2003/10/29 02:30:41 ggregory Exp $
7474 */
7575public class StringEncoderComparator implements Comparator {
7676
@@ -83,6 +83,7 @@ public class StringEncoderComparator implements Comparator {
8383 * Constructs a new instance.
8484 */
8585 public StringEncoderComparator () {
86+ // no init.
8687 }
8788
8889 /**
@@ -93,10 +94,14 @@ public StringEncoderComparator(StringEncoder en) {
9394 }
9495
9596 /**
96- * Compares 2 strings based not on the strings
97+ * Compares two strings based not on the strings
9798 * themselves, but on an encoding of the two
9899 * strings using the StringEncoder this Comparator
99100 * was created with.
101+ *
102+ * If an {@link EncoderException} is encountered, return <code>0</code>.
103+ *
104+ * @see Comparable
100105 */
101106 public int compare (Object o1 , Object o2 ) {
102107
@@ -110,7 +115,7 @@ public int compare(Object o1, Object o2) {
110115 catch (EncoderException ee ) {
111116 compareCode = 0 ;
112117 }
113- return ( compareCode ) ;
118+ return compareCode ;
114119 }
115120
116121}
You can’t perform that action at this time.
0 commit comments