Community
Participate
Working Groups
Build Identifier: 1.6.8 In BasicTokenSource, the methods next and peek catch an ArrayIndexOutOfBoundsException, when the index is not in range, and return IToken.EOF in the catch clause, thus everytime any of these methods are called with an illegal index, an unnecessary exception is created and handled. It would be much more efficient to manually check the range and return IToken.EOF if not legal, avoiding the unnecessary exception handling . Reproducible: Always
Created attachment 160293 [details] Test class which calls 2 versions of the peek method and compares results