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

Method versionYear

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

Checks the year in the Version.

()

Source from the content-addressed store, hash-verified

380 * Checks the year in the {@link Version}.
381 */
382 private void versionYear() throws IOException {
383 final List<String> lines =
384 FileUtils.readLines(new File("src/main/java/org/htmlunit/Version.java"),
385 SOURCE_ENCODING);
386 for (final String line : lines) {
387 if (line.contains("return \"Copyright (c) 2002-" + Calendar.getInstance(Locale.ROOT).get(Calendar.YEAR))) {
388 return;
389 }
390 }
391 addFailure("src/main/java/org/htmlunit/Version.java", 0, "Incorrect year in Version.getCopyright()");
392 }
393
394 /**
395 * Verifies no &lt;parent&gt; tag in {@code pom.xml}.

Callers 1

codeStyleMethod · 0.95

Calls 4

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

Tested by

no test coverage detected