Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when attempting to copy an 837 #332

Merged
merged 3 commits into from
Feb 13, 2023

Conversation

hoffrocket
Copy link
Contributor

@hoffrocket hoffrocket commented Feb 13, 2023

I attempted to upgrade staedi from 1.17.0 to 1.22.0 and got this exception when attempting to create a copy of an 837 transaction in a manner very similar to what's happening in StaEDIStreamWriterTest.testInputEquivalence.

When I add a test case using the existing sample837 it fails with the same exception that I'm seeing:

io.xlate.edi.stream.EDIStreamException: Invalid X12 ISA segment: too short or elements missing
 at io.xlate.edi.internal.stream.StaEDIStreamWriter.writeEndSegment(StaEDIStreamWriter.java:549)
 at io.xlate.edi.internal.stream.StaEDIStreamWriterTest.writeFromReader(StaEDIStreamWriterTest.java:757)
 at io.xlate.edi.internal.stream.StaEDIStreamWriterTest.testInputEquivalence(StaEDIStreamWriterTest.java:717)

I'm assuming this is some sort of regression? but please advise. Thanks!

hoffrocket and others added 2 commits February 13, 2023 20:19
```
io.xlate.edi.stream.EDIStreamException: Invalid X12 ISA segment: too short or elements missing
 at io.xlate.edi.internal.stream.StaEDIStreamWriter.writeEndSegment(StaEDIStreamWriter.java:549)
 at io.xlate.edi.internal.stream.StaEDIStreamWriterTest.writeFromReader(StaEDIStreamWriterTest.java:757)
 at io.xlate.edi.internal.stream.StaEDIStreamWriterTest.testInputEquivalence(StaEDIStreamWriterTest.java:717)
```
Signed-off-by: Michael Edgar <michael@xlate.io>
@MikeEdgar
Copy link
Member

Hi @hoffrocket , thanks for finding this. If you don't mind adding commit MikeEdgar@3835237 to your branch, I'll get that merged in and release 1.22.1.

Ensure State is a known dialect when checking `State.isHeaderState`
@hoffrocket hoffrocket marked this pull request as ready for review February 13, 2023 23:00
@hoffrocket
Copy link
Contributor Author

@MikeEdgar I merged in your fix. Thanks for the amazingly fast response!

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@MikeEdgar MikeEdgar merged commit 16feb07 into xlate:master Feb 13, 2023
@MikeEdgar MikeEdgar added this to the v1.22.1 milestone Feb 13, 2023
@MikeEdgar
Copy link
Member

Thanks again for reporting this @hoffrocket . Release 1.22.1 is available in Maven Central.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants