Skip to content

Commit b3f9943

Browse files
author
Vladimir Kotal
committed
throw UnsupportedOperationException from unused RepositoryDateFormat methods
fixes #2278
1 parent c491b5b commit b3f9943

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/history/Repository.java

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -531,10 +531,7 @@ private class RepositoryDateFormat extends DateFormat {
531531

532532
@Override
533533
public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {
534-
for (DateFormat formatter : formatters) {
535-
return formatter.format(date, toAppendTo, fieldPosition);
536-
}
537-
return toAppendTo.append("(date null)");
534+
throw new UnsupportedOperationException("not implemented");
538535
}
539536

540537
@Override
@@ -568,13 +565,7 @@ public Date parse(String source) throws ParseException {
568565

569566
@Override
570567
public Date parse(String source, ParsePosition pos) {
571-
Date d = null;
572-
for (DateFormat formatter : formatters) {
573-
if ((d = formatter.parse(source, pos)) != null) {
574-
return d;
575-
}
576-
}
577-
return d;
568+
throw new UnsupportedOperationException("not implemented");
578569
}
579570
}
580571
}

0 commit comments

Comments
 (0)