summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pom.xml29
-rw-r--r--src/main/java/module-info.java4
-rw-r--r--src/main/java/org/javacs/Main.java50
3 files changed, 0 insertions, 83 deletions
diff --git a/pom.xml b/pom.xml
index ee0a3ab..78c98f6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,9 +14,6 @@
<url>file://${basedir}/dist</url>
</repository>
</distributionManagement>
- <properties>
- <jackson-2-version>2.9.6</jackson-2-version>
- </properties>
<dependencies>
<!-- Java implementation of VS Code language server protocol -->
<dependency>
@@ -30,32 +27,6 @@
</exclusion>
</exclusions>
</dependency>
- <!-- JSON -->
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-core</artifactId>
- <version>${jackson-2-version}</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-annotations</artifactId>
- <version>${jackson-2-version}</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-databind</artifactId>
- <version>${jackson-2-version}</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.datatype</groupId>
- <artifactId>jackson-datatype-jsr310</artifactId>
- <version>${jackson-2-version}</version>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.datatype</groupId>
- <artifactId>jackson-datatype-jdk8</artifactId>
- <version>${jackson-2-version}</version>
- </dependency>
<!-- Guava collections-->
<dependency>
<groupId>com.google.guava</groupId>
diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java
index a99ddc8..ed8f470 100644
--- a/src/main/java/module-info.java
+++ b/src/main/java/module-info.java
@@ -6,8 +6,4 @@ module javacs {
requires org.eclipse.lsp4j;
requires gson;
requires org.eclipse.lsp4j.jsonrpc;
- requires com.fasterxml.jackson.core;
- requires com.fasterxml.jackson.databind;
- requires com.fasterxml.jackson.datatype.jdk8;
- requires com.fasterxml.jackson.datatype.jsr310;
}
diff --git a/src/main/java/org/javacs/Main.java b/src/main/java/org/javacs/Main.java
index 14a8f61..438353f 100644
--- a/src/main/java/org/javacs/Main.java
+++ b/src/main/java/org/javacs/Main.java
@@ -1,35 +1,11 @@
package org.javacs;
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.DeserializationContext;
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.JsonDeserializer;
-import com.fasterxml.jackson.databind.JsonSerializer;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.SerializerProvider;
-import com.fasterxml.jackson.databind.module.SimpleModule;
-import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
-import com.fasterxml.jackson.datatype.jsr310.JSR310Module;
-import java.io.IOException;
-import java.nio.file.Path;
-import java.nio.file.Paths;
import java.util.concurrent.Executors;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.eclipse.lsp4j.launch.LSPLauncher;
public class Main {
- public static final ObjectMapper JSON =
- new ObjectMapper()
- .registerModule(new Jdk8Module())
- .registerModule(new JSR310Module())
- .registerModule(pathAsJson())
- .configure(JsonGenerator.Feature.AUTO_CLOSE_TARGET, false)
- .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
- .configure(DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES, false);
-
private static final Logger LOG = Logger.getLogger("main");
public static void setRootFormat() {
@@ -38,32 +14,6 @@ public class Main {
for (var h : root.getHandlers()) h.setFormatter(new LogFormat());
}
- private static SimpleModule pathAsJson() {
- var m = new SimpleModule();
-
- m.addSerializer(
- Path.class,
- new JsonSerializer<Path>() {
- @Override
- public void serialize(Path path, JsonGenerator gen, SerializerProvider serializerProvider)
- throws IOException, JsonProcessingException {
- gen.writeString(path.toString());
- }
- });
-
- m.addDeserializer(
- Path.class,
- new JsonDeserializer<Path>() {
- @Override
- public Path deserialize(JsonParser parse, DeserializationContext deserializationContext)
- throws IOException, JsonProcessingException {
- return Paths.get(parse.getText());
- }
- });
-
- return m;
- }
-
public static void main(String[] args) {
try {
// Logger.getLogger("").addHandler(new FileHandler("javacs.%u.log", false));