Skip to content

Cleanup warnings #1246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import org.gitlab4j.api.models.Discussion;
import org.gitlab4j.api.models.Note;
import org.gitlab4j.api.models.Position;
import org.gitlab4j.api.utils.ISO8601;
import org.gitlab4j.models.utils.ISO8601;

/**
* This class implements the client side API for the GitLab Discussions API.
Expand Down
2 changes: 1 addition & 1 deletion gitlab4j-api/src/main/java/org/gitlab4j/api/NotesApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import jakarta.ws.rs.core.Response;

import org.gitlab4j.api.models.Note;
import org.gitlab4j.api.utils.ISO8601;
import org.gitlab4j.models.utils.ISO8601;

public class NotesApi extends AbstractApi {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectWriter;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.module.SimpleModule;
Expand All @@ -60,7 +60,7 @@ public JacksonJson() {
objectMapper = new ObjectMapper();

objectMapper.setSerializationInclusion(Include.NON_NULL);
objectMapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
objectMapper.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE);

objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
objectMapper.configure(SerializationFeature.WRITE_ENUMS_USING_TO_STRING, true);
Expand Down Expand Up @@ -360,7 +360,7 @@ private static class JacksonJsonSingletonHelper {
private static final JacksonJson JACKSON_JSON = new JacksonJson();

static {
JACKSON_JSON.objectMapper.setPropertyNamingStrategy(PropertyNamingStrategy.LOWER_CAMEL_CASE);
JACKSON_JSON.objectMapper.setPropertyNamingStrategy(PropertyNamingStrategies.LOWER_CAMEL_CASE);
JACKSON_JSON.objectMapper.setSerializationInclusion(Include.ALWAYS);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;

public class EpicIssue extends AbstractIssue {
private static final long serialVersionUID = 1L;

@JsonProperty("_links")
private Map<String, String> links;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.gitlab4j.models.utils.JacksonJson;

public class LinkedIssue extends AbstractIssue {
private static final long serialVersionUID = 1L;

private Long issueLinkId;
private LinkType linkType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public String toString() {
return (JacksonJson.toJsonString(this));
}

private static class Kas {
public static class Kas {

private Boolean enabled;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.gitlab4j.models.GitLabForm;

public class BugzillaService extends NotificationService {
private static final long serialVersionUID = 1L;

/**
* Get the form data for this service based on it's properties.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.gitlab4j.models.GitLabForm;

public class CustomIssueTrackerService extends NotificationService {
private static final long serialVersionUID = 1L;

/**
* Get the form data for this service based on it's properties.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.fasterxml.jackson.annotation.JsonIgnore;

public class EmailOnPushService extends NotificationService {
private static final long serialVersionUID = 1L;

public static final String RECIPIENT_PROP = "recipients";
public static final String DISABLE_DIFFS_PROP = "disable_diffs";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.gitlab4j.models.GitLabForm;

public class ExternalWikiService extends NotificationService {
private static final long serialVersionUID = 1L;

public static final String WIKIURL_KEY_PROP = "external_wiki_url";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.fasterxml.jackson.annotation.JsonIgnore;

public class HipChatService extends NotificationService {
private static final long serialVersionUID = 1L;

public static final String TOKEN_PROP = "token";
public static final String COLOR_PROP = "color";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.fasterxml.jackson.annotation.JsonIgnore;

public class JiraService extends NotificationService {
private static final long serialVersionUID = 1L;

public static final String URL_PROP = "url";
public static final String API_URL_PROP = "api_url";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.fasterxml.jackson.annotation.JsonIgnore;

public class MattermostService extends NotificationService {
private static final long serialVersionUID = 1L;

private String defaultChannel;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.gitlab4j.models.utils.JacksonJson;

public class RepositorySystemHookEvent extends AbstractSystemHookEvent {
private static final long serialVersionUID = 1L;

public static final String REPOSITORY_UPDATE_EVENT = "repository_update";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,38 +71,74 @@ public interface SystemHookEvent extends Serializable {

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

class DestroyProjectSystemHookEvent extends ProjectSystemHookEvent {}
class DestroyProjectSystemHookEvent extends ProjectSystemHookEvent {
private static final long serialVersionUID = 1L;
}

class RenameProjectSystemHookEvent extends ProjectSystemHookEvent {}
class RenameProjectSystemHookEvent extends ProjectSystemHookEvent {
private static final long serialVersionUID = 1L;
}

class TransferProjectSystemHookEvent extends ProjectSystemHookEvent {}
class TransferProjectSystemHookEvent extends ProjectSystemHookEvent {
private static final long serialVersionUID = 1L;
}

class UpdateProjectSystemHookEvent extends ProjectSystemHookEvent {}
class UpdateProjectSystemHookEvent extends ProjectSystemHookEvent {
private static final long serialVersionUID = 1L;
}

class NewTeamMemberSystemHookEvent extends TeamMemberSystemHookEvent {}
class NewTeamMemberSystemHookEvent extends TeamMemberSystemHookEvent {
private static final long serialVersionUID = 1L;
}

class RemoveTeamMemberSystemHookEvent extends TeamMemberSystemHookEvent {}
class RemoveTeamMemberSystemHookEvent extends TeamMemberSystemHookEvent {
private static final long serialVersionUID = 1L;
}

class CreateUserSystemHookEvent extends UserSystemHookEvent {}
class CreateUserSystemHookEvent extends UserSystemHookEvent {
private static final long serialVersionUID = 1L;
}

class DestroyUserSystemHookEvent extends UserSystemHookEvent {}
class DestroyUserSystemHookEvent extends UserSystemHookEvent {
private static final long serialVersionUID = 1L;
}

class RenameUserSystemHookEvent extends UserSystemHookEvent {}
class RenameUserSystemHookEvent extends UserSystemHookEvent {
private static final long serialVersionUID = 1L;
}

class UserFailedLoginSystemHookEvent extends UserSystemHookEvent {}
class UserFailedLoginSystemHookEvent extends UserSystemHookEvent {
private static final long serialVersionUID = 1L;
}

class CreateKeySystemHookEvent extends KeySystemHookEvent {}
class CreateKeySystemHookEvent extends KeySystemHookEvent {
private static final long serialVersionUID = 1L;
}

class DestroyKeySystemHookEvent extends KeySystemHookEvent {}
class DestroyKeySystemHookEvent extends KeySystemHookEvent {
private static final long serialVersionUID = 1L;
}

class CreateGroupSystemHookEvent extends GroupSystemHookEvent {}
class CreateGroupSystemHookEvent extends GroupSystemHookEvent {
private static final long serialVersionUID = 1L;
}

class DestroyGroupSystemHookEvent extends GroupSystemHookEvent {}
class DestroyGroupSystemHookEvent extends GroupSystemHookEvent {
private static final long serialVersionUID = 1L;
}

class RenameGroupSystemHookEvent extends GroupSystemHookEvent {}
class RenameGroupSystemHookEvent extends GroupSystemHookEvent {
private static final long serialVersionUID = 1L;
}

class NewGroupMemberSystemHookEvent extends GroupMemberSystemHookEvent {}
class NewGroupMemberSystemHookEvent extends GroupMemberSystemHookEvent {
private static final long serialVersionUID = 1L;
}

class RemoveGroupMemberSystemHookEvent extends GroupMemberSystemHookEvent {}
class RemoveGroupMemberSystemHookEvent extends GroupMemberSystemHookEvent {
private static final long serialVersionUID = 1L;
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectWriter;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.module.SimpleModule;
Expand All @@ -53,7 +53,7 @@ public JacksonJson() {
objectMapper = new ObjectMapper();

objectMapper.setSerializationInclusion(Include.NON_NULL);
objectMapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
objectMapper.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE);

objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
objectMapper.configure(SerializationFeature.WRITE_ENUMS_USING_TO_STRING, true);
Expand Down Expand Up @@ -339,7 +339,7 @@ private static class JacksonJsonSingletonHelper {
private static final JacksonJson JACKSON_JSON = new JacksonJson();

static {
JACKSON_JSON.objectMapper.setPropertyNamingStrategy(PropertyNamingStrategy.LOWER_CAMEL_CASE);
JACKSON_JSON.objectMapper.setPropertyNamingStrategy(PropertyNamingStrategies.LOWER_CAMEL_CASE);
JACKSON_JSON.objectMapper.setSerializationInclusion(Include.ALWAYS);
}
}
Expand Down
Loading