File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
rest/rest-sqs/src/main/scala/org/elasticmq/rest/sqs Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -485,18 +485,18 @@ trait SQSLimitsModule {
485485 if (offset < bodyLength) {
486486 val c = body.codePointAt(offset)
487487
488- // Allow chars: #x9 | #xA | #xD | [#x20 to #xD7FF] | [#xE000 to #xFFFD] | [#x10000 to #x10FFFF]
489- if (c == 0x9 || c == 0xA || c == 0xD || (c >= 0x20 && c <= 0xD7FF ) || (c >= 0xE000 && c <= 0xFFFD ) || (c >= 0x10000 && c <= 0x10FFFF )) {
490- // Current char is valid
488+ if (isAllowedCharacter(c))
491489 findInvalidCharacter(offset + Character .charCount(c))
492- } else {
493- true
494- }
490+ else true
495491 } else {
496492 false
497493 }
498494 }
499495
496+ // Allow chars: #x9 | #xA | #xD | [#x20 to #xD7FF] | [#xE000 to #xFFFD] | [#x10000 to #x10FFFF]
497+ def isAllowedCharacter (c : Int ): Boolean =
498+ c == 0x9 || c == 0xA || c == 0xD || (c >= 0x20 && c <= 0xD7FF ) || (c >= 0xE000 && c <= 0xFFFD ) || (c >= 0x10000 && c <= 0x10FFFF )
499+
500500 findInvalidCharacter(0 )
501501 }
502502}
You can’t perform that action at this time.
0 commit comments