mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-16 12:15:30 +00:00
fix of the issue 1230. @Tolerate not working for @Builder methods?
This commit is contained in:
1 parent
4d9da60f4f
commit
105c32f4b6
7 files changed
+135
-17
No files matched your search
@@ -0,0 +1,34 @@
|
||||
import lombok.Builder;
|
||||
import lombok.experimental.Tolerate;
|
||||
public @Builder class BuilderWithTolerate {
|
||||
public static class BuilderWithTolerateBuilder {
|
||||
private @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") int value;
|
||||
public @Tolerate BuilderWithTolerateBuilder value(String s) {
|
||||
return this.value(Integer.parseInt(s));
|
||||
}
|
||||
@java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithTolerateBuilder() {
|
||||
super();
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithTolerateBuilder value(final int value) {
|
||||
this.value = value;
|
||||
return this;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithTolerate build() {
|
||||
return new BuilderWithTolerate(value);
|
||||
}
|
||||
public @java.lang.Override @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") java.lang.String toString() {
|
||||
return (("BuilderWithTolerate.BuilderWithTolerateBuilder(value=" + this.value) + ")");
|
||||
}
|
||||
}
|
||||
private final int value;
|
||||
public static void main(String[] args) {
|
||||
BuilderWithTolerate.builder().value("42").build();
|
||||
}
|
||||
@java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithTolerate(final int value) {
|
||||
super();
|
||||
this.value = value;
|
||||
}
|
||||
public static @java.lang.SuppressWarnings("all") @javax.annotation.Generated("lombok") BuilderWithTolerateBuilder builder() {
|
||||
return new BuilderWithTolerateBuilder();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user