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 {
6666 * @param configClass The class to process.
6767 * @return The configuration elements.
6868 */
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 {
7071 val cfg = Optional
7172 .ofNullable (configClass .getAnnotation (Config .class ))
7273 .orElseThrow (() -> new ConfigException ("Class " + configClass .getName () + " does not have a @Config annotation!" ));
@@ -78,7 +79,7 @@ public static List<? extends IConfigElement<?>> getConfigElements(Class<?> confi
7879 .orElseThrow (() -> new ConfigException ("Tried to get config elements for non-registed config class!" ));
7980 val category = cfg .category ();
8081 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 , () -> {
8283 try {
8384 processConfigInternal (configClass , category , rawConfig );
8485 rawConfig .save ();
You can’t perform that action at this time.
0 commit comments