addWarn(FNP_NOT_SET);
addWarn(CoreConstants.SEE_FNP_NOT_SET);
throw new IllegalStateException(FNP_NOT_SET + CoreConstants.SEE_FNP_NOT_SET);
}
DateTokenConverter dtc = fileNamePattern.getDateTokenConverter();
if (dtc == null) {
throw new IllegalStateException("FileNamePattern ["
+ fileNamePattern.getPattern()
+ "] does not contain a valid DateToken");
}
int len = fileNamePatternStr.length();
switch (compressionMode) {
case GZ:
activeFileNamePattern = new FileNamePattern(fileNamePatternStr.substring(
0, len - 3), this.context);
break;
case ZIP:
activeFileNamePattern = new FileNamePattern(fileNamePatternStr.substring(
0, len - 4), this.context);
break;
case NONE:
activeFileNamePattern = fileNamePattern;
}
addInfo("Will use the pattern " + activeFileNamePattern
+ " for the active file");
rc = new RollingCalendar();
rc.init(dtc.getDatePattern());
addInfo("The date pattern is '" + dtc.getDatePattern()
+ "' from file name pattern '" + fileNamePattern.getPattern() + "'.");
rc.printPeriodicity(this);
// lastCheck can be set by test classes
// if it has not been set, we set it here