You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upon saving in eclipse I get "Unable to locate field type at line X", if I remove the nested @joincolumn lines it works. It also works if there's one nested @joincolumn annotation on a single line.
Maven plugin version 1.1, joda beans version 1.13.
I've discovered that this happens any time the @PropertyDefinition annotation is above another annotation containing newlines. So the following will also fail:
The workaround is to ensure that the @PropertyDefinition annotation is directly before the field declaration.
lourish
changed the title
"Unable to locate field type" error with nested annotations
"Unable to locate field type" error when annotations below @PropertyDefinition contain newlines
Aug 10, 2017
This is a known limitation of the parser. Rather than trying to parse the whole source file as Java, it looks for specific known things, but as part of that the developer must write code that is of a standard form. Here, it looks for the @ sign at the start of each line following the @PropertyDefinition. When it stops finding it, it assumes that it has found the field.
I've made a change so it looks for a comma at the end of the previous line and uses that to assume a multi-line annotation. While still imperfect, it should handle the cases above and not break any existing code.
Hi, I have a property definition with JPA annotations of the form:
Upon saving in eclipse I get "Unable to locate field type at line X", if I remove the nested @joincolumn lines it works. It also works if there's one nested @joincolumn annotation on a single line.
Maven plugin version 1.1, joda beans version 1.13.
This issue was originally posted at JodaOrg/joda-beans-maven-plugin#4
The text was updated successfully, but these errors were encountered: