Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1996

JavaME Constants generation is broken / inconsistent with regular Java generation

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.9
    • Fix Version/s: 0.9.1
    • Component/s: JavaME - Compiler
    • Labels:
      None
    • Environment:

      NA

    • Patch Info:
      Patch Available

      Description

      So say you have a namespace 'com.example', and in this namespace you have constant definitions in multiple files:

      Example1.thrift, Example2.thrift

      Generating either of these files compiles to com/example/Constants.java

      So you cannot have more than one file containing constants in this namespace, as compiling Example2 overrides the code compiled from Example1.

      In the regular java codegen the compile paths are different:

      Example1.thrift => Example1Constants.java
      Example2.thrift => Example2Constants.java

      This seems to be the optimal solution as losing code is never good. I've patched the Javame compiler to act the same as the Java compiler (will attach a patch)

        Attachments

        1. 0001-javame-constants-win.patch
          1 kB
          Matthew Rathbone

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                rathboma Matthew Rathbone
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: