pojobuilder
pojobuilder copied to clipboard
A Java Code Generator for Pojo Builders
# Security Vulnerability Fix This pull request fixes either 1.) Temporary Directory Hijacking Vulnerability, or 2.) Temporary Directory Information Disclosure Vulnerability, which existed in this project. ## Preamble The system...
With Java7 PB 4.2.3 does not produce any generated files and javac stops without any message. Java8 in contrast works as expected. In the demo below I used the example...
When annotating a method for building it is currently the case that it must be a proper static Factory Method. If the method is written solely for the builder to...
If the POJO has a setter `setFoos(Foo[] foos)`, I'd like the option to generate setter methods in the builder with `withFoos(Foo... foos)`. This would allow for a more fluent creation...
Imagine a POJO like this: ``` @GeneratePojoBuilder(withBuilderInterface = PojoBuilder.class, withBuilderProperties = true) public class Trade { private String name; private List items; // Getters - Setters ... } ``` When...
I tested this using the JMH test cases `return this;` instead of the default `return self;` and saw very notable increase in performance (and decrease in heap allocation). I think...
At some point over the last few years, the implementation of `withOptionalProperties` has gotten very wasteful. When originally implemented, the internal type was: protected int value$age$int; now it is protected...
Currently PB `clone()` wraps the (checked) `CloneNotSupportedException` with `InternalError`. As of Java 8, the following ["sneaky throws"](https://www.baeldung.com/java-sneaky-throws) allows the code to propagate the checked exception directly. ````java @Override @GwtIncompatible public...
I'm using PojoBuilder `withBuilderProperties`, which is great to stick stuff together. However, I'm experiencing some pain when setting properties to null. As `.withCustomer(null)` would be ambiguous, I have to write...
Eclipse Version: `Oxygen.1a Release (4.7.1a)` PojoBuilder Version: `4.0.1` Jar used in Factory Path: `pojobuilder-4.0.1-jar-with-dependencies.jar` Sample pojo: ```java @GeneratePojoBuilder public class PojoWithPrimitive { private long primitiveLong; public long getPrimitiveLong() { return...