abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r555875 - in /incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client: AbstractClientResponse.java ClientResponse.java
Date Fri, 13 Jul 2007 05:12:43 GMT
Author: jmsnell
Date: Thu Jul 12 22:12:42 2007
New Revision: 555875

URL: http://svn.apache.org/viewvc?view=rev&rev=555875
Log:
I'm really starting to dislike MimeTypeParseException.
There's no real need to throw it here

Modified:
    incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbstractClientResponse.java
    incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/ClientResponse.java

Modified: incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbstractClientResponse.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbstractClientResponse.java?view=diff&rev=555875&r1=555874&r2=555875
==============================================================================
--- incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbstractClientResponse.java
(original)
+++ incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/AbstractClientResponse.java
Thu Jul 12 22:12:42 2007
@@ -22,7 +22,6 @@
 import java.util.Date;
 
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 
 import org.apache.abdera.Abdera;
 import org.apache.abdera.i18n.iri.IRI;
@@ -124,11 +123,12 @@
       CacheControlUtil.parseCacheControl(cc, this);
   }
   
-  public String getCharacterEncoding() throws MimeTypeParseException {
-    MimeType mt = getContentType();
+  public String getCharacterEncoding() {
     String charset = null;
-    if (mt != null)
-      charset = mt.getParameter("charset");
+    try {
+      MimeType mt = getContentType();
+      if (mt != null) charset = mt.getParameter("charset");
+    } catch (Exception e) {}
     return charset;
   }
 

Modified: incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/ClientResponse.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/ClientResponse.java?view=diff&rev=555875&r1=555874&r2=555875
==============================================================================
--- incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/ClientResponse.java
(original)
+++ incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/ClientResponse.java
Thu Jul 12 22:12:42 2007
@@ -86,6 +86,6 @@
    * Return the character set encoding specified in the ContentType header, if ant
    * @throws MimeTypeParseException 
    */
-  String getCharacterEncoding() throws MimeTypeParseException;
+  String getCharacterEncoding();
   
 }



Mime
View raw message