From 82e0cb2f82f7c3641bdb1eecbc3334e7e65984b8 Mon Sep 17 00:00:00 2001 From: "Anosh D. Ullenius" Date: Sat, 20 Jun 2020 13:58:41 +0200 Subject: [PATCH] Replace type wrappers with primitives --- src/main/java/dev/personnummer/Personnummer.java | 3 +-- src/test/java/PersonnummerData.java | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/dev/personnummer/Personnummer.java b/src/main/java/dev/personnummer/Personnummer.java index 6079ef3..67df42f 100644 --- a/src/main/java/dev/personnummer/Personnummer.java +++ b/src/main/java/dev/personnummer/Personnummer.java @@ -1,8 +1,7 @@ package dev.personnummer; import java.time.LocalDate; -import java.util.regex.Matcher; -import java.util.regex.Pattern; +import java.util.regex.*; /** * Class used to validate Swedish personal identity numbers. diff --git a/src/test/java/PersonnummerData.java b/src/test/java/PersonnummerData.java index b86e6b3..8bf81ac 100644 --- a/src/test/java/PersonnummerData.java +++ b/src/test/java/PersonnummerData.java @@ -1,6 +1,6 @@ public class PersonnummerData { - public PersonnummerData(Long integer, String longFormat, String shortFormat, String separatedFormat, String separatedLong, Boolean valid, String type, Boolean isMale, Boolean isFemale) { + public PersonnummerData(long integer, String longFormat, String shortFormat, String separatedFormat, String separatedLong, boolean valid, String type, boolean isMale, boolean isFemale) { this.integer = integer; this.longFormat = longFormat; this.shortFormat = shortFormat; @@ -12,14 +12,14 @@ public PersonnummerData(Long integer, String longFormat, String shortFormat, Str this.isFemale = isFemale; } - public Long integer; + public long integer; public String longFormat; public String shortFormat; public String separatedFormat; public String separatedLong; - public Boolean valid; + public boolean valid; public String type; - public Boolean isMale; + public boolean isMale; public boolean isFemale; }