-
Bug
-
Resolution: Fixed
-
P4
-
7
-
None
-
b20
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2150500 | 6u4 | Mikhail Lapshin | P4 | Closed | Won't Fix |
There is an oversight of the fix for 6544309. Look at the code in sun.awt.im.InputMethodManager:
286 public void run() {
...
297 // Loop for processing input method change requests
298 while (true) {
299 waitForChangeRequest();
300 initializeInputMethodLocatorList();
301 try {
302 if (requestComponent != null) {
303 try {
304 showInputMethodMenuOnRequesterEDT(requestComponent);
305 } catch (Exception ex) {
306 throw new RuntimeException(ex);
307 }
308 } else {
309 // show the popup menu within the event thread
310 EventQueue.invokeAndWait(new Runnable() {
311 public void run() {
312 showInputMethodMenu();
313 }
314 });
315 }
316 } catch (InterruptedException ie) {
317 } catch (InvocationTargetException ite) {
318 // should we do anything under these exceptions?
319 }
320 }
321 }
There is an unnecessary try-catch clause at 303-307 lines. InterruptedException and InvocationTargetException that could be thrown in showInputMethodMenuOnRequesterEDT() will be caught in the outer try-catch clause. The try-catch clause should be deleted in this way:
286 public void run() {
...
297 // Loop for processing input method change requests
298 while (true) {
299 waitForChangeRequest();
300 initializeInputMethodLocatorList();
301 try {
302 if (requestComponent != null) {
303 showInputMethodMenuOnRequesterEDT(requestComponent);
304 } else {
305 // show the popup menu within the event thread
306 EventQueue.invokeAndWait(new Runnable() {
307 public void run() {
308 showInputMethodMenu();
309 }
310 });
311 }
312 } catch (InterruptedException ie) {
313 } catch (InvocationTargetException ite) {
314 // should we do anything under these exceptions?
315 }
316 }
317 }
286 public void run() {
...
297 // Loop for processing input method change requests
298 while (true) {
299 waitForChangeRequest();
300 initializeInputMethodLocatorList();
301 try {
302 if (requestComponent != null) {
303 try {
304 showInputMethodMenuOnRequesterEDT(requestComponent);
305 } catch (Exception ex) {
306 throw new RuntimeException(ex);
307 }
308 } else {
309 // show the popup menu within the event thread
310 EventQueue.invokeAndWait(new Runnable() {
311 public void run() {
312 showInputMethodMenu();
313 }
314 });
315 }
316 } catch (InterruptedException ie) {
317 } catch (InvocationTargetException ite) {
318 // should we do anything under these exceptions?
319 }
320 }
321 }
There is an unnecessary try-catch clause at 303-307 lines. InterruptedException and InvocationTargetException that could be thrown in showInputMethodMenuOnRequesterEDT() will be caught in the outer try-catch clause. The try-catch clause should be deleted in this way:
286 public void run() {
...
297 // Loop for processing input method change requests
298 while (true) {
299 waitForChangeRequest();
300 initializeInputMethodLocatorList();
301 try {
302 if (requestComponent != null) {
303 showInputMethodMenuOnRequesterEDT(requestComponent);
304 } else {
305 // show the popup menu within the event thread
306 EventQueue.invokeAndWait(new Runnable() {
307 public void run() {
308 showInputMethodMenu();
309 }
310 });
311 }
312 } catch (InterruptedException ie) {
313 } catch (InvocationTargetException ite) {
314 // should we do anything under these exceptions?
315 }
316 }
317 }
- backported by
-
JDK-2150500 InputMethodManager: unnecessary try-catch clause should be deleted in the run() method
-
- Closed
-
- relates to
-
JDK-6544309 PIT:Unable to select the item's in 'input method selection' popupmenu by using keyboard.
-
- Closed
-