Is there a way how to disable auto-boxing for Java 5 and 6 in IntelliJ IDEA, to not allow a developer to use this feature in the IDE?
I don't think you can disable auto-boxing outright while maintaining the target compile version - that's a feature of the specific Java version.
What you can do in IntelliJ is change the inspection level of Auto-boxing to "Error". To do that:
Further down the line, you can add code inspections which run when testing the code (PMD, FindBugs, Cobertura, et. al.) which will fail the build if anything is being auto-boxed or auto-unboxed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With