You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
String.format() is likely not feasible - it requires parsing the format string at runtime, and handling the various possible patterns. That sort of code can't be optimized by the compiler without knowing ahead of time what all format strings will be.
In theory we could require that the format param will be a string literal and pre-compile the formats so that unused formatting code can be pruned. In practice, that sort of change likely wouldn't be accepted to j2cl, so we should consider carefully if we want to introduce that incompatibility.
Activity
[-]Java 11 String JRE emulation[/-][+]Java 11 JRE emulation[/+]niloc132 commentedon Jan 20, 2024
PredicateandOptional*are all merged.String.format()is likely not feasible - it requires parsing the format string at runtime, and handling the various possible patterns. That sort of code can't be optimized by the compiler without knowing ahead of time what all format strings will be.gwt/user/super/com/google/gwt/emul/java/lang/String.java
Lines 71 to 73 in e981e97
https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Formatter.html#syntax
In theory we could require that the format param will be a string literal and pre-compile the formats so that unused formatting code can be pruned. In practice, that sort of change likely wouldn't be accepted to j2cl, so we should consider carefully if we want to introduce that incompatibility.
String method emulation for Java 11, align Character.isWhitespace witβ¦
zbynek commentedon Jul 29, 2024
Also CharSequence.chars is already implemented:
gwt/user/super/com/google/gwt/emul/java/lang/CharSequence.java
Line 41 in 22ff07e
niloc132 commentedon Aug 9, 2024
Closing as fixed, all emulation mentioned here is fixed (CharSequence methods split into
#9991 for later followup).