@@ -5,7 +5,7 @@
Loading
5 5
package org.mockito.internal.matchers.text;
6 6
7 7
import static org.mockito.internal.util.ObjectMethodsGuru.isToStringMethod;
8 -
import static org.mockito.internal.util.StringUtil.decamelizeMatcher;
8 +
import static org.mockito.internal.util.StringUtil.decamelizeMatcherName;
9 9
10 10
import java.lang.reflect.Method;
11 11
@@ -37,6 +37,17 @@
Loading
37 37
            }
38 38
            cls = cls.getSuperclass();
39 39
        }
40 -
        return decamelizeMatcher(matcher.getClass().getSimpleName());
40 +
41 +
        String matcherName;
42 +
        Class<?> matcherClass = matcher.getClass();
43 +
        // Lambdas have non-empty getSimpleName() (despite being synthetic)
44 +
        // but that name is not useful for user
45 +
        if (matcherClass.isSynthetic()) {
46 +
            matcherName = "";
47 +
        } else {
48 +
            matcherName = matcherClass.getSimpleName();
49 +
        }
50 +
51 +
        return decamelizeMatcherName(matcherName);
41 52
    }
42 53
}

@@ -60,7 +60,7 @@
Loading
60 60
        return out.substring(0, out.length() - 1); // lose last EOL
61 61
    }
62 62
63 -
    public static String decamelizeMatcher(String className) {
63 +
    public static String decamelizeMatcherName(String className) {
64 64
        if (className.length() == 0) {
65 65
            return "<custom argument matcher>";
66 66
        }
Files Complexity Coverage
src/main/java/org/mockito 85.60% 84.92%
subprojects 79.06% 85.34%
Project Totals (325 files) 85.52% 84.93%
4814.3
openjdk11=
TRAVIS_OS_NAME=linux
4814.2
TRAVIS_OS_NAME=linux
openjdk8=
4814.1
TRAVIS_OS_NAME=linux
openjdk8=
4814.4
openjdk11=
TRAVIS_OS_NAME=linux
4814.6
TRAVIS_OS_NAME=linux
openjdk14=
4814.5
TRAVIS_OS_NAME=linux
openjdk14=

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading