File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/main/java/com/falsepattern/lib/config Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,8 @@ public static void registerConfig(Class<?> configClass) throws ConfigException {
66
66
* @param configClass The class to process.
67
67
* @return The configuration elements.
68
68
*/
69
- public static List <? extends IConfigElement <?>> getConfigElements (Class <?> configClass ) throws ConfigException {
69
+ @ SuppressWarnings ({"rawtypes" , "unchecked" })
70
+ public static List <IConfigElement > getConfigElements (Class <?> configClass ) throws ConfigException {
70
71
val cfg = Optional
71
72
.ofNullable (configClass .getAnnotation (Config .class ))
72
73
.orElseThrow (() -> new ConfigException ("Class " + configClass .getName () + " does not have a @Config annotation!" ));
@@ -78,7 +79,7 @@ public static List<? extends IConfigElement<?>> getConfigElements(Class<?> confi
78
79
.orElseThrow (() -> new ConfigException ("Tried to get config elements for non-registed config class!" ));
79
80
val category = cfg .category ();
80
81
val elements = new ConfigElement <>(rawConfig .getCategory (category )).getChildElements ();
81
- return elements .stream ().map ((element ) -> new IConfigElementProxy <>(( IConfigElement <?>) element , () -> {
82
+ return elements .stream ().map ((element ) -> new IConfigElementProxy ( element , () -> {
82
83
try {
83
84
processConfigInternal (configClass , category , rawConfig );
84
85
rawConfig .save ();
You can’t perform that action at this time.
0 commit comments