The URL parser state engine generates for each character read a StringBuilder and a new String object. This is not needed. Instead you can keep the StringBuilder, append it until the result step where you use a single toString(). Also in the initial state you dont need the append(result).
|
result = builder.toString(); |
BTW: it looks like there is no state für ipv6 [1:2:3:4] literals.
The URL parser state engine generates for each character read a StringBuilder and a new String object. This is not needed. Instead you can keep the StringBuilder, append it until the result step where you use a single toString(). Also in the initial state you dont need the append(result).
mssql-jdbc/src/main/java/com/microsoft/sqlserver/jdbc/Util.java
Line 281 in c8a08c8
BTW: it looks like there is no state für ipv6 [1:2:3:4] literals.