Add a javadoc note about the nature of classes in com.intellij.tasks.*.model packages

Suppress unused declaration and other inspections for them to avoid optimizations
inadvertently breaking deserialization of JSON responses.

Also, reverted such changes already made in TrelloCommentAction.
This commit is contained in:
Mikhail Golubev
2019-02-07 18:11:22 +03:00
parent d81641fc21
commit de896355ed
12 changed files with 18 additions and 18 deletions
@@ -6,8 +6,9 @@ import org.jetbrains.annotations.NotNull;
import java.util.Date;
/**
* @author Mikhail Golubev
* This is a stub definition intended to be used with Google GSON. Its fields are initialized reflectively.
*/
@SuppressWarnings("unused")
public class GitlabIssue {
private int id;
@SerializedName("iid")
@@ -6,11 +6,12 @@ import com.intellij.util.xmlb.annotations.Tag;
import org.jetbrains.annotations.Nullable;
/**
* This is a stub definition intended to be used with Google GSON. Its fields are initialized reflectively.
*
* Only required fields are declared.
* Field {@code name} and {@code webUrl} may be null because only {@code id} is serialized.
*
* @author Mikhail Golubev
*/
@SuppressWarnings("unused")
@Tag("GitlabProject")
public class GitlabProject {
private int id;
@@ -9,7 +9,7 @@ import org.jetbrains.io.mandatory.RestModel;
import java.util.Date;
/**
* @author Mikhail Golubev
* This is a stub definition intended to be used with Google GSON. Its fields are initialized reflectively.
*/
@RestModel
@SuppressWarnings("UnusedDeclaration")
@@ -7,7 +7,7 @@ import org.jetbrains.io.mandatory.Mandatory;
import org.jetbrains.io.mandatory.RestModel;
/**
* @author Mikhail Golubev
* This is a stub definition intended to be used with Google GSON. Its fields are initialized reflectively.
*/
@RestModel
@SuppressWarnings("UnusedDeclaration")
@@ -8,7 +8,7 @@ import org.jetbrains.io.mandatory.RestModel;
import java.util.List;
/**
* @author Mikhail Golubev
* This is a stub definition intended to be used with Google GSON. Its fields are initialized reflectively.
*/
@SuppressWarnings("UnusedDeclaration")
public abstract class RedmineResponseWrapper {
@@ -22,9 +22,8 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* @author Mikhail Golubev
* This is a stub definition intended to be used with Google GSON. Its fields are initialized reflectively.
*/
@SuppressWarnings("UnusedDeclaration")
@Tag("TrelloBoard")
public class TrelloBoard extends TrelloModel {
@@ -30,7 +30,7 @@ import java.util.Set;
import static com.intellij.tasks.trello.model.TrelloLabel.LabelColor;
/**
* @author Mikhail Golubev
* This is a stub definition intended to be used with Google GSON. Its fields are initialized reflectively.
*/
@SuppressWarnings("UnusedDeclaration")
public class TrelloCard extends TrelloModel {
@@ -22,8 +22,9 @@ import org.jetbrains.annotations.Nullable;
import java.util.Date;
/**
* @author Mikhail Golubev
* This is a stub definition intended to be used with Google GSON. Its fields are initialized reflectively.
*/
@SuppressWarnings("unused")
public class TrelloCommentAction extends Comment {
private String id;
private Date date;
@@ -31,8 +32,9 @@ public class TrelloCommentAction extends Comment {
private Data data;
@SuppressWarnings("FieldMayBeFinal")
private static class Data {
private static final String text = "";
private String text = "";
private TrelloBoard board;
private TrelloCard card;
}
@@ -21,8 +21,9 @@ import org.jetbrains.annotations.Nullable;
import java.awt.*;
/**
* @author Mikhail Golubev
* This is a stub definition intended to be used with Google GSON. Its fields are initialized reflectively.
*/
@SuppressWarnings("unused")
public class TrelloLabel {
public enum LabelColor {
@@ -22,7 +22,7 @@ import com.intellij.util.xmlb.annotations.Transient;
import org.jetbrains.annotations.NotNull;
/**
* @author Mikhail Golubev
* This is a stub definition intended to be used with Google GSON. Its fields are initialized reflectively.
*/
@SuppressWarnings("UnusedDeclaration")
@Tag("TrelloList")
@@ -19,9 +19,6 @@ package com.intellij.tasks.trello.model;
import com.intellij.util.xmlb.annotations.Attribute;
import org.jetbrains.annotations.NotNull;
/**
* @author Mikhail Golubev
*/
public abstract class TrelloModel {
public static final String ILLEGAL_ID = "ILLEGAL_ID";
@@ -21,9 +21,8 @@ import com.intellij.util.xmlb.annotations.Tag;
import org.jetbrains.annotations.NotNull;
/**
* @author Mikhail Golubev
* This is a stub definition intended to be used with Google GSON. Its fields are initialized reflectively.
*/
@Tag("TrelloUser")
public class TrelloUser extends TrelloModel {