PLUTO-601 Remove use of JDK 1.6 API

git-svn-id: https://svn.apache.org/repos/asf/portals/pluto/branches/pluto-2.0.x@1026934 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletAppDescriptorServiceImpl.java b/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletAppDescriptorServiceImpl.java
index de44103..b556423 100644
--- a/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletAppDescriptorServiceImpl.java
+++ b/pluto-container/src/main/java/org/apache/pluto/container/impl/PortletAppDescriptorServiceImpl.java
@@ -223,7 +223,9 @@
             app = (JAXBElement<?>) unmarshaller.unmarshal(delegatingStreamReader);
         }
         catch (JAXBException e) {
-            throw new IOException(e.getMessage(), e);
+            final IOException ioe = new IOException(e.getMessage());
+            ioe.initCause(e);
+            throw ioe;
         }
 
         PortletApplicationDefinition pad = null;
@@ -326,10 +328,14 @@
             marshaller.marshal(src,out);
         }
         catch (JAXBException jaxbEx){
-            throw new IOException(jaxbEx.getMessage(), jaxbEx);
+            final IOException ioe = new IOException(jaxbEx.getMessage());
+            ioe.initCause(jaxbEx);
+            throw ioe;
         }
         catch(Exception me) {
-            throw new IOException(me.getLocalizedMessage(), me);
+            final IOException ioe = new IOException(me.getLocalizedMessage());
+            ioe.initCause(me);
+            throw ioe;
         }
     }