Merge branch 'pr-1241'
This commit is contained in:
commit
cc9d9f47bd
4 files changed
+34
-2
No files matched your search
@@ -30,6 +30,7 @@ This is a minor release.
|
||||
* [#1217](https://github.com/pmd/pmd/issues/1217): \[java] CyclomaticComplexityRule counts ?-operator twice
|
||||
* plsql
|
||||
* [#980](https://github.com/pmd/pmd/issues/980): \[plsql] ParseException for CREATE TABLE
|
||||
* [#981](https://github.com/pmd/pmd/issues/981): \[plsql] ParseException when parsing VIEW
|
||||
|
||||
### API Changes
|
||||
|
||||
|
||||
@@ -2528,8 +2528,7 @@ ASTView View() :
|
||||
["(" ViewColumn() ("," ViewColumn())* ")"]
|
||||
//### OF ... WITH OBJECT IDENTIFIER...
|
||||
<AS>
|
||||
Statement() //SRT select()
|
||||
//### WITH ...
|
||||
SqlStatement(null,";")
|
||||
(";" | "/")
|
||||
|
||||
{ jjtThis.setImage(simpleNode.getImage()) ; return jjtThis ; }
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.lang.plsql.ast;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import net.sourceforge.pmd.lang.plsql.AbstractPLSQLParserTst;
|
||||
|
||||
public class ViewTest extends AbstractPLSQLParserTst {
|
||||
|
||||
@Test
|
||||
public void parseCreateViewIssue981() throws Exception {
|
||||
String code = IOUtils.toString(this.getClass().getResourceAsStream("ViewIssue981.pls"));
|
||||
ASTInput input = parsePLSQL(code);
|
||||
Assert.assertNotNull(input);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--
|
||||
-- BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
--
|
||||
|
||||
CREATE OR REPLACE FORCE VIEW "HR_DEV1"."EMP_DETAILS_VIEW" ("EMPLOYEE_ID") AS
|
||||
SELECT
|
||||
e.employee_id
|
||||
FROM
|
||||
employees e
|
||||
WITH READ ONLY
|
||||
;
|
||||
Reference in new issue
Block a user