fix token access in visitFASTJavaVariableDeclarator class#2
fix token access in visitFASTJavaVariableDeclarator class#2badetitou merged 2 commits intoEvref-BL:v2from
Conversation
Pull Request Test Coverage Report for Build 13014590610Details
💛 - Coveralls |
badetitou
left a comment
There was a problem hiding this comment.
You do use really low level API of Pharo/Moose. I am pretty sure it is possible to create more clean code. At least with isKindOf: (even if it is not the best option)
| modifier token = 'public' ifTrue: [ famixVariable isPublic: true ]. | ||
| modifier token = 'final' ifTrue: [ famixVariable isFinal: true ]. | ||
| modifier token = 'static' ifTrue: [ famixVariable isClassSide: true ] ]. | ||
| anyOne modifiers do: [ :modifier | |
There was a problem hiding this comment.
Hello,
This is a real strange fix. Can you please share a description of the issue, depicting the error. And add a test for this feature so it will not be removed in the future for your bug.
There was a problem hiding this comment.
Hello,
When an aFASTJavaVariableDeclarator is created for Java code like:
@Value("${com.example}") private String test;Two things are created in the modifiers:
- The actual token (e.g., public, private, ...) => FASTJavaModifier
- The different annotations => FASTJavaAnnotation
For this loop on modifiers, we work with FASTJavaModifier. I just added a type checker to fix the loop.
|
I think you should add an issue here https://github.com/moosetechnology/FAST-JAVA/issues |
No description provided.