HHH-17772 handle missing static constant refs

This commit is contained in:
Gavin King 2024-02-23 21:35:51 +01:00
parent 1e32439b3c
commit 0bc198f265

View File

@ -1595,10 +1595,18 @@ private static String parameterName(VariableElement parameter) {
final AnnotationMirror by = getAnnotationMirror( parameter, "jakarta.data.repository.By" );
final AnnotationMirror param = getAnnotationMirror( parameter, "jakarta.data.repository.Param" );
if ( by != null ) {
return (String) castNonNull( getAnnotationValue( by, "value" ) );
final String name = (String) castNonNull(getAnnotationValue(by, "value"));
if ( name.contains("<error>") ) {
throw new ProcessLaterException();
}
return name;
}
else if ( param != null ) {
return (String) castNonNull( getAnnotationValue( param, "value" ) );
final String name = (String) castNonNull(getAnnotationValue(param, "value"));
if ( name.contains("<error>") ) {
throw new ProcessLaterException();
}
return name;
}
else {
return parameter.getSimpleName().toString();