Skip to content

Commit 55d3bfb

Browse files
committed
Remove Lombok
1 parent 5bd042c commit 55d3bfb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2770
-187
lines changed

easy-random-bean-validation/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,6 @@
7777
<artifactId>assertj-core</artifactId>
7878
<scope>test</scope>
7979
</dependency>
80-
<dependency>
81-
<groupId>org.projectlombok</groupId>
82-
<artifactId>lombok</artifactId>
83-
<scope>test</scope>
84-
</dependency>
8580
</dependencies>
8681

8782
</project>

easy-random-bean-validation/src/test/java/org/jeasy/random/validation/BeanValidationAnnotatedBean.java

Lines changed: 242 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,12 @@
2323
*/
2424
package org.jeasy.random.validation;
2525

26-
import lombok.Data;
27-
2826
import javax.validation.constraints.*;
2927
import java.math.BigDecimal;
3028
import java.time.Instant;
3129
import java.time.LocalDateTime;
3230
import java.util.*;
3331

34-
@Data
3532
class BeanValidationAnnotatedBean {
3633

3734
@AssertFalse
@@ -125,4 +122,246 @@ class BeanValidationAnnotatedBean {
125122
@Pattern(regexp="[a-z]{4}")
126123
private String regexString;
127124

125+
public BeanValidationAnnotatedBean() {
126+
}
127+
128+
public boolean isUnsupported() {
129+
return this.unsupported;
130+
}
131+
132+
public boolean isActive() {
133+
return this.active;
134+
}
135+
136+
public BigDecimal getMaxDiscount() {
137+
return this.maxDiscount;
138+
}
139+
140+
public BigDecimal getMinDiscount() {
141+
return this.minDiscount;
142+
}
143+
144+
public BigDecimal getDiscount() {
145+
return this.discount;
146+
}
147+
148+
public Date getEventDate() {
149+
return this.eventDate;
150+
}
151+
152+
public LocalDateTime getEventLocalDateTime() {
153+
return this.eventLocalDateTime;
154+
}
155+
156+
public Date getFutureOrPresent() {
157+
return this.futureOrPresent;
158+
}
159+
160+
public Date getBirthday() {
161+
return this.birthday;
162+
}
163+
164+
public LocalDateTime getBirthdayLocalDateTime() {
165+
return this.birthdayLocalDateTime;
166+
}
167+
168+
public Instant getPastInstant() {
169+
return this.pastInstant;
170+
}
171+
172+
public Date getPastOrPresent() {
173+
return this.pastOrPresent;
174+
}
175+
176+
public int getMaxQuantity() {
177+
return this.maxQuantity;
178+
}
179+
180+
public int getMinQuantity() {
181+
return this.minQuantity;
182+
}
183+
184+
public int getPositive() {
185+
return this.positive;
186+
}
187+
188+
public int getPositiveOrZero() {
189+
return this.positiveOrZero;
190+
}
191+
192+
public int getNegative() {
193+
return this.negative;
194+
}
195+
196+
public int getNegativeOrZero() {
197+
return this.negativeOrZero;
198+
}
199+
200+
public String getNotBlank() {
201+
return this.notBlank;
202+
}
203+
204+
public String getEmail() {
205+
return this.email;
206+
}
207+
208+
public String getUsername() {
209+
return this.username;
210+
}
211+
212+
public String getUnusedString() {
213+
return this.unusedString;
214+
}
215+
216+
public String getBriefMessage() {
217+
return this.briefMessage;
218+
}
219+
220+
public Collection<String> getSizedCollection() {
221+
return this.sizedCollection;
222+
}
223+
224+
public List<String> getSizedList() {
225+
return this.sizedList;
226+
}
227+
228+
public Set<String> getSizedSet() {
229+
return this.sizedSet;
230+
}
231+
232+
public Map<String, Integer> getSizedMap() {
233+
return this.sizedMap;
234+
}
235+
236+
public String[] getSizedArray() {
237+
return this.sizedArray;
238+
}
239+
240+
public String getSizedString() {
241+
return this.sizedString;
242+
}
243+
244+
public String getRegexString() {
245+
return this.regexString;
246+
}
247+
248+
public void setUnsupported(boolean unsupported) {
249+
this.unsupported = unsupported;
250+
}
251+
252+
public void setActive(boolean active) {
253+
this.active = active;
254+
}
255+
256+
public void setMaxDiscount(BigDecimal maxDiscount) {
257+
this.maxDiscount = maxDiscount;
258+
}
259+
260+
public void setMinDiscount(BigDecimal minDiscount) {
261+
this.minDiscount = minDiscount;
262+
}
263+
264+
public void setDiscount(BigDecimal discount) {
265+
this.discount = discount;
266+
}
267+
268+
public void setEventDate(Date eventDate) {
269+
this.eventDate = eventDate;
270+
}
271+
272+
public void setEventLocalDateTime(LocalDateTime eventLocalDateTime) {
273+
this.eventLocalDateTime = eventLocalDateTime;
274+
}
275+
276+
public void setFutureOrPresent(Date futureOrPresent) {
277+
this.futureOrPresent = futureOrPresent;
278+
}
279+
280+
public void setBirthday(Date birthday) {
281+
this.birthday = birthday;
282+
}
283+
284+
public void setBirthdayLocalDateTime(LocalDateTime birthdayLocalDateTime) {
285+
this.birthdayLocalDateTime = birthdayLocalDateTime;
286+
}
287+
288+
public void setPastInstant(Instant pastInstant) {
289+
this.pastInstant = pastInstant;
290+
}
291+
292+
public void setPastOrPresent(Date pastOrPresent) {
293+
this.pastOrPresent = pastOrPresent;
294+
}
295+
296+
public void setMaxQuantity(int maxQuantity) {
297+
this.maxQuantity = maxQuantity;
298+
}
299+
300+
public void setMinQuantity(int minQuantity) {
301+
this.minQuantity = minQuantity;
302+
}
303+
304+
public void setPositive(int positive) {
305+
this.positive = positive;
306+
}
307+
308+
public void setPositiveOrZero(int positiveOrZero) {
309+
this.positiveOrZero = positiveOrZero;
310+
}
311+
312+
public void setNegative(int negative) {
313+
this.negative = negative;
314+
}
315+
316+
public void setNegativeOrZero(int negativeOrZero) {
317+
this.negativeOrZero = negativeOrZero;
318+
}
319+
320+
public void setNotBlank(String notBlank) {
321+
this.notBlank = notBlank;
322+
}
323+
324+
public void setEmail(String email) {
325+
this.email = email;
326+
}
327+
328+
public void setUsername(String username) {
329+
this.username = username;
330+
}
331+
332+
public void setUnusedString(String unusedString) {
333+
this.unusedString = unusedString;
334+
}
335+
336+
public void setBriefMessage(String briefMessage) {
337+
this.briefMessage = briefMessage;
338+
}
339+
340+
public void setSizedCollection(Collection<String> sizedCollection) {
341+
this.sizedCollection = sizedCollection;
342+
}
343+
344+
public void setSizedList(List<String> sizedList) {
345+
this.sizedList = sizedList;
346+
}
347+
348+
public void setSizedSet(Set<String> sizedSet) {
349+
this.sizedSet = sizedSet;
350+
}
351+
352+
public void setSizedMap(Map<String, Integer> sizedMap) {
353+
this.sizedMap = sizedMap;
354+
}
355+
356+
public void setSizedArray(String[] sizedArray) {
357+
this.sizedArray = sizedArray;
358+
}
359+
360+
public void setSizedString(String sizedString) {
361+
this.sizedString = sizedString;
362+
}
363+
364+
public void setRegexString(String regexString) {
365+
this.regexString = regexString;
366+
}
128367
}

easy-random-core/pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,6 @@
6161
<groupId>com.fasterxml.jackson.core</groupId>
6262
<artifactId>jackson-databind</artifactId>
6363
</dependency>
64-
<dependency>
65-
<groupId>org.projectlombok</groupId>
66-
<artifactId>lombok</artifactId>
67-
</dependency>
6864
<dependency>
6965
<groupId>org.junit.jupiter</groupId>
7066
<artifactId>junit-jupiter</artifactId>

easy-random-core/src/main/java/org/jeasy/random/EasyRandomParameters.java

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import org.jeasy.random.api.*;
2727
import org.jeasy.random.randomizers.registry.CustomRandomizerRegistry;
2828
import org.jeasy.random.randomizers.registry.ExclusionRandomizerRegistry;
29-
import lombok.Data;
3029

3130
import java.lang.reflect.Field;
3231
import java.nio.charset.Charset;
@@ -545,7 +544,6 @@ public EasyRandomParameters overrideDefaultInitialization(boolean overrideDefaul
545544
*
546545
* @param <T> type of values
547546
*/
548-
@Data
549547
public static class Range<T> {
550548

551549
private T min;
@@ -555,5 +553,21 @@ public Range(T min, T max) {
555553
this.min = min;
556554
this.max = max;
557555
}
556+
557+
public T getMin() {
558+
return min;
559+
}
560+
561+
public void setMin(T min) {
562+
this.min = min;
563+
}
564+
565+
public T getMax() {
566+
return max;
567+
}
568+
569+
public void setMax(T max) {
570+
this.max = max;
571+
}
558572
}
559573
}

easy-random-core/src/main/java/org/jeasy/random/RandomizationContextStackItem.java

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,13 @@
2323
*/
2424
package org.jeasy.random;
2525

26-
import lombok.Data;
27-
2826
import java.lang.reflect.Field;
2927

3028
/**
3129
* Context object holding the data of a recursion step in {@link EasyRandom#nextObject(Class)}.
3230
*
3331
* @author Rémi Alvergnat (toilal.dev@gmail.com)
3432
*/
35-
@Data
3633
class RandomizationContextStackItem {
3734

3835
private Object object;
@@ -43,4 +40,20 @@ class RandomizationContextStackItem {
4340
this.object = object;
4441
this.field = field;
4542
}
43+
44+
public Object getObject() {
45+
return object;
46+
}
47+
48+
public void setObject(Object object) {
49+
this.object = object;
50+
}
51+
52+
public Field getField() {
53+
return field;
54+
}
55+
56+
public void setField(Field field) {
57+
this.field = field;
58+
}
4659
}

easy-random-core/src/main/java/org/jeasy/random/randomizers/collection/CollectionRandomizer.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
package org.jeasy.random.randomizers.collection;
2525

2626
import org.jeasy.random.api.Randomizer;
27-
import lombok.NonNull;
2827

2928
import java.util.Collection;
3029

@@ -47,7 +46,10 @@ abstract class CollectionRandomizer<T> implements Randomizer<Collection<T>> {
4746
this(delegate, abs(aNewByteRandomizer().getRandomValue()));
4847
}
4948

50-
CollectionRandomizer(@NonNull final Randomizer<T> delegate, final int nbElements) {
49+
CollectionRandomizer(final Randomizer<T> delegate, final int nbElements) {
50+
if (delegate == null) {
51+
throw new IllegalArgumentException("delegate must not be null");
52+
}
5153
checkArguments(nbElements);
5254
this.nbElements = nbElements;
5355
this.delegate = delegate;

0 commit comments

Comments
 (0)