Fix bug 380403

https://bugs.eclipse.org/bugs/show_bug.cgi?id=380403

Signed-off-by: Dietmar Stoll <eclipse.etc@dietmar-stoll.de>
This commit is contained in:
Dietmar 2015-07-13 20:56:43 +02:00
parent 85f20f2bc2
commit 3df3684547

View file

@ -48,11 +48,12 @@ public abstract class MethodBasedModule implements Module {
Type key = getKeyType();
if (isClassBinding()) {
Class<?> value = (Class<?>) invokeMethod();
if (LOGGER.isTraceEnabled())
LOGGER.trace("Adding binding from " + key + " to " + value.getName()
+ ". Declaring Method was '" + getMethod().toGenericString() + "' in Module "
+ this.getClass().getName());
if (value != null && !Void.class.equals(value)) {
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("Adding binding from " + key + " to " + value.getName()
+ ". Declaring Method was '" + getMethod().toGenericString() + "' in Module "
+ this.getClass().getName());
}
LinkedBindingBuilder<Object> bind = binder.bind((Key<Object>)Key.get(key));
if (!key.equals(value)) {
bindToClass(bind, value);