X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.osgi.boot%2Fsrc%2Forg%2Fargeo%2Fosgi%2Fboot%2FOsgiBoot.java;fp=org.argeo.osgi.boot%2Fsrc%2Forg%2Fargeo%2Fosgi%2Fboot%2FOsgiBoot.java;h=b400bf43ad5172318fe3edf733508ab8b0f17d5b;hb=bc570353abdcc80a9d369c8509c648507644955d;hp=bdf7134b85441df762d5ca3120e4e51b43e6f768;hpb=35507e18257f2e9f59842ba5120fcd3f19c4cf4d;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.osgi.boot/src/org/argeo/osgi/boot/OsgiBoot.java b/org.argeo.osgi.boot/src/org/argeo/osgi/boot/OsgiBoot.java index bdf7134b8..b400bf43a 100644 --- a/org.argeo.osgi.boot/src/org/argeo/osgi/boot/OsgiBoot.java +++ b/org.argeo.osgi.boot/src/org/argeo/osgi/boot/OsgiBoot.java @@ -215,16 +215,21 @@ public class OsgiBoot implements OsgiBootConstants { } } } catch (BundleException e) { + final String ALREADY_INSTALLED = "is already installed"; String message = e.getMessage(); if ((message.contains("Bundle \"" + SYMBOLIC_NAME_OSGI_BOOT + "\"") || message.contains("Bundle \"" + SYMBOLIC_NAME_EQUINOX + "\"")) - && message.contains("is already installed")) { + && message.contains(ALREADY_INSTALLED)) { // silent, in order to avoid warnings: we know that both // have already been installed... } else { - OsgiBootUtils.warn("Could not install bundle from " + url + ": " + message); + if (message.contains(ALREADY_INSTALLED)) { + if (OsgiBootUtils.isDebug()) + OsgiBootUtils.warn("Duplicate install from " + url + ": " + message); + } else + OsgiBootUtils.warn("Could not install bundle from " + url + ": " + message); } - if (OsgiBootUtils.debug && !message.contains("is already installed")) + if (OsgiBootUtils.debug && !message.contains(ALREADY_INSTALLED)) e.printStackTrace(); } }