abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r517335 - /incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java
Date Mon, 12 Mar 2007 19:04:02 GMT
Author: jmsnell
Date: Mon Mar 12 12:04:01 2007
New Revision: 517335

URL: http://svn.apache.org/viewvc?view=rev&rev=517335
Log:
Better handling of the list of accepted media ranges

Modified:
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java?view=diff&rev=517335&r1=517334&r2=517335
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java
Mon Mar 12 12:04:01 2007
@@ -146,10 +146,8 @@
   
   public String[] getAccept(){
     String accept = _getElementValue(ACCEPT);
-    String[] list = accept.split(",");
-    for (int n = 0; n < list.length; n++) {
-      list[n] = list[n].trim();
-    }
+    if (accept == null) return new String[0];
+    String[] list = accept.trim().split("\\s*,\\s*");
     return MimeTypeHelper.condense(list);
   }
 



Mime
View raw message