Remove redundant 'String.substring()' call

This commit is contained in:
www
2019-03-24 18:57:06 +08:00
committed by Juergen Hoeller
parent 80c48648d7
commit 4517f40f57

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@@ -95,7 +95,7 @@ class HtmlCharacterEntityDecoder {
int skipUntilIndex = (this.nextPotentialReferencePosition != -1 ?
this.nextPotentialReferencePosition : this.originalMessage.length());
if (skipUntilIndex - this.currentPosition > 3) {
this.decodedMessage.append(this.originalMessage.substring(this.currentPosition, skipUntilIndex));
this.decodedMessage.append(this.originalMessage, this.currentPosition, skipUntilIndex);
this.currentPosition = skipUntilIndex;
}
else {