/** @param tl mpl | apache | cpl */
public void setLicense(String tl) {
- License input = (License) LICENSES.get(tl);
+ License input = LICENSES.get(tl);
if (null == input) {
throw new BuildException("no license known for " + tl);
}
}
/** list known licenses or check source tree */
+ @Override
public void execute() throws BuildException {
if (list) {
list();
private void replaceHeaders() {
class YearVisitor implements FileVisitor {
+ @Override
public void visit(File file) {
HeaderInfo info = Header.checkFile(file);
if (!Header.replaceHeader(file, info)) {
private void getYears() {
final PrintStream out = getOut();
class YearVisitor implements FileVisitor {
+ @Override
public void visit(File file) {
HeaderInfo info = Header.checkFile(file);
out.println(info.toString());
int failed = 0;
int passed = 0;
+ @Override
public void visit(File file) {
if (license.checkFile(file)) {
passed++;
/** acceptable years for copyright prefix to company - append " " */
static final String[] YEARS = // remove older after license xfer?
new String[] { "2002 ", "2003 ", "2004 ", "2005", "2006", "2007", "2008",
- "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2001 ", "2000 ",
+ "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2001 ", "2000 ",
"1999 " };
public final String tag;
public final String license;
return gotValidFile();
}
+ @Override
public String toString() {
return tag;
}
}
}
+ @Override
public String toString() {
return file.getPath() + ":" + lastLine + " " + years;
}