[jira] [Commented] (CMIS-885) regression - query parser accepts invalid queries

2015-02-03 Thread Michael Brackx (JIRA)

[ 
https://issues.apache.org/jira/browse/CMIS-885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14303078#comment-14303078
 ] 

Michael Brackx commented on CMIS-885:
-

Thanks.
Yes the fix works for me.


> regression - query parser accepts invalid queries
> -
>
> Key: CMIS-885
> URL: https://issues.apache.org/jira/browse/CMIS-885
> Project: Chemistry
>  Issue Type: Bug
>  Components: opencmis-server
>Affects Versions: OpenCMIS 0.12.0
>Reporter: Michael Brackx
>Assignee: Jens Hübel
> Attachments: patch, patch2.txt, patch3.txt
>
>
> regression on CMIS-526
> The fix was in the now deprecated QueryUtil.
> QueryUtilStrict does not have the fix.
> The test QueryParseTest.whereTestTokensAfterStatement() is incorrect and 
> should fail() inside the try.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CMIS-885) regression - query parser accepts invalid queries

2015-01-20 Thread JIRA

[ 
https://issues.apache.org/jira/browse/CMIS-885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14284113#comment-14284113
 ] 

Jens Hübel commented on CMIS-885:
-

Hi Michael,

Thanks for providing the patch. I agree that this is an issue and merged your 
patch for the test.
However the code for your fix caused issues in one of our projects and that's 
the reason I have removed these checks.

Imho the proper way to way to check for a proper ending query in AntLR is to 
have a rule like:
root : query EOF;

Unfortunately QueryUtil did not call the root rule but the query rule and so 
the EOF was missing. 
I changed this in QueryUtilStrict so that now 
root_return parsedStatement = parser.root();
is called.

I also needed a few changes in the strict grammar to properly catch the parsing 
errors (AntLR is really terrible with extension grammars).

Could you verify that this fix also works in your case?

Thanks Jens

> regression - query parser accepts invalid queries
> -
>
> Key: CMIS-885
> URL: https://issues.apache.org/jira/browse/CMIS-885
> Project: Chemistry
>  Issue Type: Bug
>  Components: opencmis-server
>Affects Versions: OpenCMIS 0.12.0
>Reporter: Michael Brackx
>Assignee: Jens Hübel
> Attachments: patch, patch2.txt, patch3.txt
>
>
> regression on CMIS-526
> The fix was in the now deprecated QueryUtil.
> QueryUtilStrict does not have the fix.
> The test QueryParseTest.whereTestTokensAfterStatement() is incorrect and 
> should fail() inside the try.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CMIS-885) regression - query parser accepts invalid queries

2015-01-16 Thread Michael Brackx (JIRA)

[ 
https://issues.apache.org/jira/browse/CMIS-885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14280261#comment-14280261
 ] 

Michael Brackx commented on CMIS-885:
-

Sorry. that patch is bad.

> regression - query parser accepts invalid queries
> -
>
> Key: CMIS-885
> URL: https://issues.apache.org/jira/browse/CMIS-885
> Project: Chemistry
>  Issue Type: Bug
>  Components: opencmis-server
>Affects Versions: OpenCMIS 0.12.0
>Reporter: Michael Brackx
>Assignee: Jens Hübel
> Attachments: patch
>
>
> regression on CMIS-526
> The fix was in the now deprecated QueryUtil.
> QueryUtilStrict does not have the fix.
> The test QueryParseTest.whereTestTokensAfterStatement() is incorrect and 
> should fail() inside the try.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)