Skip to content

Commit 6100b30

Browse files
Minor refactoring
1 parent 4563d71 commit 6100b30

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 1.0.3
2+
3+
* ReportableSellerCreator can now create "Rechtsträger" like a company.
4+
15
# 1.0.2
26

37
* The alias for the private key in the keystore is now configurable (

bzst-dip-java-client/src/main/java/software/xdev/bzst/dip/client/model/message/BzstDipCorrectableReportableSellerType.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,11 @@ public CorrectableReportableSellerType toXmlType(final BzstDipConfiguration conf
4949
this.tin.toXmlType(),
5050
this.handelsregisternummer,
5151
this.vat,
52-
this.firstName,
52+
this.firstName == null ? ReportableSellerCreator.NULL_STRING : this.firstName,
5353
this.lastName,
54-
this.birthDate == null ? "NULL" : this.birthDate.format(DateTimeFormatter.ISO_LOCAL_DATE),
54+
this.birthDate == null
55+
? ReportableSellerCreator.NULL_STRING
56+
: this.birthDate.format(DateTimeFormatter.ISO_LOCAL_DATE),
5557
this.legalAddress.toXmlType(),
5658
this.addressFix.toXmlType(),
5759
this.numberOfActivities.toXmlType(),

bzst-dip-java-client/src/main/java/software/xdev/bzst/dip/client/xmldocument/ReportableSellerCreator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
public class ReportableSellerCreator
5151
{
5252
private static final Logger LOGGER = LoggerFactory.getLogger(ReportableSellerCreator.class);
53+
public static final String NULL_STRING = "NULL";
5354
private final BzstDipConfiguration configuration;
5455

5556
public ReportableSellerCreator(final BzstDipConfiguration configuration)
@@ -337,7 +338,7 @@ private static OrganisationPartyType createOrganisationPartyType(
337338
*/
338339
public static boolean isNULLAsString(final String checkNULLString)
339340
{
340-
return checkNULLString.equals("NULL");
341+
return checkNULLString.equals(NULL_STRING);
341342
}
342343

343344
private static OrganisationINType createIN(final String in)

0 commit comments

Comments
 (0)