Skip to content

Commit

Permalink
Fix 'list-persistence-types' command
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Pinčuk <alexander.v.pinchuk@gmail.com>
  • Loading branch information
avpinchuk committed Oct 8, 2023
1 parent de97abe commit 935efe6
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Contributors to the Eclipse Foundation
* Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation.
* Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -60,7 +60,7 @@ public class ListPersistenceTypesCommand implements AdminCommand {
@Param(name = "type", optional = false, primary = false)
@I18n("list.persistence.types.container")
@Pattern(regexp = CONTAINER_TYPES, message = "Valid values: " + CONTAINER_TYPES)
private final String containerType = "";
private String containerType = "";

private Logger logger;
private static final String EOL = "\n";
Expand Down Expand Up @@ -106,7 +106,6 @@ public void execute(AdminCommandContext context) {
private boolean checkEnvAndParams(ActionReport report) {
if (containerType == null) {
return fail(report, Strings.get("list.persistence.types.null.parameter"));

}
if (!containerType.equals("ejb") && !containerType.equals("web")) {
return fail(report, Strings.get("list.persistence.types.invalid.parameter", containerType));
Expand All @@ -121,5 +120,4 @@ private boolean fail(ActionReport report, String s) {
report.setMessage(s);
return false;
}

}

0 comments on commit 935efe6

Please sign in to comment.