Skip to content

Commit c87b885

Browse files
committed
[CODEC-240] Add Percent-Encoding Codec (described in RFC3986 and RFC7578). No need to nest.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/codec/trunk@1814506 13f79535-47bb-0310-9956-ffa450edef68
1 parent 924540a commit c87b885

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/main/java/org/apache/commons/codec/net/PercentCodec.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,8 @@ public byte[] encode(final byte[] bytes) throws EncoderException {
122122
boolean willEncode = expectedEncodingBytes != bytes.length;
123123
if (willEncode || (plusForSpace && containsSpace(bytes))) {
124124
return doEncode(bytes, expectedEncodingBytes, willEncode);
125-
} else {
126-
return bytes;
127125
}
126+
return bytes;
128127
}
129128

130129
private byte[] doEncode(final byte[] bytes, int expectedLength, boolean willEncode) {

0 commit comments

Comments
 (0)