|
1 | 1 | /* |
2 | | - * Copyright 2002-2016 the original author or authors. |
| 2 | + * Copyright 2002-2017 the original author or authors. |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
@@ -144,10 +144,11 @@ private String resolveName() { |
144 | 144 | return StringUtils.uncapitalize(this.readMethod.getName().substring(index)); |
145 | 145 | } |
146 | 146 | else { |
147 | | - int index = this.writeMethod.getName().indexOf("set") + 3; |
| 147 | + int index = this.writeMethod.getName().indexOf("set"); |
148 | 148 | if (index == -1) { |
149 | 149 | throw new IllegalArgumentException("Not a setter method"); |
150 | 150 | } |
| 151 | + index += 3; |
151 | 152 | return StringUtils.uncapitalize(this.writeMethod.getName().substring(index)); |
152 | 153 | } |
153 | 154 | } |
@@ -194,7 +195,8 @@ private MethodParameter resolveParameterType(MethodParameter parameter) { |
194 | 195 | private Annotation[] resolveAnnotations() { |
195 | 196 | Annotation[] annotations = annotationCache.get(this); |
196 | 197 | if (annotations == null) { |
197 | | - Map<Class<? extends Annotation>, Annotation> annotationMap = new LinkedHashMap<Class<? extends Annotation>, Annotation>(); |
| 198 | + Map<Class<? extends Annotation>, Annotation> annotationMap = |
| 199 | + new LinkedHashMap<Class<? extends Annotation>, Annotation>(); |
198 | 200 | addAnnotationsToMap(annotationMap, getReadMethod()); |
199 | 201 | addAnnotationsToMap(annotationMap, getWriteMethod()); |
200 | 202 | addAnnotationsToMap(annotationMap, getField()); |
|
0 commit comments