Skip to content

Commit 697ae17

Browse files
committed
Cleaned up code
1 parent f0fbf83 commit 697ae17

File tree

5 files changed

+25
-6
lines changed

5 files changed

+25
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
/parsers/target/
66
/parsers/nbproject/
77
.vscode/
8+
/cli/nbproject/

cli/pom.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,24 @@
3636
<artifactId>logback-classic</artifactId>
3737
<version>1.2.12</version>
3838
</dependency>
39+
<dependency>
40+
<groupId>org.junit.jupiter</groupId>
41+
<artifactId>junit-jupiter-api</artifactId>
42+
<version>5.6.0</version>
43+
<scope>test</scope>
44+
</dependency>
45+
<dependency>
46+
<groupId>org.junit.jupiter</groupId>
47+
<artifactId>junit-jupiter-params</artifactId>
48+
<version>5.6.0</version>
49+
<scope>test</scope>
50+
</dependency>
51+
<dependency>
52+
<groupId>org.junit.jupiter</groupId>
53+
<artifactId>junit-jupiter-engine</artifactId>
54+
<version>5.6.0</version>
55+
<scope>test</scope>
56+
</dependency>
3957
</dependencies>
4058
<build>
4159
<resources>

cli/src/main/java/org/lifstools/jgoslin/cli/CmdLineParser.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public static void main(String[] args) throws Exception {
191191
}
192192
}
193193

194-
private static enum Grammar {
194+
private enum Grammar {
195195
GOSLIN, GOSLINFRAGMENTS, LIPIDMAPS, SWISSLIPIDS, HMDB, SHORTHAND2020, FATTYACIDS, NONE
196196
};
197197

@@ -220,7 +220,6 @@ private static boolean writeToStdOut(List<Pair<String, List<ValidationResult>>>
220220
writeToWriter(bw, results);
221221
}
222222
sw.flush();
223-
sw.close();
224223
log.info(sw.toString());
225224
return true;
226225
} catch (IOException ex) {

parsers/src/main/java/org/lifstools/jgoslin/parser/SwissLipidsParserEventHandler.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
*/
3939
public class SwissLipidsParserEventHandler extends LipidBaseParserEventHandler {
4040

41-
public int dbPosition;
42-
public String dbCistrans;
43-
public int suffixNumber;
41+
private int dbPosition;
42+
private String dbCistrans;
43+
private int suffixNumber;
4444

4545
/**
4646
* Create a new {@code SwissLipidsParserEventHandler}.

parsers/src/test/java/org/lifstools/jgoslin/parser/SwissLipidsParserTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
*/
1616
package org.lifstools.jgoslin.parser;
1717

18+
import static org.junit.jupiter.api.Assertions.assertEquals;
19+
import static org.junit.jupiter.api.Assertions.assertFalse;
1820
import org.lifstools.jgoslin.domain.LipidAdduct;
1921
import org.junit.jupiter.api.Test;
20-
import static org.junit.jupiter.api.Assertions.assertEquals;
2122
import static org.junit.jupiter.api.Assertions.assertNotNull;
2223
import static org.junit.jupiter.api.Assertions.assertTrue;
2324
import org.junit.jupiter.api.BeforeAll;

0 commit comments

Comments
 (0)