roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gango...@apache.org
Subject svn commit: r587921 - /roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/pings/WeblogUpdatePinger.java
Date Wed, 24 Oct 2007 16:12:34 GMT
Author: gangolli
Date: Wed Oct 24 09:12:33 2007
New Revision: 587921

URL: http://svn.apache.org/viewvc?rev=587921&view=rev
Log:
Fix for ROL-1585.

Modified:
    roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/pings/WeblogUpdatePinger.java

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/pings/WeblogUpdatePinger.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/pings/WeblogUpdatePinger.java?rev=587921&r1=587920&r2=587921&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/pings/WeblogUpdatePinger.java
(original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/pings/WeblogUpdatePinger.java
Wed Oct 24 09:12:33 2007
@@ -18,6 +18,7 @@
 
 package org.apache.roller.weblogger.business.pings;
 
+import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.roller.weblogger.config.PingConfig;
 import org.apache.roller.weblogger.pojos.PingTarget;
@@ -31,10 +32,9 @@
 import java.net.URL;
 import java.net.UnknownHostException;
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
-import org.apache.commons.logging.Log;
 
 /**
  * Utility for sending a weblog update ping.
@@ -94,8 +94,8 @@
      * @param pingTarget         the target site to ping
      * @param website            the website that changed (from which the ping originates)
      * @return the result message string sent by the server.
-     * @throws IOException
-     * @throws XmlRpcException
+     * @throws IOException if an IOException occurs during the ping
+     * @throws XmlRpcException if the XML RPC client throws one
      */
     public static PingResult sendPing(PingTarget pingTarget, Weblog website) throws IOException,
XmlRpcException {
         String websiteUrl = website.getAbsoluteURL();
@@ -113,7 +113,7 @@
             logger.debug("Executing ping to '" + pingTargetUrl + "' for website '" + websiteUrl
+ "' (" + website.getName() + ")" + (variantOptions.isEmpty() ? "" : " with variant options
" + variantOptions));
         }
 
-        // Send the ping.        
+        // Send the ping.
         XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
         config.setServerURL(new URL(pingTargetUrl));
         XmlRpcClient client = new XmlRpcClient();
@@ -128,8 +128,8 @@
         // Deal with the fact that some buggy ping targets may not respond with the proper
struct type.
         if (obj == null) return new PingResult(null,null);
         try {
-            // normal case: response is a struct (represented as a HashMap) with Boolean
flerror and String fields.
-            HashMap result = (HashMap) obj;
+            // normal case: response is a struct (represented as a Map) with Boolean flerror
and String fields.
+            Map result = (Map) obj;
             return new PingResult((Boolean) result.get("flerror"), (String) result.get("message"));
         } catch (Exception ex) {
             // exception case:  The caller responded with an unexpected type, though parsed
at the basic XML RPC level.



Mime
View raw message