Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Commit 14581a6

Browse files
committed
native: drop un-used tests&deps + minor style tweaks
Signed-off-by: Alexander Bezzubov <[email protected]>
1 parent fb8a5c6 commit 14581a6

File tree

4 files changed

+5
-159
lines changed

4 files changed

+5
-159
lines changed

native/pom.xml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project xmlns="http://maven.apache.org/POM/4.0.0"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
54
<modelVersion>4.0.0</modelVersion>
65

76
<groupId>tech.sourced</groupId>
@@ -20,24 +19,12 @@
2019
<version>4.12</version>
2120
<scope>test</scope>
2221
</dependency>
23-
<dependency>
24-
<groupId>org.reflections</groupId>
25-
<artifactId>reflections</artifactId>
26-
<version>0.9.10</version>
27-
<scope>test</scope>
28-
</dependency>
2922
<dependency>
3023
<groupId>org.easytesting</groupId>
3124
<artifactId>fest-assert</artifactId>
3225
<version>1.4</version>
3326
<scope>test</scope>
3427
</dependency>
35-
<dependency>
36-
<groupId>org.apache.commons</groupId>
37-
<artifactId>commons-lang3</artifactId>
38-
<version>3.4</version>
39-
<scope>test</scope>
40-
</dependency>
4128

4229
<dependency>
4330
<groupId>org.eclipse.jdt</groupId>

native/src/main/java/bblfsh/CommentVisitor.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package bblfsh;
22

3-
import org.eclipse.jdt.core.dom.ASTNode;
43
import org.eclipse.jdt.core.dom.ASTVisitor;
54
import org.eclipse.jdt.core.dom.BlockComment;
65
import org.eclipse.jdt.core.dom.Comment;
@@ -53,7 +52,7 @@ private boolean visitBlock(Comment node) {
5352

5453
StringBuffer blockComment = new StringBuffer();
5554

56-
for (int lineCount = startLineNumber ; lineCount <= endLineNumber; lineCount++) {
55+
for (int lineCount = startLineNumber; lineCount <= endLineNumber; lineCount++) {
5756

5857
int startCol = lineCount == startLineNumber ? startLineColumn : 0;
5958
int endCol = lineCount == endLineNumber ? endLineColumn : source[lineCount].length();

native/src/main/java/bblfsh/EclipseParser.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ public EclipseParser() {
2828
}
2929

3030
/**
31-
* Parse the code and generate the JSON in outJ
31+
* Parses the given source code text.
3232
*
3333
* @param source String to parses
3434
* @return CompilationUnit of the AST
35-
* @throws IOException if anything related to I/O or Json generation failed
35+
* @throws IllegalStateException if parser is not configured properly.
3636
*/
3737
public CompilationUnit parse(final String source) throws IOException {
3838
parser.setSource(source.toCharArray());
39-
Map options = JavaCore.getOptions();
39+
Map<String, String> options = JavaCore.getOptions();
4040
JavaCore.setComplianceOptions(JavaCore.VERSION_1_8, options);
4141
parser.setCompilerOptions(options);
4242
return (CompilationUnit) parser.createAST(null);

native/src/test/java/bblfsh/GoGen.java

Lines changed: 0 additions & 140 deletions
This file was deleted.

0 commit comments

Comments
 (0)