Merge branch 'pr-1976'

This commit is contained in:
Andreas Dangel
2019-09-08 12:03:54 +02:00
4 changed files with 16 additions and 1 deletions

View File

@@ -111,6 +111,7 @@ about the usage and features of the rule designer.
* [#1972](https://github.com/pmd/pmd/pull/1972): \[plsql] ParseError - SELECT with FOR UPDATE OF - [Piotr Szymanski](https://github.com/szyman23)
* [#1974](https://github.com/pmd/pmd/pull/1974): \[plsql] Fixes for referencing record type variables - [Piotr Szymanski](https://github.com/szyman23)
* [#1975](https://github.com/pmd/pmd/pull/1975): \[plsql] TRIM function with record type variables - [Piotr Szymanski](https://github.com/szyman23)
* [#1976](https://github.com/pmd/pmd/pull/1976): \[plsql] Fix for mistaking / for MultiplicativeExpression - [Piotr Szymanski](https://github.com/szyman23)
* [#1994](https://github.com/pmd/pmd/pull/1994): \[core] Resolve pmd-report failure when java folder in filepath - [Amish Shah](https://github.com/shahamish150294)
{% endtocmaker %}

View File

@@ -3160,7 +3160,7 @@ ASTMultiplicativeExpression MultiplicativeExpression() #MultiplicativeExpression
//UnaryExpression() ( ( "*" | "/" | <MOD> ) UnaryExpression() )*
(
(simpleNode = UnaryExpression(true) ) { sb.append(simpleNode.getImage()); }
(
( LOOKAHEAD(2)
( ("**" ) { sb.append(" ** "); } //Exponentiation
| ("*" ) { sb.append(" * "); }
| ("/" ) { sb.append(" / "); }

View File

@@ -29,4 +29,12 @@ public class ViewTest extends AbstractPLSQLParserTst {
ASTInput input = parsePLSQL(code);
Assert.assertNotNull(input);
}
@Test
public void parseCreateViewWithoutSemicolon() throws Exception {
String code = IOUtils.toString(this.getClass().getResourceAsStream("QueryWithoutSemicolon.sql"),
StandardCharsets.UTF_8);
ASTInput input = parsePLSQL(code);
Assert.assertNotNull(input);
}
}

View File

@@ -0,0 +1,6 @@
create or replace view beneficiary as
select os.obj_seq_no,
nvl(os.n01, 0) procentage
from object_slave os
where obj_slave_type_id = 'BENEFICIARY'
/