• R/O
  • SSH
  • HTTPS

aoiro: Commit


Commit MetaInfo

Revisão21 (tree)
Hora2019-02-24 12:14:43
Autorhirukawa_ryo

Mensagem de Log

* aoiro 0.3.2 ビルド環境をJava11に変更しました。依存ライブラリのバージョンを上げました。32ビットのサポートを終了し、今後は64ビット版ビルドのみとします。

Mudança Sumário

Diff

--- aoiro/trunk/lib/jna/LICENSE (nonexistent)
+++ aoiro/trunk/lib/jna/LICENSE (revision 21)
@@ -0,0 +1,22 @@
1+Java Native Access project (JNA) is dual-licensed under 2
2+alternative Open Source/Free licenses: LGPL 2.1 or later and
3+Apache License 2.0. (starting with JNA version 4.0.0).
4+
5+You can freely decide which license you want to apply to
6+the project.
7+
8+You may obtain a copy of the LGPL License at:
9+
10+http://www.gnu.org/licenses/licenses.html
11+
12+A copy is also included in the downloadable source code package
13+containing JNA, in file "LGPL2.1", under the same directory
14+as this file.
15+
16+You may obtain a copy of the Apache License at:
17+
18+http://www.apache.org/licenses/
19+
20+A copy is also included in the downloadable source code package
21+containing JNA, in file "AL2.0", under the same directory
22+as this file.
--- aoiro/trunk/lib/yamlbeans/CREDITS (nonexistent)
+++ aoiro/trunk/lib/yamlbeans/CREDITS (revision 21)
@@ -0,0 +1,10 @@
1+
2+CREDITS
3+-------
4+
5+Kirill Simonov <xi@resolvent.net>
6+For writing the PyYAML3000 YAML parser.
7+
8+Ola Bini <ola@ologix.com>
9+For porting PyYAML3000 to RbYAML and RbYAML to JvYAML.
10+The yamlbeans project is based on the JvYAML tokenizer, parser, and emitter.
--- aoiro/trunk/lib/yamlbeans/LICENSE (nonexistent)
+++ aoiro/trunk/lib/yamlbeans/LICENSE (revision 21)
@@ -0,0 +1,20 @@
1+
2+Copyright (c) 2008 Nathan Sweet, Copyright (c) 2006 Ola Bini
3+
4+Permission is hereby granted, free of charge, to any person obtaining a copy of
5+this software and associated documentation files (the "Software"), to deal in
6+the Software without restriction, including without limitation the rights to
7+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8+of the Software, and to permit persons to whom the Software is furnished to do
9+so, subject to the following conditions:
10+
11+The above copyright notice and this permission notice shall be included in all
12+copies or substantial portions of the Software.
13+
14+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20+SOFTWARE.
--- aoiro/trunk/src/main/java/net/osdn/aoiro/cui/Main.java (revision 20)
+++ aoiro/trunk/src/main/java/net/osdn/aoiro/cui/Main.java (revision 21)
@@ -6,9 +6,9 @@
66 import java.util.Map;
77 import java.util.Map.Entry;
88 import java.util.Set;
9-import java.util.logging.Level;
10-import java.util.logging.Logger;
119
10+import com.esotericsoftware.yamlbeans.YamlReader;
11+
1212 import net.osdn.aoiro.AccountSettlement;
1313 import net.osdn.aoiro.Util;
1414 import net.osdn.aoiro.loader.yaml.YamlAccountTitlesLoader;
@@ -24,13 +24,13 @@
2424 import net.osdn.aoiro.report.GeneralLedger;
2525 import net.osdn.aoiro.report.ProfitAndLoss;
2626 import net.osdn.aoiro.report.StatementOfChangesInEquity;
27-import net.osdn.util.yaml.Yaml;
27+import net.osdn.util.io.AutoDetectReader;
2828
2929 public class Main {
3030
3131 public static void main(String[] args) {
3232 try {
33- Logger.getLogger("org.apache").setLevel(Level.SEVERE);
33+ System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.NoOpLog");
3434
3535 boolean skipSettlement = false;
3636 Boolean isSoloProprietorship = null;
@@ -216,8 +216,11 @@
216216 * @throws IOException
217217 */
218218 public static boolean isSoloProprietorship(File journalEntryFile) throws IOException {
219- Yaml yaml = new Yaml(journalEntryFile);
220- for(Object obj : yaml.getList()) {
219+ String yaml = AutoDetectReader.readAll(journalEntryFile.toPath());
220+ @SuppressWarnings("unchecked")
221+ List<Object> list = (List<Object>)new YamlReader(yaml).read();
222+
223+ for(Object obj : list) {
221224 if(obj instanceof Map) {
222225 @SuppressWarnings("unchecked")
223226 Map<String, Object> map = (Map<String, Object>)obj;
@@ -224,9 +227,9 @@
224227 Object debtor = map.get("借方");
225228 if(debtor instanceof List) {
226229 @SuppressWarnings("unchecked")
227- List<Object> list = (List<Object>)debtor;
228- for(int i = 0; i < list.size(); i++) {
229- obj = list.get(i);
230+ List<Object> debtorList = (List<Object>)debtor;
231+ for(int i = 0; i < debtorList.size(); i++) {
232+ obj = debtorList.get(i);
230233 if(obj instanceof Map) {
231234 @SuppressWarnings("unchecked")
232235 Map<String, Object> m = (Map<String, Object>)obj;
@@ -253,9 +256,9 @@
253256 Object creditor = map.get("貸方");
254257 if(creditor instanceof List) {
255258 @SuppressWarnings("unchecked")
256- List<Object> list = (List<Object>)creditor;
257- for(int i = 0; i < list.size(); i++) {
258- obj = list.get(i);
259+ List<Object> creditorList = (List<Object>)creditor;
260+ for(int i = 0; i < creditorList.size(); i++) {
261+ obj = creditorList.get(i);
259262 if(obj instanceof Map) {
260263 @SuppressWarnings("unchecked")
261264 Map<String, Object> m = (Map<String, Object>)obj;
--- aoiro/trunk/src/main/java/net/osdn/aoiro/loader/yaml/YamlAccountTitlesLoader.java (revision 20)
+++ aoiro/trunk/src/main/java/net/osdn/aoiro/loader/yaml/YamlAccountTitlesLoader.java (revision 21)
@@ -12,11 +12,13 @@
1212 import java.util.Map.Entry;
1313 import java.util.Set;
1414
15+import com.esotericsoftware.yamlbeans.YamlReader;
16+
1517 import net.osdn.aoiro.model.AccountTitle;
1618 import net.osdn.aoiro.model.AccountType;
1719 import net.osdn.aoiro.model.Amount;
1820 import net.osdn.aoiro.model.Node;
19-import net.osdn.util.yaml.Yaml;
21+import net.osdn.util.io.AutoDetectReader;
2022
2123 /** YAMLファイルから勘定科目をロードします。
2224 *
@@ -52,8 +54,9 @@
5254 private Node<List<AccountTitle>> ceRoot;
5355
5456 public YamlAccountTitlesLoader(File file) throws IOException {
55- Yaml yaml = new Yaml(file);
56- Map<String, Object> root = yaml.getMap();
57+ String yaml = AutoDetectReader.readAll(file.toPath());
58+ @SuppressWarnings("unchecked")
59+ Map<String, Object> root = (Map<String, Object>)new YamlReader(yaml).read();
5760
5861 Object obj;
5962
--- aoiro/trunk/src/main/java/net/osdn/aoiro/loader/yaml/YamlJournalsLoader.java (revision 20)
+++ aoiro/trunk/src/main/java/net/osdn/aoiro/loader/yaml/YamlJournalsLoader.java (revision 21)
@@ -14,11 +14,13 @@
1414 import java.util.Map.Entry;
1515 import java.util.Set;
1616
17+import com.esotericsoftware.yamlbeans.YamlReader;
18+
1719 import net.osdn.aoiro.model.AccountTitle;
1820 import net.osdn.aoiro.model.Creditor;
1921 import net.osdn.aoiro.model.Debtor;
2022 import net.osdn.aoiro.model.JournalEntry;
21-import net.osdn.util.yaml.Yaml;
23+import net.osdn.util.io.AutoDetectReader;
2224
2325 /** YAMLファイルから仕訳をロードします。
2426 *
@@ -35,8 +37,10 @@
3537 accountTitleByDisplayName.put(accountTitle.getDisplayName(), accountTitle);
3638 }
3739
38- Yaml yaml = new Yaml(file);
39- List<Object> list = yaml.getList();
40+ String yaml = AutoDetectReader.readAll(file.toPath());
41+ @SuppressWarnings("unchecked")
42+ List<Object> list = (List<Object>)new YamlReader(yaml).read();
43+
4044 for(Object obj : list) {
4145 if(obj instanceof Map) {
4246 @SuppressWarnings("unchecked")
--- aoiro/trunk/src/main/java/net/osdn/aoiro/loader/yaml/YamlProportionalDivisionsLoader.java (revision 20)
+++ aoiro/trunk/src/main/java/net/osdn/aoiro/loader/yaml/YamlProportionalDivisionsLoader.java (revision 21)
@@ -8,9 +8,11 @@
88 import java.util.Map;
99 import java.util.Set;
1010
11+import com.esotericsoftware.yamlbeans.YamlReader;
12+
1113 import net.osdn.aoiro.model.AccountTitle;
1214 import net.osdn.aoiro.model.ProportionalDivision;
13-import net.osdn.util.yaml.Yaml;
15+import net.osdn.util.io.AutoDetectReader;
1416
1517 /** YAMLファイルから家事按分をロードします。
1618 *
@@ -26,8 +28,10 @@
2628 accountTitleByDisplayName.put(accountTitle.getDisplayName(), accountTitle);
2729 }
2830
29- Yaml yaml = new Yaml(file);
30- List<Object> list = yaml.getList();
31+ String yaml = AutoDetectReader.readAll(file.toPath());
32+ @SuppressWarnings("unchecked")
33+ List<Object> list = (List<Object>)new YamlReader(yaml).read();
34+
3135 for(Object obj : list) {
3236 if(obj instanceof Map) {
3337 @SuppressWarnings("unchecked")
Show on old repository browser