I have the following Java 8 code (simplified for demonstration):
public Double fooBar(int a) { return Double.valueOf(a); }
Now IntelliJ IDEA tells me that I have an extra box in the return statement. I would understand this problem if a was double , but for int I feel like I need boxing to convert to double .
Is there a good way to reorganize this code that I donβt see right now, or is the error message from IntelliJ IDEA currently just not optimal?
thanks for the help
source share