james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mwiederk...@apache.org
Subject svn commit: r733125 - in /james/mime4j/trunk/src/main: java/org/apache/james/mime4j/descriptor/ java/org/apache/james/mime4j/field/ javacc/org/apache/james/mime4j/field/contenttype/ javacc/org/apache/james/mime4j/field/datetime/ javacc/org/apache/james...
Date Fri, 09 Jan 2009 19:28:25 GMT
Author: mwiederkehr
Date: Fri Jan  9 11:28:24 2009
New Revision: 733125

URL: http://svn.apache.org/viewvc?rev=733125&view=rev
Log:
migrated JavaCC sources to Java 5 (related to MIME4J-85)

Modified:
    james/mime4j/trunk/src/main/java/org/apache/james/mime4j/descriptor/MaximalBodyDescriptor.java
    james/mime4j/trunk/src/main/java/org/apache/james/mime4j/field/ContentTypeField.java
    james/mime4j/trunk/src/main/javacc/org/apache/james/mime4j/field/contenttype/ContentTypeParser.jj
    james/mime4j/trunk/src/main/javacc/org/apache/james/mime4j/field/datetime/DateTimeParser.jj
    james/mime4j/trunk/src/main/javacc/org/apache/james/mime4j/field/language/ContentLanguageParser.jj
    james/mime4j/trunk/src/main/javacc/org/apache/james/mime4j/field/mimeversion/MimeVersionParser.jj
    james/mime4j/trunk/src/main/javacc/org/apache/james/mime4j/field/structured/StructuredFieldParser.jj
    james/mime4j/trunk/src/main/jjtree/org/apache/james/mime4j/field/address/AddressListParser.jjt

