diff --git a/README.md b/README.md
index e0cd485..f54e2e0 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@ Fixed Width Parser is a small library that purpose is:
- If you are using Gradle just add the following dependency to your `build.gradle`.
```groovy
-compile "com.github.joutvhu:fixed-width-parser:1.1.3"
+compile "com.github.joutvhu:fixed-width-parser:1.1.4"
```
- Or add the following dependency to your `pom.xml` if you are using Maven.
@@ -20,7 +20,7 @@ compile "com.github.joutvhu:fixed-width-parser:1.1.3"
com.github.joutvhu
fixed-width-parser
- 1.1.3
+ 1.1.4
```
diff --git a/build.gradle b/build.gradle
index e0a063b..7815e89 100644
--- a/build.gradle
+++ b/build.gradle
@@ -7,7 +7,7 @@ plugins {
}
group = 'com.github.joutvhu'
-version '1.1.3'
+version '1.1.4'
sourceCompatibility = 1.8
targetCompatibility = 1.8
@@ -29,26 +29,19 @@ dependencies {
compileOnly 'org.projectlombok:lombok:1.18.12'
implementation 'org.apache.commons:commons-lang3:3.11'
- implementation 'com.google.code.findbugs:jsr305:3.0.2'
-
- implementation 'org.apache.logging.log4j:log4j-api:2.13.3'
- implementation 'org.apache.logging.log4j:log4j-core:2.13.3'
implementation "com.google.re2j:re2j:1.4"
implementation "org.reflections:reflections:0.9.12"
implementation "com.fasterxml.jackson.core:jackson-core:2.11.2"
- implementation "com.fasterxml.jackson.core:jackson-annotations:2.11.2"
implementation "com.fasterxml.jackson.core:jackson-databind:2.11.2"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.11.2"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.11.2"
- testImplementation 'junit:junit:4.13'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.2'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.6.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.2'
- testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.6.2'
testCompileOnly 'org.projectlombok:lombok:1.18.12'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.12'
@@ -88,9 +81,7 @@ artifacts {
}
tasks.withType(Test) {
- useJUnitPlatform {
- includeEngines 'junit-jupiter'
- }
+ useJUnitPlatform()
filter {
includeTestsMatching 'com.joutvhu.fixedwidth.parser.*'
}
diff --git a/gradlew b/gradlew
old mode 100644
new mode 100755
diff --git a/src/main/java/com/joutvhu/fixedwidth/parser/support/FixedParseStrategy.java b/src/main/java/com/joutvhu/fixedwidth/parser/support/FixedParseStrategy.java
index a31beb9..b51a5c6 100644
--- a/src/main/java/com/joutvhu/fixedwidth/parser/support/FixedParseStrategy.java
+++ b/src/main/java/com/joutvhu/fixedwidth/parser/support/FixedParseStrategy.java
@@ -48,13 +48,14 @@ private void validate(FixedTypeInfo info, String value, ValidationType type) {
@Override
public Object read(FixedTypeInfo info, StringAssembler assembler) {
info.detectTypeWith(assembler);
+ String value = assembler.getValue();
assembler.trim(info);
if (assembler.isBlank(info)) {
if (info.require)
throw new NullPointerException(info.buildMessage("{title} cannot be blank."));
return null;
}
- validate(info, assembler.getValue(), ValidationType.BEFORE_READ);
+ validate(info, value, ValidationType.BEFORE_READ);
FixedWidthReader