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 269253

Summary: static checked syntax error not detected
Product: java Reporter: FiruzzZ
Component: CompilerAssignee: Dusan Balek <dbalek>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 8.2   
Hardware: PC   
OS: Windows 10 x64   
Issue Type: DEFECT Exception Reporter:
Attachments: IDE log

Description FiruzzZ 2016-12-06 17:21:34 UTC
Inside the If statement there a RETURN FALSE, which just should be RETURN, the IDE doesn't detect the "bad return" until it is compiled.
There is no RED error highlighted in that row neither adobe or below.


abm.getBtnAceptar().addActionListener(evt -> {
            if (JOptionPane.YES_OPTION
                    != JOptionPane.showConfirmDialog(abm, "Confirmar acreditación: $" + panelABM.getTxtTotal().getText() + " a " + delegacion.getNombre(),
                            "Acreditar Dinero", JOptionPane.YES_NO_OPTION)) {
                return false;
            }
 ..........
 ..........
});

Compiling error:  error: incompatible types: bad return type in lambda expression
                return false;
    unexpected return value


Product Version = NetBeans IDE 8.2 (Build 201609300101)
Operating System = Windows 10 version 10.0 running on amd64
Java; VM; Vendor = 1.8.0_112
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.112-b15

Reproducibility: Happens every time
Comment 1 FiruzzZ 2016-12-06 17:22:03 UTC
Created attachment 163170 [details]
IDE log
Comment 2 Dusan Balek 2017-05-04 11:28:58 UTC
Already fixed in dev build.

http://hg.netbeans.org/main/nb-javac/rev/848eced2ad34