You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2019/11/13 03:06:52 UTC

[james-project] 03/21: [Refactoring] Remove unused methods from protocols-api

This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit ebd59ed3446e2f8da597f48f734fc54e696c2853
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Fri Nov 8 16:36:24 2019 +0700

    [Refactoring] Remove unused methods from protocols-api
---
 .../protocols/api/handler/WiringException.java     |  4 --
 .../james/protocols/api/utils/TestUtils.java       | 48 ----------------------
 2 files changed, 52 deletions(-)

diff --git a/protocols/api/src/main/java/org/apache/james/protocols/api/handler/WiringException.java b/protocols/api/src/main/java/org/apache/james/protocols/api/handler/WiringException.java
index 9e54ceb..19e85b2 100644
--- a/protocols/api/src/main/java/org/apache/james/protocols/api/handler/WiringException.java
+++ b/protocols/api/src/main/java/org/apache/james/protocols/api/handler/WiringException.java
@@ -25,10 +25,6 @@ public class WiringException extends Exception {
 
     private static final long serialVersionUID = 8824880646965171467L;
 
-    public WiringException() {
-        super();
-    }
-
     public WiringException(String message, Throwable t) {
         super(message, t);
     }
diff --git a/protocols/api/src/test/java/org/apache/james/protocols/api/utils/TestUtils.java b/protocols/api/src/test/java/org/apache/james/protocols/api/utils/TestUtils.java
deleted file mode 100644
index e3bb2b6..0000000
--- a/protocols/api/src/test/java/org/apache/james/protocols/api/utils/TestUtils.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/****************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one   *
- * or more contributor license agreements.  See the NOTICE file *
- * distributed with this work for additional information        *
- * regarding copyright ownership.  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.                                           *
- ****************************************************************/
-package org.apache.james.protocols.api.utils;
-
-import java.io.IOException;
-import java.net.ServerSocket;
-
-public class TestUtils {
-
-    private static final int START_PORT = 20000;
-    private static final int END_PORT = 30000;
-    
-    /**
-     * Return a free port which can be used to bind to
-     * 
-     * @return port
-     */
-    public static synchronized int getFreePort() {
-        for (int start = START_PORT; start <= END_PORT; start++) {
-            try {
-                ServerSocket socket = new ServerSocket(start);
-                socket.setReuseAddress(true);
-                socket.close();
-                return start;
-            } catch (IOException e) {
-                // ignore 
-            }
-            
-        }
-        throw new RuntimeException("Unable to find a free port....");
-    }
-}


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