Skip to content

Instantly share code, notes, and snippets.

@jakemcc
Created November 4, 2009 20:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakemcc/226340 to your computer and use it in GitHub Desktop.
Save jakemcc/226340 to your computer and use it in GitHub Desktop.
// No issues with this
private static class DecimalsRecordLayout extends CobolRecordLayout {
public DecimalsRecordLayout() {
super("decimals");
field("Price", "9(5)");
field("Quantity", "99v999");
field("Other", "999v99");
}
}
// Issues with this, exception below.
private static class DecimalsRecordLayout extends CobolRecordLayout {
public DecimalsRecordLayout() {
super("decimals");
field("Price", "9(5)");
field("Quantity", "9(2)v999");
field("Other", "999v99");
}
// java.lang.IllegalStateException: No match found
// at java.util.regex.Matcher.group(Matcher.java:468)
// at flapjack.cobol.util.CobolDecimalPatternParser.parseDecimalPlaces(CobolDecimalPatternParser.java:29)
// at flapjack.cobol.util.CobolDecimalTextValueConverter.fromTextToDomain(CobolDecimalTextValueConverter.java:34)
// at flapjack.util.AbstractTextValueConverter.toDomain(AbstractTextValueConverter.java:23)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment