--- a/langtools/src/share/classes/com/sun/mirror/util/SourceOrderDeclScanner.java Mon Feb 15 20:06:11 2010 -0800
+++ b/langtools/src/share/classes/com/sun/mirror/util/SourceOrderDeclScanner.java Mon Feb 15 20:17:57 2010 -0800
@@ -101,7 +101,11 @@
}
@SuppressWarnings("cast")
private int compareEqualPosition(Declaration d1, Declaration d2) {
- assert d1.getPosition() == d2.getPosition();
+ assert
+ (d1.getPosition() == d2.getPosition()) || // Handles d1 == d2 == null
+ (d1.getPosition().file().compareTo(d2.getPosition().file()) == 0 &&
+ d1.getPosition().line() == d2.getPosition().line() &&
+ d1.getPosition().column() == d2.getPosition().column());
DeclPartialOrder dpo1 = new DeclPartialOrder();
DeclPartialOrder dpo2 = new DeclPartialOrder();