pgaref commented on a change in pull request #1161:
URL: https://github.com/apache/hive/pull/1161#discussion_r451488767



##########
File path: common/src/java/org/apache/hadoop/hive/common/StringInternUtils.java
##########
@@ -135,10 +135,10 @@ public static Path internUriStringsInPath(Path path) {
 
   public static <K> Map<K, String> internValuesInMap(Map<K, String> map) {
     if (map != null) {
-      for (K key : map.keySet()) {
-        String value = map.get(key);
+      for (Map.Entry<K, String> entry : map.entrySet()) {
+        String value = entry.getValue();
         if (value != null) {
-          map.put(key, value.intern());
+          map.put(entry.getKey(), value.intern());

Review comment:
       Nice idea! I followed similar logic to check if values are already 
interned in all helper methods in StringInternUtils class




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

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



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

Reply via email to