1
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:
2025-03-04 01:06:21 +08:00
parent 251dd208af
commit c2a9e2254c
19 changed files with 119 additions and 91 deletions
+1 -1
View File
@@ -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);
}