Skip to content

Constant field in repeating group produces Java compile error #3

Closed
@donmendelson

Description

@donmendelson

A constant field produced this code in an inner class:

public class MDIncRefresh implements MessageFlyweight
{
..
public class MDEntries implements GroupFlyweight
{
...
private static final byte[] TradingSessionIDValue = {65};

    public int TradingSessionIDLength()
    {
        return 1;
    }

    public byte TradingSessionID(final int index)
    {
        return TradingSessionIDValue[index];
    }

This is the error on the constant declaration:

The field TradingSessionIDValue cannot be declared static; static fields can only be declared in static or top level types MDIncRefresh.java /InteropTester/src/MarketData line 434 Java Problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions