How do you get jikes to warn about them? Is there a flag or something?

I've always liked the public modifier, but I guess it is completely
redundant. I'll try to change my ways in the future.

On Thu, 28 Feb 2002, Christopher Elkins wrote:

> Hi, all.
>
> The patch attached below removes public modifiers from some interfaces.
> Besides being redundant and bad form, they cause lots of Jikes warnings. :-)
>
> Also, please note that I did _not_ add the DOS line-endings (the ^M's); they
> are already present in the original files.
>
> While I'm thinking about it, here is a list of all the files containing bad
> line-endings:
>
> AbstractBag.java
> Bag.java
> BeanMap.java
> Closure.java
> DefaultMapEntry.java
> HashBag.java
> IteratorEnumeration.java
> MapUtils.java
> MultiHashMap.java
> MultiMap.java
> Predicate.java
> SingletonIterator.java
> SoftRefHashMap.java
> SortedBag.java
> TransformIterator.java
> Transformer.java
> TreeBag.java
>
> It'd be nice if someone could fix those before the forthcoming 2.0 release.
>
> (And in case anyone thinks that there's something wrong in my local CVS
> setup, I suggest you take a look at the nightly builds. ;-)
>
> --
> Christopher Elkins
>
>
>
> Index: src/java/org/apache/commons/collections/Bag.java
> ===================================================================
> RCS file: 
>/home/cvspublic/jakarta-commons/collections/src/java/org/apache/commons/collections/Bag.java,v
> retrieving revision 1.3
> diff -u -r1.3 Bag.java
> --- src/java/org/apache/commons/collections/Bag.java  22 Feb 2002 04:39:53 -0000     
> 1.3
> +++ src/java/org/apache/commons/collections/Bag.java  28 Feb 2002 18:25:34 -0000
> @@ -80,7 +80,7 @@
>      * object currently in the bag. If the object does not exist in the
>      * bag, return 0.
>      **/
> -   public int getCount(Object o);
> +   int getCount(Object o);
>
>     /**
>      * Add the given object to the bag and keep a count. If the object
> @@ -91,7 +91,7 @@
>      *         <code>uniqueSet</code>
>      * @see #getCount
>      **/
> -   public boolean add(Object o);
> +   boolean add(Object o);
>
>     /**
>      * Add <code>i</code> copies of the given object to the bag and
> @@ -101,7 +101,7 @@
>      * @see #add(Object)
>      * @see #getCount
>      **/
> -   public boolean add(Object o, int i);
> +   boolean add(Object o, int i);
>
>     /**
>      * Remove all occurrences of the given object from the bag, and do
> @@ -109,7 +109,7 @@
>      * @see #remove(Object, int)
>      * @return <code>true</code> if this call changed the collection
>      **/
> -   public boolean remove(Object o);
> +   boolean remove(Object o);
>
>     /**
>      * Remove the given number of occurrences from the bag. If the bag
> @@ -119,20 +119,20 @@
>      * @see #remove(Object)
>      * @return <code>true</code> if this call changed the collection
>      **/
> -   public boolean remove(Object o, int i);
> +   boolean remove(Object o, int i);
>
>     /**
>      * The {@link Set} of unique members that represent all members in
>      * the bag. Uniqueness constraints are the same as those in {@link
>      * Set}.
>      **/
> -   public Set uniqueSet();
> +   Set uniqueSet();
>
>     /**
>      * Returns the total number of items in the bag across all types.
>      * @see #size
>      **/
> -   public int size();
> +   int size();
>
>     /**
>      * Returns <code>true</code> if the bag contains all elements in
> @@ -141,7 +141,7 @@
>      * of a given object, calling {@link #getCount} on that object must
>      * be >= <code>n</code> for all <code>n</code> in <code>C</code>.
>      **/
> -   public boolean containsAll(Collection c);
> +   boolean containsAll(Collection c);
>
>     /**
>      * Remove all elements represented in the given collection,
> @@ -151,7 +151,7 @@
>      * had at least <code>n</code> copies to begin with.
>      * @return <code>true</code> if this call changed the collection
>      **/
> -   public boolean removeAll(Collection c);
> +   boolean removeAll(Collection c);
>
>     /**
>      * Remove any members of the bag that are not in the given
> @@ -165,14 +165,14 @@
>      *
>      * @return <code>true</code> if this call changed the collection
>      **/
> -   public boolean retainAll(Collection c);
> +   boolean retainAll(Collection c);
>
>     /**
>      * Returns an {@link Iterator} over the entire set of members,
>      * including copies due to cardinality. This iterator is fail-fast
>      * and will not tolerate concurrent modifications.
>      **/
> -   public Iterator iterator();
> +   Iterator iterator();
>  }
>
>
> Index: src/java/org/apache/commons/collections/Closure.java
> ===================================================================
> RCS file: 
>/home/cvspublic/jakarta-commons/collections/src/java/org/apache/commons/collections/Closure.java,v
> retrieving revision 1.2
> diff -u -r1.2 Closure.java
> --- src/java/org/apache/commons/collections/Closure.java      10 Feb 2002 08:07:42 
>-0000      1.2
> +++ src/java/org/apache/commons/collections/Closure.java      28 Feb 2002 18:25:34 
>-0000
> @@ -70,5 +70,5 @@
>
>      /** Performs some operation on the input object
>        */
> -    public void execute(Object input);
> +    void execute(Object input);
>  }
> Index: src/java/org/apache/commons/collections/MultiMap.java
> ===================================================================
> RCS file: 
>/home/cvspublic/jakarta-commons/collections/src/java/org/apache/commons/collections/MultiMap.java,v
> retrieving revision 1.2
> diff -u -r1.2 MultiMap.java
> --- src/java/org/apache/commons/collections/MultiMap.java     10 Feb 2002 08:07:42 
>-0000      1.2
> +++ src/java/org/apache/commons/collections/MultiMap.java     28 Feb 2002 18:25:34 
>-0000
> @@ -75,6 +75,6 @@
>   */
>  public interface MultiMap extends Map {
>
> -    public Object remove( Object key, Object item );
> +    Object remove( Object key, Object item );
>
>  }
> Index: src/java/org/apache/commons/collections/Predicate.java
> ===================================================================
> RCS file: 
>/home/cvspublic/jakarta-commons/collections/src/java/org/apache/commons/collections/Predicate.java,v
> retrieving revision 1.2
> diff -u -r1.2 Predicate.java
> --- src/java/org/apache/commons/collections/Predicate.java    10 Feb 2002 08:07:42 
>-0000      1.2
> +++ src/java/org/apache/commons/collections/Predicate.java    28 Feb 2002 18:25:34 
>-0000
> @@ -69,5 +69,5 @@
>
>      /** @return true if the input object matches this predicate, else returns false
>        */
> -    public boolean evaluate(Object input);
> +    boolean evaluate(Object input);
>  }
> Index: src/java/org/apache/commons/collections/SortedBag.java
> ===================================================================
> RCS file: 
>/home/cvspublic/jakarta-commons/collections/src/java/org/apache/commons/collections/SortedBag.java,v
> retrieving revision 1.2
> diff -u -r1.2 SortedBag.java
> --- src/java/org/apache/commons/collections/SortedBag.java    10 Feb 2002 08:07:42 
>-0000      1.2
> +++ src/java/org/apache/commons/collections/SortedBag.java    28 Feb 2002 18:25:35 
>-0000
> @@ -74,15 +74,15 @@
>      * Returns the comparator associated with this sorted set, or null
>      * if it uses its elements' natural ordering.
>      **/
> -   public Comparator comparator();
> +   Comparator comparator();
>
>     /**
>      * Returns the first (lowest) member.
>      **/
> -   public Object first();
> +   Object first();
>
>     /**
>      * Returns the last (highest) member.
>      **/
> -   public Object last();
> +   Object last();
>  }
> Index: src/java/org/apache/commons/collections/Transformer.java
> ===================================================================
> RCS file: 
>/home/cvspublic/jakarta-commons/collections/src/java/org/apache/commons/collections/Transformer.java,v
> retrieving revision 1.2
> diff -u -r1.2 Transformer.java
> --- src/java/org/apache/commons/collections/Transformer.java  10 Feb 2002 08:07:42 
>-0000      1.2
> +++ src/java/org/apache/commons/collections/Transformer.java  28 Feb 2002 18:25:35 
>-0000
> @@ -69,5 +69,5 @@
>      /** Transforms the input object (leaving it unchanged) into some output object.
>        * @return the transformation of the input object to the output object
>        */
> -    public Object transform(Object input);
> +    Object transform(Object input);
>  }
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to