Affects PMD Version: 6.17.0
Rule:
Description: I get ParseException when trying to process file with single script with cursor in anonymous block declaration.
lip 23, 2019 2:12:18 PM net.sourceforge.pmd.RulesetsFactoryUtils printRuleNamesInDebug
FINER: Loaded rule AvoidTabCharacter
lip 23, 2019 2:12:18 PM net.sourceforge.pmd.PMD getApplicableLanguages
FINE: Using PLSQL version: PLSQL
lip 23, 2019 2:12:18 PM net.sourceforge.pmd.PMD processFiles
WARNING: This analysis could be faster, please consider using Incremental Analysis: https://pmd.github.io/latest/pmd_userdocs_incremental_analysis.html
lip 23, 2019 2:12:18 PM net.sourceforge.pmd.RulesetsFactoryUtils printRuleNamesInDebug
FINER: Loaded rule AvoidTabCharacter
lip 23, 2019 2:12:18 PM net.sourceforge.pmd.processor.PmdRunnable call
FINE: Processing C:\Users\...\01_DB\00_Scripts\sols83_icom_aq.sql
lip 23, 2019 2:12:18 PM net.sourceforge.pmd.processor.PmdRunnable addError
FINE: Error while processing file: C:\Users\...\01_DB\00_Scripts\sols83_icom_aq.sql
net.sourceforge.pmd.PMDException: Error while parsing C:\Users\...\01_DB\00_Scripts\sols83_icom_aq.sql
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:99)
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:51)
at net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:78)
at net.sourceforge.pmd.processor.PmdRunnable.call(PmdRunnable.java:24)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: net.sourceforge.pmd.lang.plsql.ast.ParseException: Encountered "" at line 1, column 1.
Was expecting one of:
at net.sourceforge.pmd.lang.plsql.ast.PLSQLParser.generateParseException(PLSQLParser.java)
at net.sourceforge.pmd.lang.plsql.ast.PLSQLParser.jj_consume_token(PLSQLParser.java)
at net.sourceforge.pmd.lang.plsql.ast.PLSQLParser.Global(PLSQLParser.java:510)
at net.sourceforge.pmd.lang.plsql.ast.PLSQLParser.Input(PLSQLParser.java:202)
at net.sourceforge.pmd.lang.plsql.PLSQLParser.parse(PLSQLParser.java:55)
at net.sourceforge.pmd.SourceCodeProcessor.parse(SourceCodeProcessor.java:111)
at net.sourceforge.pmd.SourceCodeProcessor.processSource(SourceCodeProcessor.java:175)
at net.sourceforge.pmd.SourceCodeProcessor.processSourceCode(SourceCodeProcessor.java:96)
... 9 more
Code Sample demonstrating the issue:
declare
cursor c_queue_exists(cp_queue_name xla_reference_code.code%type) is
select 1
from dba_queues dq
where dq.name = cp_queue_name;
r_queue_exists c_queue_exists%rowtype;
begin
null;
end;
/
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