Affects PMD Version:
7.0.0 - 7.2.0
Description:
The underlying apex parser seems to believe the following SOSL query is invalid. (it deploys and runs just fine).
List<List<sObject>> records = [ FIND :soslStringWC RETURNING VCC_Softphone_Directory__c(Name, Description__c, Phone_Number__c ORDER BY Name) WITH USER_MODE LIMIT 50 ];
Exception Stacktrace:
[TRACE] Processing file (lang: apex+version:60): /Users/kevinpoorman/PROJECT/SomeFile.cls
line 65:21 no viable alternative at input 'WITH USER_MODE'
[INFO] Syntax error at 65:21: no viable alternative at input 'WITH USER_MODE'
line 66:16 missing ';' at 'LIMIT'
[INFO] Syntax error at 66:16: missing ';' at 'LIMIT'
line 67:12 extraneous input ']' expecting ';'
[INFO] Syntax error at 67:12: extraneous input ']' expecting ';'
Code Sample demonstrating the issue:
List<List<sObject>> records = [ FIND :soslStringWC RETURNING VCC_Softphone_Directory__c(Name, Description__c, Phone_Number__c ORDER BY Name) WITH USER_MODE LIMIT 50 ];
Steps to reproduce:
Running PMD through:
CLI.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4