roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r1642165 - in /roller/trunk/app/src/main/java/org/apache/roller/weblogger: business/TestTask.java webservices/atomprotocol/RollerAtomHandler.java webservices/xmlrpc/MetaWeblogAPIHandler.java
Date Thu, 27 Nov 2014 14:51:45 GMT
Author: snoopdave
Date: Thu Nov 27 14:51:44 2014
New Revision: 1642165

URL: http://svn.apache.org/r1642165
Log:
Error handling improvements, and adding missing ASL header.

Modified:
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/TestTask.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/atomprotocol/RollerAtomHandler.java
    roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/xmlrpc/MetaWeblogAPIHandler.java

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/TestTask.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/TestTask.java?rev=1642165&r1=1642164&r2=1642165&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/TestTask.java (original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/business/TestTask.java Thu
Nov 27 14:51:44 2014
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  The ASF licenses this file to You
+ * under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.  For additional information regarding
+ * copyright in this work, please see the NOTICE file in the top level
+ * directory of this distribution.
+ */
 package org.apache.roller.weblogger.business;
 
 import java.util.Date;

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/atomprotocol/RollerAtomHandler.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/atomprotocol/RollerAtomHandler.java?rev=1642165&r1=1642164&r2=1642165&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/atomprotocol/RollerAtomHandler.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/atomprotocol/RollerAtomHandler.java
Thu Nov 27 14:51:44 2014
@@ -479,7 +479,7 @@ public class RollerAtomHandler implement
                 }
             }
         } catch (Exception e) {
-            log.debug(e);
+            log.debug("Error authenticating via BASIC Auth", e);
         }
         if (valid) {
             return userID;

Modified: roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/xmlrpc/MetaWeblogAPIHandler.java
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/xmlrpc/MetaWeblogAPIHandler.java?rev=1642165&r1=1642164&r2=1642165&view=diff
==============================================================================
--- roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/xmlrpc/MetaWeblogAPIHandler.java
(original)
+++ roller/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/xmlrpc/MetaWeblogAPIHandler.java
Thu Nov 27 14:51:44 2014
@@ -474,11 +474,16 @@ public class MetaWeblogAPIHandler extend
         
         struct.put("userid", entry.getCreator().getUserName());
         struct.put("author", entry.getCreator().getEmailAddress());
-        
-        Vector catArray = new Vector();
-        catArray.addElement(entry.getCategory().getName());
-        struct.put("categories", catArray);
-        
+       
+        if ( entry.getCategory() != null ) {
+            Vector catArray = new Vector();
+            catArray.addElement(entry.getCategory().getName());
+            struct.put("categories", catArray);
+
+        } else {
+            mLogger.warn("Entry " + entry.getId() + " has null category");
+        }
+
         return struct;
     }
     



Mime
View raw message