Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
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.