james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r722585 - in /james/mpt/trunk: ./ antlib/src/main/java/org/apache/james/mpt/ant/ antlib/src/test/java/org/apache/james/mpt/ant/ main/src/main/java/org/apache/james/mpt/ main/src/test/java/org/apache/james/mpt/ src/site/xdoc/
Date Tue, 02 Dec 2008 19:29:31 GMT
Author: rdonkin
Date: Tue Dec  2 11:29:30 2008
New Revision: 722585

URL: http://svn.apache.org/viewvc?rev=722585&view=rev
Log:
Switch to Java 1.5

Modified:
    james/mpt/trunk/antlib/src/main/java/org/apache/james/mpt/ant/MailProtocolTestTask.java
    james/mpt/trunk/antlib/src/test/java/org/apache/james/mpt/ant/TestAddUser.java
    james/mpt/trunk/antlib/src/test/java/org/apache/james/mpt/ant/TestRunScripts.java
    james/mpt/trunk/main/src/main/java/org/apache/james/mpt/ProtocolInteractor.java
    james/mpt/trunk/main/src/main/java/org/apache/james/mpt/ProtocolSession.java
    james/mpt/trunk/main/src/main/java/org/apache/james/mpt/ProtocolSessionBuilder.java
    james/mpt/trunk/main/src/test/java/org/apache/james/mpt/DiscardProtocol.java
    james/mpt/trunk/main/src/test/java/org/apache/james/mpt/TestDiscardProtocol.java
    james/mpt/trunk/main/src/test/java/org/apache/james/mpt/TestExternalHostSystem.java
    james/mpt/trunk/main/src/test/java/org/apache/james/mpt/TestFileProtocolSessionBuilder.java
    james/mpt/trunk/pom.xml
    james/mpt/trunk/src/site/xdoc/index.xml

Modified: james/mpt/trunk/antlib/src/main/java/org/apache/james/mpt/ant/MailProtocolTestTask.java
URL: http://svn.apache.org/viewvc/james/mpt/trunk/antlib/src/main/java/org/apache/james/mpt/ant/MailProtocolTestTask.java?rev=722585&r1=722584&r2=722585&view=diff
==============================================================================
--- james/mpt/trunk/antlib/src/main/java/org/apache/james/mpt/ant/MailProtocolTestTask.java
(original)
+++ james/mpt/trunk/antlib/src/main/java/org/apache/james/mpt/ant/MailProtocolTestTask.java
Tue Dec  2 11:29:30 2008
@@ -55,7 +55,7 @@
     private String host = "127.0.0.1";
     private boolean skip = false;
     private String shabang = null;
-    private Collection users = new ArrayList();
+    private Collection<AddUser> users = new ArrayList<AddUser>();
     
     /**
      * Should progress output be suppressed?
@@ -163,7 +163,7 @@
         this.shabang = shabang;
     }
 
-    //@Override
+    @Override
     public void execute() throws BuildException {
         if (port <= 0) {
             throw new BuildException("Port must be set to a positive integer");

Modified: james/mpt/trunk/antlib/src/test/java/org/apache/james/mpt/ant/TestAddUser.java
URL: http://svn.apache.org/viewvc/james/mpt/trunk/antlib/src/test/java/org/apache/james/mpt/ant/TestAddUser.java?rev=722585&r1=722584&r2=722585&view=diff
==============================================================================
--- james/mpt/trunk/antlib/src/test/java/org/apache/james/mpt/ant/TestAddUser.java (original)
+++ james/mpt/trunk/antlib/src/test/java/org/apache/james/mpt/ant/TestAddUser.java Tue Dec
 2 11:29:30 2008
@@ -19,14 +19,12 @@
 
 package org.apache.james.mpt.ant;
 
-import java.io.File;
+import junit.framework.TestCase;
 
 import org.apache.james.mpt.DiscardProtocol;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.types.resources.Union;
 
-import junit.framework.TestCase;
-
 public class TestAddUser extends TestCase {
 
     private static final int PORT = 10001;

Modified: james/mpt/trunk/antlib/src/test/java/org/apache/james/mpt/ant/TestRunScripts.java
URL: http://svn.apache.org/viewvc/james/mpt/trunk/antlib/src/test/java/org/apache/james/mpt/ant/TestRunScripts.java?rev=722585&r1=722584&r2=722585&view=diff
==============================================================================
--- james/mpt/trunk/antlib/src/test/java/org/apache/james/mpt/ant/TestRunScripts.java (original)
+++ james/mpt/trunk/antlib/src/test/java/org/apache/james/mpt/ant/TestRunScripts.java Tue
Dec  2 11:29:30 2008
@@ -28,7 +28,6 @@
 import org.apache.james.mpt.DiscardProtocol;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.types.Resource;
-import org.apache.tools.ant.types.resources.FileResource;
 import org.apache.tools.ant.types.resources.StringResource;
 import org.apache.tools.ant.types.resources.Union;
 

Modified: james/mpt/trunk/main/src/main/java/org/apache/james/mpt/ProtocolInteractor.java
URL: http://svn.apache.org/viewvc/james/mpt/trunk/main/src/main/java/org/apache/james/mpt/ProtocolInteractor.java?rev=722585&r1=722584&r2=722585&view=diff
==============================================================================
--- james/mpt/trunk/main/src/main/java/org/apache/james/mpt/ProtocolInteractor.java (original)
+++ james/mpt/trunk/main/src/main/java/org/apache/james/mpt/ProtocolInteractor.java Tue Dec
 2 11:29:30 2008
@@ -40,7 +40,7 @@
     /**
      * adds a new Server Unordered Block to the test elements.
      */
-    public abstract void SUB(List serverLines, String location);
+    public abstract void SUB(List<String> serverLines, String location);
 
     /**
      * adds a new Client request line to the test elements
@@ -62,7 +62,7 @@
     /**
      * adds a new Server Unordered Block to the test elements.
      */
-    public abstract void SUB(int sessionNumber, List serverLines,
+    public abstract void SUB(int sessionNumber, List<String> serverLines,
             String location, String lastClientMessage);
 
 }
\ No newline at end of file

Modified: james/mpt/trunk/main/src/main/java/org/apache/james/mpt/ProtocolSession.java
URL: http://svn.apache.org/viewvc/james/mpt/trunk/main/src/main/java/org/apache/james/mpt/ProtocolSession.java?rev=722585&r1=722584&r2=722585&view=diff
==============================================================================
--- james/mpt/trunk/main/src/main/java/org/apache/james/mpt/ProtocolSession.java (original)
+++ james/mpt/trunk/main/src/main/java/org/apache/james/mpt/ProtocolSession.java Tue Dec 
2 11:29:30 2008
@@ -43,7 +43,7 @@
 
     private int maxSessionNumber;
 
-    protected List testElements = new ArrayList();
+    protected List<ProtocolElement> testElements = new ArrayList<ProtocolElement>();
 
     private Iterator elementsIterator;
 
@@ -137,7 +137,7 @@
     /**
      * @see org.apache.james.mpt.ProtocolScript#SUB(java.util.List, java.lang.String)
      */
