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

HY-92 : bug when using float overflow handler with dictionary where a… #543

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public final class CodecConfiguration
public static final String PARENT_PACKAGE_PROPERTY = "fix.codecs.parent_package";
public static final String FLYWEIGHTS_ENABLED_PROPERTY = "fix.codecs.flyweight";
public static final String REJECT_UNKNOWN_ENUM_VALUE_PROPERTY = "reject.unknown.enum.value";
public static final String FLOAT_OVERFLOW_HANDLER_PROPERTY = "float.overflow.handler";
public static final String FLOAT_OVERFLOW_HANDLER_PROPERTY = "fix.codecs.float_overflow_handler";
public static final String FIX_TAGS_IN_JAVADOC = "fix.codecs.tags_in_javadoc";

public static final String DEFAULT_PARENT_PACKAGE = "uk.co.real_logic.artio";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ else if (type == HEADER)
}

out.append(classDeclaration(className, interfaces, false, aggregate.isInParent(), isGroup));
if (decimalFloatOverflowHandler != null && type != HEADER)
if (decimalFloatOverflowHandler != null && type != HEADER && type != GROUP)
{
out.append(String.format(" public %s() {\n\n", className));
out.append(String.format(" decimalFloatOverflowHandler = new %s",
Expand Down Expand Up @@ -999,13 +999,23 @@ private void wrapTrailerAndMessageFieldsInGroupConstructor(final Writer out, fin
out.append(String.format(
" private final TrailerDecoder trailer;\n" +
" private final IntHashSet %1$s;\n" +
" public %2$s(final TrailerDecoder trailer, final IntHashSet %1$s)\n" +
" {\n" +
" this.trailer = trailer;\n" +
" this.%1$s = %1$s;\n" +
" }\n\n",
" public %2$s(final TrailerDecoder trailer, final IntHashSet %1$s)\n",
MESSAGE_FIELDS,
decoderClassName(aggregate)));

out.append(String.format(
" {\n" +
" this.trailer = trailer;\n" +
" this.%1$s = %1$s;\n",
MESSAGE_FIELDS));

if (decimalFloatOverflowHandler != null)
{
out.append(String.format(" decimalFloatOverflowHandler = new %s",
decimalFloatOverflowHandler + "();\n\n"));
}

out.append(" }\n\n");
}

private void wrapTrailerInConstructor(final Writer out, final Aggregate aggregate) throws IOException
Expand Down
Loading