Enable Checkstyle 7.7.

This commit is contained in:
jwilson
2017-05-06 14:48:55 -04:00
parent 13fd0b252c
commit 0ea1959b7e
18 changed files with 92 additions and 35 deletions

View File

@@ -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"

View File

@@ -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 + '\''
+ '}';
}
}

View File

@@ -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"

View File

@@ -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\":"

View File

@@ -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() {