Skip to content

Commit 72e613a

Browse files
committed
ShadowMenu: log duplicate menus at debug level
It comes up extremely frequently. Especially when imagej-legacy is part of the mix, and the ImageJ1 commands overlap the SciJava ones.
1 parent 91e8d7f commit 72e613a

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/main/java/org/scijava/menu/ShadowMenu.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -548,14 +548,8 @@ private ShadowMenu addChild(final ModuleInfo info, final int depth) {
548548
else if (existingChild != null) {
549549
if (log != null) {
550550
final ModuleInfo childInfo = existingChild.getModuleInfo();
551-
if (childInfo != null && info.getPriority() == childInfo.getPriority())
552-
{
553-
log.warn("ShadowMenu: menu item already exists:\n" + //
554-
"\texisting: " + details(childInfo) + "\n" + //
555-
"\t ignored: " + details(info));
556-
}
557-
else {
558-
log.debug("ShadowMenu: higher-priority menu item already exists:\n" +
551+
if (log.isDebug()) {
552+
log.debug("ShadowMenu: menu item already exists:\n" + //
559553
"\texisting: " + details(childInfo) + "\n" + //
560554
"\t ignored: " + details(info));
561555
}

0 commit comments

Comments
 (0)