Modified: james/mime4j/trunk/src/main/java/org/apache/james/mime4j/descriptor/MaximalBodyDescriptor.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/main/java/org/apache/james/mime4j/descriptor/MaximalBodyDescriptor.java?rev=733125&r1=733124&r2=733125&view=diff
==============================================================================
--- james/mime4j/trunk/src/main/java/org/apache/james/mime4j/descriptor/MaximalBodyDescriptor.java
(original)
+++ james/mime4j/trunk/src/main/java/org/apache/james/mime4j/descriptor/MaximalBodyDescriptor.java
Fri Jan  9 11:28:24 2009
@@ -152,9 +152,7 @@
         if (value != null) {
             try {
                 final ContentLanguageParser parser = new ContentLanguageParser(new StringReader(value));
-                @SuppressWarnings("unchecked")
-                final List<String> stringList = (List<String>) parser.parse();
-                contentLanguage = stringList;
+                contentLanguage = parser.parse();
             } catch (MimeException e) {
                 contentLanguageParseException = e;
             }

Modified: james/mime4j/trunk/src/main/java/org/apache/james/mime4j/field/ContentTypeField.java
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/main/java/org/apache/james/mime4j/field/ContentTypeField.java?rev=733125&r1=733124&r2=733125&view=diff
==============================================================================
--- james/mime4j/trunk/src/main/java/org/apache/james/mime4j/field/ContentTypeField.java (original)
+++ james/mime4j/trunk/src/main/java/org/apache/james/mime4j/field/ContentTypeField.java Fri
Jan  9 11:28:24 2009
@@ -231,9 +231,7 @@
         if (type != null && subType != null) {
             mimeType = (type + "/" + subType).toLowerCase();
 
-            @SuppressWarnings("unchecked")
             List<String> paramNames = parser.getParamNames();
-            @SuppressWarnings("unchecked")
             List<String> paramValues = parser.getParamValues();
 
             if (paramNames != null && paramValues != null) {

Modified: james/mime4j/trunk/src/main/javacc/org/apache/james/mime4j/field/contenttype/ContentTypeParser.jj
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/main/javacc/org/apache/james/mime4j/field/contenttype/ContentTypeParser.jj?rev=733125&r1=733124&r2=733125&view=diff
==============================================================================
--- james/mime4j/trunk/src/main/javacc/org/apache/james/mime4j/field/contenttype/ContentTypeParser.jj
(original)
+++ james/mime4j/trunk/src/main/javacc/org/apache/james/mime4j/field/contenttype/ContentTypeParser.jj
Fri Jan  9 11:28:24 2009
@@ -28,7 +28,7 @@
 options {
 	STATIC=false;
 	LOOKAHEAD=1;
-	JDK_VERSION = "1.4";
+	JDK_VERSION = "1.5";
 	OUTPUT_DIRECTORY = "../../../../../../../../../target/generated-sources/javacc";
 	//DEBUG_PARSER=true;
 	//DEBUG_TOKEN_MANAGER=true;
@@ -55,19 +55,20 @@
  ****************************************************************/
 package org.apache.james.mime4j.field.contenttype.parser;
 
+import java.util.List;
 import java.util.ArrayList;
 
 public class ContentTypeParser {
 
 	private String type;
 	private String subtype;
-	private ArrayList paramNames = new ArrayList();
-	private ArrayList paramValues = new ArrayList();
+	private List<String> paramNames = new ArrayList<String>();
+	private List<String> paramValues = new ArrayList<String>();
 
 	public String getType() { return type; }
 	public String getSubType() { return subtype; }
-	public ArrayList getParamNames() { return paramNames; }
-	public ArrayList getParamValues() { return paramValues; }
+	public List<String> getParamNames() { return paramNames; }
+	public List<String> getParamValues() { return paramValues; }
 
     public static void main(String args[]) throws ParseException {
 	while (true) {

Modified: james/mime4j/trunk/src/main/javacc/org/apache/james/mime4j/field/datetime/DateTimeParser.jj
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/main/javacc/org/apache/james/mime4j/field/datetime/DateTimeParser.jj?rev=733125&r1=733124&r2=733125&view=diff
==============================================================================
--- james/mime4j/trunk/src/main/javacc/org/apache/james/mime4j/field/datetime/DateTimeParser.jj
(original)
+++ james/mime4j/trunk/src/main/javacc/org/apache/james/mime4j/field/datetime/DateTimeParser.jj
Fri Jan  9 11:28:24 2009
@@ -28,6 +28,7 @@
 options {
 	STATIC=false;
 	LOOKAHEAD=1;
+	JDK_VERSION = "1.5";
 	OUTPUT_DIRECTORY = "../../../../../../../../../target/generated-sources/javacc";
 	//DEBUG_PARSER=true;
 	//DEBUG_TOKEN_MANAGER=true;
@@ -56,8 +57,6 @@
 
 import org.apache.james.mime4j.field.datetime.DateTime;
 
-import java.util.Calendar;
-
 public class DateTimeParser {
     private static final boolean ignoreMilitaryZoneOffset = true;
 

Modified: james/mime4j/trunk/src/main/javacc/org/apache/james/mime4j/field/language/ContentLanguageParser.jj
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/main/javacc/org/apache/james/mime4j/field/language/ContentLanguageParser.jj?rev=733125&r1=733124&r2=733125&view=diff
==============================================================================
--- james/mime4j/trunk/src/main/javacc/org/apache/james/mime4j/field/language/ContentLanguageParser.jj
(original)
+++ james/mime4j/trunk/src/main/javacc/org/apache/james/mime4j/field/language/ContentLanguageParser.jj
Fri Jan  9 11:28:24 2009
@@ -19,7 +19,7 @@
 
 options {
   static=false;
-  JDK_VERSION = "1.4";
+  JDK_VERSION = "1.5";
   OUTPUT_DIRECTORY = "../../../../../../../../../target/generated-sources/javacc";
 }
 
@@ -48,13 +48,13 @@
 import java.util.List;
 
 public class ContentLanguageParser {
-	private ArrayList languages = new ArrayList();
+	private List<String> languages = new ArrayList<String>();
 	
 	/**
 	 * Parses the input into a list of language tags.
 	 * @return list of language tag Strings
 	 */
-	public List parse() throws ParseException {
+	public List<String> parse() throws ParseException {
 		try {
 			return doParse();
 		} catch (TokenMgrError e) {
@@ -67,7 +67,7 @@
 }
 PARSER_END(ContentLanguageParser)
 
-private List doParse() :
+private List<String> doParse() :
 {
 }
 {

Modified: james/mime4j/trunk/src/main/javacc/org/apache/james/mime4j/field/mimeversion/MimeVersionParser.jj
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/main/javacc/org/apache/james/mime4j/field/mimeversion/MimeVersionParser.jj?rev=733125&r1=733124&r2=733125&view=diff
==============================================================================
--- james/mime4j/trunk/src/main/javacc/org/apache/james/mime4j/field/mimeversion/MimeVersionParser.jj
(original)
+++ james/mime4j/trunk/src/main/javacc/org/apache/james/mime4j/field/mimeversion/MimeVersionParser.jj
Fri Jan  9 11:28:24 2009
@@ -19,7 +19,7 @@
 
 options {
   static=false;
-  JDK_VERSION = "1.4";
+  JDK_VERSION = "1.5";
   OUTPUT_DIRECTORY = "../../../../../../../../../target/generated-sources/javacc";
 }
 

Modified: james/mime4j/trunk/src/main/javacc/org/apache/james/mime4j/field/structured/StructuredFieldParser.jj
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/main/javacc/org/apache/james/mime4j/field/structured/StructuredFieldParser.jj?rev=733125&r1=733124&r2=733125&view=diff
==============================================================================
--- james/mime4j/trunk/src/main/javacc/org/apache/james/mime4j/field/structured/StructuredFieldParser.jj
(original)
+++ james/mime4j/trunk/src/main/javacc/org/apache/james/mime4j/field/structured/StructuredFieldParser.jj
Fri Jan  9 11:28:24 2009
@@ -19,7 +19,7 @@
 
 options {
   static=false;
-  JDK_VERSION = "1.4";
+  JDK_VERSION = "1.5";
   OUTPUT_DIRECTORY = "../../../../../../../../../target/generated-sources/javacc";
   //DEBUG_PARSER = true;
   //DEBUG_TOKEN_MANAGER = true;

Modified: james/mime4j/trunk/src/main/jjtree/org/apache/james/mime4j/field/address/AddressListParser.jjt
URL: http://svn.apache.org/viewvc/james/mime4j/trunk/src/main/jjtree/org/apache/james/mime4j/field/address/AddressListParser.jjt?rev=733125&r1=733124&r2=733125&view=diff
==============================================================================
--- james/mime4j/trunk/src/main/jjtree/org/apache/james/mime4j/field/address/AddressListParser.jjt
(original)
+++ james/mime4j/trunk/src/main/jjtree/org/apache/james/mime4j/field/address/AddressListParser.jjt
Fri Jan  9 11:28:24 2009
@@ -28,6 +28,7 @@
 options {
 	STATIC=false;
 	LOOKAHEAD=1;
+	JDK_VERSION = "1.5";
 	VISITOR=true;
 	MULTI=true;
 	NODE_SCOPE_HOOK=true;



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message