diff options
| author | Tom Tromey <tromey@gcc.gnu.org> | 2007-01-09 19:58:05 +0000 |
|---|---|---|
| committer | Tom Tromey <tromey@gcc.gnu.org> | 2007-01-09 19:58:05 +0000 |
| commit | 97b8365cafc3a344a22d3980b8ed885f5c6d8357 (patch) | |
| tree | 996a5f57d4a68c53473382e45cb22f574cb3e4db /libjava/classpath/java/awt/TextComponent.java | |
| parent | c648dedbde727ca3f883bb5fd773aa4af70d3369 (diff) | |
Merged gcj-eclipse branch to trunk.
From-SVN: r120621
Diffstat (limited to 'libjava/classpath/java/awt/TextComponent.java')
| -rw-r--r-- | libjava/classpath/java/awt/TextComponent.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libjava/classpath/java/awt/TextComponent.java b/libjava/classpath/java/awt/TextComponent.java index f811122f2b2..8fdd94139fc 100644 --- a/libjava/classpath/java/awt/TextComponent.java +++ b/libjava/classpath/java/awt/TextComponent.java @@ -391,7 +391,9 @@ public class TextComponent extends Component */ public synchronized void setSelectionStart(int selectionStart) { - select(selectionStart, getSelectionEnd()); + select(selectionStart, + (getSelectionEnd() < selectionStart) + ? selectionStart : getSelectionEnd()); } /** @@ -610,7 +612,7 @@ public class TextComponent extends Component * @exception ClassCastException If listenerType doesn't specify a class or * interface that implements java.util.EventListener. */ - public EventListener[] getListeners(Class listenerType) + public <T extends EventListener> T[] getListeners(Class<T> listenerType) { if (listenerType == TextListener.class) return AWTEventMulticaster.getListeners(textListener, listenerType); |
