From 0ed5c52f4bc8db56c0afb833f0fb9db9572df404 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Tue, 11 Apr 2023 15:27:23 +0200 Subject: [PATCH] Change ListProfiles class to interface --- .../sop/external/operation/ListProfilesExternal.java | 2 +- .../src/main/java/sop/exception/SOPGPException.java | 4 ++++ sop-java/src/main/java/sop/operation/ListProfiles.java | 10 +++------- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/external-sop/src/main/java/sop/external/operation/ListProfilesExternal.java b/external-sop/src/main/java/sop/external/operation/ListProfilesExternal.java index 85eae6c..1c6cdf3 100644 --- a/external-sop/src/main/java/sop/external/operation/ListProfilesExternal.java +++ b/external-sop/src/main/java/sop/external/operation/ListProfilesExternal.java @@ -13,7 +13,7 @@ import java.util.Arrays; import java.util.List; import java.util.Properties; -public class ListProfilesExternal extends ListProfiles { +public class ListProfilesExternal implements ListProfiles { private final List commandList = new ArrayList<>(); private final List envList; diff --git a/sop-java/src/main/java/sop/exception/SOPGPException.java b/sop-java/src/main/java/sop/exception/SOPGPException.java index a192c6c..04da74d 100644 --- a/sop-java/src/main/java/sop/exception/SOPGPException.java +++ b/sop-java/src/main/java/sop/exception/SOPGPException.java @@ -405,6 +405,10 @@ public abstract class SOPGPException extends RuntimeException { super(); } + public UnsupportedProfile(String errorMessage) { + super(errorMessage); + } + @Override public int getExitCode() { return EXIT_CODE; diff --git a/sop-java/src/main/java/sop/operation/ListProfiles.java b/sop-java/src/main/java/sop/operation/ListProfiles.java index bdfa811..e27789f 100644 --- a/sop-java/src/main/java/sop/operation/ListProfiles.java +++ b/sop-java/src/main/java/sop/operation/ListProfiles.java @@ -6,14 +6,10 @@ package sop.operation; import java.util.List; -public abstract class ListProfiles { +public interface ListProfiles { - public ListProfiles() { + List ofCommand(String command); - } - - public abstract List ofCommand(String command); - - public abstract List global(); + List global(); }