mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 06:15:41 +00:00
[superbuilder] toBuilder + singular + javac6 was broken
superbuilder generated the node `x.pluralName(plural == null ? Collections.emptyList() : plural)`. java6 is not smart enough to infer the appropriate generics for the emptyList() call. Fixed by always specifying the needed type explicitly: Collections.<String>emptyList();
This commit is contained in:
13 files changed
+49
-27
No files matched your search
@@ -19,7 +19,7 @@ public class SuperBuilderBasicToBuilder {
|
||||
b.obtainViaField(instance.field1);
|
||||
b.obtainViaMethod(instance.method());
|
||||
b.obtainViaStaticMethod(SuperBuilderBasicToBuilder.Parent.staticMethod(instance));
|
||||
b.items(((instance.items == null) ? java.util.Collections.emptyList() : instance.items));
|
||||
b.items(((instance.items == null) ? java.util.Collections.<String>emptyList() : instance.items));
|
||||
}
|
||||
protected abstract @java.lang.SuppressWarnings("all") B self();
|
||||
public abstract @java.lang.SuppressWarnings("all") C build();
|
||||
|
||||
Reference in new issue
Block a user