From f09c956ab2d64f704f8780dec3d7670d51c399d5 Mon Sep 17 00:00:00 2001 From: Victor Date: Wed, 9 May 2018 10:45:04 -0300 Subject: [PATCH] DATAMONGO-1978 - Fix minor typo in Field.positionKey field name. Original pull request: #558. --- .../data/mongodb/core/query/Field.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/query/Field.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/query/Field.java index 0676b52fa..639743bd8 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/query/Field.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/query/Field.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2015 the original author or authors. + * Copyright 2010-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,7 +35,7 @@ public class Field { private final Map criteria = new HashMap(); private final Map slices = new HashMap(); private final Map elemMatchs = new HashMap(); - private String postionKey; + private String positionKey; private int positionValue; public Field include(String key) { @@ -66,7 +66,7 @@ public class Field { /** * The array field must appear in the query. Only one positional {@code $} operator can appear in the projection and * only one array field can appear in the query. - * + * * @param field query array field, must not be {@literal null} or empty. * @param value * @return @@ -75,7 +75,7 @@ public class Field { Assert.hasText(field, "DocumentField must not be null or empty!"); - postionKey = field; + positionKey = field; positionValue = value; return this; @@ -94,14 +94,14 @@ public class Field { dbo.put(entry.getKey(), dbObject); } - if (postionKey != null) { - dbo.put(postionKey + ".$", positionValue); + if (positionKey != null) { + dbo.put(positionKey + ".$", positionValue); } return dbo; } - /* + /* * (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ @@ -130,14 +130,14 @@ public class Field { return false; } - boolean samePositionKey = this.postionKey == null ? that.postionKey == null - : this.postionKey.equals(that.postionKey); + boolean samePositionKey = this.positionKey == null ? that.positionKey == null + : this.positionKey.equals(that.positionKey); boolean samePositionValue = this.positionValue == that.positionValue; return samePositionKey && samePositionValue; } - /* + /* * (non-Javadoc) * @see java.lang.Object#hashCode() */ @@ -149,7 +149,7 @@ public class Field { result += 31 * ObjectUtils.nullSafeHashCode(this.criteria); result += 31 * ObjectUtils.nullSafeHashCode(this.elemMatchs); result += 31 * ObjectUtils.nullSafeHashCode(this.slices); - result += 31 * ObjectUtils.nullSafeHashCode(this.postionKey); + result += 31 * ObjectUtils.nullSafeHashCode(this.positionKey); result += 31 * ObjectUtils.nullSafeHashCode(this.positionValue); return result;