@@ -245,10 +245,10 @@ private Thread[] getThreadsOwningLock(ISchedulingRule rule) {
245245 }
246246 }
247247 if ((blocking .isEmpty ()) && (JobManager .DEBUG_LOCKS )) {
248- System . out . println ("Lock " + rule + " is involved in deadlock but is not owned by any thread." ); //$NON-NLS-1$ //$NON-NLS-2$
248+ JobManager . debug ("Lock " + rule + " is involved in deadlock but is not owned by any thread." ); //$NON-NLS-1$ //$NON-NLS-2$
249249 }
250250 if ((blocking .size () > 1 ) && (rule instanceof ILock ) && (JobManager .DEBUG_LOCKS )) {
251- System . out . println ("Lock " + rule + " is owned by more than 1 thread, but it is not a rule." ); //$NON-NLS-1$ //$NON-NLS-2$
251+ JobManager . debug ("Lock " + rule + " is owned by more than 1 thread, but it is not a rule." ); //$NON-NLS-1$ //$NON-NLS-2$
252252 }
253253 return blocking .toArray (new Thread [blocking .size ()]);
254254 }
@@ -354,13 +354,13 @@ void lockReleased(Thread owner, ISchedulingRule lock) {
354354 //make sure the lock and thread exist in the graph
355355 if (threadIndex < 0 ) {
356356 if (JobManager .DEBUG_LOCKS ) {
357- System . out . println ("[lockReleased] Lock " + lock + " was already released by thread " + owner .getName ()); //$NON-NLS-1$ //$NON-NLS-2$
357+ JobManager . debug ("[lockReleased] Lock " + lock + " was already released by thread " + owner .getName ()); //$NON-NLS-1$ //$NON-NLS-2$
358358 }
359359 return ;
360360 }
361361 if (lockIndex < 0 ) {
362362 if (JobManager .DEBUG_LOCKS ) {
363- System . out . println ("[lockReleased] Thread " + owner .getName () + " already released lock " + lock ); //$NON-NLS-1$ //$NON-NLS-2$
363+ JobManager . debug ("[lockReleased] Thread " + owner .getName () + " already released lock " + lock ); //$NON-NLS-1$ //$NON-NLS-2$
364364 }
365365 return ;
366366 }
@@ -376,7 +376,8 @@ void lockReleased(Thread owner, ISchedulingRule lock) {
376376 || lock .isConflicting (locks .get (j )))) {
377377 if (graph [threadIndex ][j ] == NO_STATE ) {
378378 if (JobManager .DEBUG_LOCKS ) {
379- System .out .println ("[lockReleased] More releases than acquires for thread " + owner .getName () + " and lock " + lock ); //$NON-NLS-1$ //$NON-NLS-2$
379+ JobManager .debug ("[lockReleased] More releases than acquires for thread " + owner .getName () //$NON-NLS-1$
380+ + " and lock " + lock ); //$NON-NLS-1$
380381 }
381382 } else {
382383 graph [threadIndex ][j ]--;
@@ -399,13 +400,15 @@ void lockReleasedCompletely(Thread owner, ISchedulingRule rule) {
399400 //need to make sure that the given thread and rule were not already removed from the graph
400401 if (threadIndex < 0 ) {
401402 if (JobManager .DEBUG_LOCKS ) {
402- System .out .println ("[lockReleasedCompletely] Lock " + rule + " was already released by thread " + owner .getName ()); //$NON-NLS-1$ //$NON-NLS-2$
403+ JobManager .debug (
404+ "[lockReleasedCompletely] Lock " + rule + " was already released by thread " + owner .getName ()); //$NON-NLS-1$ //$NON-NLS-2$
403405 }
404406 return ;
405407 }
406408 if (ruleIndex < 0 ) {
407409 if (JobManager .DEBUG_LOCKS ) {
408- System .out .println ("[lockReleasedCompletely] Thread " + owner .getName () + " already released lock " + rule ); //$NON-NLS-1$ //$NON-NLS-2$
410+ JobManager
411+ .debug ("[lockReleasedCompletely] Thread " + owner .getName () + " already released lock " + rule ); //$NON-NLS-1$ //$NON-NLS-2$
409412 }
410413 return ;
411414 }
@@ -464,20 +467,20 @@ void lockWaitStop(Thread owner, ISchedulingRule lock) {
464467 //make sure the thread and lock exist in the graph
465468 if (threadIndex < 0 ) {
466469 if (JobManager .DEBUG_LOCKS ) {
467- System . out . println ("Thread " + owner .getName () + " was already removed." ); //$NON-NLS-1$ //$NON-NLS-2$
470+ JobManager . debug ("Thread " + owner .getName () + " was already removed." ); //$NON-NLS-1$ //$NON-NLS-2$
468471 }
469472 return ;
470473 }
471474 if (lockIndex < 0 ) {
472475 if (JobManager .DEBUG_LOCKS ) {
473- System . out . println ("Lock " + lock + " was already removed." ); //$NON-NLS-1$ //$NON-NLS-2$
476+ JobManager . debug ("Lock " + lock + " was already removed." ); //$NON-NLS-1$ //$NON-NLS-2$
474477 }
475478 return ;
476479 }
477480 if (graph [threadIndex ][lockIndex ] != WAITING_FOR_LOCK ) {
478481 // Lock has already been granted, nothing to do...
479482 if (JobManager .DEBUG_LOCKS ) {
480- System . out . println ("Lock " + lock + " already granted to depth: " + graph [threadIndex ][lockIndex ]); //$NON-NLS-1$ //$NON-NLS-2$
483+ JobManager . debug ("Lock " + lock + " already granted to depth: " + graph [threadIndex ][lockIndex ]); //$NON-NLS-1$ //$NON-NLS-2$
481484 }
482485 return ;
483486 }
0 commit comments