Skip to content

Commit

Permalink
[Improve] Remove redundant serializable implements for enum (#3025)
Browse files Browse the repository at this point in the history
* [Improve] Using code style & quality rules to improve org.apache.streampark.common.enums package of streampark-common module.

* [Improve] remove redundancy implements

* [Fix] fix compiler
  • Loading branch information
VampireAchao authored Sep 10, 2023
1 parent 4390d06 commit 0d61f5d
Show file tree
Hide file tree
Showing 18 changed files with 18 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@

package org.apache.streampark.console.core.enums;

import java.io.Serializable;

public enum AccessTokenState implements Serializable {
public enum AccessTokenState {

/** not added token */
NULL(0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@

package org.apache.streampark.console.core.enums;

import java.io.Serializable;

public enum AppExistsState implements Serializable {
public enum AppExistsState {

/** no exists */
NO(0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@

package org.apache.streampark.console.core.enums;

import java.io.Serializable;
import java.util.Arrays;

public enum BuildState implements Serializable {
public enum BuildState {

/** has changed, need rebuild */
NEED_REBUILD(-2),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@

package org.apache.streampark.console.core.enums;

import java.io.Serializable;
import java.util.Arrays;

public enum CandidateType implements Serializable {
public enum CandidateType {

/** non candidate */
NONE(0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@

import lombok.Getter;

import java.io.Serializable;
import java.util.Arrays;

/** This is an enumeration representing the types of changes that can occur. */
@Getter
public enum ChangeTypeEnum implements Serializable {
public enum ChangeTypeEnum {

/** Represents no change. */
NONE(0, "[NONE], nothing to changed"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@

package org.apache.streampark.console.core.enums;

import java.io.Serializable;
import java.util.Arrays;

public enum CheckPointStatus implements Serializable {
public enum CheckPointStatus {
/** IN_PROGRESS */
IN_PROGRESS(1),
/** COMPLETED */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@

package org.apache.streampark.console.core.enums;

import java.io.Serializable;
import java.util.Arrays;

public enum CheckPointType implements Serializable {
public enum CheckPointType {
/** CHECKPOINT */
CHECKPOINT(1),
/** SAVEPOINT */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@

import lombok.Getter;

import java.io.Serializable;
import java.util.Arrays;

/** configFile Type enum */
@Getter
public enum ConfigFileType implements Serializable {
public enum ConfigFileType {
YAML(1, "yaml"),

PROPERTIES(2, "prop"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@

import lombok.Getter;

import java.io.Serializable;

@Getter
public enum EffectiveType implements Serializable {
public enum EffectiveType {
/** config */
CONFIG(1),
/** FLINKSQL */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@

import lombok.Getter;

import java.io.Serializable;

import scala.Enumeration;

@Getter
public enum FlinkAppState implements Serializable {
public enum FlinkAppState {

/** Added new job to database. */
ADDED(0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@

package org.apache.streampark.console.core.enums;

import java.io.Serializable;

public enum GitAuthorizedError implements Serializable {
public enum GitAuthorizedError {

/** Success. */
SUCCESS(0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@

package org.apache.streampark.console.core.enums;

import java.io.Serializable;
import java.util.Arrays;

public enum NoticeType implements Serializable {
public enum NoticeType {
/** exception */
EXCEPTION(1),
/** message */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@

import lombok.Getter;

import java.io.Serializable;
import java.util.Arrays;

@Getter
public enum Operation implements Serializable {
public enum Operation {
RELEASE(0),
START(1),
SAVEPOINT(2),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@

import lombok.Getter;

import java.io.Serializable;
import java.util.Arrays;

@Getter
public enum OptionState implements Serializable {
public enum OptionState {

/** Application which is currently action: none. */
NONE(0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@

package org.apache.streampark.console.core.enums;

import java.io.Serializable;

/** configFile Type enum */
public enum PlaceholderType implements Serializable {
public enum PlaceholderType {
JOB_ID("job_id"),

JOB_NAME("job_name"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@

package org.apache.streampark.console.core.enums;

import java.io.Serializable;
import java.util.Arrays;

public enum ReleaseState implements Serializable {
public enum ReleaseState {

/** release failed */
FAILED(-1),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@

import lombok.Getter;

import java.io.Serializable;
import java.util.Arrays;

@Getter
public enum ResourceFrom implements Serializable {
public enum ResourceFrom {

/** cicd(build from cvs) */
CICD(1),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@

package org.apache.streampark.console.core.enums;

import java.io.Serializable;

public enum StopFrom implements Serializable {
public enum StopFrom {
/** None */
NONE,
/** StreamPark */
Expand Down

0 comments on commit 0d61f5d

Please sign in to comment.