package sfBugs;

import java.io.IOException;

public class Bug1964520 extends Exception {
    private static final long serialVersionUID = 1L;

	public void test(Exception e) {
		// should trigger warning (and does)
		if(((Bug1964520)e).toString().equals("")) {
			System.out.println("toString is blank");
		}
		// should trigger warning (and does)
		if(e instanceof IOException && ((Bug1964520)e).toString().equals("")) {
			System.out.println("toString is blank");
		}
		// should not trigger warning (and doesn't)
		if(e instanceof Bug1964520 && ((Bug1964520)e).toString().equals("")) {
			System.out.println("toString is blank");
		}
		// should not trigger warning (and doesn't)
		if(e instanceof Bug1964520) {
			if(((Bug1964520)e).toString().equals("")) {
				System.out.println("toString is blank");
			}
		}
	}
}

Test case for [ 1964520 ] Findbugs reports invalid M D BC - Unchecked/unconfirmed cast (I can't recreate it)
Test case for [ 1964520 ] Findbugs reports invalid M D BC - Unchecked/unconfirmed cast (I can't recreate it)

git-svn-id: e7d6bde23f017c9ff4efd468d79d66def666766b@9600 eae3c2d3-9b19-0410-a86e-396b6ccb6ab3
