Skip to content

Commit 3674117

Browse files
authored
Add Lombok's EHC/ToString to LogConfig (#1374)
Fixes #1373
1 parent e4eb048 commit 3674117

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

docker-java-api/src/main/java/com/github/dockerjava/api/model/LogConfig.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import com.fasterxml.jackson.annotation.JsonIgnore;
55
import com.fasterxml.jackson.annotation.JsonProperty;
66
import com.fasterxml.jackson.annotation.JsonValue;
7+
import lombok.EqualsAndHashCode;
8+
import lombok.ToString;
79

810
import javax.annotation.CheckForNull;
911
import java.io.Serializable;
@@ -18,6 +20,8 @@
1820
* docker will ignore them. In most cases setting the config option to null will suffice. Consult the docker remote API for a more detailed
1921
* and up-to-date explanation of the available types and their options.
2022
*/
23+
@EqualsAndHashCode
24+
@ToString
2125
public class LogConfig implements Serializable {
2226
private static final long serialVersionUID = 1L;
2327

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.github.dockerjava.api.model;
2+
3+
import org.junit.Test;
4+
5+
import static org.hamcrest.MatcherAssert.assertThat;
6+
import static org.hamcrest.Matchers.equalTo;
7+
8+
public class HostConfigTest {
9+
10+
@Test
11+
public void testNewObjectsEqual() throws Exception {
12+
assertThat(HostConfig.newHostConfig(),
13+
equalTo(HostConfig.newHostConfig()));
14+
}
15+
}

0 commit comments

Comments
 (0)