for (Field field : type.getDeclaredFields()) {
Meta meta = field.getAnnotation(Meta.class);
if (meta != null) {
- E id = E.valueOf(type, field.getName());
+ E id = Enum.valueOf(type, field.getName());
String info = getMetaInfo(meta);
if (info != null) {
}
}
}
-
+
/**
* Take a snapshot of the changes in memory in this {@link Bundle} made by
* the "set" methods ( {@link Bundle#setString(Enum, String)}...) at the
if (snap instanceof Map) {
changeMap = (Map<String, String>) snap;
} else {
- throw new Error(
+ throw new RuntimeException(
"Restoring changes in a Bundle must be done on a changes snapshot, "
+ "or NULL to discard current changes");
}
file = new File(dir, name + loc + ".properties");
if (file.exists()) {
break;
- } else {
- file = null;
}
+
+ file = null;
}
return file;