Quantcast
Channel: zeroturnaround.com » All Posts
Viewing all articles
Browse latest Browse all 2540

Reply To: "Method code too large!" on large enum list

$
0
0

Hello Tobse!

This is not a limitation of JRebel, but in a Class format. See here: http://stackoverflow.com/questions/11883043/does-an-enum-class-containing-20001-enum-constants-hit-any-limit
2500 enums is very close to the limit without JRebel. JRebel adds a small amount of code into this class that just pushes it over the limit, but you will hit the limit even without it if you keep adding values there.

Best option would be to rethink this design and try some other approach.

Another option is to exlude this class from being reloaded, but eventually still facing this problem, when adding more enums.
To do that use add -Drebel.packages_exclude=package/to/a/Class to your VM arguments. It will prevent your process from crashing though the class won’t be reloaded by JRebel.

Please let us know if this information had helped you?

Kind regards,
Valerie


Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>