1+ /*
2+ * Copyright 2017 MongoDB, Inc.
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
117package org .bson .codecs .pojo .entities .conventions ;
218
319import org .bson .codecs .pojo .annotations .BsonCreator ;
@@ -13,7 +29,7 @@ public class CreatorConstructorIdModel {
1329 public long longField ;
1430
1531 @ BsonCreator
16- public CreatorConstructorIdModel (@ BsonId String id , @ BsonProperty ("integersField" ) final List <Integer > integerField ,
32+ public CreatorConstructorIdModel (final @ BsonId String id , @ BsonProperty ("integersField" ) final List <Integer > integerField ,
1733 @ BsonProperty ("longField" ) final long longField ) {
1834 this .id = id ;
1935 this .integersField = integerField ;
@@ -52,7 +68,7 @@ public void setLongField(final long longField) {
5268 }
5369
5470 @ Override
55- public boolean equals (Object o ) {
71+ public boolean equals (final Object o ) {
5672 if (this == o ) {
5773 return true ;
5874 }
@@ -68,8 +84,8 @@ public boolean equals(Object o) {
6884 if (getId () != null ? !getId ().equals (that .getId ()) : that .getId () != null ) {
6985 return false ;
7086 }
71- if (getIntegersField () != null ? !getIntegersField ().equals (that .getIntegersField ()) :
72- that .getIntegersField () != null ) {
87+ if (getIntegersField () != null ? !getIntegersField ().equals (that .getIntegersField ())
88+ : that .getIntegersField () != null ) {
7389 return false ;
7490 }
7591 return getStringField () != null ? getStringField ().equals (that .getStringField ()) : that .getStringField () == null ;
@@ -86,11 +102,11 @@ public int hashCode() {
86102
87103 @ Override
88104 public String toString () {
89- return "CreatorConstructorIdModel{" +
90- "id='" + id + '\'' +
91- ", integersField=" + integersField +
92- ", stringField='" + stringField + '\'' +
93- ", longField=" + longField +
94- '}' ;
105+ return "CreatorConstructorIdModel{"
106+ + "id='" + id + '\''
107+ + ", integersField=" + integersField
108+ + ", stringField='" + stringField + '\''
109+ + ", longField=" + longField
110+ + '}' ;
95111 }
96112}
0 commit comments