[JBoss JIRA] (IPROTO-113) Generated marshallers for Interface enums don't compile
by Ryan Emerson (Jira)
[ https://issues.jboss.org/browse/IPROTO-113?page=com.atlassian.jira.plugin... ]
Ryan Emerson reassigned IPROTO-113:
-----------------------------------
Assignee: Nistor Adrian
> Generated marshallers for Interface enums don't compile
> -------------------------------------------------------
>
> Key: IPROTO-113
> URL: https://issues.jboss.org/browse/IPROTO-113
> Project: Infinispan ProtoStream
> Issue Type: Bug
> Affects Versions: 4.3.0.Alpha11
> Reporter: Ryan Emerson
> Assignee: Nistor Adrian
> Priority: Major
>
> For example:
> {code:java}
> public interface User {
> enum Gender {
> @ProtoEnumValue(number = 1)
> MALE,
> @ProtoEnumValue(number = 2)
> FEMALE
> }
> }
> {code}
> The generated marshaller does not compile as it tries to access Gender via '$' instead of '.'.
> {code:java}
> public final class Gender$___Marshaller_50930fab395a4317bcf1c7a7787bb360b5248d1517560bce47017d9c5477c52a implements org.infinispan.protostream.EnumMarshaller<org.infinispan.query.dsl.embedded.testdomain.User.Gender> {
> @Override
> public Class<org.infinispan.query.dsl.embedded.testdomain.User.Gender> getJavaClass() { return org.infinispan.query.dsl.embedded.testdomain.User.Gender.class; }
>
> @Override
> public String getTypeName() { return "org.infinispan.test.query.Gender"; }
>
> @Override
> public org.infinispan.query.dsl.embedded.testdomain.User.Gender decode(int $1) {
> switch ($1) {
> case 1: return org.infinispan.query.dsl.embedded.testdomain.User$Gender.MALE;
> case 2: return org.infinispan.query.dsl.embedded.testdomain.User$Gender.FEMALE;
> default: return null;
> }
> }
>
> @Override
> public int encode(org.infinispan.query.dsl.embedded.testdomain.User.Gender $1) throws IllegalArgumentException {
> switch ($1.ordinal()) {
> case 0: return 1;
> case 1: return 2;
> default: throw new IllegalArgumentException("Unexpected org.infinispan.query.dsl.embedded.testdomain.User.Gender enum value : " + $1.name());
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v7.13.5#713005)
5 years, 3 months
[JBoss JIRA] (IPROTO-113) Generated marshallers for Interface enums don't compile
by Ryan Emerson (Jira)
[ https://issues.jboss.org/browse/IPROTO-113?page=com.atlassian.jira.plugin... ]
Ryan Emerson updated IPROTO-113:
--------------------------------
Description:
For example:
{code:java}
public interface User {
enum Gender {
@ProtoEnumValue(number = 1)
MALE,
@ProtoEnumValue(number = 2)
FEMALE
}
}
{code}
The generated marshaller does not compile as it tries to access Gender via '$' instead of '.'.
{code:java}
public final class Gender$___Marshaller_50930fab395a4317bcf1c7a7787bb360b5248d1517560bce47017d9c5477c52a implements org.infinispan.protostream.EnumMarshaller<org.infinispan.query.dsl.embedded.testdomain.User.Gender> {
@Override
public Class<org.infinispan.query.dsl.embedded.testdomain.User.Gender> getJavaClass() { return org.infinispan.query.dsl.embedded.testdomain.User.Gender.class; }
@Override
public String getTypeName() { return "org.infinispan.test.query.Gender"; }
@Override
public org.infinispan.query.dsl.embedded.testdomain.User.Gender decode(int $1) {
switch ($1) {
case 1: return org.infinispan.query.dsl.embedded.testdomain.User$Gender.MALE;
case 2: return org.infinispan.query.dsl.embedded.testdomain.User$Gender.FEMALE;
default: return null;
}
}
@Override
public int encode(org.infinispan.query.dsl.embedded.testdomain.User.Gender $1) throws IllegalArgumentException {
switch ($1.ordinal()) {
case 0: return 1;
case 1: return 2;
default: throw new IllegalArgumentException("Unexpected org.infinispan.query.dsl.embedded.testdomain.User.Gender enum value : " + $1.name());
}
}
{code}
was:
For example:
{code:java}
public interface User {
enum Gender {
@ProtoEnumValue(number = 1)
MALE,
@ProtoEnumValue(number = 2)
FEMALE
}
}
The generated marshaller does not compile as it tries to access Gender via '$' instead of '.'.
{code:java}
public final class Gender$___Marshaller_50930fab395a4317bcf1c7a7787bb360b5248d1517560bce47017d9c5477c52a implements org.infinispan.protostream.EnumMarshaller<org.infinispan.query.dsl.embedded.testdomain.User.Gender> {
@Override
public Class<org.infinispan.query.dsl.embedded.testdomain.User.Gender> getJavaClass() { return org.infinispan.query.dsl.embedded.testdomain.User.Gender.class; }
@Override
public String getTypeName() { return "org.infinispan.test.query.Gender"; }
@Override
public org.infinispan.query.dsl.embedded.testdomain.User.Gender decode(int $1) {
switch ($1) {
case 1: return org.infinispan.query.dsl.embedded.testdomain.User$Gender.MALE;
case 2: return org.infinispan.query.dsl.embedded.testdomain.User$Gender.FEMALE;
default: return null;
}
}
@Override
public int encode(org.infinispan.query.dsl.embedded.testdomain.User.Gender $1) throws IllegalArgumentException {
switch ($1.ordinal()) {
case 0: return 1;
case 1: return 2;
default: throw new IllegalArgumentException("Unexpected org.infinispan.query.dsl.embedded.testdomain.User.Gender enum value : " + $1.name());
}
}
{code}
{code}
> Generated marshallers for Interface enums don't compile
> -------------------------------------------------------
>
> Key: IPROTO-113
> URL: https://issues.jboss.org/browse/IPROTO-113
> Project: Infinispan ProtoStream
> Issue Type: Bug
> Affects Versions: 4.3.0.Alpha11
> Reporter: Ryan Emerson
> Priority: Major
>
> For example:
> {code:java}
> public interface User {
> enum Gender {
> @ProtoEnumValue(number = 1)
> MALE,
> @ProtoEnumValue(number = 2)
> FEMALE
> }
> }
> {code}
> The generated marshaller does not compile as it tries to access Gender via '$' instead of '.'.
> {code:java}
> public final class Gender$___Marshaller_50930fab395a4317bcf1c7a7787bb360b5248d1517560bce47017d9c5477c52a implements org.infinispan.protostream.EnumMarshaller<org.infinispan.query.dsl.embedded.testdomain.User.Gender> {
> @Override
> public Class<org.infinispan.query.dsl.embedded.testdomain.User.Gender> getJavaClass() { return org.infinispan.query.dsl.embedded.testdomain.User.Gender.class; }
>
> @Override
> public String getTypeName() { return "org.infinispan.test.query.Gender"; }
>
> @Override
> public org.infinispan.query.dsl.embedded.testdomain.User.Gender decode(int $1) {
> switch ($1) {
> case 1: return org.infinispan.query.dsl.embedded.testdomain.User$Gender.MALE;
> case 2: return org.infinispan.query.dsl.embedded.testdomain.User$Gender.FEMALE;
> default: return null;
> }
> }
>
> @Override
> public int encode(org.infinispan.query.dsl.embedded.testdomain.User.Gender $1) throws IllegalArgumentException {
> switch ($1.ordinal()) {
> case 0: return 1;
> case 1: return 2;
> default: throw new IllegalArgumentException("Unexpected org.infinispan.query.dsl.embedded.testdomain.User.Gender enum value : " + $1.name());
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v7.13.5#713005)
5 years, 3 months
[JBoss JIRA] (IPROTO-113) Generated marshallers for Interface enums don't compile
by Ryan Emerson (Jira)
Ryan Emerson created IPROTO-113:
-----------------------------------
Summary: Generated marshallers for Interface enums don't compile
Key: IPROTO-113
URL: https://issues.jboss.org/browse/IPROTO-113
Project: Infinispan ProtoStream
Issue Type: Bug
Affects Versions: 4.3.0.Alpha11
Reporter: Ryan Emerson
For example:
{code:java}
public interface User {
enum Gender {
@ProtoEnumValue(number = 1)
MALE,
@ProtoEnumValue(number = 2)
FEMALE
}
}
The generated marshaller does not compile as it tries to access Gender via '$' instead of '.'.
{code:java}
public final class Gender$___Marshaller_50930fab395a4317bcf1c7a7787bb360b5248d1517560bce47017d9c5477c52a implements org.infinispan.protostream.EnumMarshaller<org.infinispan.query.dsl.embedded.testdomain.User.Gender> {
@Override
public Class<org.infinispan.query.dsl.embedded.testdomain.User.Gender> getJavaClass() { return org.infinispan.query.dsl.embedded.testdomain.User.Gender.class; }
@Override
public String getTypeName() { return "org.infinispan.test.query.Gender"; }
@Override
public org.infinispan.query.dsl.embedded.testdomain.User.Gender decode(int $1) {
switch ($1) {
case 1: return org.infinispan.query.dsl.embedded.testdomain.User$Gender.MALE;
case 2: return org.infinispan.query.dsl.embedded.testdomain.User$Gender.FEMALE;
default: return null;
}
}
@Override
public int encode(org.infinispan.query.dsl.embedded.testdomain.User.Gender $1) throws IllegalArgumentException {
switch ($1.ordinal()) {
case 0: return 1;
case 1: return 2;
default: throw new IllegalArgumentException("Unexpected org.infinispan.query.dsl.embedded.testdomain.User.Gender enum value : " + $1.name());
}
}
{code}
{code}
--
This message was sent by Atlassian Jira
(v7.13.5#713005)
5 years, 3 months