Skip to content

Commit

Permalink
Merge pull request quarkusio#12627 from gsmet/hv-valid-object
Browse files Browse the repository at this point in the history
Don't consider the hierarchy of Object when marked with @Valid
  • Loading branch information
gsmet authored Oct 9, 2020
2 parents 24abf81 + c85ea20 commit 6824ac9
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import io.quarkus.arc.deployment.UnremovableBeanBuildItem;
import io.quarkus.arc.processor.BeanInfo;
import io.quarkus.arc.processor.BuiltinScope;
import io.quarkus.arc.processor.DotNames;
import io.quarkus.deployment.Capabilities;
import io.quarkus.deployment.Capability;
import io.quarkus.deployment.Feature;
Expand Down Expand Up @@ -307,6 +308,11 @@ private static void contributeBuiltinConstraints(Set<String> builtinConstraints,

private static void contributeClass(Set<DotName> classNamesCollector, IndexView indexView, DotName className) {
classNamesCollector.add(className);

if (DotNames.OBJECT.equals(className)) {
return;
}

for (ClassInfo subclass : indexView.getAllKnownSubclasses(className)) {
if (Modifier.isAbstract(subclass.flags())) {
// we can avoid adding the abstract classes here: either they are parent classes
Expand Down

0 comments on commit 6824ac9

Please sign in to comment.