mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 22:17: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 SuperBuilderWithGenericsAndToBuilder {
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private static <A> void $fillValuesFromInstanceIntoBuilder(final SuperBuilderWithGenericsAndToBuilder.Parent<A> instance, final SuperBuilderWithGenericsAndToBuilder.Parent.ParentBuilder<A, ?, ?> b) {
|
||||
b.field1(instance.field1);
|
||||
b.items(instance.items == null ? java.util.Collections.emptyMap() : instance.items);
|
||||
b.items(instance.items == null ? java.util.Collections.<Integer, String>emptyMap() : instance.items);
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
protected abstract B self();
|
||||
|
||||
Reference in new issue
Block a user