Skip to content

Commit

Permalink
try #2 not sure if works.
Browse files Browse the repository at this point in the history
  • Loading branch information
karelmikie3 committed Oct 6, 2016
1 parent 29023ee commit 3b8f5eb
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ private static List<String> mainMapCollectionWriter(Field field, Map<Object, Obj
}

private static <K,V> void mainMapReader(String variable, BufferedReader reader, Class<?> configClass, Map<K,V> tempMap, HxCConfig HxCConfigClass) throws NoSuchFieldException, ClassNotFoundException, IOException, IllegalAccessException {
reader.mark(1000000);
Field field = configClass.getDeclaredField(variable);

HashMap<String, Object> keyInfo = new HashMap<>();
Expand Down
13 changes: 7 additions & 6 deletions src/test/java/hxckdms/hxcconfig/RandomConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@

@Config
public class RandomConfig {

public static LinkedHashMap<Integer, String> test = new LinkedHashMap<Integer, String>(){{
put(5, "fdsa");
put(43, "fads");
put(54, "asdvnilas");
}};

public static LinkedHashMap<Integer, Blue> blues = new LinkedHashMap<Integer, Blue>(){{
put(5, new Blue(532, 543, 52, 235));
put(543, new Blue(543, 1234, 4123, 532462));
put(645, new Blue(432, 5423, 876, 45));
put(34, new Blue(543, 77, 687, 87));
put(345, new Blue(6543, 87, 786, 645));
}};

public static LinkedHashMap<Integer, String> test = new LinkedHashMap<Integer, String>(){{
put(5, "fdsa");
put(43, "fads");
put(54, "asdvnilas");
}};
}
28 changes: 14 additions & 14 deletions test/testConfig.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,41 @@
##########################################################################################################

General {
test=[
5=fdsa
43=fads
54=asdvnilas
]
blues=[
5=[
xx=532
yy=654
yy=543
zz=52
asdf=235.0
]
543=[
xx=543
yy=453
yy=1234
zz=4123
asdf=532462.0
]
645=[
xx=431
xx=432
yy=5423
zz=876
asdf=45.0
]
34=[
xx=543543
yy=77453
zz=12435
asdf=543.0
xx=543
yy=77
zz=687
asdf=87.0
]
345=[
xx=6543
yy=87543
yy=87
zz=786
asdf=5432.0
asdf=645.0
]
]
test=[
5=fdsavsa
43=fadsfasd
54=gfsd
]
}

0 comments on commit 3b8f5eb

Please sign in to comment.