Skip to content

Commit

Permalink
Fixes a potential NPE in type validation
Browse files Browse the repository at this point in the history
Change-Id: I8c7c9bb227dac35381ac91a8e19bed42a253cf20
Signed-off-by: Zoltan Ujhelyi <[email protected]>
  • Loading branch information
ujhelyiz committed Mar 3, 2022
1 parent 23f283a commit b175687
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ private void executeDefaultAnnotationValidation(Annotation annotation, IPatternA
Class<? extends ValueReference> expectedParameterType = validator.getExpectedParameterType(parameter);
final ValueReference parameterValue = parameter.getValue();

if (expectedParameterType == null && parameterValue == null) {
if (expectedParameterType == null || parameterValue == null) {
return;
}
if (parameterValue instanceof JavaConstantValue) {
Expand Down

0 comments on commit b175687

Please sign in to comment.