Skip to content

Commit 60a0e4a

Browse files
committed
feat: updated dependencies.
1 parent aa2e9c6 commit 60a0e4a

File tree

12 files changed

+29
-32
lines changed

12 files changed

+29
-32
lines changed

gen.css/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ description = 'GumTree tree generator for CSS code based on ph-css.'
77

88
dependencies {
99
implementation project(':core')
10-
implementation 'com.helger:ph-css:7.0.3'
10+
implementation 'com.helger:ph-css:8.0.0'
11+
implementation 'jakarta.annotation:jakarta.annotation-api:3.0.0'
1112
}

gen.css/src/main/java/com/github/gumtreediff/gen/css/CssTreeGenerator.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import com.github.gumtreediff.gen.TreeGenerator;
2626
import com.github.gumtreediff.io.LineReader;
2727
import com.github.gumtreediff.tree.TreeContext;
28-
import com.helger.css.ECSSVersion;
2928
import com.helger.css.decl.CascadingStyleSheet;
3029
import com.helger.css.decl.visit.CSSVisitor;
3130
import com.helger.css.handler.CSSHandler;
@@ -47,7 +46,6 @@ public TreeContext generate(Reader r) throws IOException {
4746
p.setBrowserCompliantMode(false);
4847
try {
4948
CascadingStyleSheet sheet = CSSHandler.readCascadingStyleSheetFromNode(
50-
ECSSVersion.LATEST,
5149
CSSReader.getDefaultInterpretErrorHandler(),
5250
true,
5351
p.styleSheet());

gen.css/src/main/java/com/github/gumtreediff/gen/css/GtCssVisitor.java

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,19 @@
3030
import com.helger.css.decl.*;
3131
import com.helger.css.decl.visit.ICSSVisitor;
3232
import com.helger.css.writer.CSSWriterSettings;
33+
import jakarta.annotation.Nonnull;
3334

34-
import javax.annotation.Nonnull;
35-
import java.io.IOException;
3635
import java.util.ArrayDeque;
3736

3837
public class GtCssVisitor implements ICSSVisitor {
39-
private TreeContext ctx;
40-
private ArrayDeque<Tree> trees;
41-
private LineReader lr;
42-
private ICSSWriterSettings settings;
38+
private final TreeContext ctx;
39+
private final ArrayDeque<Tree> trees;
40+
private final LineReader lr;
41+
private final ICSSWriterSettings settings;
4342

44-
private CascadingStyleSheet sheet;
45-
46-
public GtCssVisitor(CascadingStyleSheet sheet, LineReader lr) throws IOException {
43+
public GtCssVisitor(CascadingStyleSheet sheet, LineReader lr) {
4744
this.lr = lr;
4845
this.settings = new CSSWriterSettings();
49-
this.sheet = sheet;
5046
this.ctx = new TreeContext();
5147
this.trees = new ArrayDeque<>();
5248
Tree root = this.ctx.createTree(symbol(sheet), Tree.NO_LABEL);
@@ -173,6 +169,12 @@ public void onBeginSupportsRule(@Nonnull CSSSupportsRule aSupportsRule) {}
173169
@Override
174170
public void onEndSupportsRule(@Nonnull CSSSupportsRule aSupportsRule) {}
175171

172+
@Override
173+
public void onBeginLayerRule(@Nonnull CSSLayerRule aLayerRule) {}
174+
175+
@Override
176+
public void onEndLayerRule(@Nonnull CSSLayerRule aLayerRule) {}
177+
176178
@Override
177179
public void onUnknownRule(@Nonnull CSSUnknownRule aUnknownRule) {}
178180

gen.css/src/test/java/com/github/gumtreediff/gen/css/TestCssTreeGenerator.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,21 @@
3131
public class TestCssTreeGenerator {
3232
@Test
3333
public void testSimple() throws Exception {
34-
Reader r = new StringReader("@import url(\"bluish.css\") projection, tv;\n"
34+
String input = "@import url(\"bluish.css\") projection, tv;\n"
3535
+ "body {\n"
3636
+ "\tfont-size: 11pt;\n"
3737
+ "}\n"
3838
+ "ul li {\n"
3939
+ "\tbackground-color: black;\n"
40-
+ "}");
41-
TreeContext ctx = new CssTreeGenerator().generateFrom().reader(r);
40+
+ "}";
41+
TreeContext ctx = new CssTreeGenerator().generateFrom().string(input);
4242
Tree tree = ctx.getRoot();
4343
assertEquals(10, tree.getMetrics().size);
4444
}
4545

4646
@Test
47-
public void badSyntax() throws IOException {
47+
public void badSyntax() {
4848
String input = ".foo \"toto {\nfont-size: 11pt;\n}";
49-
assertThrows(SyntaxException.class, () -> {
50-
TreeContext ct = new CssTreeGenerator().generateFrom().string(input);
51-
});
49+
assertThrows(SyntaxException.class, () -> new CssTreeGenerator().generateFrom().string(input));
5250
}
5351
}

gen.javaparser/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ description = 'GumTree tree generator for Java code (JavaParser based).'
77

88
dependencies {
99
implementation project(':core')
10-
implementation 'com.github.javaparser:javaparser-symbol-solver-core:3.26.3'
10+
implementation 'com.github.javaparser:javaparser-symbol-solver-core:3.27.0'
1111
}

gen.jdt/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ description = 'GumTree tree generator for Java code (Eclipse JDT based).'
77

88
dependencies {
99
implementation project(':core')
10-
implementation 'org.eclipse.jdt:org.eclipse.jdt.core:3.38.0'
10+
implementation 'org.eclipse.jdt:org.eclipse.jdt.core:3.43.0'
1111
}

gen.json/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ description = 'GumTree tree generator for JSON code (Jackson based).'
66

77
dependencies {
88
implementation project(':core')
9-
implementation 'com.fasterxml.jackson.core:jackson-core:2.18.2'
9+
implementation 'com.fasterxml.jackson.core:jackson-core:2.20.0'
1010
}

gen.json/src/main/java/com/github/gumtreediff/gen/json/JsonTreeGenerator.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,10 @@
3535
@Register(id = "json-jackson", accept = {"\\.json"}, priority = Registry.Priority.MAXIMUM)
3636
public class JsonTreeGenerator extends TreeGenerator {
3737
private Stack<Tree> trees;
38-
private TreeContext ctx;
3938

4039
@Override
4140
public TreeContext generate(Reader r) throws IOException {
42-
ctx = new TreeContext();
41+
TreeContext ctx = new TreeContext();
4342
trees = new Stack<>();
4443
JsonFactory factory = JsonFactory.builder().build();
4544
JsonParser p = factory.createParser(r);

gen.json/src/test/java/com/github/gumtreediff/gen/json/TestJsonTreeGenerator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,21 @@ public void testJsonArray() throws IOException {
4444
}
4545

4646
@Test
47-
public void testSyntaxError1() throws IOException {
47+
public void testSyntaxError1() {
4848
String input = "{ \"foo\": \"bar\" ";
4949
Assertions.assertThrows(SyntaxException.class,
5050
() -> new JsonTreeGenerator().generateFrom().string(input));
5151
}
5252

5353
@Test
54-
public void testSyntaxError2() throws IOException {
54+
public void testSyntaxError2() {
5555
String input = "{ foo: \"bar\" }";
5656
Assertions.assertThrows(SyntaxException.class,
5757
() -> new JsonTreeGenerator().generateFrom().string(input));
5858
}
5959

6060
@Test
61-
public void testSyntaxError3() throws IOException {
61+
public void testSyntaxError3() {
6262
String input = "{ \"foo\" = \"bar\" }";
6363
Assertions.assertThrows(SyntaxException.class,
6464
() -> new JsonTreeGenerator().generateFrom().string(input));

gen.xml/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ description = 'GumTree tree generator for XML code (JSoup based).'
77

88
dependencies {
99
implementation project(':core')
10-
implementation 'org.jsoup:jsoup:1.18.3'
10+
implementation 'org.jsoup:jsoup:1.21.2'
1111
}

0 commit comments

Comments
 (0)