Browse Source

Minor code improvements (#51921)

Fix some whitespaces, comments and usage of `this.`.
Benedict Jin 5 năm trước cách đây
mục cha
commit
9f59900bf6

+ 1 - 1
server/src/main/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplanation.java

@@ -133,7 +133,7 @@ public final class ClusterAllocationExplanation implements ToXContentObject, Wri
         return this.clusterInfo;
     }
 
-    /** \
+    /**
      * Returns the shard allocation decision for attempting to assign or move the shard.
      */
     public ShardAllocationDecision getShardAllocationDecision() {

+ 0 - 2
server/src/main/java/org/elasticsearch/common/transport/BoundTransportAddress.java

@@ -30,8 +30,6 @@ import java.io.IOException;
  * A bounded transport address is a tuple of {@link TransportAddress}, one array that represents
  * the addresses the transport is bound to, and the other is the published one that represents the address clients
  * should communicate on.
- *
- *
  */
 public class BoundTransportAddress implements Writeable {
 

+ 1 - 1
server/src/main/java/org/elasticsearch/common/util/AbstractBigArray.java

@@ -110,7 +110,7 @@ abstract class AbstractBigArray extends AbstractArray {
         cache[page] = v;
         assert Array.getLength(v.v()) == expectedSize;
         return v.v();
-      }
+    }
 
     protected final byte[] newBytePage(int page) {
         if (recycler != null) {

+ 3 - 3
server/src/main/java/org/elasticsearch/indices/breaker/CircuitBreakerStats.java

@@ -49,9 +49,9 @@ public class CircuitBreakerStats implements Writeable, ToXContentObject {
     }
 
     public CircuitBreakerStats(StreamInput in) throws IOException {
-        limit = in.readLong();
-        estimated = in.readLong();
-        overhead = in.readDouble();
+        this.limit = in.readLong();
+        this.estimated = in.readLong();
+        this.overhead = in.readDouble();
         this.trippedCount = in.readLong();
         this.name = in.readString();
     }