Skip to content

Commit 3d1a286

Browse files
committed
Javadoc
Format tweaks
1 parent ab84d0d commit 3d1a286

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ public class PercentCodec implements BinaryEncoder, BinaryDecoder {
4242
/**
4343
* The escape character used by the Percent-Encoding in order to introduce an encoded character.
4444
*/
45-
4645
private static final byte ESCAPE_CHAR = '%';
4746

4847
/**
@@ -97,15 +96,14 @@ private boolean containsSpace(final byte[] bytes) {
9796
}
9897

9998
/**
100-
* Decode bytes encoded with Percent-Encoding based on RFC 3986. The reverse process is performed in order to
99+
* Decodes bytes encoded with Percent-Encoding based on RFC 3986. The reverse process is performed in order to
101100
* decode the encoded characters to Unicode.
102101
*/
103102
@Override
104103
public byte[] decode(final byte[] bytes) throws DecoderException {
105104
if (bytes == null) {
106105
return null;
107106
}
108-
109107
final ByteBuffer buffer = ByteBuffer.allocate(expectedDecodingBytes(bytes));
110108
for (int i = 0; i < bytes.length; i++) {
111109
final byte b = bytes[i];
@@ -175,7 +173,6 @@ public byte[] encode(final byte[] bytes) throws EncoderException {
175173
if (bytes == null) {
176174
return null;
177175
}
178-
179176
final int expectedEncodingBytes = expectedEncodingBytes(bytes);
180177
final boolean willEncode = expectedEncodingBytes != bytes.length;
181178
if (willEncode || plusForSpace && containsSpace(bytes)) {
@@ -244,7 +241,7 @@ private void insertAlwaysEncodeChar(final byte b) {
244241
}
245242

246243
/**
247-
* Adds the byte array into a BitSet for faster lookup
244+
* Inserts the byte array into a BitSet for faster lookup.
248245
*
249246
* @param alwaysEncodeCharsArray
250247
*/

0 commit comments

Comments
 (0)