-    public void SUB(List serverLines, String location) {
+    public void SUB(List<String> serverLines, String location) {
         testElements
                 .add(new ServerUnorderedBlockResponse(serverLines, location));
     }
@@ -171,7 +171,7 @@
     /**
      * @see org.apache.james.mpt.ProtocolScript#SUB(int, java.util.List, java.lang.String,
java.lang.String)
      */
-    public void SUB(int sessionNumber, List serverLines, String location,
+    public void SUB(int sessionNumber, List<String> serverLines, String location,
             String lastClientMessage) {
         this.maxSessionNumber = Math.max(this.maxSessionNumber, sessionNumber);
         testElements.add(new ServerUnorderedBlockResponse(sessionNumber,
@@ -406,7 +406,7 @@
      * non-specified order.
      */
     private class ServerUnorderedBlockResponse extends ServerResponse {
-        private List expectedLines = new ArrayList();
+        private List<String> expectedLines = new ArrayList<String>();
 
         /**
          * Sets up a ServerUnorderedBlockResponse with the list of expected
@@ -418,7 +418,7 @@
          * @param location
          *            A descriptive location string for error messages.
          */
-        public ServerUnorderedBlockResponse(List expectedLines, String location) {
+        public ServerUnorderedBlockResponse(List<String> expectedLines, String location)
{
             this(-1, expectedLines, location, null);
         }
 
@@ -436,7 +436,7 @@
          *            A descriptive location string for error messages.
          */
         public ServerUnorderedBlockResponse(int sessionNumber,
-                List expectedLines, String location, String lastClientMessage) {
+                List<String> expectedLines, String location, String lastClientMessage)
{
             super(sessionNumber, "<Unordered Block>", location,
                     lastClientMessage);
             this.expectedLines = expectedLines;
@@ -455,7 +455,7 @@
          */
         protected void checkResponse(Session session,
                 boolean continueAfterFailure) throws Exception {
-            List testLines = new ArrayList(expectedLines);
+            List<String> testLines = new ArrayList<String>(expectedLines);
             while (testLines.size() > 0) {
                 String actualLine = readLine(session);
 

Modified: james/mpt/trunk/main/src/main/java/org/apache/james/mpt/ProtocolSessionBuilder.java
URL: http://svn.apache.org/viewvc/james/mpt/trunk/main/src/main/java/org/apache/james/mpt/ProtocolSessionBuilder.java?rev=722585&r1=722584&r2=722585&view=diff
==============================================================================
--- james/mpt/trunk/main/src/main/java/org/apache/james/mpt/ProtocolSessionBuilder.java (original)
+++ james/mpt/trunk/main/src/main/java/org/apache/james/mpt/ProtocolSessionBuilder.java Tue
Dec  2 11:29:30 2008
@@ -190,7 +190,7 @@
                 }
                 session.SL(sessionNumber, serverMsg, location, lastClientMsg);
             } else if (line.startsWith(OPEN_UNORDERED_BLOCK_TAG)) {
-                List unorderedLines = new ArrayList(5);
+                List<String> unorderedLines = new ArrayList<String>(5);
                 line = reader.readLine();
 
                 while (!line.startsWith(CLOSE_UNORDERED_BLOCK_TAG)) {

Modified: james/mpt/trunk/main/src/test/java/org/apache/james/mpt/DiscardProtocol.java
URL: http://svn.apache.org/viewvc/james/mpt/trunk/main/src/test/java/org/apache/james/mpt/DiscardProtocol.java?rev=722585&r1=722584&r2=722585&view=diff
==============================================================================
--- james/mpt/trunk/main/src/test/java/org/apache/james/mpt/DiscardProtocol.java (original)
+++ james/mpt/trunk/main/src/test/java/org/apache/james/mpt/DiscardProtocol.java Tue Dec 
2 11:29:30 2008
@@ -54,9 +54,9 @@
      * Queues requests for recordings.
      * Also, used as lock.
      */
-    private final Queue queue;
+    private final Queue<Server> queue;
     
-    private final Collection runningServers;
+    private final Collection<Server> runningServers;
     
     /** 
      * Server socket when started, null otherwise.
@@ -68,8 +68,8 @@
     public DiscardProtocol(final int port) {
         super();
         this.port = port;
-        queue = new LinkedList();
-        runningServers = new LinkedList();
+        queue = new LinkedList<Server>();
+        runningServers = new LinkedList<Server>();
     }
     
     /**

Modified: james/mpt/trunk/main/src/test/java/org/apache/james/mpt/TestDiscardProtocol.java
URL: http://svn.apache.org/viewvc/james/mpt/trunk/main/src/test/java/org/apache/james/mpt/TestDiscardProtocol.java?rev=722585&r1=722584&r2=722585&view=diff
==============================================================================
--- james/mpt/trunk/main/src/test/java/org/apache/james/mpt/TestDiscardProtocol.java (original)
+++ james/mpt/trunk/main/src/test/java/org/apache/james/mpt/TestDiscardProtocol.java Tue Dec
 2 11:29:30 2008
@@ -59,7 +59,7 @@
 
     private DiscardProtocol.Record record;
     
-    //@Override
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         protocol = new DiscardProtocol(PORT);
@@ -68,7 +68,7 @@
         record = protocol.recordNext();
     }
 
-    //@Override
+    @Override
     protected void tearDown() throws Exception {
         protocol.stop();
         super.tearDown();

Modified: james/mpt/trunk/main/src/test/java/org/apache/james/mpt/TestExternalHostSystem.java
URL: http://svn.apache.org/viewvc/james/mpt/trunk/main/src/test/java/org/apache/james/mpt/TestExternalHostSystem.java?rev=722585&r1=722584&r2=722585&view=diff
==============================================================================
--- james/mpt/trunk/main/src/test/java/org/apache/james/mpt/TestExternalHostSystem.java (original)
+++ james/mpt/trunk/main/src/test/java/org/apache/james/mpt/TestExternalHostSystem.java Tue
Dec  2 11:29:30 2008
@@ -44,7 +44,7 @@
 
     private Mock mockUserAdder;
     
-    //@Override
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         protocol = new DiscardProtocol(PORT);
@@ -55,7 +55,7 @@
         userAdder = (UserAdder) mockUserAdder.proxy();
     }
 
-    //@Override
+    @Override
     protected void tearDown() throws Exception {
         protocol.stop();
         super.tearDown();

Modified: james/mpt/trunk/main/src/test/java/org/apache/james/mpt/TestFileProtocolSessionBuilder.java
URL: http://svn.apache.org/viewvc/james/mpt/trunk/main/src/test/java/org/apache/james/mpt/TestFileProtocolSessionBuilder.java?rev=722585&r1=722584&r2=722585&view=diff
==============================================================================
--- james/mpt/trunk/main/src/test/java/org/apache/james/mpt/TestFileProtocolSessionBuilder.java
(original)
+++ james/mpt/trunk/main/src/test/java/org/apache/james/mpt/TestFileProtocolSessionBuilder.java
Tue Dec  2 11:29:30 2008
@@ -35,7 +35,7 @@
 
     private Mock mockSession;
     
-    //@Override
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         builder = new ProtocolSessionBuilder();
@@ -43,7 +43,7 @@
         session = (ProtocolInteractor) mockSession.proxy();
     }
 
-    //@Override
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }

Modified: james/mpt/trunk/pom.xml
URL: http://svn.apache.org/viewvc/james/mpt/trunk/pom.xml?rev=722585&r1=722584&r2=722585&view=diff
==============================================================================
--- james/mpt/trunk/pom.xml (original)
+++ james/mpt/trunk/pom.xml Tue Dec  2 11:29:30 2008
@@ -51,8 +51,8 @@
         <artifactId>maven-compiler-plugin</artifactId>
         <configuration>
           <optimize>true</optimize>
-          <source>1.4</source>
-          <target>1.4</target>
+          <source>1.5</source>
+          <target>1.5</target>
         </configuration>
       </plugin>
       <plugin>

Modified: james/mpt/trunk/src/site/xdoc/index.xml
URL: http://svn.apache.org/viewvc/james/mpt/trunk/src/site/xdoc/index.xml?rev=722585&r1=722584&r2=722585&view=diff
==============================================================================
--- james/mpt/trunk/src/site/xdoc/index.xml (original)
+++ james/mpt/trunk/src/site/xdoc/index.xml Tue Dec  2 11:29:30 2008
@@ -26,10 +26,11 @@
  </properties>
 
 <body>
-<section name="What is the Apache James MTP?">
+<section name="What is the Apache James MPT?">
 <p>
-Apache James Mail Protocol Tester (MTP) is  a framework for the 
-scritable functional testing of ASCII based line protocols.</p>
+Apache James Mail Protocol Tester (MPT) is  a framework for the 
+scritable functional testing of ASCII based line protocols. 
+Apache James MPT requires Java 1.5 or higher.</p>
 <subsection name='Modules'>
 <p>
 The <a href='main'>main library</a> contains the basic frameworks suitable



---------------------------------------------------------------------
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