Remove accidental import of an unused library,

fix build on jdk18-systems.
This commit is contained in:
vlofgren 2022-08-26 20:48:44 +02:00
parent 3200c36072
commit f4ad7aaf33
4 changed files with 8 additions and 36 deletions

View File

@ -158,8 +158,6 @@ dependencies {
jmh 'org.openjdk.jmh:jmh-core:1.35'
jmh 'org.openjdk.jmh:jmh-generator-annprocess:1.35'
implementation 'com.dslplatform:dsl-json:1.9.9'
annotationProcessor 'com.dslplatform:dsl-json-processor:1.9.9'
}
configurations {

View File

@ -1,14 +1,12 @@
package nu.marginalia.wmsa.edge.model.crawl;
import com.dslplatform.json.JsonObject;
import com.dslplatform.json.JsonWriter;
import lombok.Data;
import nu.marginalia.wmsa.edge.index.model.IndexBlock;
import java.util.*;
@Data
public class EdgePageWordSet implements JsonObject {
public class EdgePageWordSet {
public Map<IndexBlock, EdgePageWords> wordSets;
public EdgePageWordSet(EdgePageWords... words) {
@ -48,17 +46,4 @@ public class EdgePageWordSet implements JsonObject {
return sj.toString();
}
@Override
public void serialize(JsonWriter writer, boolean minimal) {
writer.writeAscii("[");
boolean first = false;
for (var w : wordSets.values()) {
if (!first) first = true;
else writer.writeAscii(", ");
w.serialize(writer, minimal);
}
writer.writeAscii("]}");
}
}

View File

@ -1,7 +1,4 @@
package nu.marginalia.wmsa.edge.model.crawl;
import com.dslplatform.json.JsonObject;
import com.dslplatform.json.JsonWriter;
import com.dslplatform.json.NumberConverter;
import lombok.Getter;
import lombok.ToString;
import nu.marginalia.wmsa.edge.index.model.IndexBlock;
@ -11,7 +8,7 @@ import java.util.Collection;
import java.util.List;
@ToString @Getter
public class EdgePageWords implements JsonObject {
public class EdgePageWords{
public final IndexBlock block;
public final List<String> words = new ArrayList<>();
@ -35,18 +32,4 @@ public class EdgePageWords implements JsonObject {
}
public void addJust(String word) { words.add(word); }
@Override
public void serialize(JsonWriter writer, boolean minimal) {
writer.writeAscii("{\"b\":");
NumberConverter.serialize(block.ordinal(), writer);
writer.writeAscii(", \"w\": [");
boolean first = false;
for (var word : words) {
if (!first) first = true;
else { writer.writeAscii(","); }
writer.writeString(word);
}
writer.writeAscii("]}");
}
}

View File

@ -5,6 +5,12 @@ plugins {
repositories {
gradlePluginPortal()
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:3.0.0'