Hi Peter,
I know it is matter of taste, but don't you think this:
269 for (char c = current();
270 c != ';' && c != '.' && c != '/' && c != '[' &&
271 c != ':' && c != '>' && c != '<' &&
272 !Character.isWhitespace(c);
273 c = current())
274 {
is easier to read than the long or-condition which is then negated?
Best regards,
Andrej Golovnin
On Tue, Nov 29, 2016 at 11:41 PM, Peter Levart <[email protected]> wrote:
> Hi Claes,
>
> On 11/29/2016 11:30 PM, Peter Levart wrote:
>>
>>
>>
>>
>> http://cr.openjdk.java.net/~plevart/jdk9-dev/8035424_SignatureParser.performance/webrev.02/
>>
>
> Which loop do you prefer. The above one or the following?
>
> private void skipIdentifier() {
> char c;
> while (!((c = current()) == ';' || c == '.' || c == '/' ||
> c == '[' || c == ':' || c == '>' || c == '<' ||
> Character.isWhitespace(c))) {
> advance();
> }
> }
>
>
> Peter
>