public class EqualsComparison {
	void badEqualsComparision() {
		String s = "Hi there";
		Boolean b = Boolean.TRUE;

		System.out.println("equals() returned " + s.equals(b));
	}

	boolean literalStringEqualsDoNotReport(String s) {
		return "Uh huh".equals(s);
	}
}

// vim:ts=3

public class EqualsComparison {
	public interface A {}
	public interface B {}

	void badEqualsComparision() {
		String s = "Hi there";
		Boolean b = Boolean.TRUE;

		System.out.println("equals() returned " + s.equals(b));
	}

	boolean literalStringEqualsDoNotReport(String s) {
		return "Uh huh".equals(s);
	}

	boolean unrelatedInterfaceComparison(A a, B b) {
		// This should be a medium priority warning
		return a.equals(b);
	}
}

// vim:ts=3

Add test for comparing unrelated interfaces
Add test for comparing unrelated interfaces


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