-
-
Notifications
You must be signed in to change notification settings - Fork 351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fix PositionBuilder if modifier is followed by generic with out whitespace e.g public static<T> #3552
Conversation
…out whitespace e.g public static<T>
097c68f
to
e9aab13
Compare
Thanks a lot for the bug fix. What is the cause of the assertion changes? What if you add new method |
Ah those were because of the added import. Its no longer references in the test class so I will remove it and revert the previous assertions |
cool, thanks.
|
…ace following modifier
e9aab13
to
7319121
Compare
Done that 👍 only getEndLine() and getSourceEnd() assertions had to be changed :) |
Thanks for the new commits.
because of a change of behavior or a change of test data? in the latter case, we would try to avoid this. Thanks! |
The latter case because a new method was added that caused the issue that this PR addresses. As a new method was added to the test input class, the source length (in chars and lines) was increased. The change in assertion numbers is simply to reflect this addition |
FYI, we avoid spurious assertion changes, so in this case, one option is to put the code in a new test input class. |
Thanks a lot for your contribution @Strum355 |
…whitespace e.g public static<T> (INRIA#3552)
The following line would result in
o2
being of a value that would causemodifierName
to include the generic type param, causing the looking intoexplicitModifiersByName
to return null. https://github.com/google/gson/blob/master/gson/src/test/java/com/google/gson/ParameterizedTypeFixtures.java#L129If a space would be between
static
and<T>
, the modifier position is extracted properly.