Skip to content

Commit

Permalink
removed static constructor
Browse files Browse the repository at this point in the history
add allargs constructor
  • Loading branch information
user authored and soe78 committed Feb 7, 2021
1 parent b1c1016 commit 5a8bf8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.springframework.util.StringUtils;

import de.codecentric.boot.admin.server.domain.entities.Instance;
import lombok.NoArgsConstructor;

/**
* Provides Basic Auth headers for the {@link Instance} using the metadata for "user.name"
Expand Down Expand Up @@ -103,8 +102,9 @@ protected String encode(String username, String password) {
return null;
}

@lombok.Data(staticConstructor = "of")
@NoArgsConstructor
@lombok.Data
@lombok.NoArgsConstructor
@lombok.AllArgsConstructor
public static class InstanceCredentials {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class BasicAuthHttpHeaderProviderTest {
private final BasicAuthHttpHeaderProvider headersProvider = new BasicAuthHttpHeaderProvider();

private final BasicAuthHttpHeaderProvider headersProviderEnableInstanceAuth = new BasicAuthHttpHeaderProvider(
"client", "client", Collections.singletonMap("sb-admin-server", InstanceCredentials.of("admin", "admin")));
"client", "client", Collections.singletonMap("sb-admin-server", new InstanceCredentials("admin", "admin")));

@Test
public void test_auth_header() {
Expand Down

0 comments on commit 5a8bf8d

Please sign in to comment.