-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40448 from michalvavrik/feature/secure-field-warn…
…ing-logs Avoid "Failed to index" warnings produced during @SecureField annotation detection
- Loading branch information
Showing
5 changed files
with
513 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
...ment/src/test/java/io/quarkus/resteasy/reactive/jackson/deployment/test/ResponseType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package io.quarkus.resteasy.reactive.jackson.deployment.test; | ||
|
||
import jakarta.ws.rs.core.Response; | ||
|
||
import org.jboss.resteasy.reactive.RestResponse; | ||
|
||
import io.quarkus.resteasy.reactive.jackson.SecureField; | ||
import io.smallrye.mutiny.Multi; | ||
import io.smallrye.mutiny.Uni; | ||
|
||
public enum ResponseType { | ||
/** | ||
* Returns DTOs directly. | ||
*/ | ||
PLAIN(true, "plain"), | ||
/** | ||
* Returns {@link Multi} with DTOs. | ||
*/ | ||
// TODO: enable when https://github.com/quarkusio/quarkus/issues/40447 gets fixed | ||
//MULTI(true, "multi"), | ||
/** | ||
* Returns {@link Uni} with DTOs. | ||
*/ | ||
UNI(true, "uni"), | ||
/** | ||
* Returns {@link Object} that is either DTO with a {@link SecureField} or not. | ||
*/ | ||
OBJECT(false, "object"), // we must always assume it can contain SecureField | ||
/** | ||
* Returns {@link Response} that is either DTO with a {@link SecureField} or not. | ||
*/ | ||
RESPONSE(false, "response"), // we must always assume it can contain SecureField | ||
/** | ||
* Returns {@link RestResponse} with DTOs. | ||
*/ | ||
REST_RESPONSE(true, "rest-response"), | ||
/** | ||
* Returns {@link RestResponse} with DTOs. | ||
*/ | ||
COLLECTION(true, "collection"); | ||
|
||
private final boolean secureFieldDetectable; | ||
private final String resourceSubPath; | ||
|
||
ResponseType(boolean secureFieldDetectable, String resourceSubPath) { | ||
this.secureFieldDetectable = secureFieldDetectable; | ||
this.resourceSubPath = resourceSubPath; | ||
} | ||
|
||
boolean isSecureFieldDetectable() { | ||
return secureFieldDetectable; | ||
} | ||
|
||
String getResourceSubPath() { | ||
return resourceSubPath; | ||
} | ||
} |
Oops, something went wrong.