MCPcopy Index your code
hub / github.com/HtmlUnit/htmlunit / year

Method year

src/test/java/org/htmlunit/CodeStyleTest.java:197–202  ·  view source on GitHub ↗

Checks the year in the source.

(final List<String> lines, final String path)

Source from the content-addressed store, hash-verified

195 * Checks the year in the source.
196 */
197 private void year(final List<String> lines, final String path) {
198 final int year = Calendar.getInstance(Locale.ROOT).get(Calendar.YEAR);
199 if (lines.size() < 2 || !lines.get(1).contains("Copyright (c) 2002-" + year)) {
200 addFailure(path, lines.size() < 2 ? 0 : 1, "Incorrect year");
201 }
202 }
203
204 /**
205 * Checks the JavaDoc first line, it should not be empty, and should not start with lower-case.

Callers 1

processMethod · 0.95

Calls 5

addFailureMethod · 0.95
containsMethod · 0.65
getMethod · 0.45
getInstanceMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected