Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleResolver.java')
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleResolver.java20
1 files changed, 18 insertions, 2 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleResolver.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleResolver.java
index f07ff1475..9a829516b 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleResolver.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleResolver.java
@@ -482,7 +482,7 @@ final class ModuleResolver {
private Map<Resource, ResolutionException> errors = null;
public ResolveLogger() {
- super(0);
+ super(DEBUG_USES ? Logger.LOG_DEBUG : 0);
}
@Override
@@ -508,6 +508,18 @@ final class ModuleResolver {
Map<Resource, ResolutionException> getUsesConstraintViolations() {
return errors == null ? Collections.<Resource, ResolutionException> emptyMap() : errors;
}
+
+ @Override
+ public boolean isDebugEnabled() {
+ checkTimeout();
+ return DEBUG_USES;
+ }
+
+ @Override
+ protected void doLog(int level, String msg, Throwable throwable) {
+ Debug.println("RESOLVER: " + msg + SEPARATOR + (throwable != null ? (TAB + TAB + throwable.getMessage()) : "")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
}
private final ModuleResolutionReport.Builder reportBuilder = new ModuleResolutionReport.Builder();
@@ -1496,11 +1508,15 @@ final class ModuleResolver {
@Override
public void execute(Runnable command) {
+ checkTimeout();
+ adaptor.getResolverExecutor().execute(command);
+ }
+
+ void checkTimeout() {
if (checkTimeout && resolveTimeout < System.currentTimeMillis()) {
checkTimeout = false;
throw new ResolutionTimeout();
}
- adaptor.getResolverExecutor().execute(command);
}
}

Back to the top