@@ -91,15 +91,17 @@ public Column read(JsonReader reader) throws IOException {
9191 } else if (name .equals ("preference" )) {
9292 reader .beginArray ();
9393 categoricalPreference = new ArrayList <String >();
94- while (reader .hasNext ())
94+ while (reader .hasNext ()) {
9595 categoricalPreference .add (reader .nextString ());
96+ }
9697 reader .endArray ();
9798 } else if (name .equals ("range" )) {
9899 if (reader .peek ().equals (JsonToken .BEGIN_ARRAY )) {
99100 reader .beginArray ();
100101 categoricalRange = new ArrayList <String >();
101- while (reader .hasNext ())
102+ while (reader .hasNext ()) {
102103 categoricalRange .add (reader .nextString ());
104+ }
103105 reader .endArray ();
104106 } else {
105107 reader .beginObject ();
@@ -150,32 +152,41 @@ public Column read(JsonReader reader) throws IOException {
150152
151153 column .setKey (key );
152154
153- if (description != null )
155+ if (description != null ) {
154156 column .setDescription (description );
157+ }
155158
156- if (format != null )
159+ if (format != null ) {
157160 column .setFormat (format );
161+ }
158162
159- if (objective != null )
163+ if (objective != null ) {
160164 column .setObjective (objective );
165+ }
161166
162- if (fullName != null )
167+ if (fullName != null ) {
163168 column .setFullName (fullName );
169+ }
164170
165- if (goal != null )
171+ if (goal != null ) {
166172 column .setGoal (goal );
173+ }
167174
168- if (key != null )
169- column .setObjective (objective );
175+ if (key != null ) {
176+ column .setKey (key );
177+ }
170178
171- if (significantGain != null )
179+ if (significantGain != null ) {
172180 column .setSignificantGain (significantGain );
181+ }
173182
174- if (significantLoss != null )
183+ if (significantLoss != null ) {
175184 column .setSignificantLoss (insignificantLoss );
185+ }
176186
177- if (insignificantLoss != null )
187+ if (insignificantLoss != null ) {
178188 column .setInsignificantLoss (insignificantLoss );
189+ }
179190
180191 return column ;
181192 }
@@ -192,29 +203,37 @@ public void write(JsonWriter writer, Column column) throws IOException {
192203 writer .name ("key" ).value (column .getKey ());
193204 writer .name ("type" ).value (column .getType ().toString ());
194205
195- if (column .getGoal () != null )
206+ if (column .getGoal () != null ) {
196207 writer .name ("goal" ).value (column .getGoal ().toString ());
208+ }
197209
198- if (column .isObjective () != null )
210+ if (column .isObjective () != null ) {
199211 writer .name ("is_objective" ).value (column .isObjective ());
212+ }
200213
201- if (column .getFormat () != null )
214+ if (column .getFormat () != null ) {
202215 writer .name ("format" ).value (column .getFormat ());
216+ }
203217
204- if (column .getDescription () != null )
218+ if (column .getDescription () != null ) {
205219 writer .name ("description" ).value (column .getDescription ());
220+ }
206221
207- if (column .getFullName () != null )
222+ if (column .getFullName () != null ) {
208223 writer .name ("full_name" ).value (column .getFullName ());
224+ }
209225
210- if (column .getSignificantGain () != null )
226+ if (column .getSignificantGain () != null ) {
211227 writer .name ("significant_gain" ).value (column .getSignificantGain ());
228+ }
212229
213- if (column .getSignificantLoss () != null )
230+ if (column .getSignificantLoss () != null ) {
214231 writer .name ("significant_loss" ).value (column .getSignificantLoss ());
232+ }
215233
216- if (column .getInsignificantLoss () != null )
234+ if (column .getInsignificantLoss () != null ) {
217235 writer .name ("insignificant_loss" ).value (column .getInsignificantLoss ());
236+ }
218237
219238 final ColumnType type = column .getType ();
220239
0 commit comments