tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r885999 - in /tomcat/trunk/java/org/apache: catalina/ant/jmx/JMXAccessorTask.java catalina/tribes/membership/Membership.java naming/resources/DirContextURLConnection.java
Date Tue, 01 Dec 2009 23:21:41 GMT
Author: markt
Date: Tue Dec  1 23:21:41 2009
New Revision: 885999

URL: http://svn.apache.org/viewvc?rev=885999&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48296
Generics and JavaDoc fixes
Patch provided by sebb

Modified:
    tomcat/trunk/java/org/apache/catalina/ant/jmx/JMXAccessorTask.java
    tomcat/trunk/java/org/apache/catalina/tribes/membership/Membership.java
    tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java

Modified: tomcat/trunk/java/org/apache/catalina/ant/jmx/JMXAccessorTask.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ant/jmx/JMXAccessorTask.java?rev=885999&r1=885998&r2=885999&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ant/jmx/JMXAccessorTask.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ant/jmx/JMXAccessorTask.java Tue Dec  1 23:21:41
2009
@@ -631,7 +631,7 @@
             TabularDataSupport data = (TabularDataSupport) result;
             for (Iterator<Object> iter = data.keySet().iterator(); iter.hasNext();)
{
                 Object key = iter.next();
-                for (Iterator<Object> iter1 = ((List<Object>) key).iterator();
iter1.hasNext();) {
+                for (Iterator<?> iter1 = ((List<?>) key).iterator(); iter1.hasNext();)
{
                     Object key1 = iter1.next();
                     CompositeData valuedata = data.get(new Object[] { key1 });
                     Object value = valuedata.get("value");

Modified: tomcat/trunk/java/org/apache/catalina/tribes/membership/Membership.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/membership/Membership.java?rev=885999&r1=885998&r2=885999&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/membership/Membership.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/membership/Membership.java Tue Dec  1 23:21:41
2009
@@ -68,7 +68,9 @@
     public Object clone() {
         synchronized (membersLock) {
             Membership clone = new Membership(local, memberComparator);
-            clone.map = (HashMap<MemberImpl, MbrEntry>) map.clone();
+            @SuppressWarnings("unchecked") // map is correct type already
+            final HashMap<MemberImpl, MbrEntry> tmpclone = (HashMap<MemberImpl,
MbrEntry>) map.clone();
+            clone.map = tmpclone;
             clone.members = new MemberImpl[members.length];
             System.arraycopy(members,0,clone.members,0,members.length);
             return clone;
@@ -110,8 +112,8 @@
      * Notify the membership that this member has announced itself.
      *
      * @param member - the member that just pinged us
-     * @return - true if this member is new to the cluster, false otherwise.
-     * @return - false if this member is the local member or updated.
+     * @return - true if this member is new to the cluster, false otherwise.<br/>
+     * - false if this member is the local member or updated.
      */
     public synchronized boolean memberAlive(MemberImpl member) {
         boolean result = false;

Modified: tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java?rev=885999&r1=885998&r2=885999&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java (original)
+++ tomcat/trunk/java/org/apache/naming/resources/DirContextURLConnection.java Tue Dec  1
23:21:41 2009
@@ -256,7 +256,7 @@
       }
 
       if (attributes == null)
-          return (Collections.EMPTY_MAP);
+          return (Collections.emptyMap());
 
       HashMap<String,List<String>> headerFields =
           new HashMap<String,List<String>>(attributes.size());
@@ -347,6 +347,7 @@
     /**
      * Get object content.
      */
+    @SuppressWarnings("unchecked") // overridden method uses raw type Class[]
     @Override
     public Object getContent(Class[] classes)
         throws IOException {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message