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

Summary: Compiler errors: Highlight differences between expected/actual argument list
Product: java Reporter: _ gtzabari <gtzabari>
Component: SourceAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 7.1   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

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.