A DESCRIPTION OF THE REQUEST :
Since Java 5.0, StringBuilder has been introduced.
This is a great performance enhancement in server application.
A lot of java.* et javax.* still use old synchronized StringBuffer with no need as
java.net.URLDecoder.decode(String, String) for exemple.
It just can be simply replaced by StringBuilder instead.
JUSTIFICATION :
Synchronisation is costly, especially in high load multithreaded application wich are developped to limit synchronisation cost.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Replace StringBuffer by StringBuilder in the Java APIs where no synchronisation is needed.
Since Java 5.0, StringBuilder has been introduced.
This is a great performance enhancement in server application.
A lot of java.* et javax.* still use old synchronized StringBuffer with no need as
java.net.URLDecoder.decode(String, String) for exemple.
It just can be simply replaced by StringBuilder instead.
JUSTIFICATION :
Synchronisation is costly, especially in high load multithreaded application wich are developped to limit synchronisation cost.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Replace StringBuffer by StringBuilder in the Java APIs where no synchronisation is needed.
- duplicates
-
JDK-8041679 Replace uses of StringBuffer with StringBuilder within core library classes
-
- Resolved
-