SYNCH.NESTEDS

When a synchronized method calls other synchronized methods on same object, it does not create synchronization problems but it does have a detrimental effect on performance. This error is reported for static method calls.

Example 1

Copy
     public static class MyClass {
         static public synchronized List getElements() {
             return internalGetElements();
         }
         static synchronized List internalGetElements() {
             List list = new ArrayList();
             // calculate and return list of elements
             return list;
         }
         // ...
     }

SYNCH.NESTEDS is reported for line 14: Synchronized static method calls another synchronized static method 'internalGetElements' with the same lock held