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

constant presence, length of 1 and char primitive type [Java] #505

Closed
aSapozhnikov2 opened this issue Aug 29, 2017 · 1 comment
Closed

Comments

@aSapozhnikov2
Copy link

aSapozhnikov2 commented Aug 29, 2017

I have the following type:

<type name="PartyIDSource" description="PartyIDSource" presence="constant" length="1" primitiveType="char" semanticType="char">C</type>

And the following field using the type:

<field name="PartyIDSource" id="447" type="PartyIDSource" semanticType="char"/>

This creates the following code in java:

    public byte partyIDSource()
    {
        return (byte)C;
    }

because there's no single quotes around the C, this causes compilation failures , removing the length="1" part does fix it to be "return (byte)57;"

@mjpt777
Copy link
Contributor

mjpt777 commented Aug 29, 2017

Thanks.

@mjpt777 mjpt777 closed this as completed Aug 29, 2017
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

No branches or pull requests

2 participants