eclipse-ee4j / eclipse-ee4j/jersey

Isn't it this a bug? ValidateOnExecutionHandler class hierarchy

Open
#4,084 0 comments 0 reactions 0 assignees View on GitHub
bean-validation Type: Bug
Dominant language
Java
Stars
730
Forks
382
PR merge metrics
No merged PRs in 30d

Description

https://github.com/eclipse-ee4j/jersey/blob/eafb9bdcb82dfa3fd76dd957d307b99d4a22c87f/ext/bean-validation/src/main/java/org/glassfish/jersey/server/validation/internal/ValidateOnExecutionHandler.java#L224

In ```ValidateOnExecutionHandler``` there is a method (```getValidationClassHierarchy(Class)```), where the following lines can be found:

```java
for (Class currentClass = clazz; currentClass != Object.class; currentClass = currentClass.getSuperclass()) {
hierarchy.add(clazz);
}
```

Shouldn't it be like the following snippet?:

```java
for (Class currentClass = clazz; currentClass != Object.class; currentClass = currentClass.getSuperclass()) {
hierarchy.add(currentClass);
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.