This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 202308 - Compiler errors: Highlight differences between expected/actual argument list
Summary: Compiler errors: Highlight differences between expected/actual argument list
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-19 14:09 UTC by _ gtzabari
Modified: 2013-09-02 14:18 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2011-09-19 14:09:15 UTC
I just got the following compiler error:

-------------
method getDevice in class com.muxlab.vitex.serial.SerialPortService cannot be applied to given types;
  required: org.jperipheral.SerialPort,java.nio.ByteBuffer,A,java.nio.channels.CompletionHandler<com.muxlab.vitex.serial.GetDeviceResponse,A>
  found: org.jperipheral.SerialPort,java.nio.ByteBuffer,org.jperipheral.SerialPort,<nulltype>,java.nio.channels.CompletionHandler<com.muxlab.vitex.serial.GetDeviceResponse,java.lang.Void>
  reason: cannot instantiate from arguments because actual and formal argument lists differ in length
-------------

Instead of squinting trying to figure out what's wrong, it would be nice if Netbeans will highlight where the expected/actual argument list diverges. Another error message I frequently run into is:

-------------
method getDevice in class com.muxlab.vitex.serial.SerialPortService cannot be applied to given types;
  required: org.jperipheral.SerialPort,java.nio.ByteBuffer,A,java.nio.channels.CompletionHandler<com.muxlab.vitex.serial.GetDeviceResponse,A>
  found: org.jperipheral.SerialPort,java.nio.ByteBuffer,java.lang.Integer,java.nio.channels.CompletionHandler<com.muxlab.vitex.serial.GetDeviceResponse,java.lang.Void>
  reason: no instance(s) of type variable(s) A exist so that argument type java.nio.channels.CompletionHandler<com.muxlab.vitex.serial.GetDeviceResponse,java.lang.Void> conforms to formal parameter type java.nio.channels.CompletionHandler<com.muxlab.vitex.serial.GetDeviceResponse,A>
-------------

Again, this involves a lot of squinting to figure out where the expected/actual arguments diverge.