|
1 | 1 | /* |
2 | | - * Copyright 2012-2019 the original author or authors. |
| 2 | + * Copyright 2012-2020 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. |
@@ -73,10 +73,10 @@ private Map<String, Object> getProperties(Class<?> source) { |
73 | 73 | return properties; |
74 | 74 | } |
75 | 75 |
|
76 | | - private void collectProperties(String prefix, SkipPropertyMapping defaultSkip, MergedAnnotation<?> annotation, |
| 76 | + private void collectProperties(String prefix, SkipPropertyMapping skip, MergedAnnotation<?> annotation, |
77 | 77 | Method attribute, Map<String, Object> properties) { |
78 | 78 | MergedAnnotation<?> attributeMapping = MergedAnnotations.from(attribute).get(PropertyMapping.class); |
79 | | - SkipPropertyMapping skip = attributeMapping.getValue("skip", SkipPropertyMapping.class).orElse(defaultSkip); |
| 79 | + skip = attributeMapping.getValue("skip", SkipPropertyMapping.class).orElse(skip); |
80 | 80 | if (skip == SkipPropertyMapping.YES) { |
81 | 81 | return; |
82 | 82 | } |
@@ -127,7 +127,8 @@ private void putProperties(String name, SkipPropertyMapping defaultSkip, Object |
127 | 127 | } |
128 | 128 | } |
129 | 129 | else if (value instanceof MergedAnnotation<?>) { |
130 | | - for (Method attribute : ((MergedAnnotation<?>) value).getType().getDeclaredMethods()) { |
| 130 | + MergedAnnotation<?> annotation = (MergedAnnotation<?>) value; |
| 131 | + for (Method attribute : annotation.getType().getDeclaredMethods()) { |
131 | 132 | collectProperties(name, defaultSkip, (MergedAnnotation<?>) value, attribute, properties); |
132 | 133 | } |
133 | 134 | } |
|
0 commit comments