@@ -548,12 +548,14 @@ else if (existingChild != null) {
548548 final ModuleInfo childInfo = existingChild .getModuleInfo ();
549549 if (childInfo != null && info .getPriority () == childInfo .getPriority ())
550550 {
551- log .warn ("ShadowMenu: menu item already exists:\n \t existing: " +
552- childInfo + "\n \t ignored: " + info );
551+ log .warn ("ShadowMenu: menu item already exists:\n " + //
552+ "\t existing: " + details (childInfo ) + "\n " + //
553+ "\t ignored: " + details (info ));
553554 }
554555 else {
555556 log .debug ("ShadowMenu: higher-priority menu item already exists:\n " +
556- "\t existing: " + childInfo + "\n \t ignored: " + info );
557+ "\t existing: " + details (childInfo ) + "\n " + //
558+ "\t ignored: " + details (info ));
557559 }
558560 }
559561 }
@@ -564,6 +566,21 @@ private boolean isLeaf(final int depth, final MenuPath path) {
564566 return depth == path .size () - 1 ;
565567 }
566568
569+ private String details (final ModuleInfo info ) {
570+ if (info == null ) return "<null>" ;
571+ String className , classLocation ;
572+ try {
573+ final Class <?> c = info .loadDelegateClass ();
574+ className = c .getName ();
575+ classLocation = ClassUtils .getLocation (c ).toString ();
576+ }
577+ catch (final ClassNotFoundException exc ) {
578+ className = info .getDelegateClassName ();
579+ classLocation = "<invalid>" ;
580+ }
581+ return info .getMenuPath () + " : " + className + " [" + classLocation + "]" ;
582+ }
583+
567584 private ShadowMenu getMenu (final MenuPath menuPath , final int index ) {
568585 final MenuEntry entry = menuPath .get (index );
569586
0 commit comments