Hi, It looks like the check in CompositeView.modelToView() for throwing a BadLocationException was slightly to high. It looks like this method should never return null if the position doesn't map. This patch makes it so.
2006-11-25 Mark Wielaard <[EMAIL PROTECTED]>
* javax/swing/text/CompositeView.java (modelToView): Never return
null.
Committed,
Mark
diff -u -r1.25 CompositeView.java
--- javax/swing/text/CompositeView.java 20 Nov 2006 11:18:04 -0000 1.25
+++ javax/swing/text/CompositeView.java 25 Nov 2006 19:24:17 -0000
@@ -282,12 +282,12 @@
}
}
}
- else
- {
- throw new BadLocationException("Position " + pos
- + " is not represented by view.",
pos);
- }
}
+
+ if (ret == null)
+ throw new BadLocationException("Position " + pos
+ + " is not represented by view.", pos);
+
return ret;
}
signature.asc
Description: This is a digitally signed message part
