Browse Source

Move Yaml utils to com.dmdirc.util.io.yaml bundle.

Issue #750
pull/763/head
Chris Smith 7 years ago
parent
commit
39ba4c7707

+ 3
- 0
build.gradle View File

45
     bundle group: 'com.google.guava', name:'guava', version: '19.0'
45
     bundle group: 'com.google.guava', name:'guava', version: '19.0'
46
     bundle group: 'net.engio', name: 'mbassador', version: '1.3.0'
46
     bundle group: 'net.engio', name: 'mbassador', version: '1.3.0'
47
     bundle group: 'com.google.code.gson', name: 'gson', 'version': '2.5'
47
     bundle group: 'com.google.code.gson', name: 'gson', 'version': '2.5'
48
+
48
     bundle group: 'com.dmdirc', name: 'com.dmdirc.events.eventbus', version: '+', changing: true
49
     bundle group: 'com.dmdirc', name: 'com.dmdirc.events.eventbus', version: '+', changing: true
50
+    bundle group: 'com.dmdirc', name: 'com.dmdirc.util.io.yaml', version: '+', changing: true
51
+
49
     bundle group: 'com.dmdirc', name: 'api', version: '+', changing: true
52
     bundle group: 'com.dmdirc', name: 'api', version: '+', changing: true
50
     bundle group: 'com.dmdirc', name: 'util', version: '+', changing: true
53
     bundle group: 'com.dmdirc', name: 'util', version: '+', changing: true
51
     bundle group: 'com.dmdirc', name: 'parser-common', version: '+', changing: true
54
     bundle group: 'com.dmdirc', name: 'parser-common', version: '+', changing: true

+ 55
- 0
bundles/com.dmdirc.util.io.yaml/build.gradle View File

1
+/*
2
+ * Copyright (c) 2006-2017 DMDirc Developers
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
5
+ * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
6
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
7
+ * permit persons to whom the Software is furnished to do so, subject to the following conditions:
8
+ *
9
+ * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
10
+ * Software.
11
+ *
12
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
13
+ * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
14
+ * OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
15
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
16
+ */
17
+
18
+plugins {
19
+  id 'java'
20
+  id 'findbugs'
21
+  id 'pmd'
22
+  id 'idea'
23
+}
24
+
25
+group = 'com.dmdirc'
26
+
27
+idea {
28
+    module {
29
+         sourceDirs += file('src/main/generated')
30
+         testSourceDirs += file('src/test/generated_tests')
31
+         generatedSourceDirs = [file('src/main/generated'), file('src/test/generated_tests')]
32
+    }
33
+}
34
+
35
+configurations.all {
36
+    resolutionStrategy.cacheDynamicVersionsFor 2, 'minutes'
37
+    resolutionStrategy.cacheChangingModulesFor 2, 'minutes'
38
+}
39
+
40
+dependencies {
41
+    compile group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1'
42
+    compile group: 'org.slf4j', name: 'slf4j-api', version:'1.7.21'
43
+    compile group: 'com.esotericsoftware.yamlbeans', name: 'yamlbeans', version: '1.09'
44
+
45
+    testCompile group: 'junit', name: 'junit', version: '4.12'
46
+    testCompile group: 'org.mockito', name: 'mockito-core', version: '1.10.19'
47
+}
48
+
49
+sourceCompatibility = 1.8
50
+targetCompatibility = 1.8
51
+
52
+repositories {
53
+    mavenCentral()
54
+}
55
+

src/main/java/com/dmdirc/util/BaseYamlStore.java → bundles/com.dmdirc.util.io.yaml/src/main/java/com/dmdirc/util/io/yaml/BaseYamlStore.java View File

15
  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15
  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
16
  */
16
  */
17
 
17
 
18
-package com.dmdirc.util;
18
+package com.dmdirc.util.io.yaml;
19
 
19
 
20
+import com.esotericsoftware.yamlbeans.YamlReader;
21
+import com.esotericsoftware.yamlbeans.YamlWriter;
20
 import java.io.IOException;
22
 import java.io.IOException;
