Opened 4 years ago
Closed 4 years ago
#19889 closed defect (fixed)
CI contains thousands of "Keystroke … is already assigned to …, will be overridden by …" warnings
Reported by: | simon04 | Owned by: | simon04 |
---|---|---|---|
Priority: | normal | Milestone: | 21.03 |
Component: | Unit tests | Version: | |
Keywords: | Cc: |
Attachments (0)
Change History (9)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
Not a single plugin is installed. However, using org.openstreetmap.josm.testutils.JOSMTestRules#main()
causes org.openstreetmap.josm.gui.MainApplication
to be initialised before each unit test.
comment:3 by , 4 years ago
Milestone: | 20.10 → 20.11 |
---|
Maybe org.openstreetmap.josm.testutils.JOSMTestRules#main()
is no longer needed now we have JMockit?
comment:5 by , 4 years ago
Milestone: | 20.12 → Longterm |
---|
comment:6 by , 4 years ago
Milestone: | Longterm → 21.04 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
This fixes many log messages. Any objections?
-
test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java
diff --git a/test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java b/test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java index 8012c286a..7afa85a3c 100644
a b public class MainApplicationTest { 66 66 * Make sure {@link MainApplication#contentPanePrivate} is initialized. 67 67 */ 68 68 public static void initContentPane() { 69 if (MainApplication.contentPanePrivate == null) { 70 MainApplication.contentPanePrivate = new JPanel(new BorderLayout()); 71 } 69 // init every time to avoid "Keystroke %s is already assigned to %s" 70 MainApplication.contentPanePrivate = new JPanel(new BorderLayout()); 72 71 } 73 72 74 73 /** … … public class MainApplicationTest { 103 102 * Make sure {@link MainApplication#toolbar} is initialized. 104 103 */ 105 104 public static void initToolbar() { 106 if (MainApplication.toolbar == null) { 107 MainApplication.toolbar = new ToolbarPreferences(); 108 } 105 // init every time to avoid "Registered toolbar action" 106 MainApplication.toolbar = new ToolbarPreferences(); 109 107 } 110 108 111 109 @SuppressFBWarnings(value = "DM_DEFAULT_ENCODING")
The following log messages remain:
2021-03-29 20:09:29.926 INFO: Reassigning macOS shortcut 'help:search-items' from Meta to Ctrl because of conflict with ⌘+␣ 2021-03-29 20:09:29.927 INFO: Silent shortcut conflict: 'help:search-items' moved by 'apple-reserved-01' to '⌃+␣'. 2021-03-29 20:09:29.927 INFO: Reassigning macOS shortcut 'core:historyinfo' from Meta to Ctrl because of conflict with ⌘+H 2021-03-29 20:09:29.927 INFO: Silent shortcut conflict: 'core:historyinfo' moved by 'system:hide' to '⌃+H'. 2021-03-29 20:09:30.100 INFO: Reassigning macOS shortcut 'file:downloadreferrers' from Meta to Ctrl because of conflict with ⌘+⌥+D 2021-03-29 20:09:30.100 INFO: Silent shortcut conflict: 'file:downloadreferrers' moved by 'apple-reserved-42' to '⌃+⌥+D'.
Too bad we cannot use java.util.logging.Logger#setLevel
for the org.openstreetmap.josm.tools.Shortcut
logger only...
comment:8 by , 4 years ago
Milestone: | 21.04 → 21.03 |
---|
Not sure what to do against it. Happens when you really install all the plugins :-)