summaryrefslogtreecommitdiffstats
path: root/config-model-api
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2021-06-29 13:14:46 +0200
committerGitHub <noreply@github.com>2021-06-29 13:14:46 +0200
commitec2f66d2c1b05073e2f5a727a23b9f180c013b9c (patch)
tree3051ca4a1df1d192a78764490322bea486a06361 /config-model-api
parent732a55c8508ce437e7d7fe5c50285b6a082bff44 (diff)
Revert "Revert "Remove dead code" (#18453)"
This reverts commit 732a55c8508ce437e7d7fe5c50285b6a082bff44.
Diffstat (limited to 'config-model-api')
-rw-r--r--config-model-api/src/main/java/com/yahoo/config/application/api/ValidationOverrides.java44
1 files changed, 0 insertions, 44 deletions
diff --git a/config-model-api/src/main/java/com/yahoo/config/application/api/ValidationOverrides.java b/config-model-api/src/main/java/com/yahoo/config/application/api/ValidationOverrides.java
index 42a47781251..af3cf4175cf 100644
--- a/config-model-api/src/main/java/com/yahoo/config/application/api/ValidationOverrides.java
+++ b/config-model-api/src/main/java/com/yahoo/config/application/api/ValidationOverrides.java
@@ -19,7 +19,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
-import java.util.logging.Level;
import java.util.stream.Collectors;
/**
@@ -34,9 +33,6 @@ public class ValidationOverrides {
public static final ValidationOverrides empty = new ValidationOverrides(ImmutableList.of(), "<validation-overrides/>");
- /** A special instance which behaves as if it contained a valid allow override for every (valid) validation id */
- public static final ValidationOverrides all = new AllowAllValidationOverrides();
-
private final List<Allow> overrides;
private final String xmlForm;
@@ -180,44 +176,4 @@ public class ValidationOverrides {
}
- // TODO: Remove this class after June 2021
- public static class AllowAllValidationOverrides extends ValidationOverrides {
-
- private final DeployLogger logger;
- private final ValidationOverrides wrapped;
-
- /** Create an instance of this which doesn't log */
- public AllowAllValidationOverrides() {
- this(null, null);
- }
-
- /** Creates an instance of this which logs what is allows to the given deploy logger */
- public AllowAllValidationOverrides(ValidationOverrides wrapped, DeployLogger logger) {
- super(List.of());
- this.wrapped = wrapped;
- this.logger = logger;
- }
-
- @Override
- public void invalid(ValidationId validationId, String message, Instant now) {
- // Log if would otherwise be invalid
- if (wrapped != null && logger != null && ! wrapped.allows(validationId, now))
- logger.log(Level.WARNING, "Possibly destructive change '" + validationId + "' allowed");
- }
-
- /** Returns whether the given (assumed invalid) change is allowed by this at the moment */
- @Override
- public boolean allows(ValidationId validationId, Instant now) {
- return true;
- }
-
- /** Returns the XML form of this, or null if it was not created by fromXml, nor is empty */
- @Override
- public String xmlForm() { return null; }
-
- @Override
- public String toString() { return "(A validation override which allows everything)"; }
-
- }
-
}