parent
ab70acb325
commit
b142f8e660
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2019 the original author or authors.
|
* Copyright 2002-2020 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -337,9 +337,6 @@ final class HierarchicalUriComponents extends UriComponents {
|
||||||
byte[] bytes = source.getBytes(charset);
|
byte[] bytes = source.getBytes(charset);
|
||||||
boolean original = true;
|
boolean original = true;
|
||||||
for (byte b : bytes) {
|
for (byte b : bytes) {
|
||||||
if (b < 0) {
|
|
||||||
b += 256;
|
|
||||||
}
|
|
||||||
if (!type.isAllowed(b)) {
|
if (!type.isAllowed(b)) {
|
||||||
original = false;
|
original = false;
|
||||||
break;
|
break;
|
||||||
|
|
@ -351,9 +348,6 @@ final class HierarchicalUriComponents extends UriComponents {
|
||||||
|
|
||||||
ByteArrayOutputStream bos = new ByteArrayOutputStream(bytes.length);
|
ByteArrayOutputStream bos = new ByteArrayOutputStream(bytes.length);
|
||||||
for (byte b : bytes) {
|
for (byte b : bytes) {
|
||||||
if (b < 0) {
|
|
||||||
b += 256;
|
|
||||||
}
|
|
||||||
if (type.isAllowed(b)) {
|
if (type.isAllowed(b)) {
|
||||||
bos.write(b);
|
bos.write(b);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue