jdk/test/java/lang/StringBuffer/TestSynchronization.java
changeset 17210 8a90d05f28d8
parent 14856 92a1bcf46888
child 23010 6dadb192ad81
equal deleted inserted replaced
17209:6f556e154816 17210:8a90d05f28d8
    94         // Get all unsynchronized public methods via reflection.  We don't need
    94         // Get all unsynchronized public methods via reflection.  We don't need
    95         // to test synchronized methods.  By definition. they are already doing
    95         // to test synchronized methods.  By definition. they are already doing
    96         // the right thing.
    96         // the right thing.
    97         List<Method> methods = Arrays.asList(aClass.getDeclaredMethods());
    97         List<Method> methods = Arrays.asList(aClass.getDeclaredMethods());
    98         for (Method m : methods) {
    98         for (Method m : methods) {
       
    99             // skip synthetic methods, like default interface methods and lambdas
       
   100             if (m.isSynthetic()) {
       
   101                 continue;
       
   102             }
    99             int modifiers = m.getModifiers();
   103             int modifiers = m.getModifiers();
   100             if (Modifier.isPublic(modifiers)
   104             if (Modifier.isPublic(modifiers)
   101                     && !Modifier.isSynchronized(modifiers)) {
   105                     && !Modifier.isSynchronized(modifiers)) {
   102                 try {
   106                 try {
   103                     testMethod(aClass, m);
   107                     testMethod(aClass, m);