Make Cron.CronPattern.FIELDS immutable The List returned from Arrays.asList() is able to mutate the underlying array.
diff --git a/src/com/google/enterprise/adaptor/CronScheduler.java b/src/com/google/enterprise/adaptor/CronScheduler.java index 215fb89..f0f260a 100644 --- a/src/com/google/enterprise/adaptor/CronScheduler.java +++ b/src/com/google/enterprise/adaptor/CronScheduler.java
@@ -163,7 +163,8 @@ } private static class CronPattern { - private static final List<Field> FIELDS = Arrays.asList(Field.values()); + private static final List<Field> FIELDS + = Collections.unmodifiableList(Arrays.asList(Field.values())); private static enum Field { MINUTE(0, 60, Calendar.MINUTE, 0),