return projectSnapshot != null ? projectSnapshot.getQualifier() : null;
}
- private Date getTargetDate() {
+ /**
+ * @deprecated in 4.2. Target date should only be used in labels.
+ */
+ @Deprecated
+ public Date getTargetDate() {
return targetDate;
}
public String toString() {
if (StringUtils.equals(mode, CoreProperties.TIMEMACHINE_MODE_VERSION)) {
String label = String.format("Compare to version %s", modeParameter);
- if (getTargetDate() != null) {
+ if (targetDate != null) {
label += String.format(" (%s)", DateUtils.formatDate(getDate()));
}
return label;
}
if (StringUtils.equals(mode, CoreProperties.TIMEMACHINE_MODE_DAYS)) {
- String label = String.format("Compare over %s days (%s", modeParameter, DateUtils.formatDate(getTargetDate()));
+ String label = String.format("Compare over %s days (%s", modeParameter, DateUtils.formatDate(targetDate));
if (isRelatedToSnapshot()) {
label += ", analysis of " + getDate();
}
return label;
}
if (StringUtils.equals(mode, CoreProperties.TIMEMACHINE_MODE_DATE)) {
- String label = "Compare to date " + DateUtils.formatDate(getTargetDate());
+ String label = "Compare to date " + DateUtils.formatDate(targetDate);
if (isRelatedToSnapshot()) {
label += String.format(" (analysis of %s)", DateUtils.formatDate(getDate()));
}