@@ -63,13 +63,11 @@
Loading
63 63
            throw new IllegalArgumentException("Method parameter type must not be null.");
64 64
        }
65 65
66 -
        // The generic type may contain the generic type declarations, e.g. List<String>.
66 +
        // Only the ParametrizedType contains reflection information about the actual type.
67 67
        if (!(type instanceof ParameterizedType)) {
68 68
            throw new IllegalArgumentException("Cannot obtain the component type of " + type +
69 69
                    ", it does not declare generic type parameters.");
70 70
        }
71 -
72 -
        // Only the ParametrizedType contains reflection information about the actual type.
73 71
        ParameterizedType parameterizedType = (ParameterizedType) type;
74 72
        Type[] typeArguments = parameterizedType.getActualTypeArguments();
75 73
@@ -105,14 +103,14 @@
Loading
105 103
            // It cannot be resolved - we must look at the boundaries.
106 104
            Type[] bounds = variable.getBounds();
107 105
108 -
            // Type variables only have upper bounds. There are now four options:
106 +
            // Type variables only have upper bounds. There are now five options:
109 107
110 108
            // 1: There are multiple boundaries, e.g. <? extends A & B>, which means the type cannot be derived. Bail.
111 109
            if (bounds.length != 1) {
112 110
                return null;
113 111
            }
114 112
115 -
            // 2: There is one boundary, and it is java.lan.Object. This means there is none. Bail.
113 +
            // 2: There is one boundary, and it is java.lang.Object. This means there is no boundary. Bail.
116 114
            if (bounds[0] == Object.class) {
117 115
                return null;
118 116
            }
@@ -127,6 +125,8 @@
Loading
127 125
                return resolveWildCard((WildcardType) bounds[0], assigningType);
128 126
            }
129 127
128 +
            // 5: At this point, we know there is exactly one boundary, which is not a generic symbol and not java.lang.Object.
129 +
            //    Thus, it must be the effective type, e.g. List<? extends SpecificType> -> SpecificType
130 130
            return bounds[0];
131 131
        }
132 132

@@ -138,5 +138,4 @@
Loading
138 138
                .findFirst()
139 139
                .orElse(null);
140 140
    }
141 -
142 141
}

@@ -91,7 +91,7 @@
Loading
91 91
            this.tailServlet.init(getServletConfig());
92 92
        } catch (Throwable t) {
93 93
            this.logger.error("Unable to initialize the tail servlet - the log viewer will not be available", t);
94 -
            // We have to catch and re-throw here, as Sling tends not to log exceptions thrown in servlet's init() methods.
94 +
            // We have to catch and re-throw here, as Sling tends not to log exceptions thrown in a servlet's init() method.
95 95
            throw new ServletException("Unable to initialize the tail servlet - the log viewer will not be available", t);
96 96
        } finally {
97 97
            currentThread().setContextClassLoader(ccl);
Files Complexity Coverage
api/src/main/java/io/neba/api 88.46% 89.36%
core/src/main/java/io/neba/core 81.08% 85.99%
spring/src/main/java/io/neba/spring 81.25% 86.26%
Project Totals (91 files) 81.25% 86.09%
904.1
TRAVIS_OS_NAME=linux
openjdk8=

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