abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r564810 - in /incubator/abdera/java/trunk: client/src/main/java/org/apache/abdera/protocol/client/ contrib/rss/src/main/java/org/apache/abdera/contrib/rss/ core/src/main/java/org/apache/abdera/model/ core/src/main/java/org/apache/abdera/uti...
Date Sat, 11 Aug 2007 00:13:32 GMT
Author: jmsnell
Date: Fri Aug 10 17:13:30 2007
New Revision: 564810

URL: http://svn.apache.org/viewvc?view=rev&rev=564810
Log:
The JAF MimeTypeParseException does not extend RuntimeException so we had to catch it all over 
the place.  That sucks and is completely unnecessary.  This update provides an alternative
that extends RuntimeException and is used to wrap the JAF exception whenever it is thrown.

Java exception handling sucks.

Added:
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/MimeTypeParseException.java
Modified:
    incubator/abdera/java/trunk/client/src/main/java/org/apache/abdera/protocol/client/ClientResponse.java
    incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssChannel.java
    incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssContent.java
    incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssEnclosure.java
    incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssFeed.java
    incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssGuid.java
    incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssItem.java
    incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssLink.java
    incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssSource.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Collection.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Content.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Document.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Link.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Source.java
    incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/MimeTypeHelper.java
    incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java
    incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/editor/Editor.java
    incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/json/JSONWriter.java
    incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/license/LicenseHelper.java
    incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaContent.java
    incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/InReplyTo.java
    incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/ThreadHelper.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMCollection.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMContent.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDocument.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMLink.java
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java
    incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedValidatorTest.java
    incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/Request.java
    incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/Response.java
    incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractRequest.java
    incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractResponse.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/BaseResponseContext.java

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=564810&r1=564809&r2=564810
==============================================================================
--- 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 Fri Aug 10 17:13:30 2007
@@ -21,8 +21,6 @@
 import java.io.InputStream;
 import java.util.Date;
 
-import javax.activation.MimeTypeParseException;
-
 import org.apache.abdera.model.Document;
 import org.apache.abdera.model.Element;
 import org.apache.abdera.parser.ParseException;
@@ -84,7 +82,6 @@
   
   /**
    * Return the character set encoding specified in the ContentType header, if ant
-   * @throws MimeTypeParseException 
    */
   String getCharacterEncoding();
   

Modified: incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssChannel.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssChannel.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssChannel.java (original)
+++ incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssChannel.java Fri Aug 10 17:13:30 2007
@@ -23,7 +23,6 @@
 import java.util.List;
 import java.util.Map;
 
-import javax.activation.MimeTypeParseException;
 import javax.xml.namespace.QName;
 
 import org.apache.abdera.Abdera;
@@ -168,7 +167,7 @@
   }
 
   public Link addLink(String href, String rel, String type, String title,
-      String hreflang, long length) throws MimeTypeParseException {
+      String hreflang, long length) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -178,8 +177,7 @@
     return link;
   }
 
-  public Link getAlternateLink(String type, String hreflang)
-      throws MimeTypeParseException {
+  public Link getAlternateLink(String type, String hreflang){
     return getAlternateLink();
   }
 
@@ -188,8 +186,7 @@
     return (link != null) ? link.getResolvedHref() : null;
   }
 
-  public IRI getAlternateLinkResolvedHref(String type, String hreflang)
-      throws MimeTypeParseException {
+  public IRI getAlternateLinkResolvedHref(String type, String hreflang){
     return getAlternateLinkResolvedHref();
   }
 

Modified: incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssContent.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssContent.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssContent.java (original)
+++ incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssContent.java Fri Aug 10 17:13:30 2007
@@ -19,7 +19,6 @@
 
 import javax.activation.DataHandler;
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 import javax.xml.namespace.QName;
 
 import org.apache.abdera.factory.Factory;
@@ -80,7 +79,7 @@
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setMimeType(String type) throws MimeTypeParseException {
+  public void setMimeType(String type){
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 

Modified: incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssEnclosure.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssEnclosure.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssEnclosure.java (original)
+++ incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssEnclosure.java Fri Aug 10 17:13:30 2007
@@ -20,7 +20,6 @@
 import java.util.List;
 
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 import javax.xml.namespace.QName;
 
 import org.apache.abdera.factory.Factory;
@@ -55,9 +54,13 @@
     return (l != null) ? Integer.parseInt(l) : -1;
   }
 
-  public MimeType getMimeType() throws MimeTypeParseException {
-    String type = getAttributeValue("type");
-    return (type != null) ? new MimeType(type) : null;
+  public MimeType getMimeType() {
+    try {
+      String type = getAttributeValue("type");
+      return (type != null) ? new MimeType(type) : null;
+    } catch (javax.activation.MimeTypeParseException e) {
+      throw new org.apache.abdera.util.MimeTypeParseException(e);
+    }
   }
 
   public String getRel() {
@@ -84,7 +87,7 @@
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setMimeType(String type) throws MimeTypeParseException {
+  public void setMimeType(String type) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 

Modified: incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssFeed.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssFeed.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssFeed.java (original)
+++ incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssFeed.java Fri Aug 10 17:13:30 2007
@@ -21,7 +21,6 @@
 import java.util.Date;
 import java.util.List;
 
-import javax.activation.MimeTypeParseException;
 import javax.xml.namespace.QName;
 
 import org.apache.abdera.factory.Factory;
@@ -150,7 +149,7 @@
   }
 
   public Link addLink(String href, String rel, String type, String title,
-      String hreflang, long length) throws MimeTypeParseException {
+      String hreflang, long length) {
     return getChannel().addLink(href, rel, type, title, hreflang, length);
   }
 
@@ -158,8 +157,7 @@
     return getChannel().getAlternateLink();
   }
 
-  public Link getAlternateLink(String type, String hreflang)
-      throws MimeTypeParseException {
+  public Link getAlternateLink(String type, String hreflang){
     return getChannel().getAlternateLink(type, hreflang);
   }
 
@@ -167,8 +165,7 @@
     return getChannel().getAlternateLinkResolvedHref();
   }
 
-  public IRI getAlternateLinkResolvedHref(String type, String hreflang)
-      throws MimeTypeParseException {
+  public IRI getAlternateLinkResolvedHref(String type, String hreflang){
     return getChannel().getAlternateLinkResolvedHref(type, hreflang);
   }
 

Modified: incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssGuid.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssGuid.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssGuid.java (original)
+++ incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssGuid.java Fri Aug 10 17:13:30 2007
@@ -20,7 +20,6 @@
 import java.util.List;
 
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 import javax.xml.namespace.QName;
 
 import org.apache.abdera.factory.Factory;
@@ -78,7 +77,7 @@
     return -1;
   }
 
-  public MimeType getMimeType() throws MimeTypeParseException {
+  public MimeType getMimeType() {
     return null;
   }
 
@@ -106,7 +105,7 @@
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setMimeType(String type) throws MimeTypeParseException {
+  public void setMimeType(String type) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 

Modified: incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssItem.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssItem.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssItem.java (original)
+++ incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssItem.java Fri Aug 10 17:13:30 2007
@@ -24,7 +24,6 @@
 
 import javax.activation.DataHandler;
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 import javax.xml.namespace.QName;
 
 import org.apache.abdera.factory.Factory;
@@ -109,7 +108,7 @@
   }
 
   public Link addLink(String href, String rel, String type, String title,
-      String hreflang, long length) throws MimeTypeParseException {
+      String hreflang, long length) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -125,7 +124,7 @@
   }
 
   public Link getAlternateLink(String type, String hreflang)
-      throws MimeTypeParseException {
+      {
     return getAlternateLink();
   }
 
@@ -135,7 +134,7 @@
   }
 
   public IRI getAlternateLinkResolvedHref(String type, String hreflang)
-      throws MimeTypeParseException {
+      {
     return getAlternateLinkResolvedHref();
   }
 
@@ -231,7 +230,7 @@
   }
 
   public Link getEditMediaLink(String type, String hreflang)
-      throws MimeTypeParseException {
+      {
     return null;
   }
 
@@ -240,7 +239,7 @@
   }
 
   public IRI getEditMediaLinkResolvedHref(String type, String hreflang)
-      throws MimeTypeParseException {
+      {
     return null;
   }
 
@@ -411,17 +410,17 @@
   }
 
   public Content setContent(Element element, String mediaType)
-      throws MimeTypeParseException {
+      {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
   public Content setContent(DataHandler dataHandler)
-      throws MimeTypeParseException {
+      {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
   public Content setContent(DataHandler dataHandler, String mediatype)
-      throws MimeTypeParseException {
+      {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
@@ -430,17 +429,17 @@
   }
 
   public Content setContent(InputStream inputStream, String mediatype)
-      throws MimeTypeParseException {
+      {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
   public Content setContent(String value, String mediatype)
-      throws MimeTypeParseException {
+      {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
   public Content setContent(IRI uri, String mediatype)
-      throws MimeTypeParseException {
+      {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 

Modified: incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssLink.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssLink.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssLink.java (original)
+++ incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssLink.java Fri Aug 10 17:13:30 2007
@@ -18,7 +18,6 @@
 package org.apache.abdera.contrib.rss;
 
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 import javax.xml.namespace.QName;
 
 import org.apache.abdera.factory.Factory;
@@ -52,7 +51,7 @@
     return -1;
   }
 
-  public MimeType getMimeType() throws MimeTypeParseException {
+  public MimeType getMimeType() {
     return null;
   }
 
@@ -87,7 +86,7 @@
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public void setMimeType(String type) throws MimeTypeParseException {
+  public void setMimeType(String type) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 

Modified: incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssSource.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssSource.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssSource.java (original)
+++ incubator/abdera/java/trunk/contrib/rss/src/main/java/org/apache/abdera/contrib/rss/RssSource.java Fri Aug 10 17:13:30 2007
@@ -20,7 +20,6 @@
 import java.util.Date;
 import java.util.List;
 
-import javax.activation.MimeTypeParseException;
 import javax.xml.namespace.QName;
 
 import org.apache.abdera.factory.Factory;
@@ -105,12 +104,11 @@
   }
 
   public Link addLink(String href, String rel, String type, String title,
-      String hreflang, long length) throws MimeTypeParseException {
+      String hreflang, long length) {
     throw new UnsupportedOperationException("Modifications are not allowed");
   }
 
-  public Link getAlternateLink(String type, String hreflang)
-      throws MimeTypeParseException {
+  public Link getAlternateLink(String type, String hreflang)  {
     return getAlternateLink();
   }
 
@@ -119,8 +117,7 @@
     return (link != null) ? link.getResolvedHref() : null;
   }
 
-  public IRI getAlternateLinkResolvedHref(String type, String hreflang)
-      throws MimeTypeParseException {
+  public IRI getAlternateLinkResolvedHref(String type, String hreflang) {
     Link link = getAlternateLink();
     return (link != null) ? link.getResolvedHref() : null;
   }

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Collection.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Collection.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Collection.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Collection.java Fri Aug 10 17:13:30 2007
@@ -20,7 +20,6 @@
 import java.util.List;
 
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 
 import org.apache.abdera.i18n.iri.IRI;
 
@@ -115,7 +114,7 @@
    * @param mediaRanges a listing of media-ranges 
    * @throws MimeTypeParseException 
    */
-  void setAccept(String... mediaRanges) throws MimeTypeParseException;
+  void setAccept(String... mediaRanges);
   
   /**
    * Returns true if the collection accepts the given media-type

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Content.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Content.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Content.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Content.java Fri Aug 10 17:13:30 2007
@@ -19,7 +19,6 @@
 
 import javax.activation.DataHandler;
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 
 import org.apache.abdera.util.MimeTypeHelper;
 import org.apache.abdera.i18n.iri.IRI;
@@ -179,7 +178,7 @@
    * @param type The media type 
    * @throws MimeTypeParseException if the media type is malformed 
    */
-  void setMimeType(String type) throws MimeTypeParseException;
+  void setMimeType(String type);
 
   /**
    * <p>RFC4287: atom:content MAY have a "src" attribute, whose value MUST 

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Document.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Document.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Document.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Document.java Fri Aug 10 17:13:30 2007
@@ -21,7 +21,6 @@
 import java.util.Date;
 
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 
 import org.apache.abdera.i18n.iri.IRI;
 import org.apache.abdera.i18n.lang.Lang;
@@ -77,7 +76,7 @@
    * @param contentType The content type of document
    * @throws MimeTypeParseException if the content type is malformed
    */
-  void setContentType(String contentType) throws MimeTypeParseException;
+  void setContentType(String contentType);
   
   /**
    * Returns the last modified date for this document

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java Fri Aug 10 17:13:30 2007
@@ -24,7 +24,6 @@
 
 import javax.activation.DataHandler;
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 
 import org.apache.abdera.i18n.iri.IRI;
 
@@ -231,14 +230,14 @@
    * @param mediaType The media type of the element
    * @throws MimeTypeParseException  if the mediaType is malformed
    */
-  Content setContent(Element element, String mediaType) throws MimeTypeParseException;
+  Content setContent(Element element, String mediaType);
   
   /**
    * Sets the content for this entry 
    * @param dataHandler The Data Handler containing the binary content needing Base64 encoding.
    * @throws MimeTypeParseException if the media Type specified by the dataHandler is malformed
    */
-  Content setContent(DataHandler dataHandler) throws MimeTypeParseException;
+  Content setContent(DataHandler dataHandler);
   
   /**
    * Sets the content for this entry
@@ -247,7 +246,7 @@
    * @return The created content element
    * @throws MimeTypeParseException if the media type specified is malformed
    */
-  Content setContent(DataHandler dataHandler, String mediatype) throws MimeTypeParseException;
+  Content setContent(DataHandler dataHandler, String mediatype);
   
   /**
    * Sets the content for this entry
@@ -263,7 +262,7 @@
    * @return The created content element
    * @throws MimeTypeParseException if the media type specified is malformed
    */
-  Content setContent(InputStream inputStream, String mediatype) throws MimeTypeParseException;
+  Content setContent(InputStream inputStream, String mediatype);
   
   /**
    * Sets the content for this entry
@@ -272,7 +271,7 @@
    * @return The newly created atom:content
    * @throws MimeTypeParseException if the media type is malformed
    */
-  Content setContent(String value, String mediatype) throws MimeTypeParseException;
+  Content setContent(String value, String mediatype);
   
   /**
    * Sets the content for this entry as out of line.
@@ -283,7 +282,7 @@
    * @throws MimeTypeParseException if the mime type is invalid.
    * @throws IRISyntaxException if the URI is invalid.
    */
-  Content setContent(IRI uri, String mediatype) throws MimeTypeParseException;
+  Content setContent(IRI uri, String mediatype);
   
   /**
    * Returns the text of the content element
@@ -440,7 +439,7 @@
    * @return The newly created atom:link
    * @throws IRISyntaxException if the href is malformed
    */  
-  Link addLink(String href, String rel, String type, String title, String hreflang, long length) throws MimeTypeParseException;
+  Link addLink(String href, String rel, String type, String title, String hreflang, long length);
   
   /**
    * RFC4287: The "atom:published" element is a Date construct indicating an
@@ -842,7 +841,7 @@
    * @return The matching atom:link
    * @throws MimeTypeParseException if the type is malformed
    */
-  Link getAlternateLink(String type, String hreflang) throws MimeTypeParseException;
+  Link getAlternateLink(String type, String hreflang);
   
   /**
    * Returns this entries first enclosure link
@@ -869,7 +868,7 @@
    * @return A matching atom:link element
    * @throws MimeTypeParseException 
    */
-  Link getEditMediaLink(String type, String hreflang) throws MimeTypeParseException;
+  Link getEditMediaLink(String type, String hreflang);
   
   /**
    * Returns this entries first self link
@@ -899,7 +898,7 @@
    * @return The resolved IRI
    * @throws IRISyntaxException if the href attribute is malformed
    */
-  IRI getAlternateLinkResolvedHref(String type, String hreflang) throws MimeTypeParseException;
+  IRI getAlternateLinkResolvedHref(String type, String hreflang);
 
   /**
    * Return a link href resolved against the in-scope Base URI
@@ -930,7 +929,7 @@
    * @throws IRISyntaxException if the href attribute is malformed
    * @throws MimeTypeParseException if the type is malformed
    */
-  IRI getEditMediaLinkResolvedHref(String type, String hreflang) throws MimeTypeParseException;
+  IRI getEditMediaLinkResolvedHref(String type, String hreflang);
  
   /**
    * Return a link href resolved against the in-scope Base URI

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Link.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Link.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Link.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Link.java Fri Aug 10 17:13:30 2007
@@ -18,7 +18,6 @@
 package org.apache.abdera.model;
 
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 
 import org.apache.abdera.i18n.iri.IRI;
 
@@ -155,7 +154,7 @@
    * @return The value of the type attribute
    * @throws MimeTypeParseException if the type is malformed
    */
-  MimeType getMimeType() throws MimeTypeParseException;
+  MimeType getMimeType();
 
   /**
    * RFC4287: On the link element, the "type" attribute's value is an advisory
@@ -168,7 +167,7 @@
    * @param type The link type
    * @throws MimeTypeParseException if the type is malformed
    */
-  void setMimeType(String type) throws MimeTypeParseException;
+  void setMimeType(String type);
   
   /**
    * RFC4287: The "hreflang" attribute's content describes the language of the

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Source.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Source.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Source.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/model/Source.java Fri Aug 10 17:13:30 2007
@@ -20,8 +20,6 @@
 import java.util.Date;
 import java.util.List;
 
-import javax.activation.MimeTypeParseException;
-
 import org.apache.abdera.i18n.iri.IRI;
 
 /**
@@ -335,7 +333,7 @@
    * @return The newly created atom:link
    * @throws IRISyntaxException if the href is malformed
    */
-  Link addLink(String href, String rel, String type, String title, String hreflang, long length) throws MimeTypeParseException;
+  Link addLink(String href, String rel, String type, String title, String hreflang, long length);
    
   /**
    * RFC4287: The "atom:logo" element's content is an IRI reference [RFC3987] 
@@ -644,7 +642,7 @@
    * @return A matching atom:link
    * @throws MimeTypeParseException if the type if malformed
    */
-  Link getAlternateLink(String type, String hreflang) throws MimeTypeParseException;
+  Link getAlternateLink(String type, String hreflang);
   
   /**
    * @param rel A link relation
@@ -668,7 +666,7 @@
    * @return A matching atom:link
    * @throws MimeTypeParseException if the type if malformed
    */
-  IRI getAlternateLinkResolvedHref(String type, String hreflang) throws MimeTypeParseException;
+  IRI getAlternateLinkResolvedHref(String type, String hreflang);
   
   /**
    * Return an app:collection element associatd with this atom:source.  The 

Modified: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/MimeTypeHelper.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/MimeTypeHelper.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/MimeTypeHelper.java (original)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/MimeTypeHelper.java Fri Aug 10 17:13:30 2007
@@ -25,7 +25,6 @@
 
 import javax.activation.MimeType;
 import javax.activation.MimeTypeParameterList;
-import javax.activation.MimeTypeParseException;
 
 import org.apache.abdera.model.Base;
 import org.apache.abdera.model.Categories;
@@ -187,7 +186,7 @@
     try {
       new MimeType(a);
       answer = true;
-    } catch (MimeTypeParseException e) {
+    } catch (javax.activation.MimeTypeParseException e) {
       answer = false;
     }
     return answer;

Added: incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/MimeTypeParseException.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/MimeTypeParseException.java?view=auto&rev=564810
==============================================================================
--- incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/MimeTypeParseException.java (added)
+++ incubator/abdera/java/trunk/core/src/main/java/org/apache/abdera/util/MimeTypeParseException.java Fri Aug 10 17:13:30 2007
@@ -0,0 +1,34 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  The ASF licenses this file to You
+* under the Apache License, Version 2.0 (the "License"); you may not
+* use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.  For additional information regarding
+* copyright in this work, please see the NOTICE file in the top level
+* directory of this distribution.
+*/
+package org.apache.abdera.util;
+
+/**
+ * An alternative to JAF's MimeTypeParseException that extends RuntimeException
+ * so we don't have to explicitly catch it everywhere.
+ */
+public class MimeTypeParseException
+    extends RuntimeException {
+
+  private static final long serialVersionUID = -8706972350332367299L;
+
+  public MimeTypeParseException(
+    javax.activation.MimeTypeParseException cause) {
+      super (cause);
+  }
+
+}

Modified: incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java (original)
+++ incubator/abdera/java/trunk/core/src/test/java/org/apache/abdera/test/core/CoreTest.java Fri Aug 10 17:13:30 2007
@@ -32,7 +32,6 @@
 
 import javax.activation.DataHandler;
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 import javax.xml.namespace.QName;
 
 import junit.framework.TestCase;
@@ -245,7 +244,7 @@
       return null;
     }
 
-    public Link addLink(String href, String rel, String type, String title, String hreflang, long length) throws MimeTypeParseException {
+    public Link addLink(String href, String rel, String type, String title, String hreflang, long length){
       return null;
     }
 
@@ -253,7 +252,7 @@
       return null;
     }
 
-    public Link getAlternateLink(String type, String hreflang) throws MimeTypeParseException {
+    public Link getAlternateLink(String type, String hreflang){
       return null;
     }
 
@@ -261,7 +260,7 @@
       return null;
     }
 
-    public IRI getAlternateLinkResolvedHref(String type, String hreflang) throws MimeTypeParseException {
+    public IRI getAlternateLinkResolvedHref(String type, String hreflang){
       return null;
     }
 
@@ -774,7 +773,7 @@
       return null;
     }
 
-    public Link addLink(String href, String rel, String type, String title, String hreflang, long length) throws MimeTypeParseException {
+    public Link addLink(String href, String rel, String type, String title, String hreflang, long length){
       return null;
     }
 
@@ -782,7 +781,7 @@
       return null;
     }
 
-    public Link getAlternateLink(String type, String hreflang) throws MimeTypeParseException {
+    public Link getAlternateLink(String type, String hreflang){
       return null;
     }
 
@@ -790,7 +789,7 @@
       return null;
     }
 
-    public IRI getAlternateLinkResolvedHref(String type, String hreflang) throws MimeTypeParseException {
+    public IRI getAlternateLinkResolvedHref(String type, String hreflang){
       return null;
     }
 
@@ -858,7 +857,7 @@
       return null;
     }
 
-    public Link getEditMediaLink(String type, String hreflang) throws MimeTypeParseException {
+    public Link getEditMediaLink(String type, String hreflang){
       return null;
     }
 
@@ -866,7 +865,7 @@
       return null;
     }
 
-    public IRI getEditMediaLinkResolvedHref(String type, String hreflang) throws MimeTypeParseException {
+    public IRI getEditMediaLinkResolvedHref(String type, String hreflang){
       return null;
     }
 
@@ -998,15 +997,15 @@
       return null;
     }
 
-    public Content setContent(Element element, String mediaType) throws MimeTypeParseException {
+    public Content setContent(Element element, String mediaType){
       return null;
     }
 
-    public Content setContent(DataHandler dataHandler) throws MimeTypeParseException {
+    public Content setContent(DataHandler dataHandler){
       return null;
     }
 
-    public Content setContent(DataHandler dataHandler, String mediatype) throws MimeTypeParseException {
+    public Content setContent(DataHandler dataHandler, String mediatype){
       return null;
     }
 
@@ -1014,15 +1013,15 @@
       return null;
     }
 
-    public Content setContent(InputStream inputStream, String mediatype) throws MimeTypeParseException {
+    public Content setContent(InputStream inputStream, String mediatype){
       return null;
     }
 
-    public Content setContent(String value, String mediatype) throws MimeTypeParseException {
+    public Content setContent(String value, String mediatype){
       return null;
     }
 
-    public Content setContent(IRI uri, String mediatype) throws MimeTypeParseException {
+    public Content setContent(IRI uri, String mediatype){
       return null;
     }
 

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/editor/Editor.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/editor/Editor.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/editor/Editor.java (original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/editor/Editor.java Fri Aug 10 17:13:30 2007
@@ -23,7 +23,6 @@
 import java.util.List;
 
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 
 import org.apache.abdera.Abdera;
 import org.apache.abdera.ext.history.FeedPagingHelper;
@@ -333,9 +332,8 @@
     }
     
     public void refresh() 
-      throws MimeTypeParseException, 
-             IOException {
-      getMedia(editMediaLink);
+      throws IOException {
+        getMedia(editMediaLink);
     }
 
   }

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/json/JSONWriter.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/json/JSONWriter.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/json/JSONWriter.java (original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/json/JSONWriter.java Fri Aug 10 17:13:30 2007
@@ -22,8 +22,6 @@
 import java.io.OutputStream;
 import java.util.List;
 
-import javax.activation.MimeTypeParseException;
-
 import org.apache.abdera.model.Base;
 import org.apache.abdera.model.Category;
 import org.apache.abdera.model.Collection;
@@ -271,7 +269,7 @@
     return jspersons;
   }
 
-  private static JSONArray linksToJSON(List<Link> links) throws MimeTypeParseException, JSONException {
+  private static JSONArray linksToJSON(List<Link> links) throws JSONException {
     JSONArray jslinks = new JSONArray();
     for (Link link : links) {
       JSONObject jslink = new JSONObject();

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/license/LicenseHelper.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/license/LicenseHelper.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/license/LicenseHelper.java (original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/license/LicenseHelper.java Fri Aug 10 17:13:30 2007
@@ -19,8 +19,6 @@
 
 import java.util.List;
 
-import javax.activation.MimeTypeParseException;
-
 import org.apache.abdera.i18n.iri.IRI;
 import org.apache.abdera.model.Base;
 import org.apache.abdera.model.Entry;
@@ -121,24 +119,14 @@
   public static Link addLicense(
     Base base, 
     String iri) {
-    try {
       return addLicense(base, iri, null, null, null);
-    } catch (MimeTypeParseException m) {
-      // not going to happen
-      return null;
-    }
   }
   
   public static Link addLicense(
     Base base,
     String iri,
     String title) {
-    try {
       return addLicense(base, iri, null, title, null);
-    } catch (MimeTypeParseException m) {
-      // not going to happen
-      return null;
-    }
   }
   
   public static Link addLicense(
@@ -146,8 +134,7 @@
     String iri,
     String type,
     String title,
-    String hreflang) 
-      throws MimeTypeParseException {
+    String hreflang) {
     if (hasLicense(base, iri,false))
       throw new IllegalStateException("License '" + iri + "' has already been added");
     if (hasUnspecifiedLicense(base,false))

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaContent.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaContent.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaContent.java (original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/media/MediaContent.java Fri Aug 10 17:13:30 2007
@@ -18,7 +18,6 @@
 package org.apache.abdera.ext.media;
 
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 import javax.xml.namespace.QName;
 
 import org.apache.abdera.factory.Factory;
@@ -61,9 +60,13 @@
       removeAttribute(new QName("filesize"));
   }
   
-  public MimeType getType() throws MimeTypeParseException {
-    String type = getAttributeValue("type");
-    return (type != null) ? new MimeType(type) : null;
+  public MimeType getType() {
+    try {
+      String type = getAttributeValue("type");
+      return (type != null) ? new MimeType(type) : null;
+    } catch (javax.activation.MimeTypeParseException e) {
+      throw new org.apache.abdera.util.MimeTypeParseException(e);
+    }
   }
   
   public void setType(String type) {

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/InReplyTo.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/InReplyTo.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/InReplyTo.java (original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/InReplyTo.java Fri Aug 10 17:13:30 2007
@@ -18,7 +18,6 @@
 package org.apache.abdera.ext.thread;
 
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 
 import org.apache.abdera.factory.Factory;
 import org.apache.abdera.model.Element;
@@ -41,9 +40,13 @@
     return (href != null) ? new IRI(href) : null;
   }
 
-  public MimeType getMimeType() throws MimeTypeParseException {
-    String type = getAttributeValue("type");
-    return (type != null) ? new MimeType(type) : null;
+  public MimeType getMimeType() {
+    try {
+      String type = getAttributeValue("type");
+      return (type != null) ? new MimeType(type) : null;
+    } catch (javax.activation.MimeTypeParseException e) {
+      throw new org.apache.abdera.util.MimeTypeParseException(e);
+    }
   }
 
   public IRI getRef() {
@@ -80,7 +83,7 @@
     setAttributeValue("type", mimeType.toString());
   }
 
-  public void setMimeType(String mimeType) throws MimeTypeParseException {
+  public void setMimeType(String mimeType) {
     setAttributeValue("type", mimeType);
   }
 

Modified: incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/ThreadHelper.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/ThreadHelper.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/ThreadHelper.java (original)
+++ incubator/abdera/java/trunk/extensions/src/main/java/org/apache/abdera/ext/thread/ThreadHelper.java Fri Aug 10 17:13:30 2007
@@ -22,7 +22,6 @@
 import java.util.List;
 
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 
 import org.apache.abdera.factory.Factory;
 import org.apache.abdera.model.AtomDate;
@@ -164,8 +163,7 @@
     String ref, 
     String source, 
     String href, 
-    String type) 
-      throws MimeTypeParseException {
+    String type) {
     InReplyTo irt = addInReplyTo(entry, ref);
     if (irt != null) {
       if (source != null) irt.setSource(source);

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=564810&r1=564809&r2=564810
==============================================================================
--- 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 Fri Aug 10 17:13:30 2007
@@ -22,7 +22,6 @@
 import java.util.List;
 
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 import javax.xml.namespace.QName;
 
 import org.apache.abdera.model.Categories;
@@ -56,8 +55,7 @@
   public FOMCollection(
     String title, 
     String href, 
-    String[] accepts) 
-      throws MimeTypeParseException {
+    String[] accepts) {
     this();
     setTitle(title);
     setHref(href);
@@ -164,11 +162,11 @@
     }
   }
 
-  public void setAccept(String mediaRange) throws MimeTypeParseException {
+  public void setAccept(String mediaRange) {
     setAccept(new String[] {mediaRange});
   }
   
-  public void setAccept(String... mediaRanges) throws MimeTypeParseException {
+  public void setAccept(String... mediaRanges) {
     if (mediaRanges != null && mediaRanges.length > 0) {
       _removeChildren(ACCEPT, true);
       _removeChildren(PRE_RFC_ACCEPT, true);
@@ -180,7 +178,11 @@
           if (type.equalsIgnoreCase("entry")) {
             addSimpleExtension(ACCEPT,"application/atom+xml;type=entry");
           } else {
-            addSimpleExtension(ACCEPT, new MimeType(type).toString());
+            try {
+              addSimpleExtension(ACCEPT, new MimeType(type).toString());
+            } catch (javax.activation.MimeTypeParseException e) {
+              throw new org.apache.abdera.util.MimeTypeParseException(e);
+            }
           }
         }
       }
@@ -211,15 +213,11 @@
   }
   
   public void setAcceptsEntry() {
-    try {
-      setAccept("application/atom+xml;type=entry");
-    } catch (MimeTypeParseException m) {}
+    setAccept("application/atom+xml;type=entry");
   }
   
   public void setAcceptsNothing() {
-    try {
-      setAccept("");
-    } catch (MimeTypeParseException m) {}
+    setAccept("");
   }
   
   public boolean acceptsEntry() {

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?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- 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 Aug 10 17:13:30 2007
@@ -19,7 +19,6 @@
 
 import javax.activation.DataHandler;
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 import javax.activation.URLDataSource;
 import javax.xml.namespace.QName;
 
@@ -134,13 +133,11 @@
       
       MimeType mtype = this.getMimeType();
       if (mtype == null) {
-        try {
-          String mt = getFactory().getMimeType(value);
-          if (mt != null) {
-            setMimeType(mt);
-            mtype = getMimeType();
-          }
-        } catch (MimeTypeParseException e) {}
+        String mt = getFactory().getMimeType(value);
+        if (mt != null) {
+          setMimeType(mt);
+          mtype = getMimeType();
+        }
       }
       
       if (value instanceof Div && !type.equals(Content.Type.XML)) 
@@ -168,11 +165,15 @@
     return type;
   }
   
-  public void setMimeType(String type) throws MimeTypeParseException {
-    if (type != null)
-      setAttributeValue(TYPE, (new MimeType(type)).toString());
-    else
-      removeAttribute(TYPE);
+  public void setMimeType(String type) {
+    try {
+      if (type != null)
+        setAttributeValue(TYPE, (new MimeType(type)).toString());
+      else
+        removeAttribute(TYPE);
+    } catch (javax.activation.MimeTypeParseException e) {
+      throw new org.apache.abdera.util.MimeTypeParseException(e);
+    }      
   }
 
   public IRI getSrc() {

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDocument.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDocument.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDocument.java (original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMDocument.java Fri Aug 10 17:13:30 2007
@@ -26,7 +26,6 @@
 import java.util.List;
 
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 import javax.xml.stream.XMLStreamException;
 
 import org.apache.abdera.factory.Factory;
@@ -191,10 +190,14 @@
     return contentType;
   }
   
-  public void setContentType(String contentType) throws MimeTypeParseException {
-    this.contentType = new MimeType(contentType);
-    if (this.contentType.getParameter("charset") != null)
-      setCharset(this.contentType.getParameter("charset"));
+  public void setContentType(String contentType) {
+    try {
+      this.contentType = new MimeType(contentType);
+      if (this.contentType.getParameter("charset") != null)
+        setCharset(this.contentType.getParameter("charset"));
+    } catch (javax.activation.MimeTypeParseException e) {
+      throw new org.apache.abdera.util.MimeTypeParseException(e);
+    }
   }
   
   public Date getLastModified() {

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java (original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java Fri Aug 10 17:13:30 2007
@@ -32,7 +32,6 @@
 
 import javax.activation.DataHandler;
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLStreamException;
 //import javax.xml.stream.XMLStreamWriter;
@@ -702,8 +701,7 @@
   protected Link selectLink(
     List<Link> links, 
     String type, 
-    String hreflang) 
-      throws MimeTypeParseException {
+    String hreflang) {
     for (Link link : links) {
       MimeType mt = link.getMimeType();
       boolean typematch =  

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java (original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java Fri Aug 10 17:13:30 2007
@@ -24,7 +24,6 @@
 
 import javax.activation.DataHandler;
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 import javax.xml.namespace.QName;
 
 import org.apache.abdera.model.AtomDate;
@@ -229,19 +228,23 @@
    * Sets the content for this entry
    * @throws MimeTypeParseException 
    */
-  public Content setContent(Element element, String mediaType) throws MimeTypeParseException {
-    FOMFactory factory = (FOMFactory) this.factory;
-    Content content = factory.newContent(new MimeType(mediaType));
-    content.setValueElement(element);
-    setContentElement(content);
-    return content;
+  public Content setContent(Element element, String mediaType){
+    try {
+      FOMFactory factory = (FOMFactory) this.factory;
+      Content content = factory.newContent(new MimeType(mediaType));
+      content.setValueElement(element);
+      setContentElement(content);
+      return content;
+    } catch (javax.activation.MimeTypeParseException e) {
+      throw new org.apache.abdera.util.MimeTypeParseException(e);
+    }
   }
   
   /**
    * Sets the content for this entry
    * @throws MimeTypeParseException 
    */
-  public Content setContent(DataHandler dataHandler) throws MimeTypeParseException {
+  public Content setContent(DataHandler dataHandler){
      return setContent(dataHandler, dataHandler.getContentType());
   }  
   
@@ -249,12 +252,16 @@
    * Sets the content for this entry
    * @throws MimeTypeParseException 
    */
-  public Content setContent(DataHandler dataHandler, String mediatype) throws MimeTypeParseException {
-    FOMFactory factory = (FOMFactory) this.factory;
-    Content content = factory.newContent(new MimeType(mediatype));
-    content.setDataHandler(dataHandler);
-    setContentElement(content);
-    return content;
+  public Content setContent(DataHandler dataHandler, String mediatype) {
+    try {
+      FOMFactory factory = (FOMFactory) this.factory;
+      Content content = factory.newContent(new MimeType(mediatype));
+      content.setDataHandler(dataHandler);
+      setContentElement(content);
+      return content;
+    } catch (javax.activation.MimeTypeParseException e) {
+      throw new org.apache.abdera.util.MimeTypeParseException(e);
+    }
   }
   
   /**
@@ -263,19 +270,14 @@
   public Content setContent(InputStream in) {
     InputStreamDataSource ds = new InputStreamDataSource(in);
     DataHandler dh = new DataHandler(ds);
-    Content content = null;
-    try {
-      content = setContent(dh);
-    } catch (MimeTypeParseException e) {
-      // should not happen
-    }
+    Content content = setContent(dh);
     return content;
   }
   
   /**
    * Sets the content for this entry
    */
-  public Content setContent(InputStream in, String mediatype) throws MimeTypeParseException {
+  public Content setContent(InputStream in, String mediatype){
     InputStreamDataSource ds = new InputStreamDataSource(in, mediatype);
     DataHandler dh = new DataHandler(ds);
     return setContent(dh, mediatype);
@@ -285,12 +287,16 @@
    * Sets the content for this entry
    * @throws MimeTypeParseException 
    */
-  public Content setContent(String value, String mediatype) throws MimeTypeParseException {
-    FOMFactory factory = (FOMFactory) this.factory;
-    Content content = factory.newContent(new MimeType(mediatype));
-    content.setValue(value);
-    setContentElement(content);
-    return content;
+  public Content setContent(String value, String mediatype){
+    try {
+      FOMFactory factory = (FOMFactory) this.factory;
+      Content content = factory.newContent(new MimeType(mediatype));
+      content.setValue(value);
+      setContentElement(content);
+      return content;
+    } catch (javax.activation.MimeTypeParseException e) {
+      throw new org.apache.abdera.util.MimeTypeParseException(e);
+    }
   }
   
   /**
@@ -298,12 +304,16 @@
    * @throws MimeTypeParseException 
  * @throws IRISyntaxException 
    */
-  public Content setContent(IRI uri, String mediatype) throws MimeTypeParseException {
-    FOMFactory factory = (FOMFactory) this.factory;
-    Content content = factory.newContent(new MimeType(mediatype));
-    content.setSrc(uri.toString());
-    setContentElement(content);
-    return content;
+  public Content setContent(IRI uri, String mediatype) {
+    try {
+      FOMFactory factory = (FOMFactory) this.factory;
+      Content content = factory.newContent(new MimeType(mediatype));
+      content.setSrc(uri.toString());
+      setContentElement(content);
+      return content;
+    } catch (javax.activation.MimeTypeParseException e) {
+      throw new org.apache.abdera.util.MimeTypeParseException(e);
+    }
   }
 
   
@@ -412,7 +422,7 @@
     String title, 
     String hreflang, 
     long length) 
-      throws MimeTypeParseException {
+     {
     FOMFactory fomfactory = (FOMFactory) factory;
     Link link = fomfactory.newLink(this);
     link.setHref(href);
@@ -815,14 +825,14 @@
   public Link getAlternateLink(
     String type, 
     String hreflang) 
-      throws MimeTypeParseException {
+     {
     return selectLink(getLinks(Link.REL_ALTERNATE), type, hreflang);
   }
 
   public IRI getAlternateLinkResolvedHref(
     String type, 
     String hreflang) 
-      throws MimeTypeParseException {
+     {
     Link link = getAlternateLink(type, hreflang);
     return (link != null) ? link.getResolvedHref() : null;
   }
@@ -830,14 +840,14 @@
   public Link getEditMediaLink(
     String type, 
     String hreflang) 
-      throws MimeTypeParseException {
+     {
     return selectLink(getLinks(Link.REL_EDIT_MEDIA), type, hreflang);
   }
 
   public IRI getEditMediaLinkResolvedHref(
     String type, 
     String hreflang) 
-      throws MimeTypeParseException {
+     {
     Link link = getEditMediaLink(type, hreflang);
     return (link != null) ? link.getResolvedHref() : null;
   }

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java (original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMFactory.java Fri Aug 10 17:13:30 2007
@@ -21,7 +21,6 @@
 import java.util.List;
 
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 import javax.xml.namespace.QName;
 
 import org.apache.abdera.Abdera;
@@ -241,10 +240,8 @@
       if (type == null) type = Content.Type.TEXT;
       Content content = 
         new FOMContent(type, (OMContainer)parent,this);
-      try {
-        if (type.equals(Content.Type.XML))
-          content.setMimeType(XML_MEDIA_TYPE);
-      } catch (MimeTypeParseException e) { /* Can't happen */ }
+      if (type.equals(Content.Type.XML))
+        content.setMimeType(XML_MEDIA_TYPE);
       return content;
   }
   
@@ -259,9 +256,7 @@
       (MimeTypeHelper.isXml(mediaType.toString())) ? 
          Content.Type.XML : Content.Type.MEDIA;
     Content content = newContent(type, parent);
-    try {
-      content.setMimeType(mediaType.toString());
-    } catch (MimeTypeParseException e) { /* Can't happen */ }
+    content.setMimeType(mediaType.toString());
     return content;
   }
 

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMLink.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMLink.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMLink.java (original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMLink.java Fri Aug 10 17:13:30 2007
@@ -21,7 +21,6 @@
 import java.util.Map;
 
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 import javax.xml.namespace.QName;
 
 import org.apache.abdera.model.Link;
@@ -124,20 +123,28 @@
     setAttributeValue(REL, rel);
   }
 
-  public MimeType getMimeType() throws MimeTypeParseException {
-    String type = getAttributeValue(TYPE);
-    return (type != null) ? new MimeType(type) : null;
+  public MimeType getMimeType() {
+    try {
+      String type = getAttributeValue(TYPE);
+      return (type != null) ? new MimeType(type) : null;
+    } catch (javax.activation.MimeTypeParseException e) {
+      throw new org.apache.abdera.util.MimeTypeParseException(e);
+    }
   }
   
   public void setMimeType(MimeType type) {
     setAttributeValue(TYPE, (type != null) ? type.toString() : null);
   }
 
-  public void setMimeType(String type) throws MimeTypeParseException {
-    if (type != null) 
-      setAttributeValue(TYPE, (new MimeType(type)).toString());
-    else
-      removeAttribute(TYPE);
+  public void setMimeType(String type) {
+    try {
+      if (type != null) 
+        setAttributeValue(TYPE, (new MimeType(type)).toString());
+     else
+        removeAttribute(TYPE);
+    } catch (javax.activation.MimeTypeParseException e) {
+      throw new org.apache.abdera.util.MimeTypeParseException(e);
+    }
   }
 
   public String getHrefLang() {

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java (original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMSource.java Fri Aug 10 17:13:30 2007
@@ -21,7 +21,6 @@
 import java.util.Iterator;
 import java.util.List;
 
-import javax.activation.MimeTypeParseException;
 import javax.xml.namespace.QName;
 
 import org.apache.abdera.model.AtomDate;
@@ -263,7 +262,7 @@
     return link;    
   }
   
-  public Link addLink(String href, String rel, String type, String title, String hreflang, long length) throws MimeTypeParseException {
+  public Link addLink(String href, String rel, String type, String title, String hreflang, long length) {
     FOMFactory fomfactory = (FOMFactory) factory;
     Link link = fomfactory.newLink(this);
     link.setHref(href);
@@ -592,15 +591,13 @@
   
   public Link getAlternateLink(
     String type, 
-    String hreflang) 
-      throws MimeTypeParseException {
+    String hreflang) {
     return selectLink(getLinks(Link.REL_ALTERNATE), type, hreflang);
   }
 
   public IRI getAlternateLinkResolvedHref(
     String type, 
-    String hreflang) 
-      throws MimeTypeParseException {
+    String hreflang) {
     Link link = getAlternateLink(type, hreflang);
     return (link != null) ? link.getResolvedHref() : null;
   }

Modified: incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedValidatorTest.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedValidatorTest.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedValidatorTest.java (original)
+++ incubator/abdera/java/trunk/parser/src/test/java/org/apache/abdera/test/parser/stax/FeedValidatorTest.java Fri Aug 10 17:13:30 2007
@@ -25,7 +25,6 @@
 import java.util.List;
 
 import javax.activation.DataHandler;
-import javax.activation.MimeTypeParseException;
 
 import org.apache.abdera.model.AtomDate;
 import org.apache.abdera.model.Category;
@@ -42,6 +41,7 @@
 import org.apache.abdera.model.Person;
 import org.apache.abdera.model.Source;
 import org.apache.abdera.model.Text;
+import org.apache.abdera.util.MimeTypeParseException;
 import org.apache.abdera.util.URIHelper;
 import org.apache.abdera.i18n.iri.IRI;
 import org.apache.abdera.i18n.iri.IRISyntaxException;

Modified: incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/Request.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/Request.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/Request.java (original)
+++ incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/Request.java Fri Aug 10 17:13:30 2007
@@ -21,7 +21,6 @@
 import java.util.List;
 
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 
 import org.apache.abdera.protocol.util.ProtocolConstants;
 import org.apache.abdera.util.EntityTag;
@@ -52,7 +51,7 @@
   
   String getSlug();
   
-  MimeType getContentType() throws MimeTypeParseException;
+  MimeType getContentType();
   
   Date getDateHeader(String name);
   

Modified: incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/Response.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/Response.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/Response.java (original)
+++ incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/Response.java Fri Aug 10 17:13:30 2007
@@ -22,7 +22,6 @@
 import java.util.Map;
 
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 
 import org.apache.abdera.protocol.util.ProtocolConstants;
 import org.apache.abdera.util.EntityTag;
@@ -60,7 +59,7 @@
   
   public long getContentLength();
   
-  public MimeType getContentType() throws MimeTypeParseException;
+  public MimeType getContentType();
   
   public String getAllow();
   

Modified: incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractRequest.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractRequest.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractRequest.java (original)
+++ incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractRequest.java Fri Aug 10 17:13:30 2007
@@ -21,7 +21,6 @@
 import java.util.List;
 
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 
 import org.apache.abdera.i18n.iri.Escaping;
 import org.apache.abdera.protocol.Request;
@@ -62,9 +61,13 @@
     return Escaping.decode(EncodingUtil.decode(getHeader("Slug")));
   }
 
-  public MimeType getContentType() throws MimeTypeParseException {
-    String value = getHeader("Content-Type");
-    return (value != null) ? new MimeType(value) : null;
+  public MimeType getContentType() {
+    try {
+      String value = getHeader("Content-Type");
+      return (value != null) ? new MimeType(value) : null;
+    } catch (javax.activation.MimeTypeParseException e) {
+      throw new org.apache.abdera.util.MimeTypeParseException(e);
+    }
   }
 
   public EntityTag[] getIfMatch() {

Modified: incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractResponse.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractResponse.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractResponse.java (original)
+++ incubator/abdera/java/trunk/protocol/src/main/java/org/apache/abdera/protocol/util/AbstractResponse.java Fri Aug 10 17:13:30 2007
@@ -20,7 +20,6 @@
 import java.util.Date;
 
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 
 import org.apache.abdera.protocol.Response;
 import org.apache.abdera.util.EntityTag;
@@ -74,9 +73,13 @@
     return getDecodedHeader("Slug");
   }
 
-  public MimeType getContentType() throws MimeTypeParseException {
-    String value = getHeader("Content-Type");
-    return (value != null) ? new MimeType(value) : null;
+  public MimeType getContentType() {
+    try {
+      String value = getHeader("Content-Type");
+      return (value != null) ? new MimeType(value) : null;
+    } catch (javax.activation.MimeTypeParseException e) {
+      throw new org.apache.abdera.util.MimeTypeParseException(e);
+    }
   }
 
   public EntityTag getEntityTag() {

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/BaseResponseContext.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/BaseResponseContext.java?view=diff&rev=564810&r1=564809&r2=564810
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/BaseResponseContext.java (original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/BaseResponseContext.java Fri Aug 10 17:13:30 2007
@@ -22,7 +22,6 @@
 import java.io.OutputStream;
 
 import javax.activation.MimeType;
-import javax.activation.MimeTypeParseException;
 
 import org.apache.abdera.model.Base;
 import org.apache.abdera.util.MimeTypeHelper;
@@ -71,14 +70,17 @@
   }
 
   @Override
-  public MimeType getContentType() 
-    throws MimeTypeParseException {
+  public MimeType getContentType() {
+    try {
       MimeType t = super.getContentType();
       if (t == null) {
         String type = MimeTypeHelper.getMimeType(base);
         if (type != null) t = new MimeType(type);
       }
       return t;
+    } catch (javax.activation.MimeTypeParseException e) {
+      throw new org.apache.abdera.util.MimeTypeParseException(e);
+    }
   }
 
   @Override



Mime
View raw message