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

Sam Tunnicliffe commented on CASSANDRA-16977:
---------------------------------------------

{{DropFunctionStatement}} does accept a function without parens, but this is 
really because it's only constructing a {{FunctionName}}, which does not have 
parameters. Wherever a {{FunctionResource}} is required, the brackets are used. 
IMO, {{fromName}} and {{getName}} ought to be symmetrical, otherwise we're at 
risk of running into problems where something is serialized in one format but 
read in another. i.e. entries in the permissions tables use {{getName}} and so 
always include brackets.

> ArrayIndexOutOfBoundsException in FunctionResource#fromName
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-16977
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16977
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Feature/Authorization
>            Reporter: Berenguer Blasi
>            Assignee: Berenguer Blasi
>            Priority: Normal
>             Fix For: 3.11.x, 4.0.x, 4.x
>
>
> {{FunctionResource}} can't handle functions with 0 args where it throws:
> {noformat}
> 2021-04-08 10:45:40,984 ErrorMessage.java:387 - Unexpected exception during 
> request
> java.lang.ArrayIndexOutOfBoundsException: 1
> at 
> org.apache.cassandra.auth.FunctionResource.fromName(FunctionResource.java:178)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to