Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the usage of Env.name() using Env.getName() #4816

Merged
merged 1 commit into from
Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public String portalAddress() {
}

public boolean isEmergencyPublishAllowed(Env env) {
String targetEnv = env.name();
String targetEnv = env.getName();

String[] emergencyPublishSupportedEnvs = getArrayProperty("emergencyPublish.supported.envs", new String[0]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public List<ItemDiffs> diff(@RequestBody NamespaceSyncModel model) {
}

if (permissionValidator
.shouldHideConfigToCurrentUser(namespace.getAppId(), namespace.getEnv().name(), namespace.getNamespaceName())) {
.shouldHideConfigToCurrentUser(namespace.getAppId(), namespace.getEnv().getName(), namespace.getNamespaceName())) {
diff.setDiffs(new ItemChangeSets());
diff.setExtInfo("You are not this project's administrator, nor you have edit or release permission for the namespace in environment: " + namespace.getEnv());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,16 +227,6 @@ public String toString() {
return name;
}

/**
* Backward compatibility with enum's name method
*
* @Deprecated please use {@link #getName()} instead of
*/
@Deprecated
public String name() {
return name;
}

public String getName() {
return name;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void testToString() {

@Test
public void name() {
assertEquals("DEV", Env.DEV.name());
assertEquals("DEV", Env.DEV.getName());
}

@Test
Expand Down