ctubbsii commented on code in PR #102:
URL: https://github.com/apache/accumulo-access/pull/102#discussion_r2908775879


##########
modules/core/src/main/java/org/apache/accumulo/access/impl/AccessExpressionImpl.java:
##########
@@ -77,7 +77,7 @@ public static CharSequence quote(CharSequence term) {
   }
 
   public static CharSequence unquote(CharSequence term) {
-    if (term.equals("\"\"") || term.isEmpty()) {
+    if (term.toString().equals("\"\"") || term.isEmpty()) {

Review Comment:
   I've made this change, but am left wondering why this code is trying to 
check for some, but not all, legal authorizations. It doesn't handle the case 
where the string is a single quote character (`"`), nor does it care if the 
string only starts or ends with a quote, but not wrapped on the other side 
(`"a` or `a"`). I'm wondering why it should care about the empty string case or 
the quoted empty string case only, but not others. If the checking is done 
comprehensively elsewhere, perhaps this should just return those special cases 
as-is, like it does in other scenarios, rather than throw an exception?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to