Skip to content

Commit 7e0c35e

Browse files
authored
De-lombokify javax.money module -- needed for #56 (JPMS) (#59)
1 parent 1880498 commit 7e0c35e

File tree

6 files changed

+214
-141
lines changed

6 files changed

+214
-141
lines changed

javax-money/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,6 @@
5050
<version>3.0.2</version>
5151
<scope>provided</scope>
5252
</dependency>
53-
<dependency>
54-
<groupId>org.projectlombok</groupId>
55-
<artifactId>lombok</artifactId>
56-
<scope>provided</scope>
57-
</dependency>
5853

5954
<!-- test -->
6055
<dependency>

javax-money/src/main/java/com/fasterxml/jackson/datatype/javax/money/CurrencyUnitSerializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import com.fasterxml.jackson.databind.SerializerProvider;
77
import com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper;
88
import com.fasterxml.jackson.databind.ser.std.StdScalarSerializer;
9-
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
109
import org.apiguardian.api.API;
1110

1211
import javax.money.CurrencyUnit;
@@ -16,6 +15,7 @@
1615

1716
@API(status = MAINTAINED)
1817
public final class CurrencyUnitSerializer extends StdScalarSerializer<CurrencyUnit> {
18+
private static final long serialVersionUID = 1L;
1919

2020
CurrencyUnitSerializer() {
2121
super(CurrencyUnit.class);
Lines changed: 52 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,64 @@
1+
// Generated by delombok at Thu Apr 10 13:56:11 PDT 2025
12
package com.fasterxml.jackson.datatype.javax.money;
23

3-
import lombok.AllArgsConstructor;
4-
import lombok.Getter;
5-
import lombok.With;
6-
7-
@AllArgsConstructor(staticName = "valueOf")
8-
@Getter
9-
public final class FieldNames
10-
{
4+
public final class FieldNames {
115
static final FieldNames DEFAULT = FieldNames.valueOf("amount", "currency", "formatted");
12-
13-
@With
146
private final String amount;
15-
16-
@With
177
private final String currency;
18-
19-
@With
208
private final String formatted;
219

2210
public static FieldNames defaults() {
2311
return DEFAULT;
2412
}
2513

14+
//@lombok.Generated
15+
private FieldNames(final String amount, final String currency, final String formatted) {
16+
this.amount = amount;
17+
this.currency = currency;
18+
this.formatted = formatted;
19+
}
20+
21+
//@lombok.Generated
22+
public static FieldNames valueOf(final String amount, final String currency, final String formatted) {
23+
return new FieldNames(amount, currency, formatted);
24+
}
25+
26+
//@lombok.Generated
27+
public String getAmount() {
28+
return this.amount;
29+
}
30+
31+
//@lombok.Generated
32+
public String getCurrency() {
33+
return this.currency;
34+
}
35+
36+
//@lombok.Generated
37+
public String getFormatted() {
38+
return this.formatted;
39+
}
40+
41+
/**
42+
* @return a clone of this object, except with this updated property (returns {@code this} if an identical value is passed).
43+
*/
44+
//@lombok.Generated
45+
public FieldNames withAmount(final String amount) {
46+
return this.amount == amount ? this : new FieldNames(amount, this.currency, this.formatted);
47+
}
48+
49+
/**
50+
* @return a clone of this object, except with this updated property (returns {@code this} if an identical value is passed).
51+
*/
52+
//@lombok.Generated
53+
public FieldNames withCurrency(final String currency) {
54+
return this.currency == currency ? this : new FieldNames(this.amount, currency, this.formatted);
55+
}
56+
57+
/**
58+
* @return a clone of this object, except with this updated property (returns {@code this} if an identical value is passed).
59+
*/
60+
//@lombok.Generated
61+
public FieldNames withFormatted(final String formatted) {
62+
return this.formatted == formatted ? this : new FieldNames(this.amount, this.currency, formatted);
63+
}
2664
}

javax-money/src/test/java/com/fasterxml/jackson/datatype/javax/money/FieldNamesTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
import org.junit.jupiter.api.Test;
44

5-
import com.fasterxml.jackson.datatype.javax.money.FieldNames;
6-
75
import static org.assertj.core.api.Assertions.assertThat;
86

97
public final class FieldNamesTest

0 commit comments

Comments
 (0)