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

Fix typo in name of AdditionalSecuredClassesBuildIem class #17768

Merged
merged 1 commit into from
Jun 8, 2021
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 @@ -35,7 +35,7 @@
import io.quarkus.resteasy.runtime.vertx.JsonObjectReader;
import io.quarkus.resteasy.runtime.vertx.JsonObjectWriter;
import io.quarkus.resteasy.server.common.deployment.ResteasyDeploymentBuildItem;
import io.quarkus.security.spi.AdditionalSecuredClassesBuildIem;
import io.quarkus.security.spi.AdditionalSecuredClassesBuildItem;
import io.quarkus.vertx.http.deployment.HttpRootPathBuildItem;
import io.quarkus.vertx.http.deployment.devmode.NotFoundPageDisplayableEndpointBuildItem;
import io.quarkus.vertx.http.deployment.devmode.RouteDescriptionBuildItem;
Expand All @@ -50,7 +50,7 @@ public class ResteasyBuiltinsProcessor {
void setUpDenyAllJaxRs(CombinedIndexBuildItem index,
JaxRsSecurityConfig config,
ResteasyDeploymentBuildItem resteasyDeployment,
BuildProducer<AdditionalSecuredClassesBuildIem> additionalSecuredClasses) {
BuildProducer<AdditionalSecuredClassesBuildItem> additionalSecuredClasses) {
if (config.denyJaxRs) {
final List<ClassInfo> classes = new ArrayList<>();

Expand All @@ -62,7 +62,7 @@ void setUpDenyAllJaxRs(CombinedIndexBuildItem index,
}
}

additionalSecuredClasses.produce(new AdditionalSecuredClassesBuildIem(classes));
additionalSecuredClasses.produce(new AdditionalSecuredClassesBuildItem(classes));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
import io.quarkus.resteasy.reactive.spi.MessageBodyWriterOverrideBuildItem;
import io.quarkus.resteasy.reactive.spi.ReaderInterceptorBuildItem;
import io.quarkus.resteasy.reactive.spi.WriterInterceptorBuildItem;
import io.quarkus.security.spi.AdditionalSecuredClassesBuildIem;
import io.quarkus.security.spi.AdditionalSecuredClassesBuildItem;
import io.quarkus.security.spi.SecurityTransformerUtils;

public class ResteasyReactiveCommonProcessor {
Expand All @@ -65,7 +65,7 @@ public class ResteasyReactiveCommonProcessor {
void setUpDenyAllJaxRs(CombinedIndexBuildItem index,
ResteasyReactiveConfig config,
Optional<ResourceScanningResultBuildItem> resteasyDeployment,
BuildProducer<AdditionalSecuredClassesBuildIem> additionalSecuredClasses) {
BuildProducer<AdditionalSecuredClassesBuildItem> additionalSecuredClasses) {
if (config.denyJaxRs && resteasyDeployment.isPresent()) {
final List<ClassInfo> classes = new ArrayList<>();

Expand All @@ -77,7 +77,7 @@ void setUpDenyAllJaxRs(CombinedIndexBuildItem index,
}
}

additionalSecuredClasses.produce(new AdditionalSecuredClassesBuildIem(classes));
additionalSecuredClasses.produce(new AdditionalSecuredClassesBuildItem(classes));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
import io.quarkus.security.runtime.interceptor.SecurityConstrainer;
import io.quarkus.security.runtime.interceptor.SecurityHandler;
import io.quarkus.security.runtime.interceptor.check.SecurityCheck;
import io.quarkus.security.spi.AdditionalSecuredClassesBuildIem;
import io.quarkus.security.spi.AdditionalSecuredClassesBuildItem;
import io.quarkus.security.spi.runtime.AuthorizationController;

public class SecurityProcessor {
Expand Down Expand Up @@ -243,14 +243,14 @@ void registerSecurityInterceptors(BuildProducer<InterceptorBindingRegistrarBuild
*/
@BuildStep
void transformSecurityAnnotations(BuildProducer<AnnotationsTransformerBuildItem> transformers,
List<AdditionalSecuredClassesBuildIem> additionalSecuredClasses,
List<AdditionalSecuredClassesBuildItem> additionalSecuredClasses,
SecurityBuildTimeConfig config) {
if (config.denyUnannotated) {
transformers.produce(new AnnotationsTransformerBuildItem(new DenyingUnannotatedTransformer()));
}
if (!additionalSecuredClasses.isEmpty()) {
Set<String> additionalSecured = new HashSet<>();
for (AdditionalSecuredClassesBuildIem securedClasses : additionalSecuredClasses) {
for (AdditionalSecuredClassesBuildItem securedClasses : additionalSecuredClasses) {
for (ClassInfo additionalSecuredClass : securedClasses.additionalSecuredClasses) {
additionalSecured.add(additionalSecuredClass.name().toString());
}
Expand All @@ -265,13 +265,13 @@ void transformSecurityAnnotations(BuildProducer<AnnotationsTransformerBuildItem>
void gatherSecurityChecks(BuildProducer<SyntheticBeanBuildItem> syntheticBeans,
BeanArchiveIndexBuildItem beanArchiveBuildItem,
BuildProducer<ApplicationClassPredicateBuildItem> classPredicate,
List<AdditionalSecuredClassesBuildIem> additionalSecuredClasses,
List<AdditionalSecuredClassesBuildItem> additionalSecuredClasses,
SecurityCheckRecorder recorder,
List<AdditionalSecurityCheckBuildItem> additionalSecurityChecks, SecurityBuildTimeConfig config) {
classPredicate.produce(new ApplicationClassPredicateBuildItem(new SecurityCheckStorage.AppPredicate()));

final Map<DotName, ClassInfo> additionalSecured = new HashMap<>();
for (AdditionalSecuredClassesBuildIem securedClasses : additionalSecuredClasses) {
for (AdditionalSecuredClassesBuildItem securedClasses : additionalSecuredClasses) {
securedClasses.additionalSecuredClasses.forEach(c -> {
if (!additionalSecured.containsKey(c.name())) {
additionalSecured.put(c.name(), c);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
/**
* Contains classes that need to have @DenyAll on all methods that don't have security annotations
*/
public final class AdditionalSecuredClassesBuildIem extends MultiBuildItem {
public final class AdditionalSecuredClassesBuildItem extends MultiBuildItem {
public final Collection<ClassInfo> additionalSecuredClasses;

public AdditionalSecuredClassesBuildIem(Collection<ClassInfo> additionalSecuredClasses) {
public AdditionalSecuredClassesBuildItem(Collection<ClassInfo> additionalSecuredClasses) {
this.additionalSecuredClasses = Collections.unmodifiableCollection(additionalSecuredClasses);
}
}