Remove dead code common-app-api 77/45277/2
authorTal Gitelman <tg851x@intl.att.com>
Mon, 30 Apr 2018 14:40:28 +0000 (17:40 +0300)
committerTal Gitelman <tg851x@intl.att.com>
Mon, 30 Apr 2018 15:59:04 +0000 (15:59 +0000)
Change-Id: I305c40c3795687d6e8e9bc42ec4f8fb8769020cf
Issue-ID: SDC-1270
Signed-off-by: Tal Gitelman <tg851x@intl.att.com>
catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/PortalServlet.java
catalog-fe/src/test/java/org/openecomp/sdc/servlets/FeProxyServletTest.java
common-app-api/src/main/java/org/openecomp/sdc/common/util/EitherPair.java [deleted file]

index ad5d08e..140b293 100644 (file)
@@ -37,7 +37,6 @@ import javax.ws.rs.core.Context;
 import org.openecomp.portalsdk.core.onboarding.util.CipherUtil;
 import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants;
 import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties;
-import org.openecomp.sdc.common.config.EcompErrorName;
 import org.openecomp.sdc.common.impl.MutableHttpServletRequest;
 import org.openecomp.sdc.fe.Constants;
 import org.openecomp.sdc.fe.config.Configuration;
index f3bd9a7..7143e87 100644 (file)
@@ -25,7 +25,6 @@ import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
-import java.net.URI;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/util/EitherPair.java b/common-app-api/src/main/java/org/openecomp/sdc/common/util/EitherPair.java
deleted file mode 100644 (file)
index 44f0d25..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.openecomp.sdc.common.util;
-
-import fj.data.Either;
-
-import java.util.function.BiFunction;
-import java.util.function.Function;
-
-public class EitherPair<L, M, R> {
-
-    private Either<L, R> firstEither;
-    private Either<M, R> secondEither;
-
-    private EitherPair(Either<L, R> firstEither, Either<M, R> secondEither) {
-        this.firstEither = firstEither;
-        this.secondEither = secondEither;
-    }
-
-    public static <L, M, R> EitherPair<L, M, R> from(Either<L, R> firstEither,
-                                                     Either<M, R> secondEither) {
-        return new EitherPair<>(firstEither, secondEither);
-    }
-
-    public <X> X either(BiFunction<L, M, X> onLeft, Function<R, X > onRight) {
-        if (firstEither.isRight()) {
-            return onRight.apply(firstEither.right().value());
-        }
-        if (secondEither.isRight()) {
-            return onRight.apply(secondEither.right().value());
-        }
-        return onLeft.apply(firstEither.left().value(), secondEither.left().value());
-    }
-
-
-}