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
GWT version: 2.12.1, latest Browser (with version): any Operating System: any
Description
While most empty clinits seem to be correctly optimized out, sometimes they unnecessarily remain in the compiled output.
As an example, if you build https://github.com/gwtproject/gwt-site-webapp/ but change turn draft mode off, $clinit_Object is correctly removed, but $clinit_Boolean is not, despite being empty:
privatebooleanshouldEnhanceLink(Elementlink) {
return// Enhance only local linksisSameOriginRexp.test(link.getAttribute("href"))
// Do not load links that are marked as full page reload
&& !Boolean.parseBoolean(link.getAttribute("data-full-load"));
}
is inlined into two different places, bringing Boolean.parseBoolean with it:
GWT version: 2.12.1, latest
Browser (with version): any
Operating System: any
Description
While most empty clinits seem to be correctly optimized out, sometimes they unnecessarily remain in the compiled output.
As an example, if you build https://github.com/gwtproject/gwt-site-webapp/ but change turn draft mode off,
$clinit_Object
is correctly removed, but$clinit_Boolean
is not, despite being empty:A Java lambda of type
elemental2.core.ReadonlyArray.FindPredicateFn
is translated as
which looks like boxing of boolean to Boolean via inlining Boolean.valueOf(boolean) gone a bit wrong:
gwt/user/super/com/google/gwt/emul/java/lang/Boolean.java
Lines 63 to 65 in c2229e7
is inlined into two different places, bringing
Boolean.parseBoolean
with it:gwt/user/super/com/google/gwt/emul/java/lang/Boolean.java
Lines 55 to 57 in c2229e7
Steps to reproduce
Check out gwt-site-webapp @ 27070768ae49c048535358a03c70a5b9d84ddf98
Change draft compile to false
Build the project, with
mvn clean verify
Expected: If
$clinit_Boolean
is present, it is non-empty.Actual:
$clinit_Boolean
is present, and only reassigns itself to emptyMethodThe text was updated successfully, but these errors were encountered: