Brian Forbis created THRIFT-4601:
------------------------------------

             Summary: Thrift compiled java: Code too large for try statement
                 Key: THRIFT-4601
                 URL: https://issues.apache.org/jira/browse/THRIFT-4601
             Project: Thrift
          Issue Type: Bug
          Components: Java - Compiler
            Reporter: Brian Forbis


 

Java is limited to having 65535 methods per class file. Anything more than that 
would cause the java compiler to crash with errors such as:

{{error: {{too many constants}}}}

{{error: code too large for try statement}}

While this likely means the user needs to refactor their IDL into multiple 
files and have multiple thrift services, the fact that this limitation does not 
exist in other languages can cause this error to come up in surprise when a 
user is generating java code for the first time

My thoughts are that the thrift compiler should emit warnings when it parses an 
IDL that would not run in certain target languages. This way, even though Java 
might not currently be used, the user would know about this limitation ahead of 
time.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to