Browse Source

Merge pull request #27833 from izeye

* pr/27833:
  Polish formatting
  Polish HtmlCharacterEntityDecoder

Closes gh-27833
pull/27848/head
Stephane Nicoll 4 years ago
parent
commit
fa78fb4351
  1. 10
      spring-web/src/main/java/org/springframework/web/util/HtmlCharacterEntityDecoder.java

10
spring-web/src/main/java/org/springframework/web/util/HtmlCharacterEntityDecoder.java

@ -70,13 +70,6 @@ class HtmlCharacterEntityDecoder { @@ -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 { @@ -84,6 +77,9 @@ class HtmlCharacterEntityDecoder {
this.nextPotentialReferencePosition = -1;
break;
}
if (this.nextSemicolonPosition - this.nextPotentialReferencePosition < MAX_REFERENCE_SIZE) {
break;
}
this.nextPotentialReferencePosition = this.nextPotentialReferencePosition + 1;
}

Loading…
Cancel
Save