Skip to content
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

fix: Fix violations of Sonar rule 2057 #3866

Merged
merged 1 commit into from
Mar 30, 2021
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
1 change: 1 addition & 0 deletions src/main/java/spoon/javadoc/internal/Javadoc.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
* writing this comment does not contain any block tags (such as <code>@see AnotherClass</code>)
*/
public class Javadoc implements Serializable {
private static final long serialVersionUID = 1L;

private JavadocDescription description;
private List<JavadocBlockTag> blockTags;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/spoon/javadoc/internal/JavadocBlockTag.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
* </code>
*/
public class JavadocBlockTag implements Serializable {
private static final long serialVersionUID = 1L;

private CtJavaDocTag.TagType type;
private JavadocDescription content;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* A javadoc text, potentially containing inline tags.
*/
public class JavadocDescription implements Serializable {
private static final long serialVersionUID = 1L;

private List<JavadocDescriptionElement> elements;

Expand Down
1 change: 1 addition & 0 deletions src/main/java/spoon/javadoc/internal/JavadocInlineTag.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* <p>For example <code>{@link String}</code>
*/
public class JavadocInlineTag implements JavadocDescriptionElement, Serializable {
private static final long serialVersionUID = 1L;

/** Return the next word of the string, in other words it stops when a space is encountered. */
public static String nextWord(String string) {
Expand Down
1 change: 1 addition & 0 deletions src/main/java/spoon/javadoc/internal/JavadocSnippet.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* have two snippets: one before and one after the inline tag (<code>{@link String}</code>).
*/
public class JavadocSnippet implements JavadocDescriptionElement, Serializable {
private static final long serialVersionUID = 1L;
private String text;

public JavadocSnippet(String text) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* source files.
*/
public class CtLineElementComparator implements Comparator<CtElement>, Serializable {
private static final long serialVersionUID = 1L;

/**
* Returns 0 if o1 has the same position as o2, or both positions are invalid and o1.equals(o2).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* Compares based on a toString representation.
*/
public class DeepRepresentationComparator implements Comparator<CtElement>, Serializable {
private static final long serialVersionUID = 1L;

@Override
public int compare(CtElement o1, CtElement o2) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* ModifierKind in kept for sake of full backward-compatibility.
*/
public class CtExtendedModifier implements SourcePositionHolder, Serializable {
private static final long serialVersionUID = 1L;
private boolean implicit;
private ModifierKind kind;
private SourcePosition position;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/spoon/support/util/ModelList.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ public int lastIndexOf(Object o) {
* See https://docs.oracle.com/javase/7/docs/api/java/util/AbstractList.html#modCount
*/
private static class InternalList<T> extends ArrayList<T> {
private static final long serialVersionUID = 1L;
InternalList(int initialCapacity) {
super(initialCapacity);
}
Expand Down