Closed alexradzin closed 9 years ago
Thanks for the detailed bug report Alex, I will take a look at this over the next couple of days
I'll be glad to get update. So far I will try to continue with my, patched version.
@alexradzin I was able to reproduce this based on your description and have added a test case for this and a fix, my fix should handle longer chains.
@alexradzin can you confirm this fix works for you?
@conorroche, I have validated your fix. It words for me. When are yo planning to make this version available in maven repository? Right now I am going to use our local Artifactory but will be glad to work with official version.
I hope to release 1.0.4 in the next couple of weeks, there are a couple of open issues id like to include in that release, i have been swamped with work recently but will see how it goes
@alexradzin this is part of 1.0.4 which ive just release.
In some cases
ServiceDoclet
got stuck. Debugging helps to locate the point where code cannot exit the endless loop:The
while()
loop never exits.Although I do not have SSCCE I will give a simplified version of my API that causes this problem.
My API looks like:
The class
MeasurementsQuery
has a lot of fields includingAggregationGroupExtractor extractor
parameterized onG
too. ThisAggregationGroupExtractor
is a interface that has several concrete implementations and declares one method:When I run
javadoc
withServiceDoclet
the methodParserHelper.getVarType()
is called withvarsToTypes
that contains map like the following:Where
java.lang.Integer
isClassDocImpl
G
isTypeVariableImpl
Mapping of
G
toG
causes infinite loop becausetype
is nevernull
: it is alwaysG
.My suggestion is to fix the
while()
condition as following:In this case the loop terminates when generic parameter is mapped to itself. This solution however does not solve longer chains (when A is mapped to B, B to C and C back to A), but I do not know whether such situation is possible.