> On Sept. 18, 2023, 6:18 p.m., Don Bosco Durai wrote:
> > agents-common/src/main/java/org/apache/ranger/plugin/util/JavaScriptEdits.java
> > Lines 51 (patched)
> > <https://reviews.apache.org/r/74609/diff/1/?file=2279790#file2279790line51>
> >
> >     I hope this won't throw an out of bound exception, but only returns null
> 
> Barbara Eckman wrote:
>     It only returns null.  Here's what happens for the input 'var result = 
> [[USER.dataCollection_Sensitivity]]. filter(function(n){ return [[n,"_"]][0] 
> == TAG.value}); result.length !=0', for the 2 iterations of the while loop:
>     INFO [main] (JavaScriptEdits.java:56) - ==> 
> s0=[[USER.dataCollection_Sensitivity]] s1=USER.dataCollection_Sensitivity 
> s2=null delim=,
>      INFO [main] (JavaScriptEdits.java:56) - ==> s0=[[n,"_"]] s1=n s2=,"_" 
> delim=_

Thanks for the clarification


> On Sept. 18, 2023, 6:18 p.m., Don Bosco Durai wrote:
> > agents-common/src/main/java/org/apache/ranger/plugin/util/JavaScriptEdits.java
> > Lines 56 (patched)
> > <https://reviews.apache.org/r/74609/diff/1/?file=2279790#file2279790line56>
> >
> >     Would there be an case where s0 to s2 will be null or not present
> 
> Barbara Eckman wrote:
>     if m.find() is true, then s0 and s1 won't be null, because they represent 
> what was found.  s2 can be null, as we saw above, with no problems.

Thanks for the clarification


- Don Bosco


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74609/#review225767
-----------------------------------------------------------


On Sept. 18, 2023, 8:36 p.m., Barbara Eckman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74609/
> -----------------------------------------------------------
> 
> (Updated Sept. 18, 2023, 8:36 p.m.)
> 
> 
> Review request for ranger and madhan.
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> RANGER-4234: Eliminate need for splitting delimited strings into arrays in 
> policy conditions
> 
> 
> Diffs
> -----
> 
>   agents-common/dev-support/spotbugsIncludeFile.xml PRE-CREATION 
>   agents-common/pom.xml b753c1368 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/model/RangerPolicy.java 
> 9e5a94b1a 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerRequestScriptEvaluator.java
>  7ac20764f 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/util/JavaScriptEdits.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/74609/diff/3/
> 
> 
> Testing
> -------
> 
> 
> File Attachments
> ----------------
> 
> 0001-doubleBracketsReplace-stuff.patch
>   
> https://reviews.apache.org/media/uploaded/files/2023/09/18/fe38eef9-22e6-4c91-85a0-46fe337ba87b__0001-doubleBracketsReplace-stuff.patch
> 0001-doubleBracketsReplace-stuff.patch
>   
> https://reviews.apache.org/media/uploaded/files/2023/09/18/062f1050-96d7-4ed0-9008-fd65311ea7b0__0001-doubleBracketsReplace-stuff.patch
> 
> 
> Thanks,
> 
> Barbara Eckman
> 
>

Reply via email to