Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The expression of type x is boxed into X?

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.

like image 942
B.E. Avatar asked Feb 18 '11 08:02

B.E.


1 Answers

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.

like image 154
Thilo Avatar answered Oct 02 '22 00:10

Thilo