You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hugegraph.apache.org by ji...@apache.org on 2023/01/19 10:38:26 UTC

[incubator-hugegraph-commons] 01/01: chore(license): fix 3rd party refer code

This is an automated email from the ASF dual-hosted git repository.

jin pushed a commit to branch fix-license
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph-commons.git

commit 048302821af1abd89acadfdba6bef23d7d281860
Author: imbajin <ji...@apache.org>
AuthorDate: Thu Jan 19 18:38:19 2023 +0800

    chore(license): fix 3rd party refer code
---
 .../src/main/java/org/apache/hugegraph/util/CheckSocket.java         | 5 ++++-
 .../src/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 96d83e3..208a83e 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.io.IOException;
 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 b8ce471..448c0fb 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.base.Functions;
 import com.google.common.collect.Ordering;
 
 /**
+ * TODO: ensure the refer is valid
  * Reference:
  * <a href="https://stackoverflow.com/questions/109383/sort-a-mapkey-value-by-values">...</a>
  */
@@ -37,7 +38,7 @@ public class OrderLimitMap<K extends Comparable<K>, V extends Comparable<V>>
     private final Map<K, V> valueMap;
 
     private static <V extends Comparable<V>> Ordering<? super V> incr() {
-        return Ordering.from((V o1, V o2) -> o1.compareTo(o2));
+        return Ordering.from(Comparable::compareTo);
     }
 
     private static <V extends Comparable<V>> Ordering<? super V> decr() {