Skip to content

Commit 65833b7

Browse files
authored
Cleanup warnings (#1246)
1 parent 26fc152 commit 65833b7

16 files changed

+73
-27
lines changed

gitlab4j-api/src/main/java/org/gitlab4j/api/DiscussionsApi.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import org.gitlab4j.api.models.Discussion;
1212
import org.gitlab4j.api.models.Note;
1313
import org.gitlab4j.api.models.Position;
14-
import org.gitlab4j.api.utils.ISO8601;
14+
import org.gitlab4j.models.utils.ISO8601;
1515

1616
/**
1717
* This class implements the client side API for the GitLab Discussions API.

gitlab4j-api/src/main/java/org/gitlab4j/api/NotesApi.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import jakarta.ws.rs.core.Response;
99

1010
import org.gitlab4j.api.models.Note;
11-
import org.gitlab4j.api.utils.ISO8601;
11+
import org.gitlab4j.models.utils.ISO8601;
1212

1313
public class NotesApi extends AbstractApi {
1414

gitlab4j-api/src/main/java/org/gitlab4j/api/utils/JacksonJson.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import com.fasterxml.jackson.databind.JsonSerializer;
3434
import com.fasterxml.jackson.databind.ObjectMapper;
3535
import com.fasterxml.jackson.databind.ObjectWriter;
36-
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
36+
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
3737
import com.fasterxml.jackson.databind.SerializationFeature;
3838
import com.fasterxml.jackson.databind.SerializerProvider;
3939
import com.fasterxml.jackson.databind.module.SimpleModule;
@@ -60,7 +60,7 @@ public JacksonJson() {
6060
objectMapper = new ObjectMapper();
6161

6262
objectMapper.setSerializationInclusion(Include.NON_NULL);
63-
objectMapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
63+
objectMapper.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE);
6464

6565
objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
6666
objectMapper.configure(SerializationFeature.WRITE_ENUMS_USING_TO_STRING, true);
@@ -360,7 +360,7 @@ private static class JacksonJsonSingletonHelper {
360360
private static final JacksonJson JACKSON_JSON = new JacksonJson();
361361

362362
static {
363-
JACKSON_JSON.objectMapper.setPropertyNamingStrategy(PropertyNamingStrategy.LOWER_CAMEL_CASE);
363+
JACKSON_JSON.objectMapper.setPropertyNamingStrategy(PropertyNamingStrategies.LOWER_CAMEL_CASE);
364364
JACKSON_JSON.objectMapper.setSerializationInclusion(Include.ALWAYS);
365365
}
366366
}

gitlab4j-models/src/main/java/org/gitlab4j/api/models/EpicIssue.java

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import com.fasterxml.jackson.annotation.JsonProperty;
99

1010
public class EpicIssue extends AbstractIssue {
11+
private static final long serialVersionUID = 1L;
1112

1213
@JsonProperty("_links")
1314
private Map<String, String> links;

gitlab4j-models/src/main/java/org/gitlab4j/api/models/LinkedIssue.java

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import org.gitlab4j.models.utils.JacksonJson;
66

77
public class LinkedIssue extends AbstractIssue {
8+
private static final long serialVersionUID = 1L;
89

910
private Long issueLinkId;
1011
private LinkType linkType;

gitlab4j-models/src/main/java/org/gitlab4j/api/models/Metadata.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public String toString() {
5151
return (JacksonJson.toJsonString(this));
5252
}
5353

54-
private static class Kas {
54+
public static class Kas {
5555

5656
private Boolean enabled;
5757

gitlab4j-models/src/main/java/org/gitlab4j/api/services/BugzillaService.java

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import org.gitlab4j.models.GitLabForm;
44

55
public class BugzillaService extends NotificationService {
6+
private static final long serialVersionUID = 1L;
67

78
/**
89
* Get the form data for this service based on it's properties.

gitlab4j-models/src/main/java/org/gitlab4j/api/services/CustomIssueTrackerService.java

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import org.gitlab4j.models.GitLabForm;
44

55
public class CustomIssueTrackerService extends NotificationService {
6+
private static final long serialVersionUID = 1L;
67

78
/**
89
* Get the form data for this service based on it's properties.

gitlab4j-models/src/main/java/org/gitlab4j/api/services/EmailOnPushService.java

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import com.fasterxml.jackson.annotation.JsonIgnore;
66

77
public class EmailOnPushService extends NotificationService {
8+
private static final long serialVersionUID = 1L;
89

910
public static final String RECIPIENT_PROP = "recipients";
1011
public static final String DISABLE_DIFFS_PROP = "disable_diffs";

gitlab4j-models/src/main/java/org/gitlab4j/api/services/ExternalWikiService.java

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import org.gitlab4j.models.GitLabForm;
44

55
public class ExternalWikiService extends NotificationService {
6+
private static final long serialVersionUID = 1L;
67

78
public static final String WIKIURL_KEY_PROP = "external_wiki_url";
89

gitlab4j-models/src/main/java/org/gitlab4j/api/services/HipChatService.java

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import com.fasterxml.jackson.annotation.JsonIgnore;
66

77
public class HipChatService extends NotificationService {
8+
private static final long serialVersionUID = 1L;
89

910
public static final String TOKEN_PROP = "token";
1011
public static final String COLOR_PROP = "color";

gitlab4j-models/src/main/java/org/gitlab4j/api/services/JiraService.java

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import com.fasterxml.jackson.annotation.JsonIgnore;
88

99
public class JiraService extends NotificationService {
10+
private static final long serialVersionUID = 1L;
1011

1112
public static final String URL_PROP = "url";
1213
public static final String API_URL_PROP = "api_url";

gitlab4j-models/src/main/java/org/gitlab4j/api/services/MattermostService.java

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import com.fasterxml.jackson.annotation.JsonIgnore;
66

77
public class MattermostService extends NotificationService {
8+
private static final long serialVersionUID = 1L;
89

910
private String defaultChannel;
1011

gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/RepositorySystemHookEvent.java

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import org.gitlab4j.models.utils.JacksonJson;
77

88
public class RepositorySystemHookEvent extends AbstractSystemHookEvent {
9+
private static final long serialVersionUID = 1L;
910

1011
public static final String REPOSITORY_UPDATE_EVENT = "repository_update";
1112

gitlab4j-models/src/main/java/org/gitlab4j/api/systemhooks/SystemHookEvent.java

+54-18
Original file line numberDiff line numberDiff line change
@@ -71,38 +71,74 @@ public interface SystemHookEvent extends Serializable {
7171

7272
// All of the following class definitions are needed to make the above work.
7373
// Jackson has a tough time mapping the same class to multiple IDs
74-
class CreateProjectSystemHookEvent extends ProjectSystemHookEvent {}
74+
class CreateProjectSystemHookEvent extends ProjectSystemHookEvent {
75+
private static final long serialVersionUID = 1L;
76+
}
7577

76-
class DestroyProjectSystemHookEvent extends ProjectSystemHookEvent {}
78+
class DestroyProjectSystemHookEvent extends ProjectSystemHookEvent {
79+
private static final long serialVersionUID = 1L;
80+
}
7781

78-
class RenameProjectSystemHookEvent extends ProjectSystemHookEvent {}
82+
class RenameProjectSystemHookEvent extends ProjectSystemHookEvent {
83+
private static final long serialVersionUID = 1L;
84+
}
7985

80-
class TransferProjectSystemHookEvent extends ProjectSystemHookEvent {}
86+
class TransferProjectSystemHookEvent extends ProjectSystemHookEvent {
87+
private static final long serialVersionUID = 1L;
88+
}
8189

82-
class UpdateProjectSystemHookEvent extends ProjectSystemHookEvent {}
90+
class UpdateProjectSystemHookEvent extends ProjectSystemHookEvent {
91+
private static final long serialVersionUID = 1L;
92+
}
8393

84-
class NewTeamMemberSystemHookEvent extends TeamMemberSystemHookEvent {}
94+
class NewTeamMemberSystemHookEvent extends TeamMemberSystemHookEvent {
95+
private static final long serialVersionUID = 1L;
96+
}
8597

86-
class RemoveTeamMemberSystemHookEvent extends TeamMemberSystemHookEvent {}
98+
class RemoveTeamMemberSystemHookEvent extends TeamMemberSystemHookEvent {
99+
private static final long serialVersionUID = 1L;
100+
}
87101

88-
class CreateUserSystemHookEvent extends UserSystemHookEvent {}
102+
class CreateUserSystemHookEvent extends UserSystemHookEvent {
103+
private static final long serialVersionUID = 1L;
104+
}
89105

90-
class DestroyUserSystemHookEvent extends UserSystemHookEvent {}
106+
class DestroyUserSystemHookEvent extends UserSystemHookEvent {
107+
private static final long serialVersionUID = 1L;
108+
}
91109

92-
class RenameUserSystemHookEvent extends UserSystemHookEvent {}
110+
class RenameUserSystemHookEvent extends UserSystemHookEvent {
111+
private static final long serialVersionUID = 1L;
112+
}
93113

94-
class UserFailedLoginSystemHookEvent extends UserSystemHookEvent {}
114+
class UserFailedLoginSystemHookEvent extends UserSystemHookEvent {
115+
private static final long serialVersionUID = 1L;
116+
}
95117

96-
class CreateKeySystemHookEvent extends KeySystemHookEvent {}
118+
class CreateKeySystemHookEvent extends KeySystemHookEvent {
119+
private static final long serialVersionUID = 1L;
120+
}
97121

98-
class DestroyKeySystemHookEvent extends KeySystemHookEvent {}
122+
class DestroyKeySystemHookEvent extends KeySystemHookEvent {
123+
private static final long serialVersionUID = 1L;
124+
}
99125

100-
class CreateGroupSystemHookEvent extends GroupSystemHookEvent {}
126+
class CreateGroupSystemHookEvent extends GroupSystemHookEvent {
127+
private static final long serialVersionUID = 1L;
128+
}
101129

102-
class DestroyGroupSystemHookEvent extends GroupSystemHookEvent {}
130+
class DestroyGroupSystemHookEvent extends GroupSystemHookEvent {
131+
private static final long serialVersionUID = 1L;
132+
}
103133

104-
class RenameGroupSystemHookEvent extends GroupSystemHookEvent {}
134+
class RenameGroupSystemHookEvent extends GroupSystemHookEvent {
135+
private static final long serialVersionUID = 1L;
136+
}
105137

106-
class NewGroupMemberSystemHookEvent extends GroupMemberSystemHookEvent {}
138+
class NewGroupMemberSystemHookEvent extends GroupMemberSystemHookEvent {
139+
private static final long serialVersionUID = 1L;
140+
}
107141

108-
class RemoveGroupMemberSystemHookEvent extends GroupMemberSystemHookEvent {}
142+
class RemoveGroupMemberSystemHookEvent extends GroupMemberSystemHookEvent {
143+
private static final long serialVersionUID = 1L;
144+
}

gitlab4j-models/src/main/java/org/gitlab4j/models/utils/JacksonJson.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import com.fasterxml.jackson.databind.JsonSerializer;
2828
import com.fasterxml.jackson.databind.ObjectMapper;
2929
import com.fasterxml.jackson.databind.ObjectWriter;
30-
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
30+
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
3131
import com.fasterxml.jackson.databind.SerializationFeature;
3232
import com.fasterxml.jackson.databind.SerializerProvider;
3333
import com.fasterxml.jackson.databind.module.SimpleModule;
@@ -53,7 +53,7 @@ public JacksonJson() {
5353
objectMapper = new ObjectMapper();
5454

5555
objectMapper.setSerializationInclusion(Include.NON_NULL);
56-
objectMapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
56+
objectMapper.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE);
5757

5858
objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
5959
objectMapper.configure(SerializationFeature.WRITE_ENUMS_USING_TO_STRING, true);
@@ -339,7 +339,7 @@ private static class JacksonJsonSingletonHelper {
339339
private static final JacksonJson JACKSON_JSON = new JacksonJson();
340340

341341
static {
342-
JACKSON_JSON.objectMapper.setPropertyNamingStrategy(PropertyNamingStrategy.LOWER_CAMEL_CASE);
342+
JACKSON_JSON.objectMapper.setPropertyNamingStrategy(PropertyNamingStrategies.LOWER_CAMEL_CASE);
343343
JACKSON_JSON.objectMapper.setSerializationInclusion(Include.ALWAYS);
344344
}
345345
}

0 commit comments

Comments
 (0)