From 048302821af1abd89acadfdba6bef23d7d281860 Mon Sep 17 00:00:00 2001 From: imbajin Date: Thu, 19 Jan 2023 18:38:19 +0800 Subject: [PATCH] chore(license): fix 3rd party refer code --- .../src/main/java/org/apache/hugegraph/util/CheckSocket.java | 5 ++++- .../main/java/org/apache/hugegraph/util/OrderLimitMap.java | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hugegraph-common/src/main/java/org/apache/hugegraph/util/CheckSocket.java b/hugegraph-common/src/main/java/org/apache/hugegraph/util/CheckSocket.java index 96d83e38..208a83e4 100644 --- a/hugegraph-common/src/main/java/org/apache/hugegraph/util/CheckSocket.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/util/CheckSocket.java @@ -1,3 +1,6 @@ +// TODO: add refer in LICESEN or Remove this file if not necessary, who use it? e.g: +// (https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-dist/src/assembly/static/bin/checksocket.sh) + // Copyright 2017 JanusGraph Authors // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -18,7 +21,7 @@ import java.net.InetAddress; import java.net.Socket; -/* +/** * This doesn't really belong here. It's only used in the zipfile * distribution to check whether Gremlin Server or ES are listening on * their respective TCP ports. But it's so tiny that I don't want diff --git a/hugegraph-common/src/main/java/org/apache/hugegraph/util/OrderLimitMap.java b/hugegraph-common/src/main/java/org/apache/hugegraph/util/OrderLimitMap.java index b8ce4715..448c0fb1 100644 --- a/hugegraph-common/src/main/java/org/apache/hugegraph/util/OrderLimitMap.java +++ b/hugegraph-common/src/main/java/org/apache/hugegraph/util/OrderLimitMap.java @@ -25,6 +25,7 @@ import com.google.common.collect.Ordering; /** + * TODO: ensure the refer is valid * Reference: * ... */ @@ -37,7 +38,7 @@ public class OrderLimitMap, V extends Comparable> private final Map valueMap; private static > Ordering incr() { - return Ordering.from((V o1, V o2) -> o1.compareTo(o2)); + return Ordering.from(Comparable::compareTo); } private static > Ordering decr() {