vrozov commented on a change in pull request #1397: DRILL-6633: Replace usage
of Guava classes by JDK ones
URL: https://github.com/apache/drill/pull/1397#discussion_r212418848
##########
File path:
common/src/main/java/org/apache/drill/common/collections/ImmutableEntry.java
##########
@@ -17,11 +17,11 @@
*/
package org.apache.drill.common.collections;
-import java.util.Map;
-
-import com.google.common.base.Objects;
import com.google.common.base.Preconditions;
+import java.util.Map;
+import java.util.Objects;
+
public class ImmutableEntry<K, V> implements Map.Entry<K, V> {
Review comment:
@vdiravka The purpose of `org.apache.drill.common.collections.Collectors` is
to use internal iterator with a functional interface instead of creating a
stream. In many cases, I'd recommend to use `Collectors` and extend this class.
Using streams is justified when processing thousands of elements, for a handful
number of elements, `Collectors` is a better option, IMO.
@vvysotskyi Personally, I don't see why it is necessary to replace *all*
Guava classes/methods with provided by JDK. IMO, the scope of PR should be to
replace only removed and deprecated by Guava team API, so it can be reduced
significantly.
I don't see why it is necessary to change `ImmutableEntry` class as part of
this PR when it needs to be completely replaced with the one provided by JDK.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services