Question

I'm a little confused by a warning that my Eclipse IDE is currently writing next to every expression where types are autoboxed or autounboxed:

The expression of type x is boxed into X

The expression of type X is unboxed into x

Is this a warning I should react on? I thought autoboxing was a Java language feature - but now I seem to get warnings everytime this feature is used.

Was it helpful?

Solution

I don't think Eclipse does this by default (mine does not), but you can turn it on or off using Preferences > Java > Compiler > Errors/Warnings > Potential programming problems > Boxing and Unboxing Conversions.

It should be "Ignore" unless you really want to know about this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top