Skip to content

Commit

Permalink
Revert "Improve the ControllerConstraintHandlerTest to accept more Ht…
Browse files Browse the repository at this point in the history
…tpReques…"

This reverts commit 3744f17.
  • Loading branch information
yawkat committed Jun 19, 2024
1 parent 3744f17 commit 39ee018
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import io.micronaut.core.annotation.Introspected;
import io.micronaut.core.annotation.NonNull;
import io.micronaut.core.annotation.Nullable;
import io.micronaut.core.convert.value.ConvertibleValues;
import io.micronaut.core.type.Argument;
import io.micronaut.http.HttpRequest;
import io.micronaut.http.HttpStatus;
Expand Down Expand Up @@ -192,10 +191,6 @@ Optional<Map> constraintsEx(ConstraintViolationException e, HttpRequest<?> reque
password = credentials.getPassword();
} else if (obj instanceof CredentialsWithNonNull credentials) {
password = credentials.getPassword();
} else if (obj instanceof Map<?, ?> map) {
password = map.get("password") == null ? null : map.get("password").toString();
} else if (obj instanceof ConvertibleValues<?> values) {
password = values.get("password", String.class).orElse(null);
}
return password != null ? Optional.of(Map.of("password", password)) : Optional.empty();
}
Expand Down

0 comments on commit 39ee018

Please sign in to comment.