keith-turner commented on code in PR #6053:
URL: https://github.com/apache/accumulo/pull/6053#discussion_r2684110215


##########
core/src/main/java/org/apache/accumulo/core/clientImpl/access/BytesAccess.java:
##########
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.accumulo.core.clientImpl.access;
+
+import static java.nio.charset.StandardCharsets.ISO_8859_1;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.function.Consumer;
+
+import org.apache.accumulo.access.Access;
+import org.apache.accumulo.access.AccessEvaluator;
+import org.apache.accumulo.core.data.ArrayByteSequence;
+import org.apache.accumulo.core.security.AuthorizationContainer;
+import org.apache.accumulo.core.security.Authorizations;
+
+/**
+ * All Accumulo Access APIs are String based. Accumulo's legacy APIs for 
access control are all
+ * based on byte[]. This class maps those legacy byte[] based APIs to use the 
Accumulo Access string
+ * based APIs.
+ *
+ * <p>
+ * This mapping is done by using ISO_8859_1 to convert byte[] to String and 
vice versa. ISO_8859_1
+ * is used because it maps each unsigned integer in a byte array directly to 
the same unsigned

Review Comment:
   Not sure, if it is but I can add a unit test to verify that behavior. 



##########
core/src/main/java/org/apache/accumulo/core/clientImpl/access/BytesAccess.java:
##########
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.accumulo.core.clientImpl.access;
+
+import static java.nio.charset.StandardCharsets.ISO_8859_1;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.function.Consumer;
+
+import org.apache.accumulo.access.Access;
+import org.apache.accumulo.access.AccessEvaluator;
+import org.apache.accumulo.core.data.ArrayByteSequence;
+import org.apache.accumulo.core.security.AuthorizationContainer;
+import org.apache.accumulo.core.security.Authorizations;
+
+/**
+ * All Accumulo Access APIs are String based. Accumulo's legacy APIs for 
access control are all
+ * based on byte[]. This class maps those legacy byte[] based APIs to use the 
Accumulo Access string
+ * based APIs.
+ *
+ * <p>
+ * This mapping is done by using ISO_8859_1 to convert byte[] to String and 
vice versa. ISO_8859_1
+ * is used because it maps each unsigned integer in a byte array directly to 
the same unsigned

Review Comment:
   Not sure if it is, but I can add a unit test to verify that behavior. 



-- 
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