mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
removed LOG.isDebugEnabled where not needed
This commit is contained in:
@@ -306,9 +306,7 @@ public class DebugProcessEvents extends DebugProcessImpl {
|
||||
private void processVMStartEvent(final SuspendContextImpl suspendContext, VMStartEvent event) {
|
||||
preprocessEvent(suspendContext, event.thread());
|
||||
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("enter: processVMStartEvent()");
|
||||
}
|
||||
LOG.debug("enter: processVMStartEvent()");
|
||||
|
||||
showStatusText(this, event);
|
||||
|
||||
@@ -349,9 +347,7 @@ public class DebugProcessEvents extends DebugProcessImpl {
|
||||
final String addressDisplayName = DebuggerBundle.getAddressDisplayName(getConnection());
|
||||
final String transportName = DebuggerBundle.getTransportName(getConnection());
|
||||
showStatusText(DebuggerBundle.message("status.connected", addressDisplayName, transportName));
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("leave: processVMStartEvent()");
|
||||
}
|
||||
LOG.debug("leave: processVMStartEvent()");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -275,9 +275,7 @@ public abstract class DebugProcessImpl extends UserDataHolderBase implements Deb
|
||||
}
|
||||
DebuggerManagerThreadImpl.assertIsManagerThread();
|
||||
myPositionManager = createPositionManager();
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("*******************VM attached******************");
|
||||
}
|
||||
LOG.debug("*******************VM attached******************");
|
||||
checkVirtualMachineVersion(vm);
|
||||
|
||||
myVirtualMachineProxy = new VirtualMachineProxyImpl(this, vm);
|
||||
@@ -340,15 +338,8 @@ public abstract class DebugProcessImpl extends UserDataHolderBase implements Deb
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (IOException e) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(e);
|
||||
}
|
||||
}
|
||||
catch (IllegalConnectorArgumentsException e) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(e);
|
||||
}
|
||||
catch (IOException | IllegalConnectorArgumentsException e) {
|
||||
LOG.debug(e);
|
||||
}
|
||||
catch (ExecutionException e) {
|
||||
LOG.error(e);
|
||||
@@ -845,9 +836,7 @@ public abstract class DebugProcessImpl extends UserDataHolderBase implements Deb
|
||||
IllegalConnectorArgumentsException e1 = (IllegalConnectorArgumentsException)e;
|
||||
final List<String> invalidArgumentNames = e1.argumentNames();
|
||||
message = formatMessage(DebuggerBundle.message("error.invalid.argument", invalidArgumentNames.size()) + ": "+ e1.getLocalizedMessage()) + invalidArgumentNames;
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(e1);
|
||||
}
|
||||
LOG.debug(e1);
|
||||
}
|
||||
else if (e instanceof CantRunException) {
|
||||
message = e.getLocalizedMessage();
|
||||
@@ -861,11 +850,9 @@ public abstract class DebugProcessImpl extends UserDataHolderBase implements Deb
|
||||
else if (e instanceof ExecutionException) {
|
||||
message = e.getLocalizedMessage();
|
||||
}
|
||||
else {
|
||||
else {
|
||||
message = DebuggerBundle.message("error.exception.while.connecting", e.getClass().getName(), e.getLocalizedMessage());
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(e);
|
||||
}
|
||||
LOG.debug(e);
|
||||
}
|
||||
return message;
|
||||
}
|
||||
@@ -891,9 +878,7 @@ public abstract class DebugProcessImpl extends UserDataHolderBase implements Deb
|
||||
buf.append(localizedMessage);
|
||||
buf.append('"');
|
||||
}
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(e);
|
||||
}
|
||||
LOG.debug(e);
|
||||
message = buf.toString();
|
||||
}
|
||||
finally {
|
||||
@@ -1044,14 +1029,14 @@ public abstract class DebugProcessImpl extends UserDataHolderBase implements Deb
|
||||
SuspendManagerUtil.restoreAfterResume(suspendContext, resumeData);
|
||||
}
|
||||
for (SuspendContextImpl suspendingContext : mySuspendManager.getEventContexts()) {
|
||||
if (suspendingContexts.contains(suspendingContext) && !suspendingContext.isEvaluating() && !suspendingContext.suspends(invokeThread)) {
|
||||
if (suspendingContexts.contains(suspendingContext) &&
|
||||
!suspendingContext.isEvaluating() &&
|
||||
!suspendingContext.suspends(invokeThread)) {
|
||||
mySuspendManager.suspendThread(suspendingContext, invokeThread);
|
||||
}
|
||||
}
|
||||
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("getVirtualMachine().clearCaches()");
|
||||
}
|
||||
LOG.debug("getVirtualMachine().clearCaches()");
|
||||
getVirtualMachineProxy().clearCaches();
|
||||
afterMethodInvocation(suspendContext, internalEvaluate);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -211,9 +211,7 @@ public class DebuggerManagerThreadImpl extends InvokeAndWaitThread<DebuggerComma
|
||||
|
||||
@Override
|
||||
protected void commandCancelled() {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Event queue was closed, killing request");
|
||||
}
|
||||
LOG.debug("Event queue was closed, killing request");
|
||||
request.requestStop();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -95,9 +95,7 @@ public class RequestHint {
|
||||
return stepThread.frame(0);
|
||||
}
|
||||
catch (EvaluateException e) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(e);
|
||||
}
|
||||
LOG.debug(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,11 +62,9 @@ public class SuspendManagerImpl implements SuspendManager {
|
||||
SuspendContextImpl suspendContext = new SuspendContextImpl(myDebugProcess, suspendPolicy, nVotes, null) {
|
||||
@Override
|
||||
protected void resumeImpl() {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Start resuming...");
|
||||
}
|
||||
LOG.debug("Start resuming...");
|
||||
myDebugProcess.logThreads();
|
||||
switch(getSuspendPolicy()) {
|
||||
switch (getSuspendPolicy()) {
|
||||
case EventRequest.SUSPEND_ALL:
|
||||
int resumeAttempts = 5;
|
||||
while (--resumeAttempts > 0) {
|
||||
@@ -87,22 +85,18 @@ public class SuspendManagerImpl implements SuspendManager {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("VM resumed ");
|
||||
}
|
||||
|
||||
LOG.debug("VM resumed ");
|
||||
break;
|
||||
case EventRequest.SUSPEND_EVENT_THREAD:
|
||||
myFrozenThreads.remove(getThread());
|
||||
getThread().resume();
|
||||
if(LOG.isDebugEnabled()) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Thread resumed : " + getThread().toString());
|
||||
}
|
||||
break;
|
||||
case EventRequest.SUSPEND_NONE:
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("None resumed");
|
||||
}
|
||||
LOG.debug("None resumed");
|
||||
break;
|
||||
}
|
||||
if (LOG.isDebugEnabled()) {
|
||||
@@ -161,9 +155,7 @@ public class SuspendManagerImpl implements SuspendManager {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Set resumed ");
|
||||
}
|
||||
LOG.debug("Set resumed ");
|
||||
myDebugProcess.logThreads();
|
||||
}
|
||||
};
|
||||
@@ -321,13 +313,11 @@ public class SuspendManagerImpl implements SuspendManager {
|
||||
});
|
||||
}
|
||||
else {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("vote paused");
|
||||
}
|
||||
LOG.debug("vote paused");
|
||||
myDebugProcess.logThreads();
|
||||
myDebugProcess.cancelRunToCursorBreakpoint();
|
||||
final ThreadReferenceProxyImpl thread = suspendContext.getThread();
|
||||
myDebugProcess.deleteStepRequests(thread != null? thread.getThreadReference() : null);
|
||||
myDebugProcess.deleteStepRequests(thread != null ? thread.getThreadReference() : null);
|
||||
notifyPaused(suspendContext);
|
||||
}
|
||||
}
|
||||
@@ -340,9 +330,7 @@ public class SuspendManagerImpl implements SuspendManager {
|
||||
|
||||
@Override
|
||||
public void voteResume(SuspendContextImpl suspendContext) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Resume voted");
|
||||
}
|
||||
LOG.debug("Resume voted");
|
||||
processVote(suspendContext);
|
||||
}
|
||||
|
||||
|
||||
@@ -79,19 +79,17 @@ public class SuspendManagerUtil {
|
||||
|
||||
public static void restoreAfterResume(SuspendContextImpl context, Object resumeData) {
|
||||
SuspendManager suspendManager = context.getDebugProcess().getSuspendManager();
|
||||
ResumeData data = (ResumeData) resumeData;
|
||||
ResumeData data = (ResumeData)resumeData;
|
||||
|
||||
ThreadReferenceProxyImpl thread = context.getThread();
|
||||
if(data.myIsFrozen && !suspendManager.isFrozen(thread)) {
|
||||
if (data.myIsFrozen && !suspendManager.isFrozen(thread)) {
|
||||
suspendManager.freezeThread(thread);
|
||||
}
|
||||
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("RestoreAfterResume SuspendContextImpl...");
|
||||
}
|
||||
LOG.debug("RestoreAfterResume SuspendContextImpl...");
|
||||
LOG.assertTrue(context.myResumedThreads == null);
|
||||
|
||||
if(data.myResumedThreads != null) {
|
||||
if (data.myResumedThreads != null) {
|
||||
data.myResumedThreads.forEach(ThreadReferenceProxyImpl::resume);
|
||||
context.myResumedThreads = data.myResumedThreads;
|
||||
}
|
||||
@@ -104,14 +102,12 @@ public class SuspendManagerUtil {
|
||||
|
||||
ResumeData resumeData = new ResumeData(suspendManager.isFrozen(thread), context.myResumedThreads);
|
||||
|
||||
if(resumeData.myIsFrozen) {
|
||||
if (resumeData.myIsFrozen) {
|
||||
suspendManager.unfreezeThread(thread);
|
||||
}
|
||||
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Resuming SuspendContextImpl...");
|
||||
}
|
||||
if(context.myResumedThreads != null) {
|
||||
LOG.debug("Resuming SuspendContextImpl...");
|
||||
if (context.myResumedThreads != null) {
|
||||
context.myResumedThreads.forEach(ThreadReferenceProxyImpl::suspend);
|
||||
context.myResumedThreads = null;
|
||||
}
|
||||
|
||||
+1
-3
@@ -76,9 +76,7 @@ public class ExpressionEvaluatorImpl implements ExpressionEvaluator {
|
||||
return (Value)r.getReturnValue();
|
||||
}
|
||||
catch (Throwable/*IncompatibleThreadStateException*/ e) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(e);
|
||||
}
|
||||
LOG.debug(e);
|
||||
if (e instanceof EvaluateException) {
|
||||
throw ((EvaluateException)e);
|
||||
}
|
||||
|
||||
+2
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -63,9 +63,7 @@ class InstanceofEvaluator implements Evaluator {
|
||||
Collections.singletonList(((ObjectReference)value).referenceType().classObject()));
|
||||
}
|
||||
catch (Exception e) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(e);
|
||||
}
|
||||
LOG.debug(e);
|
||||
throw EvaluateExceptionUtil.createEvaluateException(e);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -188,9 +188,7 @@ public class MethodEvaluator implements Evaluator {
|
||||
return debugProcess.invokeMethod(context, objRef, jdiMethod, args);
|
||||
}
|
||||
catch (Exception e) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(e);
|
||||
}
|
||||
LOG.debug(e);
|
||||
throw EvaluateExceptionUtil.createEvaluateException(e);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-3
@@ -64,9 +64,7 @@ public class MethodReturnValueWatcher {
|
||||
}
|
||||
try {
|
||||
if (Registry.is("debugger.watch.return.speedup") && Comparing.equal(myEntryMethod, event.method())) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Now watching all");
|
||||
}
|
||||
LOG.debug("Now watching all");
|
||||
enableEntryWatching(true);
|
||||
createExitRequest().enable();
|
||||
}
|
||||
|
||||
@@ -468,9 +468,7 @@ public class DebuggerSession implements AbstractDebuggerSession {
|
||||
|
||||
@Override
|
||||
public void paused(final SuspendContextImpl suspendContext) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("paused");
|
||||
}
|
||||
LOG.debug("paused");
|
||||
|
||||
ThreadReferenceProxyImpl currentThread = suspendContext.getThread();
|
||||
|
||||
@@ -534,7 +532,7 @@ public class DebuggerSession implements AbstractDebuggerSession {
|
||||
currentThread = oldContext.getThread();
|
||||
}
|
||||
|
||||
if(currentThread == null) {
|
||||
if (currentThread == null) {
|
||||
final Collection<ThreadReferenceProxyImpl> allThreads = getProcess().getVirtualMachineProxy().allThreads();
|
||||
// heuristics: try to pre-select EventDispatchThread
|
||||
for (final ThreadReferenceProxyImpl thread : allThreads) {
|
||||
@@ -593,7 +591,9 @@ public class DebuggerSession implements AbstractDebuggerSession {
|
||||
|
||||
SourcePosition position = PsiDocumentManager.getInstance(getProject()).commitAndRunReadAction(new Computable<SourcePosition>() {
|
||||
@Override
|
||||
public @Nullable SourcePosition compute() {
|
||||
public
|
||||
@Nullable
|
||||
SourcePosition compute() {
|
||||
return ContextUtil.getSourcePosition(positionContext);
|
||||
}
|
||||
});
|
||||
@@ -618,7 +618,7 @@ public class DebuggerSession implements AbstractDebuggerSession {
|
||||
final StackFrameProxy frameProxy = positionContext.getFrameProxy();
|
||||
String className;
|
||||
try {
|
||||
className = frameProxy != null? frameProxy.location().declaringType().name() : "";
|
||||
className = frameProxy != null ? frameProxy.location().declaringType().name() : "";
|
||||
}
|
||||
catch (EvaluateException ignored) {
|
||||
className = "";
|
||||
@@ -630,7 +630,8 @@ public class DebuggerSession implements AbstractDebuggerSession {
|
||||
}
|
||||
}
|
||||
|
||||
final DebuggerContextImpl debuggerContext = DebuggerContextImpl.createDebuggerContext(DebuggerSession.this, suspendContext, currentThread, null);
|
||||
final DebuggerContextImpl debuggerContext =
|
||||
DebuggerContextImpl.createDebuggerContext(DebuggerSession.this, suspendContext, currentThread, null);
|
||||
debuggerContext.setPositionCache(position);
|
||||
|
||||
DebuggerInvocationUtil.invokeLater(getProject(), new Runnable() {
|
||||
|
||||
@@ -182,9 +182,7 @@ public abstract class InvokeThread<E extends PrioritizedTask> {
|
||||
}
|
||||
}
|
||||
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Request " + toString() + " exited");
|
||||
}
|
||||
LOG.debug("Request " + toString() + " exited");
|
||||
DumbService.getInstance(myProject).setAlternativeResolveEnabled(false);
|
||||
}
|
||||
|
||||
@@ -230,8 +228,6 @@ public abstract class InvokeThread<E extends PrioritizedTask> {
|
||||
|
||||
public void close() {
|
||||
myEvents.close();
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Closing evaluation");
|
||||
}
|
||||
LOG.debug("Closing evaluation");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,7 +151,8 @@ class ReloadClassesWorker {
|
||||
final int partiallyRedefinedClassesCount = redefineProcessor.getPartiallyRedefinedClassesCount();
|
||||
if (partiallyRedefinedClassesCount == 0) {
|
||||
myProgress.addMessage(
|
||||
myDebuggerSession, MessageCategory.INFORMATION, DebuggerBundle.message("status.classes.reloaded", redefineProcessor.getProcessedClassesCount())
|
||||
myDebuggerSession, MessageCategory.INFORMATION,
|
||||
DebuggerBundle.message("status.classes.reloaded", redefineProcessor.getProcessedClassesCount())
|
||||
);
|
||||
}
|
||||
else {
|
||||
@@ -161,9 +162,7 @@ class ReloadClassesWorker {
|
||||
myProgress.addMessage(myDebuggerSession, MessageCategory.WARNING, message);
|
||||
}
|
||||
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("classes reloaded");
|
||||
}
|
||||
LOG.debug("classes reloaded");
|
||||
}
|
||||
catch (Throwable e) {
|
||||
processException(e);
|
||||
|
||||
@@ -208,15 +208,13 @@ public class VirtualMachineProxyImpl implements JdiTimer, VirtualMachineProxy {
|
||||
clearCaches();
|
||||
}
|
||||
|
||||
public void resume() {
|
||||
public void resume() {
|
||||
DebuggerManagerThreadImpl.assertIsManagerThread();
|
||||
if (myPausePressedCount > 0) {
|
||||
myPausePressedCount--;
|
||||
}
|
||||
clearCaches();
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("before resume VM");
|
||||
}
|
||||
LOG.debug("before resume VM");
|
||||
try {
|
||||
myVirtualMachine.resume();
|
||||
}
|
||||
@@ -225,9 +223,7 @@ public class VirtualMachineProxyImpl implements JdiTimer, VirtualMachineProxy {
|
||||
// sometimes this leads to com.sun.jdi.InternalException: Unexpected JDWP Error: 13 (THREAD_NOT_SUSPENDED)
|
||||
LOG.info(e);
|
||||
}
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("VM resumed");
|
||||
}
|
||||
LOG.debug("VM resumed");
|
||||
//logThreads();
|
||||
}
|
||||
|
||||
@@ -628,9 +624,7 @@ public class VirtualMachineProxyImpl implements JdiTimer, VirtualMachineProxy {
|
||||
}
|
||||
|
||||
public void clearCaches() {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("VM cleared");
|
||||
}
|
||||
LOG.debug("VM cleared");
|
||||
|
||||
myAllClasses = null;
|
||||
if (!myNestedClassesCache.isEmpty()) {
|
||||
|
||||
@@ -251,9 +251,7 @@ public class BreakpointManager {
|
||||
exceptionBreakpoint.setQualifiedName(exceptionClassName);
|
||||
exceptionBreakpoint.setPackageName(packageName);
|
||||
addBreakpoint(exceptionBreakpoint);
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("ExceptionBreakpoint Added");
|
||||
}
|
||||
LOG.debug("ExceptionBreakpoint Added");
|
||||
return exceptionBreakpoint;
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -193,9 +193,7 @@ public class FieldBreakpoint extends BreakpointWithHighlighter<JavaFieldBreakpoi
|
||||
if (isWatchModification() && vm.canWatchFieldModification()) {
|
||||
ModificationWatchpointRequest request = manager.createModificationWatchpointRequest(this, field);
|
||||
debugProcess.getRequestsManager().enableRequest(request);
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Modification request added");
|
||||
}
|
||||
LOG.debug("Modification request added");
|
||||
}
|
||||
if (isWatchAccess() && vm.canWatchFieldAccess()) {
|
||||
AccessWatchpointRequest request = manager.createAccessWatchpointRequest(this, field);
|
||||
|
||||
@@ -156,9 +156,7 @@ public class ThreadsDebuggerTree extends DebuggerTree {
|
||||
}
|
||||
catch (Exception ex) {
|
||||
root.add( MessageDescriptor.DEBUG_INFO_UNAVAILABLE);
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(ex);
|
||||
}
|
||||
LOG.debug(ex);
|
||||
}
|
||||
|
||||
final boolean hasThreadToSelect = suspendContextThread != null; // thread can be null if pause was pressed
|
||||
|
||||
Reference in New Issue
Block a user