Skip to content

Commit

Permalink
refactor: improve order for imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan-Montes committed Jan 15, 2025
1 parent b99a0b0 commit e5d58b7
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@
import com.linecorp.armeria.common.RequestHeadersBuilder;
import com.linecorp.armeria.common.SessionProtocol;
import com.linecorp.armeria.common.annotation.Nullable;
import com.linecorp.armeria.internal.common.eureka.Application;
import com.linecorp.armeria.internal.common.eureka.Applications;
import com.linecorp.armeria.common.eureka.InstanceInfo;
import com.linecorp.armeria.common.eureka.InstanceInfo.InstanceStatus;
import com.linecorp.armeria.common.eureka.InstanceInfo.PortWrapper;
import com.linecorp.armeria.internal.common.eureka.Application;
import com.linecorp.armeria.internal.common.eureka.Applications;
import com.linecorp.armeria.server.eureka.EurekaUpdatingListener;

import io.netty.channel.EventLoop;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,17 +476,33 @@ public static class PortWrapper {
private final boolean enabled;
private final int port;

/**
* Constructs a new PortWrapper instance.
*
* @param enabled Whether the port is enabled or not.
* @param port The port number.
*/
public PortWrapper(@JsonProperty("@enabled") boolean enabled, @JsonProperty("$") int port) {
this.enabled = enabled;
this.port = port;
}

/**
* Returns whether the port is enabled or not.
*
* @return {@code true} if the port is enabled, {@code false} otherwise.
*/
@JsonProperty("@enabled")
@JsonSerialize(using = ToStringSerializer.class)
public boolean isEnabled() {
return enabled;
}

/**
* Returns the port number.
*
* @return The port number.
*/
@JsonProperty("$")
public int getPort() {
return port;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
import com.linecorp.armeria.common.SessionProtocol;
import com.linecorp.armeria.common.annotation.Nullable;
import com.linecorp.armeria.common.util.SystemInfo;
import com.linecorp.armeria.internal.common.eureka.EurekaWebClient;
import com.linecorp.armeria.common.eureka.InstanceInfo;
import com.linecorp.armeria.common.eureka.InstanceInfo.InstanceStatus;
import com.linecorp.armeria.common.eureka.InstanceInfo.PortWrapper;
import com.linecorp.armeria.internal.common.eureka.EurekaWebClient;
import com.linecorp.armeria.server.Route;
import com.linecorp.armeria.server.RoutePathType;
import com.linecorp.armeria.server.Server;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@

import com.linecorp.armeria.common.SessionProtocol;
import com.linecorp.armeria.common.annotation.Nullable;
import com.linecorp.armeria.internal.common.eureka.DataCenterInfo;
import com.linecorp.armeria.common.eureka.InstanceInfo;
import com.linecorp.armeria.common.eureka.InstanceInfo.InstanceStatus;
import com.linecorp.armeria.common.eureka.InstanceInfo.PortWrapper;
import com.linecorp.armeria.internal.common.eureka.DataCenterInfo;
import com.linecorp.armeria.internal.common.eureka.LeaseInfo;

import io.netty.util.NetUtil;
Expand Down

0 comments on commit e5d58b7

Please sign in to comment.