Merge pull request #27833 from izeye

* pr/27833:
  Polish formatting
  Polish HtmlCharacterEntityDecoder

Closes gh-27833
This commit is contained in:
Stephane Nicoll 2021-12-21 09:35:01 +01:00
commit fa78fb4351
1 changed files with 3 additions and 7 deletions

View File

@ -70,13 +70,6 @@ class HtmlCharacterEntityDecoder {
this.nextSemicolonPosition = this.originalMessage.indexOf(';', this.nextPotentialReferencePosition + 1);
}
boolean isPotentialReference = (this.nextPotentialReferencePosition != -1 &&
this.nextSemicolonPosition != -1 &&
this.nextSemicolonPosition - this.nextPotentialReferencePosition < MAX_REFERENCE_SIZE);
if (isPotentialReference) {
break;
}
if (this.nextPotentialReferencePosition == -1) {
break;
}
@ -84,6 +77,9 @@ class HtmlCharacterEntityDecoder {
this.nextPotentialReferencePosition = -1;
break;
}
if (this.nextSemicolonPosition - this.nextPotentialReferencePosition < MAX_REFERENCE_SIZE) {
break;
}
this.nextPotentialReferencePosition = this.nextPotentialReferencePosition + 1;
}