abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r620056 - /incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/ProviderHelper.java
Date Sat, 09 Feb 2008 01:27:23 GMT
Author: jmsnell
Date: Fri Feb  8 17:27:22 2008
New Revision: 620056

URL: http://svn.apache.org/viewvc?rev=620056&view=rev
Log:
Per https://issues.apache.org/jira/browse/ABDERA-110

Modified:
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/ProviderHelper.java

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/ProviderHelper.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/ProviderHelper.java?rev=620056&r1=620055&r2=620056&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/ProviderHelper.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/ProviderHelper.java
Fri Feb  8 17:27:22 2008
@@ -561,21 +561,23 @@
     Entry entry) {
       String editUri = null;
       List<Link> editLinks = entry.getLinks("edit");
-      for (Link link : editLinks) {
-        // if there is more than one edit link, we should not automatically
-        // assume that it's always going to point to an Atom document
-        // representation.
-        if (link.getMimeType() != null) {
-          if (MimeTypeHelper.isMatch(
-                link.getMimeType().toString(), 
-                Constants.ATOM_MEDIA_TYPE)) {
+      if (editLinks != null) {
+        for (Link link : editLinks) {
+          // if there is more than one edit link, we should not automatically
+          // assume that it's always going to point to an Atom document
+          // representation.
+          if (link.getMimeType() != null) {
+            if (MimeTypeHelper.isMatch(
+                  link.getMimeType().toString(), 
+                  Constants.ATOM_MEDIA_TYPE)) {
+              editUri = link.getResolvedHref().toString();
+              break;
+            }
+          } else {
+            // edit link with no type attribute is the right one to use
             editUri = link.getResolvedHref().toString();
             break;
           }
-        } else {
-          // edit link with no type attribute is the right one to use
-          editUri = link.getResolvedHref().toString();
-          break;
         }
       }
      return editUri;



Mime
View raw message