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 Dec 8, 2023
1 parent ef75790 commit b7dd083
Show file tree
Hide file tree
Showing 16 changed files with 1,028 additions and 617 deletions.
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 b7dd083

Please sign in to comment.