[generator] Fix exception caused by incorrect nested type name. #1267
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context: #1266
While the issue described in #1266 is definitely an issue (types should not be added to the
generator
symbol table with a JNI type specification), that example was merely setting up the scenario needed to expose another bug.When a JLO type has a
public
orinternal
field whose type is a nested type:We correctly import the
Field.TypeName
asCom.Mypackage.FieldClass.NestedFieldClass
, however we also createField.SetterParameter
with the same type, but we do not replace the/
nested type separator with a period, resulting inCom.Mypackage.FieldClass/NestedFieldClass
.Later, when validating the
Field
, we successfully findField.TypeName
in the symbol table, but fail to findField.SetterParameter
as the symbol table expects a period nested type separator. (Note this only happens becauseNestedFieldClass
does not have a[Register]
attribute, thus it gets added to the symbol table with its managed name rather than its Java name.)This causes
generator
to crash with:Fix this by applying the same
FullNameCorrected ()
logic that is applied toField.TypeName
.