roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
Subject svn commit: r434514 - /incubator/roller/branches/roller_3.0/src/org/apache/roller/util/URLUtilities.java
Date Thu, 24 Aug 2006 20:35:32 GMT
Author: agilliland
Date: Thu Aug 24 13:35:31 2006
New Revision: 434514

URL: http://svn.apache.org/viewvc?rev=434514&view=rev
Log:
better null checking.


Modified:
    incubator/roller/branches/roller_3.0/src/org/apache/roller/util/URLUtilities.java

Modified: incubator/roller/branches/roller_3.0/src/org/apache/roller/util/URLUtilities.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/util/URLUtilities.java?rev=434514&r1=434513&r2=434514&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/util/URLUtilities.java (original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/util/URLUtilities.java Thu
Aug 24 13:35:31 2006
@@ -77,6 +77,10 @@
                                             String locale,
                                             boolean absolute) {
         
+        if(weblog == null) {
+            return null;
+        }
+        
         StringBuffer url = new StringBuffer();
         
         if(absolute) {
@@ -103,6 +107,10 @@
                                                  String entryAnchor,
                                                  boolean absolute) {
         
+        if(weblog == null) {
+            return null;
+        }
+        
         StringBuffer url = new StringBuffer();
         
         url.append(getWeblogURL(weblog, locale, absolute));
@@ -147,6 +155,10 @@
                                                       int pageNum,
                                                       boolean absolute) {
         
+        if(weblog == null) {
+            return null;
+        }
+        
         StringBuffer pathinfo = new StringBuffer();
         Map params = new HashMap();
         
@@ -192,6 +204,10 @@
                                                 int pageNum,
                                                 boolean absolute) {
         
+        if(weblog == null) {
+            return null;
+        }
+        
         StringBuffer pathinfo = new StringBuffer();
         Map params = new HashMap();
         
@@ -230,6 +246,10 @@
                                                 boolean excerpts,
                                                 boolean absolute) {
         
+        if(weblog == null) {
+            return null;
+        }
+        
         StringBuffer url = new StringBuffer();
         
         url.append(getWeblogURL(weblog, locale, absolute));
@@ -257,6 +277,10 @@
                                                   int pageNum,
                                                   boolean absolute) {
         
+        if(weblog == null) {
+            return null;
+        }
+        
         StringBuffer url = new StringBuffer();
         
         url.append(getWeblogURL(weblog, locale, absolute));
@@ -286,6 +310,10 @@
                                                     String filePath,
                                                     boolean absolute) {
         
+        if(weblog == null) {
+            return null;
+        }
+        
         StringBuffer url = new StringBuffer();
         
         url.append(getWeblogURL(weblog, null, absolute));
@@ -306,6 +334,11 @@
      */
     public static final String getWeblogRsdURL(WebsiteData weblog,
                                                boolean absolute) {
+        
+        if(weblog == null) {
+            return null;
+        }
+        
         return getWeblogURL(weblog, null, absolute)+"rsd";
     }
     
@@ -314,6 +347,10 @@
      * Compose a map of key=value params into a query string.
      */
     public static final String getQueryString(Map params) {
+        
+        if(params == null) {
+            return null;
+        }
         
         StringBuffer queryString = new StringBuffer();
         



Mime
View raw message