21
 import java.io.InputStream;
23
 import java.io.InputStream;
22
 import java.io.InputStreamReader;
24
 import java.io.InputStreamReader;
28
 import java.util.Collection;
30
 import java.util.Collection;
29
 import java.util.List;
31
 import java.util.List;
30
 import java.util.Optional;
32
 import java.util.Optional;
31
-
32
 import org.slf4j.Logger;
33
 import org.slf4j.Logger;
33
 import org.slf4j.LoggerFactory;
34
 import org.slf4j.LoggerFactory;
34
 
35
 
35
-import com.esotericsoftware.yamlbeans.YamlReader;
36
-import com.esotericsoftware.yamlbeans.YamlWriter;
37
-
38
-import static com.dmdirc.util.YamlReaderUtils.asList;
36
+import static com.dmdirc.util.io.yaml.YamlReaderUtils.asList;
39
 import static java.util.stream.Collectors.toList;
37
 import static java.util.stream.Collectors.toList;
40
 
38
 
41
 /**
39
 /**
43
  */
41
  */
44
 public abstract class BaseYamlStore<T> {
42
 public abstract class BaseYamlStore<T> {
45
 
43
 
46
-    /** The charset to use when reading and writing files. */
44
+    /**
45
+     * The charset to use when reading and writing files.
46
+     */
47
     private static final String CHARSET = "UTF-8";
47
     private static final String CHARSET = "UTF-8";
48
 
48
 
49
-    /** Logger to use. */
49
+    /**
50
+     * Logger to use.
51
+     */
50
     private static final Logger LOG = LoggerFactory.getLogger(BaseYamlStore.class);
52
     private static final Logger LOG = LoggerFactory.getLogger(BaseYamlStore.class);
51
 
53
 
52
     /**
54
     /**
53
      * Reads a list of items from the YAML file at the specified path.
55
      * Reads a list of items from the YAML file at the specified path.
54
-     *
55
-     * <p>Each item is converted from an object into some form of model by invoking the
56
-     * {@link #convertFromYaml} method.
56
+     * <p>
57
+     * Each item is converted from an object into some form of model by invoking the {@link #convertFromYaml} method.
57
      *
58
      *
58
      * @param path The path of the file to read.
59
      * @param path The path of the file to read.
59
      * @return A list of successfully converted model objects.
60
      * @return A list of successfully converted model objects.
62
         final List<T> results = new ArrayList<>();
63
         final List<T> results = new ArrayList<>();
63
         if (Files.exists(path)) {
64
         if (Files.exists(path)) {
64
             try (final InputStream stream = Files.newInputStream(path);
65
             try (final InputStream stream = Files.newInputStream(path);
65
-                    final InputStreamReader reader = new InputStreamReader(stream, CHARSET)) {
66
+                 final InputStreamReader reader = new InputStreamReader(stream, CHARSET)) {
66
                 final YamlReader yamlReader = new YamlReader(reader);
67
                 final YamlReader yamlReader = new YamlReader(reader);
67
                 results.addAll(asList(yamlReader.read(), this::convertFromYaml));
68
                 results.addAll(asList(yamlReader.read(), this::convertFromYaml));
68
                 yamlReader.close();
69
                 yamlReader.close();
75
 
76
 
76
     /**
77
     /**
77
      * Writes a collection of items to a YAML file at the specified path.
78
      * Writes a collection of items to a YAML file at the specified path.
78
-     *
79
-     * <p>Each item is converted into a "plain" object by invoking the {@link #convertToYaml}
80
-     * method.
79
+     * <p>
80
+     * Each item is converted into a "plain" object by invoking the {@link #convertToYaml} method.
81
      *
81
      *
82
      * @param path The path of the file to write.
82
      * @param path The path of the file to write.
83
      * @param items A collection of items to write.
83
      * @param items A collection of items to write.
84
      */
84
      */
85
     protected void write(final Path path, final Collection<T> items) {
85
     protected void write(final Path path, final Collection<T> items) {
86
         try (final OutputStream stream = Files.newOutputStream(path);
86
         try (final OutputStream stream = Files.newOutputStream(path);
87
-                final OutputStreamWriter writer = new OutputStreamWriter(stream, CHARSET)) {
87
+             final OutputStreamWriter writer = new OutputStreamWriter(stream, CHARSET)) {
88
             final YamlWriter yamlWriter = new YamlWriter(writer);
88
             final YamlWriter yamlWriter = new YamlWriter(writer);
89
             yamlWriter.write(items.parallelStream().map(this::convertToYaml).collect(toList()));
89
             yamlWriter.write(items.parallelStream().map(this::convertToYaml).collect(toList()));
90
             yamlWriter.close();
90
             yamlWriter.close();
91
         } catch (IOException ex) {
91
         } catch (IOException ex) {
92
-            LOG.error(LogUtils.USER_ERROR, "Unable to write to {}", path, ex);
92
+            LOG.warn("Unable to write to {}", path, ex);
93
         }
93
         }
94
     }
94
     }
95
 
95
 

src/main/java/com/dmdirc/util/YamlReaderUtils.java → bundles/com.dmdirc.util.io.yaml/src/main/java/com/dmdirc/util/io/yaml/YamlReaderUtils.java View File

15
  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15
  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
16
  */
16
  */
17
 
17
 
18
-package com.dmdirc.util;
19
-
18
+package com.dmdirc.util.io.yaml;
20
 
19
 
21
 import java.util.List;
20
 import java.util.List;
22
 import java.util.Map;
21
 import java.util.Map;
23
 import java.util.Optional;
22
 import java.util.Optional;
24
 import java.util.function.Function;
23
 import java.util.function.Function;
25
 import java.util.stream.Collectors;
24
 import java.util.stream.Collectors;
26
-
27
 import javax.annotation.Nullable;
25
 import javax.annotation.Nullable;
28
 
26
 
29
-import static com.google.common.base.Preconditions.checkNotNull;
30
-
31
 /**
27
 /**
32
  * Provides utility methods for classes that read from YAML files.
28
  * Provides utility methods for classes that read from YAML files.
33
  */
29
  */
43
      * suppression to be reduced just to the single line.
39
      * suppression to be reduced just to the single line.
44
      *
40
      *
45
      * @param map The wildcard map to be cast.
41
      * @param map The wildcard map to be cast.
46
-     *
47
      * @return A usable object-to-object map.
42
      * @return A usable object-to-object map.
48
      */
43
      */
49
     @SuppressWarnings("unchecked")
44
     @SuppressWarnings("unchecked")
57
      * suppression to be reduced just to the single line.
52
      * suppression to be reduced just to the single line.
58
      *
53
      *
59
      * @param list The wildcard list to be cast.
54
      * @param list The wildcard list to be cast.
60
-     *
61
      * @return A usable object list.
55
      * @return A usable object list.
62
      */
56
      */
63
     @SuppressWarnings("unchecked")
57
     @SuppressWarnings("unchecked")
69
      * Checks that the specified object is a map, and casts it.
63
      * Checks that the specified object is a map, and casts it.
70
      *
64
      *
71
      * @param object The object to be cast.
65
      * @param object The object to be cast.
72
-     *
73
      * @return The given object cast as a map.
66
      * @return The given object cast as a map.
74
-     *
75
      * @throws IllegalArgumentException If the specified object is not a map.
67
      * @throws IllegalArgumentException If the specified object is not a map.
76
      */
68
      */
77
-    public static Map<Object, Object> asMap(@Nullable final Object object)
78
-            throws IllegalArgumentException {
69
+    public static Map<Object, Object> asMap(@Nullable final Object object) throws IllegalArgumentException {
79
         if (object instanceof Map) {
70
         if (object instanceof Map) {
80
             return uncheckedCast((Map<?, ?>) object);
71
             return uncheckedCast((Map<?, ?>) object);
81
         }
72
         }
82
 
73
 
83
-        throw new IllegalArgumentException("Unexpected element. Found "
84
-                + simpleName(object) + ", expected Map");
74
+        throw new IllegalArgumentException("Unexpected element. Found " + simpleName(object) + ", expected Map");
85
     }
75
     }
86
 
76
 
87
     /**
77
     /**
88
      * Checks that the specified object is a list, and casts it.
78
      * Checks that the specified object is a list, and casts it.
89
      *
79
      *
90
      * @param object The object to be cast.
80
      * @param object The object to be cast.
91
-     *
92
      * @return The given object cast as a list.
81
      * @return The given object cast as a list.
93
-     *
94
      * @throws IllegalArgumentException If the specified object is not a list.
82
      * @throws IllegalArgumentException If the specified object is not a list.
95
      */
83
      */
96
-    public static List<Object> asList(@Nullable final Object object)
97
-            throws IllegalArgumentException {
84
+    public static List<Object> asList(@Nullable final Object object) throws IllegalArgumentException {
98
         if (object instanceof List) {
85
         if (object instanceof List) {
99
             return uncheckedCast((List<?>) object);
86
             return uncheckedCast((List<?>) object);
100
         }
87
         }
101
 
88
 
102
-        throw new IllegalArgumentException("Unexpected element. Found "
103
-                + simpleName(object) + ", expected List");
89
+        throw new IllegalArgumentException("Unexpected element. Found " + simpleName(object) + ", expected List");
104
     }
90
     }
105
 
91
 
106
     /**
92
     /**
107
      * Checks that the specified object is a list, and casts it.
93
      * Checks that the specified object is a list, and casts it.
108
      *
94
      *
109
      * @param object The object to be cast.
95
      * @param object The object to be cast.
110
-     * @param convertor The function to use to convert each list member to the desired type.
111
-     *
96
+     * @param converter The function to use to convert each list member to the desired type.
112
      * @return The given object cast as a list.
97
      * @return The given object cast as a list.
113
-     *
114
      * @throws IllegalArgumentException If the specified object is not a list.
98
      * @throws IllegalArgumentException If the specified object is not a list.
115
      */
99
      */
116
-    public static <T> List<T> asList(@Nullable final Object object,
117
-            final Function<Object, Optional<T>> convertor) throws IllegalArgumentException {
100
+    public static <T> List<T> asList(@Nullable final Object object, final Function<Object, Optional<T>> converter)
101
+            throws IllegalArgumentException {
118
         return asList(object).parallelStream()
102
         return asList(object).parallelStream()
119
-                .map(convertor).filter(Optional::isPresent)
120
-                .map(Optional::get).collect(Collectors.toList());
103
+                .map(converter)
104
+                .filter(Optional::isPresent)
105
+                .map(Optional::get)
106
+                .collect(Collectors.toList());
121
     }
107
     }
122
 
108
 
123
     /**
109
     /**
125
      *
111
      *
126
      * @param map The map to retrieve the entry from.
112
      * @param map The map to retrieve the entry from.
127
      * @param key The key of the entry to retrieve.
113
      * @param key The key of the entry to retrieve.
128
-     *
129
      * @return The string representation of the value of the key.
114
      * @return The string representation of the value of the key.
130
-     *
131
      * @throws IllegalArgumentException If the specified key is not present, or is empty.
115
      * @throws IllegalArgumentException If the specified key is not present, or is empty.
132
      */
116
      */
133
     public static String requiredString(final Map<Object, Object> map, final String key)
117
     public static String requiredString(final Map<Object, Object> map, final String key)
134
             throws IllegalArgumentException {
118
             throws IllegalArgumentException {
135
-        checkNotNull(map);
136
-        checkNotNull(key);
137
-
138
         if (!map.containsKey(key)) {
119
         if (!map.containsKey(key)) {
139
             throw new IllegalArgumentException("Required key not present: " + key);
120
             throw new IllegalArgumentException("Required key not present: " + key);
140
         }
121
         }
152
      *
133
      *
153
      * @param map The map to retrieve the entry from.
134
      * @param map The map to retrieve the entry from.
154
      * @param key The key of the entry to retrieve.
135
      * @param key The key of the entry to retrieve.
155
-     *
156
      * @return The string value of the entry with the given key, or {@code null} if not present.
136
      * @return The string value of the entry with the given key, or {@code null} if not present.
157
      */
137
      */
158
     @Nullable
138
     @Nullable
159
     public static String optionalString(final Map<Object, Object> map, final String key) {
139
     public static String optionalString(final Map<Object, Object> map, final String key) {
160
-        checkNotNull(map);
161
-        checkNotNull(key);
162
-
163
         final Object value = map.get(key);
140
         final Object value = map.get(key);
164
         return value == null ? null : value.toString();
141
         return value == null ? null : value.toString();
165
     }
142
     }
168
      * Gets the simple name of the given object's class.
145
      * Gets the simple name of the given object's class.
169
      *
146
      *
170
      * @param object The object to get the class name of
147
      * @param object The object to get the class name of
171
-     *
172
      * @return The simple class name of the object, or the string {@code "null"}.
148
      * @return The simple class name of the object, or the string {@code "null"}.
173
      */
149
      */
174
     private static String simpleName(@Nullable final Object object) {
150
     private static String simpleName(@Nullable final Object object) {

+ 6
- 1
settings.gradle View File

1
 include 'api'
1
 include 'api'
2
-include 'bundles:com.dmdirc.events.eventbus'
2
+
3
+// Include all bundles
4
+new File(rootDir, 'bundles').eachDir() { File dir ->
5
+  include 'bundles:' + dir.name
6
+}
7
+

+ 3
- 3
src/main/java/com/dmdirc/commandparser/aliases/YamlAliasStore.java View File

17
 
17
 
18
 package com.dmdirc.commandparser.aliases;
18
 package com.dmdirc.commandparser.aliases;
19
 
19
 
20
-import com.dmdirc.util.BaseYamlStore;
20
+import com.dmdirc.util.io.yaml.BaseYamlStore;
21
 
21
 
22
 import java.nio.file.Path;
22
 import java.nio.file.Path;
23
 import java.util.HashMap;
23
 import java.util.HashMap;
29
 import org.slf4j.Logger;
29
 import org.slf4j.Logger;
30
 import org.slf4j.LoggerFactory;
30
 import org.slf4j.LoggerFactory;
31
 
31
 
32
-import static com.dmdirc.util.YamlReaderUtils.asMap;
33
-import static com.dmdirc.util.YamlReaderUtils.requiredString;
32
+import static com.dmdirc.util.io.yaml.YamlReaderUtils.asMap;
33
+import static com.dmdirc.util.io.yaml.YamlReaderUtils.requiredString;
34
 
34
 
35
 /**
35
 /**
36
  * Store that reads and writes aliases from a YAML file on disk.
36
  * Store that reads and writes aliases from a YAML file on disk.

+ 4
- 4
src/main/java/com/dmdirc/commandparser/auto/YamlAutoCommandStore.java View File

17
 
17
 
18
 package com.dmdirc.commandparser.auto;
18
 package com.dmdirc.commandparser.auto;
19
 
19
 
20
-import com.dmdirc.util.BaseYamlStore;
20
+import com.dmdirc.util.io.yaml.BaseYamlStore;
21
 
21
 
22
 import java.nio.file.Path;
22
 import java.nio.file.Path;
23
 import java.util.HashMap;
23
 import java.util.HashMap;
29
 import org.slf4j.Logger;
29
 import org.slf4j.Logger;
30
 import org.slf4j.LoggerFactory;
30
 import org.slf4j.LoggerFactory;
31
 
31
 
32
-import static com.dmdirc.util.YamlReaderUtils.asMap;
33
-import static com.dmdirc.util.YamlReaderUtils.optionalString;
34
-import static com.dmdirc.util.YamlReaderUtils.requiredString;
32
+import static com.dmdirc.util.io.yaml.YamlReaderUtils.asMap;
33
+import static com.dmdirc.util.io.yaml.YamlReaderUtils.optionalString;
34
+import static com.dmdirc.util.io.yaml.YamlReaderUtils.requiredString;
35
 
35
 
36
 /**
36
 /**
37
  * Store that reads and writes auto-commands from a YAML file on disk.
37
  * Store that reads and writes auto-commands from a YAML file on disk.

+ 2
- 2
src/main/java/com/dmdirc/config/prefs/reader/CategoryReader.java View File

24
 import java.util.List;
24
 import java.util.List;
25
 import java.util.Map;
25
 import java.util.Map;
26
 
26
 
27
-import static com.dmdirc.util.YamlReaderUtils.optionalString;
28
-import static com.dmdirc.util.YamlReaderUtils.requiredString;
27
+import static com.dmdirc.util.io.yaml.YamlReaderUtils.optionalString;
28
+import static com.dmdirc.util.io.yaml.YamlReaderUtils.requiredString;
29
 import static com.google.common.base.Preconditions.checkNotNull;
29
 import static com.google.common.base.Preconditions.checkNotNull;
30
 
30
 
31
 /**
31
 /**

+ 2
- 2
src/main/java/com/dmdirc/config/prefs/reader/PreferencesReader.java View File

34
 
34
 
35
 import com.esotericsoftware.yamlbeans.YamlReader;
35
 import com.esotericsoftware.yamlbeans.YamlReader;
36
 
36
 
37
-import static com.dmdirc.util.YamlReaderUtils.asList;
38
-import static com.dmdirc.util.YamlReaderUtils.asMap;
37
+import static com.dmdirc.util.io.yaml.YamlReaderUtils.asList;
38
+import static com.dmdirc.util.io.yaml.YamlReaderUtils.asMap;
39
 import static com.google.common.base.Preconditions.checkNotNull;
39
 import static com.google.common.base.Preconditions.checkNotNull;
40
 
40
 
41
 /**
41
 /**

+ 5
- 5
src/main/java/com/dmdirc/config/profiles/YamlProfileStore.java View File

17
 
17
 
18
 package com.dmdirc.config.profiles;
18
 package com.dmdirc.config.profiles;
19
 
19
 
20
-import com.dmdirc.util.BaseYamlStore;
20
+import com.dmdirc.util.io.yaml.BaseYamlStore;
21
 
21
 
22
 import java.nio.file.Path;
22
 import java.nio.file.Path;
23
 import java.util.Collection;
23
 import java.util.Collection;
30
 import org.slf4j.Logger;
30
 import org.slf4j.Logger;
31
 import org.slf4j.LoggerFactory;
31
 import org.slf4j.LoggerFactory;
32
 
32
 
33
-import static com.dmdirc.util.YamlReaderUtils.asList;
34
-import static com.dmdirc.util.YamlReaderUtils.asMap;
35
-import static com.dmdirc.util.YamlReaderUtils.optionalString;
36
-import static com.dmdirc.util.YamlReaderUtils.requiredString;
33
+import static com.dmdirc.util.io.yaml.YamlReaderUtils.asList;
34
+import static com.dmdirc.util.io.yaml.YamlReaderUtils.asMap;
35
+import static com.dmdirc.util.io.yaml.YamlReaderUtils.optionalString;
36
+import static com.dmdirc.util.io.yaml.YamlReaderUtils.requiredString;
37
 
37
 
38
 /**
38
 /**
39
  * Store that reads and writes profiles from a YAML file on disk.
39
  * Store that reads and writes profiles from a YAML file on disk.

+ 1
- 1
src/main/java/com/dmdirc/ui/messages/YamlEventFormatProvider.java View File

38
 
38
 
39
 import static com.dmdirc.util.LogUtils.FATAL_APP_ERROR;
39
 import static com.dmdirc.util.LogUtils.FATAL_APP_ERROR;
40
 import static com.dmdirc.util.LogUtils.USER_ERROR;
40
 import static com.dmdirc.util.LogUtils.USER_ERROR;
41
-import static com.dmdirc.util.YamlReaderUtils.asMap;
41
+import static com.dmdirc.util.io.yaml.YamlReaderUtils.asMap;
42
 
42
 
43
 /**
43
 /**
44
  * YAML-backed supplier of event formats.
44
  * YAML-backed supplier of event formats.

Loading…
Cancel
Save