src/main/java/de/qaware/xff/util/UrlPathHelper.java
//squid:S881  (increment < length) is a standard loop construct
S881  (increment < length) is a standard loop construct
S881 ( increment < length ) is a standard loop construct
@SuppressWarnings({"squid:S109", "squid:S881"})
	String uriDecode(String source, String charset) {
		Validate.notNull(charset, "Charset must not be null");
		final int length = source.length();
		if (length == 0) {
			return source;
		}
		ByteArrayOutputStream bos = new ByteArrayOutputStream(length);
		boolean changed = false;
		int pos = -1;
		while (++pos < length) {
			char currentChar = source.charAt(pos);
			if (currentChar == '%') {
				bos.write(decodePercentEncodedChar(source, pos));
				pos += 2;
				changed = true;
			} else {
				bos.write(currentChar);
			}
		}
		return (changed ? decodeToString(source, bos, charset) : source);
	}
@ SuppressWarnings ( { "squid:S109" , "squid:S881" } ) String uriDecode ( String source , String charset ) { Validate . notNull ( charset , "Charset must not be null" ) ; final int length = source . length ( ) ; if ( length == 0 ) { return source ; } ByteArrayOutputStream bos = new ByteArrayOutputStream ( length ) ; boolean changed = false ; int pos = - 1 ; while ( ++ pos < length ) { char currentChar = source . charAt ( pos ) ; if ( currentChar == '%' ) { bos . write ( decodePercentEncodedChar ( source , pos ) ) ; pos += 2 ; changed = true ; } else { bos . write ( currentChar ) ; } } return ( changed ? decodeToString ( source , bos , charset ) : source ) ; }
squid:S881  (increment < length) is a standard loop construct
squid : S881 ( increment < length ) is a standard loop construct
//format: %xy //process the next 2 chars following the '%' at once to decode the original value