diff --git a/pom.xml b/pom.xml index 08bb6d26..2779fb24 100644 --- a/pom.xml +++ b/pom.xml @@ -1,5 +1,5 @@ - + 4.0.0 org.sonatype.oss diff --git a/src/main/java/com/samskivert/jdbc/JDBCUtil.java b/src/main/java/com/samskivert/jdbc/JDBCUtil.java index 71d4d0a2..c18986af 100644 --- a/src/main/java/com/samskivert/jdbc/JDBCUtil.java +++ b/src/main/java/com/samskivert/jdbc/JDBCUtil.java @@ -136,7 +136,7 @@ public class JDBCUtil * Issues a query with a potentially large number of keys in batches. For example, you might * have 10,000 ids that you wish to use in an "in" clause, but don't trust the database to be * smart about optimizing that many keys, so instead you use batchQuery like so: - *
+     * 
{@code
      *    Collection keys = ...;
      *    String query = "select NAME from USERS where USER_ID in (#KEYS)";
      *    JDBCUtil.BatchProcessor proc = new JDBCUtil.BatchProcessor() {
@@ -146,7 +146,7 @@ public class JDBCUtil
      *        }
      *    };
      *    JDBCUtil.batchQuery(conn, query, keys, false, 500, proc);
-     * 
+ * }
* * @param query the SQL query to run for each batch with the string #KEYS# in the * place where the batch of keys should be substituted. diff --git a/src/main/java/com/samskivert/jdbc/jora/Cursor.java b/src/main/java/com/samskivert/jdbc/jora/Cursor.java index 74e45c9f..db1dfef3 100644 --- a/src/main/java/com/samskivert/jdbc/jora/Cursor.java +++ b/src/main/java/com/samskivert/jdbc/jora/Cursor.java @@ -99,7 +99,7 @@ public class Cursor * clause: record.table.Select("where name='xyz' for * update");

* - * Attention! Not all database drivers support update + * Attention! Not all database drivers support update * operation with cursor. This method will not work with such database * drivers. */ @@ -122,7 +122,7 @@ public class Cursor * clause: record.table.Select("where name='xyz' for * update");

* - * Attention! Not all database drivers support delete + * Attention! Not all database drivers support delete * operation with cursor. This method will not work with such database * drivers. */ diff --git a/src/main/java/com/samskivert/net/HttpPostUtil.java b/src/main/java/com/samskivert/net/HttpPostUtil.java index 662d84b7..9ee9b2b4 100644 --- a/src/main/java/com/samskivert/net/HttpPostUtil.java +++ b/src/main/java/com/samskivert/net/HttpPostUtil.java @@ -30,7 +30,7 @@ public class HttpPostUtil * "Content-Type" = "application/x-www-form-urlencoded". * * @param url from which to make the request. - * @param submission the entire submission eg "foo=bar&baz=boo&futz=foo". + * @param submission the entire submission eg {@code foo=bar&baz=boo&futz=foo}. * @param timeout time to wait for the response, in seconds, or -1 for forever. */ public static String httpPost (URL url, String submission, int timeout) @@ -45,7 +45,7 @@ public class HttpPostUtil * thread, but this thread blocks until the results are returned or it times out. * * @param url from which to make the request. - * @param submission the entire submission eg "foo=bar&baz=boo&futz=foo". + * @param submission the entire submission eg {@code foo=bar&baz=boo&futz=foo}. * @param timeout time to wait for the response, in seconds, or -1 for forever. * @param requestProps additional request properties. */ diff --git a/src/main/java/com/samskivert/servlet/util/HTMLUtil.java b/src/main/java/com/samskivert/servlet/util/HTMLUtil.java index 2c9f5779..2fec8925 100644 --- a/src/main/java/com/samskivert/servlet/util/HTMLUtil.java +++ b/src/main/java/com/samskivert/servlet/util/HTMLUtil.java @@ -17,8 +17,8 @@ import com.samskivert.util.StringUtil; public class HTMLUtil { /** - * Converts instances of <, >, & and " into their - * entified equivalents: <, >, & and ". + * Converts instances of {@code<, >, & and "} into their + * entified equivalents: {@code<, >, & and "}. * These characters are mentioned in the HTML spec as being common * candidates for entification. * @@ -43,7 +43,7 @@ public class HTMLUtil } /** - * Inserts a <p> tag between every two consecutive newlines. + * Inserts a @{code

} tag between every two consecutive newlines. */ public static String makeParagraphs (String text) { @@ -57,7 +57,7 @@ public class HTMLUtil } /** - * Inserts a <br> tag before every newline. + * Inserts a {@code
} tag before every newline. */ public static String makeLinear (String text) { diff --git a/src/main/java/com/samskivert/swing/TableSorter.java b/src/main/java/com/samskivert/swing/TableSorter.java index 78aa5992..daeb8f54 100644 --- a/src/main/java/com/samskivert/swing/TableSorter.java +++ b/src/main/java/com/samskivert/swing/TableSorter.java @@ -27,7 +27,7 @@ import com.samskivert.util.Comparators; * have been translated via the internal mapping array. This way, * the TableSorter appears to hold another copy of the table * with the rows in a different order. - *

+ *

* TableSorter registers itself as a listener to the underlying model, * just as the JTable itself would. Events recieved from the model * are examined, sometimes manipulated (typically widened), and then @@ -35,7 +35,7 @@ import com.samskivert.util.Comparators; * If a change to the model has invalidated the order of TableSorter's * rows, a note of this is made and the sorter will resort the * rows the next time a value is requested. - *

+ *

* When the tableHeader property is set, either by using the * setTableHeader() method or the two argument constructor, the * table header may be used as a complete UI for TableSorter. @@ -58,7 +58,7 @@ import com.samskivert.util.Comparators; * that are already sorting - giving a way to initiate a compound * sort. * - *

+ *

* This is a long overdue rewrite of a class of the same name that * first appeared in the swing table demos in 1997. * @@ -69,7 +69,6 @@ import com.samskivert.util.Comparators; * @author Michael Bayne (modifications) * @version 2.0 02/27/04 */ - public class TableSorter extends AbstractTableModel { protected TableModel tableModel; diff --git a/src/main/java/com/samskivert/swing/util/TaskMaster.java b/src/main/java/com/samskivert/swing/util/TaskMaster.java index fda4a3ce..794960b5 100644 --- a/src/main/java/com/samskivert/swing/util/TaskMaster.java +++ b/src/main/java/com/samskivert/swing/util/TaskMaster.java @@ -18,7 +18,7 @@ import static com.samskivert.swing.Log.log; * application can safely manipulate its user interface in response to the * results of the task. * - *

Each task is run in it's own thread. Tasks are assumed to be + *

Each task is run in it's own thread. Tasks are assumed to be * infrequently run and expensive, so the overhead of creating a new * thread to run each task is considered acceptable. If the need arises, * the task master can be extended to support more sophisticated thread diff --git a/src/main/java/com/samskivert/util/ArrayUtil.java b/src/main/java/com/samskivert/util/ArrayUtil.java index 88a4dcce..ad782fc5 100644 --- a/src/main/java/com/samskivert/util/ArrayUtil.java +++ b/src/main/java/com/samskivert/util/ArrayUtil.java @@ -430,7 +430,7 @@ public class ArrayUtil /** * Creates and returns a new array sized to fit and populated with the - * subset of values from indexes 0 to offset - + * subset of values from indexes 0 to offset - * 1 (inclusive) in the supplied array. * * @param values the array of values to splice. @@ -447,7 +447,7 @@ public class ArrayUtil /** * Creates and returns a new array sized to fit and populated with the * concatenated subset of values from indexes 0 to - * offset - 1, and offset + length to + * offset - 1, and offset + length to * values.length (inclusive) in the supplied array. * * @param values the array of values to splice. @@ -487,7 +487,7 @@ public class ArrayUtil /** * Creates and returns a new array sized to fit and populated with the - * subset of values from indexes 0 to offset - + * subset of values from indexes 0 to offset - * 1 (inclusive) in the supplied array. * * @param values the array of values to splice. @@ -504,7 +504,7 @@ public class ArrayUtil /** * Creates and returns a new array sized to fit and populated with the * concatenated subset of values from indexes 0 to - * offset - 1, and offset + length to + * offset - 1, and offset + length to * values.length (inclusive) in the supplied array. * * @param values the array of values to splice. @@ -544,7 +544,7 @@ public class ArrayUtil /** * Creates and returns a new array sized to fit and populated with the - * subset of values from indexes 0 to offset - + * subset of values from indexes 0 to offset - * 1 (inclusive) in the supplied array. * * @param values the array of values to splice. @@ -561,7 +561,7 @@ public class ArrayUtil /** * Creates and returns a new array sized to fit and populated with the * concatenated subset of values from indexes 0 to - * offset - 1, and offset + length to + * offset - 1, and offset + length to * values.length (inclusive) in the supplied array. * * @param values the array of values to splice. @@ -601,7 +601,7 @@ public class ArrayUtil /** * Creates and returns a new array sized to fit and populated with the - * subset of values from indexes 0 to offset - + * subset of values from indexes 0 to offset - * 1 (inclusive) in the supplied array. * * @param values the array of values to splice. @@ -618,7 +618,7 @@ public class ArrayUtil /** * Creates and returns a new array sized to fit and populated with the * concatenated subset of values from indexes 0 to - * offset - 1, and offset + length to + * offset - 1, and offset + length to * values.length (inclusive) in the supplied array. The * type of the array is preserved. * @@ -660,7 +660,7 @@ public class ArrayUtil /** * Creates and returns a new array sized to fit and populated with the - * subset of values from indexes 0 to offset - + * subset of values from indexes 0 to offset - * 1 (inclusive) in the supplied array. * * @param values the array of values to splice. @@ -677,7 +677,7 @@ public class ArrayUtil /** * Creates and returns a new array sized to fit and populated with the * concatenated subset of values from indexes 0 to - * offset - 1, and offset + length to + * offset - 1, and offset + length to * values.length (inclusive) in the supplied array. * * @param values the array of values to splice. diff --git a/src/main/java/com/samskivert/util/BaseArrayList.java b/src/main/java/com/samskivert/util/BaseArrayList.java index 54c81ef9..607d464f 100644 --- a/src/main/java/com/samskivert/util/BaseArrayList.java +++ b/src/main/java/com/samskivert/util/BaseArrayList.java @@ -16,9 +16,9 @@ import java.lang.reflect.Array; /** * Provides a base for extending the standard Java {@link ArrayList} * functionality (which we'd just extend directly if those pig fuckers hadn't - * made the instance variables private).

+ * made the instance variables private). * - * Note: Does not support null elements. + *

Note: Does not support null elements.

*/ public abstract class BaseArrayList extends AbstractList implements RandomAccess, Cloneable, Serializable diff --git a/src/main/java/com/samskivert/util/ComparableArrayList.java b/src/main/java/com/samskivert/util/ComparableArrayList.java index b80e7bb2..6e949ca1 100644 --- a/src/main/java/com/samskivert/util/ComparableArrayList.java +++ b/src/main/java/com/samskivert/util/ComparableArrayList.java @@ -11,12 +11,10 @@ import java.util.Comparator; import com.samskivert.annotation.ReplacedBy; /** - * Provides a mechanism ({@link #sort}) for sorting the contents of the list - * that doesn't involve creating two object arrays. Two copies of the elements - * array are made if you called {@link java.util.Collections#sort} (the - * first is when {@link #toArray} is called on the collection and the second is - * when {@link Arrays#sort} clones the supplied array so that it can do a merge - * sort). + * Provides a mechanism ({@link #sort}) for sorting the contents of the list that doesn't involve + * creating two object arrays. Two copies of the elements array are made if you called {@link + * java.util.Collections#sort} (the first is when {@link #toArray} is called on the collection and + * the second is when {@link Arrays#sort} clones the supplied array so that it can do a merge sort). */ @ReplacedBy( value="java.util.ArrayList, java.util.TreeSet, or com.google.common.collect.TreeMultiset", diff --git a/src/main/java/com/samskivert/util/Config.java b/src/main/java/com/samskivert/util/Config.java index e4dea2dd..a426ea62 100644 --- a/src/main/java/com/samskivert/util/Config.java +++ b/src/main/java/com/samskivert/util/Config.java @@ -24,42 +24,35 @@ import static com.samskivert.util.UtilLog.log; * singleton class containing a config object that is configured to load its data from a single * configuration file. For example: * - *
- * public class FooConfig
- * {
+ * 
{@code
+ * public class FooConfig {
  *     public static final String FIDDLES = "fiddles";
- *
  *     public static Config config = new Config("com/fribitz/foo");
  * }
- * 
+ * }
* * which would look for com/fribitz/foo.properties in the classpath and serve up those * configuration values when requests were made from FooConfig.config. For example: * - *
+ * 
{@code
  *     int fiddles = FooConfig.config.getValue(FooConfig.FIDDLES, 0);
  *     for (int ii = 0; ii < fiddles; ii++) {
  *         fiddle();
  *     }
- * 
+ * }
* * An even better approach involves creating accessors for all defined configuration properties: * - *
- * public class FooConfig
- * {
+ * 
{@code
+ * public class FooConfig {
  *     public static final String FIDDLES = "fiddles";
- *
  *     public static Config config = new Config("com/fribitz/foo");
- *
- *     public static int getFiddles ()
- *     {
+ *     public static int getFiddles () {
  *         return config.getValue(FIDDLES, FIDDLES_DEFAULT);
  *     }
- *
  *     protected static final int FIDDLES_DEFAULT = 0;
  * }
- * 
+ * }
* * This allows the default value for fiddles to be specified in one place and * simplifies life for the caller who can now simply request FooConfig.getFiddles(). diff --git a/src/main/java/com/samskivert/util/Folds.java b/src/main/java/com/samskivert/util/Folds.java index 0531cf13..40a3d48a 100644 --- a/src/main/java/com/samskivert/util/Folds.java +++ b/src/main/java/com/samskivert/util/Folds.java @@ -7,6 +7,7 @@ package com.samskivert.util; import java.math.BigInteger; import java.util.Iterator; +import java.util.NoSuchElementException; /** * Various useful folds over iterables. diff --git a/src/main/java/com/samskivert/util/IntSets.java b/src/main/java/com/samskivert/util/IntSets.java index 8fc75fba..d9d49580 100644 --- a/src/main/java/com/samskivert/util/IntSets.java +++ b/src/main/java/com/samskivert/util/IntSets.java @@ -43,7 +43,7 @@ public class IntSets } /** - * Create a new IntSet, initially containing the ints in the specified Collection. + * Create a new IntSet, initially containing the ints in the specified collection. */ public static IntSet create (Collection from) { diff --git a/src/main/java/com/samskivert/util/Log.java b/src/main/java/com/samskivert/util/Log.java index 074076a2..ed739b50 100644 --- a/src/main/java/com/samskivert/util/Log.java +++ b/src/main/java/com/samskivert/util/Log.java @@ -103,11 +103,11 @@ public final class Log * warning and error messages would be logged because info and debug * messages have a 'lower' log level. * - *

Note: the log provider implementation may choose to propagate + *

Note: the log provider implementation may choose to propagate * the supplied level to all modules that are contained by this module * in the module hierarchy. For example, setting the "swing.util" * module to debug could also set the "swing.util.TaskMaster" level to - * debug because it is contained by the specified module. + * debug because it is contained by the specified module.

*/ public static void setLevel (String moduleName, int level) { diff --git a/src/main/java/com/samskivert/util/Predicate.java b/src/main/java/com/samskivert/util/Predicate.java index d371ddec..1853b80f 100644 --- a/src/main/java/com/samskivert/util/Predicate.java +++ b/src/main/java/com/samskivert/util/Predicate.java @@ -13,10 +13,8 @@ import java.util.NoSuchElementException; import com.samskivert.annotation.ReplacedBy; /** - * Arbitrates membership. - * - * Example usage: - * Find the best kind of peanut butter: + * Arbitrates membership. Example usage. Find the best kind of peanut butter: + *
{@code
  * public Iterator findBestKinds (Collection pbs)
  * {
  *     return new Predicate() {
@@ -26,7 +24,7 @@ import com.samskivert.annotation.ReplacedBy;
  *         }
  *     }.filter(pbs.iterator());
  * }
- *
+ * }
* An interface like this may someday be in the Java library, but until then... */ @ReplacedBy("com.google.common.base.Predicate") diff --git a/src/main/java/com/samskivert/util/RandomUtil.java b/src/main/java/com/samskivert/util/RandomUtil.java index af21106c..8fda37de 100644 --- a/src/main/java/com/samskivert/util/RandomUtil.java +++ b/src/main/java/com/samskivert/util/RandomUtil.java @@ -164,10 +164,12 @@ public class RandomUtil * @return an index into the array, or -1 if the sum of the weights is less than 1. For * example, passing in {1, 0, 3, 4} will return: * - * - * - * - *
01/8th of the time
1never
23/8th of the time
3half of the time
+ *
{@code
+     * 0 - 1/8th of the time
+     * 1 - never
+     * 2 - 3/8th of the time
+     * 3 - half of the time
+     * }
*/ public static int getWeightedIndex (int[] weights) { @@ -184,10 +186,12 @@ public class RandomUtil * @return an index into the array, or -1 if the sum of the weights is less than 1. For * example, passing in {1, 0, 3, 4} will return: * - * - * - * - *
01/8th of the time
1never
23/8th of the time
3half of the time
+ *
{@code
+     * 0 - 1/8th of the time
+     * 1 - never
+     * 2 - 3/8th of the time
+     * 3 - half of the time
+     * }
*/ public static int getWeightedIndex (int[] weights, Random r) { @@ -216,10 +220,12 @@ public class RandomUtil * 0.0 or any individual element is negative. For example, passing in {0.2, 0.0, 0.6, 0.8} * will return: * - * - * - * - *
01/8th of the time
1never
23/8th of the time
3half of the time
+ *
{@code
+     * 0 - 1/8th of the time
+     * 1 - never
+     * 2 - 3/8th of the time
+     * 3 - half of the time
+     * }
*/ public static int getWeightedIndex (float[] weights) { @@ -236,10 +242,12 @@ public class RandomUtil * 0.0 or any individual element is negative. For example, passing in {0.2, 0.0, 0.6, 0.8} * will return: * - * - * - * - *
01/8th of the time
1never
23/8th of the time
3half of the time
+ *
{@code
+     * 0 - 1/8th of the time
+     * 1 - never
+     * 2 - 3/8th of the time
+     * 3 - half of the time
+     * }
*/ public static int getWeightedIndex (float[] weights, Random r) { diff --git a/src/main/java/com/samskivert/util/ResultListener.java b/src/main/java/com/samskivert/util/ResultListener.java index 621307dc..219a6e42 100644 --- a/src/main/java/com/samskivert/util/ResultListener.java +++ b/src/main/java/com/samskivert/util/ResultListener.java @@ -17,7 +17,7 @@ package com.samskivert.util; *

The following contrived example will hopefully communicate its use * more clearly than the previous paragraph of flowery prose: * - *

+ * 
{@code
  * public void doSomeStuff (ResultListener listener)
  * {
  *     Runnable run = new Runnable () {
@@ -32,7 +32,7 @@ package com.samskivert.util;
  *     };
  *     new Thread(run).start();
  * }
- * 
+ * }
* * @see IntResultListener */ diff --git a/src/main/java/com/samskivert/util/SortableArrayList.java b/src/main/java/com/samskivert/util/SortableArrayList.java index 957a2050..8f43ac7e 100644 --- a/src/main/java/com/samskivert/util/SortableArrayList.java +++ b/src/main/java/com/samskivert/util/SortableArrayList.java @@ -11,12 +11,10 @@ import java.util.Comparator; import com.samskivert.annotation.ReplacedBy; /** - * Provides a mechanism ({@link #sort}) for sorting the contents of the list - * that doesn't involve creating two object arrays. Two copies of the elements - * array are made if you called {@link java.util.Collections#sort} (the - * first is when {@link #toArray} is called on the collection and the second is - * when {@link Arrays#sort} clones the supplied array so that it can do a merge - * sort). + * Provides a mechanism ({@link #sort}) for sorting the contents of the list that doesn't involve + * creating two object arrays. Two copies of the elements array are made if you called {@link + * java.util.Collections#sort} (the first is when {@link #toArray} is called on the collection and + * the second is when {@link Arrays#sort} clones the supplied array so that it can do a merge sort). */ @ReplacedBy( value="java.util.ArrayList, java.util.TreeSet, or com.google.common.collect.TreeMultiset",