mirror of
https://github.com/CarmJos/EasyConfiguration.git
synced 2026-06-04 10:38:19 +08:00
feat(section): Add ConfigureSection#asMap function
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<artifactId>easyconfiguration-parent</artifactId>
|
||||
<groupId>cc.carm.lib</groupId>
|
||||
<version>4.0.8</version>
|
||||
<version>4.0.9</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<properties>
|
||||
|
||||
@@ -109,12 +109,12 @@ public class SQLSource extends ConfigureSource<SourcedSection, Map<String, Objec
|
||||
@Nullable Object value = section.get(path);
|
||||
|
||||
if (value instanceof SourcedSection) {
|
||||
value = ((SourcedSection) value).rawMap();
|
||||
value = ((SourcedSection) value).asMap();
|
||||
} else if (value instanceof List<?>) {
|
||||
List<Object> list = new ArrayList<>();
|
||||
for (Object obj : (List<?>) value) {
|
||||
if (obj instanceof SourcedSection) {
|
||||
list.add(((SourcedSection) obj).rawMap());
|
||||
list.add(((SourcedSection) obj).asMap());
|
||||
} else {
|
||||
list.add(obj);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user