aaschmid / gradle-cpd-plugin

Gradle plugin to find duplicate code using PMDs copy/paste detection (= CPD).
Apache License 2.0
96 stars 12 forks source link

Lexical error. Encountered: token recognition error at: '& ' #62

Closed AndyHao11 closed 2 years ago

AndyHao11 commented 3 years ago

I got the following error when trying to execute cpdCheck

A failure occurred while executing internal.worker.CpdAction Lexical error in file /myfile.java at line 203, column 21. Encountered: token recognition error at: '& '

The line of code is if (((int) buf[i] & 0xff) < 0x10)

Is there a way to either workaround or suppress the error?

aaschmid commented 3 years ago

Puh. Not that I am currently aware of.

This is rather an issue with CPD itself, maybe you can check there if this is fixed with a new version?

aaschmid commented 2 years ago

Any news on this @AndyHao11?

AndyHao11 commented 2 years ago

@aaschmid Sorry, a stupid mistake on my side. This is resolved. It turned out I was checking the wrong language.

aaschmid commented 2 years ago

No worrries, therefore I will close this issue