Book a Demo

Author Topic: java 5 enum, rev. engineer (regression for 772)  (Read 2643 times)

tanja

  • EA User
  • **
  • Posts: 71
  • Karma: +0/-0
    • View Profile
java 5 enum, rev. engineer (regression for 772)
« on: November 28, 2005, 03:03:00 am »
Hello,

This piece of code:

public enum Operator {
  AND((short) 1), // <<<====
  // rest omitted

at synchronisation from code into model generates the error:

There was an error parsing C:\test\Test.java on line 2.
Unexpected Symbol: )
Would you like to continue the import?

I guess the problem is the cast (short). This very same code has been successfully reverse engineered with some of the previous builds (prior to 772), as shown below (I'm not sure whether this pic will show, but beleive me it was correct, generated with EA):



I summarise the cases from some 30 enum classes where the same kind of error appears:

AND((short) 1),
QUALITY_MASK((int) 0x000000C0L),

The java source code for these enums has been generated from IDL with idl2j compiler, so blame them for casts :-)

Is this going to be fixed soon? In the meantime, is there a workaround?

Thanks in advance,
Tanja

ps: note to Sparx - how about putting strings in error messages surrounded by something? I would have preferred the above error message look so:
Unexpected Symbol: ')'

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: java 5 enum, rev. engineer (regression for 772
« Reply #1 on: November 28, 2005, 01:10:31 pm »
Hi Tanja,

Thanks for letting us know about this.  It should be fixed for the next build.

Unfortunately, I can't think of a workaround until then, other than removing the casts.