Bug 321742

Summary: assert statement marks expression after colon as Dead code.
Product: [Eclipse Project] JDT Reporter: davisebugzilla
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: Olivier_Thomann
Version: 3.7   
Target Milestone: 3.7 M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description davisebugzilla CLA 2010-08-04 11:17:12 EDT
Build Identifier: M20100211-1343

AFAIK, this is a legal assert.
try {
        flt = fConvert(sb.toString());
    } catch (NumberFormatException ex) {
        assert true: "Unexpected NumberFormatException while parsing " + s1;
    }
It generates the following error in Problems.
Description: Dead code
Resource: TargetResultsComparator.java
Path: /src/java/com/primerabio/ice/client/table
Location: line 49
Type: Java Problem



Reproducible: Always

Steps to Reproduce:
1.Use 'assert true: "Unexpected NumberFormatException while parsing " + s1;'
2.
3.
Comment 1 davisebugzilla CLA 2010-08-04 11:24:04 EDT
This is a stupid bug and I am embarrassed that I put in assert true when I should have used assert false.

Sorry for the bother.
Comment 2 Olivier Thomann CLA 2010-08-04 13:45:20 EDT
Closing as INVALID.