abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r421996 - /incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMContent.java
Date Fri, 14 Jul 2006 19:23:26 GMT
Author: jmsnell
Date: Fri Jul 14 12:23:26 2006
New Revision: 421996

URL: http://svn.apache.org/viewvc?rev=421996&view=rev
Log:
FOMContent was being a bit too helpful for it's own good.
Only set the content type if it's hasn't already been set.

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

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMContent.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMContent.java?rev=421996&r1=421995&r2=421996&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMContent.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMContent.java
Fri Jul 14 12:23:26 2006
@@ -250,13 +250,15 @@
         if (element != null)
           setValueElement(element);
         try {
-          setMimeType("application/xml");
+          if (getMimeType() == null)
+            setMimeType("application/xml");
         } catch (Exception e) {}
       } else if (Type.MEDIA.equals(type)) {
         _removeAllChildren();
         super.setText(value);
         try {
-          setMimeType("text/plain");
+          if (getMimeType() == null)
+            setMimeType("text/plain");
         } catch (Exception e) {}
       }
     } else {



Mime
View raw message