You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/org/socialsignin/spring/data/dynamodb/repository/support/DynamoDBHashAndRangeKeyMethodExtractorImpl.java
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,7 @@ public void doWith(Method method) {
63
63
@Override
64
64
publicvoiddoWith(Fieldfield) {
65
65
if (field.getAnnotation(DynamoDBHashKey.class) != null) {
66
-
Assert.isNull(field, "Multiple fields annotated by @DynamoDBHashKey within type " + idType.getName()
66
+
Assert.isNull(hashKeyField, "Multiple fields annotated by @DynamoDBHashKey within type " + idType.getName()
67
67
+ "!");
68
68
ReflectionUtils.makeAccessible(field);
69
69
@@ -86,8 +86,8 @@ public void doWith(Method method) {
86
86
@Override
87
87
publicvoiddoWith(Fieldfield) {
88
88
if (field.getAnnotation(DynamoDBRangeKey.class) != null) {
89
-
Assert.isNull(rangeKeyMethod,
90
-
"Multiple methods annotated by @DynamoDBRangeKey within type " + idType.getName() + "!");
89
+
Assert.isNull(rangeKeyField,
90
+
"Multiple fields annotated by @DynamoDBRangeKey within type " + idType.getName() + "!");
91
91
ReflectionUtils.makeAccessible(field);
92
92
rangeKeyField = field;
93
93
}
@@ -96,13 +96,13 @@ public void doWith(Field field) {
96
96
if (hashKeyMethod == null && hashKeyField == null) {
97
97
thrownewIllegalArgumentException("No method or field annotated by @DynamoDBHashKey within type " + idType.getName() + "!");
98
98
}
99
-
if (rangeKeyMethod == null && hashKeyField == null) {
99
+
if (rangeKeyMethod == null && rangeKeyField == null) {
100
100
thrownewIllegalArgumentException("No method or field annotated by @DynamoDBRangeKey within type " + idType.getName() + "!");
101
101
}
102
102
if (hashKeyMethod != null && hashKeyField != null) {
103
103
thrownewIllegalArgumentException("Both method and field annotated by @DynamoDBHashKey within type " + idType.getName() + "!");
0 commit comments