geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r953633 - in /geronimo/specs/trunk/geronimo-javamail_1.4_spec/src: main/java/javax/mail/internet/ main/java/org/apache/geronimo/mail/ test/java/javax/mail/internet/
Date Fri, 11 Jun 2010 09:50:03 GMT
Author: rickmcguire
Date: Fri Jun 11 09:50:03 2010
New Revision: 953633

URL: http://svn.apache.org/viewvc?rev=953633&view=rev
Log:
fix java 5 compilation errors

Modified:
    geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/MimeMultipart.java
    geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/ParameterList.java
    geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/org/apache/geronimo/mail/MailProviderBundleTrackerCustomizer.java
    geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/test/java/javax/mail/internet/MimeTest.java

Modified: geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/MimeMultipart.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/MimeMultipart.java?rev=953633&r1=953632&r2=953633&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/MimeMultipart.java
(original)
+++ geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/MimeMultipart.java
Fri Jun 11 09:50:03 2010
@@ -25,7 +25,6 @@ import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.nio.charset.Charset;
 
 import java.util.Arrays;
 
@@ -235,7 +234,7 @@ public class MimeMultipart extends Multi
                     // save the preamble, if there is one.
                     byte[] preambleBytes = preambleStream.toByteArray();
                     if (preambleBytes.length > 0) {
-                        preamble = new String(preambleBytes, Charset.forName("ISO8859-1"));
+                        preamble = new String(preambleBytes, "ISO8859-1");
                     }
                     return stripLinearWhiteSpace(line);
                 }
@@ -307,7 +306,7 @@ public class MimeMultipart extends Multi
                     // save the preamble, if there is one.
                     byte[] preambleBytes = preambleStream.toByteArray();
                     if (preambleBytes.length > 0) {
-                        preamble = new String(preambleBytes, Charset.forName("ISO8859-1"));
+                        preamble = new String(preambleBytes, "ISO8859-1");
                     }
                     return;
                 }

Modified: geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/ParameterList.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/ParameterList.java?rev=953633&r1=953632&r2=953633&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/ParameterList.java
(original)
+++ geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/internet/ParameterList.java
Fri Jun 11 09:50:03 2010
@@ -21,7 +21,6 @@ package javax.mail.internet;
 
 import java.io.ByteArrayOutputStream;
 import java.io.UnsupportedEncodingException;
-import java.nio.charset.Charset;
 import java.util.ArrayList;// Represents lists in things like
 import java.util.Collections;
 import java.util.Enumeration;
@@ -186,7 +185,7 @@ public class ParameterList {
                 encoder.encode(valueBytes, 0, valueBytes.length, out);
 
                 // default in case there is an exception
-                _parameters.put(name, new ParameterValue(name, value, new String(out.toByteArray(),
Charset.forName("ISO8859-1"))));
+                _parameters.put(name, new ParameterValue(name, value, new String(out.toByteArray(),
"ISO8859-1")));
                 return;
 
             } catch (Exception e) {

Modified: geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/org/apache/geronimo/mail/MailProviderBundleTrackerCustomizer.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/org/apache/geronimo/mail/MailProviderBundleTrackerCustomizer.java?rev=953633&r1=953632&r2=953633&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/org/apache/geronimo/mail/MailProviderBundleTrackerCustomizer.java
(original)
+++ geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/org/apache/geronimo/mail/MailProviderBundleTrackerCustomizer.java
Fri Jun 11 09:50:03 2010
@@ -47,7 +47,6 @@ public class MailProviderBundleTrackerCu
      *
      * @return A return object.
      */
-    @Override
     public Object addingBundle(Bundle bundle, BundleEvent event) {
         if (bundle.equals(activationBundle)) {
             return null;
@@ -57,13 +56,11 @@ public class MailProviderBundleTrackerCu
     }
 
 
-    @Override
     public void modifiedBundle(Bundle bundle, BundleEvent event, Object object) {
         // this will update for the new bundle
         MailProviderRegistry.registerBundle(bundle);
     }
 
-    @Override
     public void removedBundle(Bundle bundle, BundleEvent event, Object object) {
         MailProviderRegistry.unregisterBundle(bundle);
     }

Modified: geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/test/java/javax/mail/internet/MimeTest.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/test/java/javax/mail/internet/MimeTest.java?rev=953633&r1=953632&r2=953633&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/test/java/javax/mail/internet/MimeTest.java
(original)
+++ geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/test/java/javax/mail/internet/MimeTest.java
Fri Jun 11 09:50:03 2010
@@ -24,7 +24,6 @@ import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.nio.charset.Charset;
 import java.util.Properties;
 
 import javax.activation.DataHandler;
@@ -49,7 +48,7 @@ public class MimeTest extends TestCase {
         MimeBodyPart jpegPart = new MimeBodyPart();
         jpegPart.setContentID("<jpeg>");
         String filename = "filename";
-        String encodedFilename = "=?UTF-8?B?" + new String(Base64.encode(filename.getBytes()),
Charset.forName("ISO8859-1")) + "?=";
+        String encodedFilename = "=?UTF-8?B?" + new String(Base64.encode(filename.getBytes()),
"ISO8859-1") + "?=";
         jpegPart.setFileName(encodedFilename);
         jpegPart.setDataHandler(new DataHandler(new ByteArrayDataSource(new byte[] { 0, 1,
2, 3, 4, 5 }, "image/jpeg")));
         parts.addBodyPart(jpegPart);



Mime
View raw message