|
42 | 42 | * @author Madhura Bhave |
43 | 43 | * @author Phillip Webb |
44 | 44 | * @author Thiago Hirata |
| 45 | + * @author Guirong Hu |
45 | 46 | */ |
46 | 47 | class OriginTrackedPropertiesLoader { |
47 | 48 |
|
@@ -90,12 +91,12 @@ List<Document> load(boolean expandLists) throws IOException { |
90 | 91 | if (document.isEmpty() && !documents.isEmpty()) { |
91 | 92 | document = documents.remove(documents.size() - 1); |
92 | 93 | } |
93 | | - reader.setLastLineCommentPrefix(commentPrefixCharacter); |
| 94 | + reader.setLastLineCommentPrefixCharacter(commentPrefixCharacter); |
94 | 95 | reader.skipComment(); |
95 | 96 | } |
96 | 97 | } |
97 | 98 | else { |
98 | | - reader.setLastLineCommentPrefix(-1); |
| 99 | + reader.setLastLineCommentPrefixCharacter(-1); |
99 | 100 | loadKeyAndValue(expandLists, document, reader, buffer); |
100 | 101 | } |
101 | 102 | } |
@@ -197,7 +198,7 @@ private static class CharacterReader implements Closeable { |
197 | 198 |
|
198 | 199 | private int character; |
199 | 200 |
|
200 | | - private int lastLineCommentPrefix; |
| 201 | + private int lastLineCommentPrefixCharacter; |
201 | 202 |
|
202 | 203 | CharacterReader(Resource resource) throws IOException { |
203 | 204 | this.reader = new LineNumberReader( |
@@ -233,8 +234,8 @@ private void skipWhitespace() throws IOException { |
233 | 234 | } |
234 | 235 | } |
235 | 236 |
|
236 | | - private void setLastLineCommentPrefix(int lastLineCommentPrefix) { |
237 | | - this.lastLineCommentPrefix = lastLineCommentPrefix; |
| 237 | + private void setLastLineCommentPrefixCharacter(int lastLineCommentPrefixCharacter) { |
| 238 | + this.lastLineCommentPrefixCharacter = lastLineCommentPrefixCharacter; |
238 | 239 | } |
239 | 240 |
|
240 | 241 | private void skipComment() throws IOException { |
@@ -307,7 +308,7 @@ Location getLocation() { |
307 | 308 | } |
308 | 309 |
|
309 | 310 | boolean isSameLastLineCommentPrefix() { |
310 | | - return this.lastLineCommentPrefix == this.character; |
| 311 | + return this.lastLineCommentPrefixCharacter == this.character; |
311 | 312 | } |
312 | 313 |
|
313 | 314 | boolean isCommentPrefixCharacter() { |
|
0 commit comments