mirror of
https://github.com/fankes/moshi.git
synced 2025-10-18 23:49:21 +08:00
Enable Checkstyle 7.7.
This commit is contained in:
@@ -21,7 +21,7 @@ import com.squareup.moshi.recipes.models.Player;
|
||||
|
||||
public final class CustomFieldName {
|
||||
public void run() throws Exception {
|
||||
String json = ""
|
||||
String json = ""
|
||||
+ "{"
|
||||
+ " \"username\": \"jesse\","
|
||||
+ " \"lucky number\": 32"
|
||||
|
@@ -44,6 +44,7 @@ public final class FromJsonWithoutStrings {
|
||||
new FromJsonWithoutStrings().run();
|
||||
}
|
||||
|
||||
@SuppressWarnings("checkstyle:membername")
|
||||
private static final class EventJson {
|
||||
String title;
|
||||
String begin_date;
|
||||
@@ -55,10 +56,10 @@ public final class FromJsonWithoutStrings {
|
||||
String beginDateAndTime;
|
||||
|
||||
@Override public String toString() {
|
||||
return "Event{" +
|
||||
"title='" + title + '\'' +
|
||||
", beginDateAndTime='" + beginDateAndTime + '\'' +
|
||||
'}';
|
||||
return "Event{"
|
||||
+ "title='" + title + '\''
|
||||
+ ", beginDateAndTime='" + beginDateAndTime + '\''
|
||||
+ '}';
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -21,7 +21,7 @@ import com.squareup.moshi.recipes.models.BlackjackHand;
|
||||
|
||||
public final class ReadJson {
|
||||
public void run() throws Exception {
|
||||
String json = ""
|
||||
String json = ""
|
||||
+ "{\n"
|
||||
+ " \"hidden_card\": {\n"
|
||||
+ " \"rank\": \"6\",\n"
|
||||
|
@@ -32,6 +32,9 @@ import java.util.Set;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
final class Unwrap {
|
||||
private Unwrap() {
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
String json = ""
|
||||
+ "{\"data\":"
|
||||
|
@@ -17,13 +17,14 @@ package com.squareup.moshi.recipes.models;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("checkstyle:membername")
|
||||
public final class BlackjackHand {
|
||||
public final Card hidden_card;
|
||||
public final List<Card> visible_cards;
|
||||
|
||||
public BlackjackHand(Card hidden_card, List<Card> visible_cards) {
|
||||
this.hidden_card = hidden_card;
|
||||
this.visible_cards = visible_cards;
|
||||
public BlackjackHand(Card hiddenCard, List<Card> visibleCards) {
|
||||
this.hidden_card = hiddenCard;
|
||||
this.visible_cards = visibleCards;
|
||||
}
|
||||
|
||||
@Override public String toString() {
|
||||
|
Reference in New Issue
Block a user