Skip to content

Commit

Permalink
Push writer output through lexer and proxy handler for validation
Browse files Browse the repository at this point in the history
Fixes xlate#283
Fixes xlate#286

Signed-off-by: Michael Edgar <[email protected]>
  • Loading branch information
MikeEdgar committed May 18, 2023
1 parent 7970e6a commit 4052443
Show file tree
Hide file tree
Showing 17 changed files with 1,029 additions and 618 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@
<jdk>(,11)</jdk>
</activation>
<properties>
<version.jakarta.json.api>2.0.1</version.jakarta.json.api>
<version.jakarta.json.api>2.0.2</version.jakarta.json.api>
<version.parsson>1.0.2</version.parsson>
<version.jakarta.xml.bind.api>3.0.1</version.jakarta.xml.bind.api>
<version.jaxb-runtime>3.0.2</version.jaxb-runtime>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public StaEDIOutputFactory() {
supportedProperties.add(PRETTY_PRINT);
supportedProperties.add(TRUNCATE_EMPTY_ELEMENTS);
supportedProperties.add(FORMAT_ELEMENTS);
supportedProperties.add(EDI_VALIDATE_CONTROL_STRUCTURE);

properties.put(PRETTY_PRINT, Boolean.FALSE);
}
Expand Down
1,033 changes: 610 additions & 423 deletions src/main/java/io/xlate/edi/internal/stream/StaEDIStreamWriter.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
******************************************************************************/
package io.xlate.edi.internal.stream.tokenization;

import io.xlate.edi.stream.EDIStreamException;
import io.xlate.edi.stream.Location;

import java.util.HashMap;
import java.util.Map;

import io.xlate.edi.stream.EDIStreamException;
import io.xlate.edi.stream.Location;

public class EDIException extends EDIStreamException {

private static final long serialVersionUID = -2724168743697298348L;
Expand All @@ -41,7 +41,7 @@ public class EDIException extends EDIStreamException {
exceptionMessages.put(INVALID_STATE,
"EDIE003 - Invalid processing state");
exceptionMessages.put(INVALID_CHARACTER,
"EDIE004 - Invalid input character");
"EDIE004 - Invalid character");
exceptionMessages.put(INCOMPLETE_STREAM,
"EDIE005 - Unexpected end of stream");
}
Expand All @@ -55,7 +55,7 @@ public EDIException(String message) {
}

EDIException(Integer id, String message, Location location) {
super(exceptionMessages.get(id) + "; " + message, location);
super(buildMessage(exceptionMessages.get(id), location) + "; " + message, location);
}

public EDIException(Integer id, String message) {
Expand Down
Loading

0 comments on commit 4052443

Please sign in to comment.