Menu

#1290 Mismatch in method name causes exception when selecting "Open Writable Glossary File"

6.1
open-fixed
None
5
2025-04-27
2025-04-18
No

When selecting "Open Writable Glossary File" from the "Glossaries Pane" to open the glossary, the following exception is thrown:

00:25:14.189: Error: java.lang.IncompatibleClassChangeError: Error invoke method handler for main menu: there is no method projectAccessWritableGlossaryMenuItemActionPerformed 
00:25:14.189: Error:    at org.omegat.gui.main.BaseMainWindowMenu.invokeAction(BaseMainWindowMenu.java:712) 
00:25:14.189: Error:    at org.omegat.gui.glossary.GlossaryTextArea$6.actionPerformed(GlossaryTextArea.java:417) 
00:25:14.189: Error:    at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967) 
...

It appears that the method name being called in GlossaryTextArea.java and the one defined in MainWindowMenuHandler.java do not match.
(projectAccessWritableGlossaryMenuItem vs projectAccessWriteableGlossaryMenuItemActionPerformed)

Discussion

  • Hiroshi Miura

    Hiroshi Miura - 2025-04-19
    • assigned_to: Hiroshi Miura
     
  • Hiroshi Miura

    Hiroshi Miura - 2025-04-19

    Thank you for the report. It is clearly bug, and it does not detected by the test unfortunately. So there is also an issue in test case.

     
  • Hiroshi Miura

    Hiroshi Miura - 2025-04-19

    I have pushed the fix, adding test, and refactoring the class.
    https://github.com/omegat-org/omegat/pull/1355
    @wingcloud Could you mine to check and review the code?

     

    Last edit: Hiroshi Miura 2025-04-19
  • Tomohiro Takata

    Tomohiro Takata - 2025-04-20

    Thank you for the rapid fix!
    I've reviewed your updates and found no issues. 💯

    (I've also left the same message on GitHub.)

     
  • Hiroshi Miura

    Hiroshi Miura - 2025-04-27
    • status: open --> open-fixed
     
  • Hiroshi Miura

    Hiroshi Miura - 2025-04-27

    The PR is merged.

     

Log in to post a comment.