Skip to content

Commit ddad505

Browse files
authored
Merge pull request #234 from hazendaz/master
Move to velocity 2.4
2 parents d7fdbbc + a3905bd commit ddad505

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@
77
.idea
88
*.iml
99
.github/keys/
10+
release.properties
11+
pom.xml.releaseBackup

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
<dependency>
8585
<groupId>org.apache.velocity</groupId>
8686
<artifactId>velocity-engine-core</artifactId>
87-
<version>2.3</version>
87+
<version>2.4</version>
8888
</dependency>
8989
<dependency>
9090
<groupId>org.apache.commons</groupId>

src/main/java/org/mybatis/scripting/velocity/InDirective.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@
2828
import org.apache.velocity.runtime.parser.node.ASTReference;
2929
import org.apache.velocity.runtime.parser.node.ASTStringLiteral;
3030
import org.apache.velocity.runtime.parser.node.Node;
31-
import org.apache.velocity.runtime.parser.node.ParserTreeConstants;
31+
import org.apache.velocity.runtime.parser.node.StandardParserTreeConstants;
3232
import org.apache.velocity.util.introspection.Info;
3333

3434
/**
@@ -61,12 +61,12 @@ public void init(RuntimeServices rs, InternalContextAdapter context, Node node)
6161
for (int i = 1; i < n; i++) {
6262
Node child = node.jjtGetChild(i);
6363
if (i == 1) {
64-
if (child.getType() == ParserTreeConstants.JJTREFERENCE) {
64+
if (child.getType() == StandardParserTreeConstants.JJTREFERENCE) {
6565
this.var = ((ASTReference) child).getRootString();
6666
} else {
6767
throw new TemplateInitException("Syntax error", getTemplateName(), getLine(), getColumn());
6868
}
69-
} else if (child.getType() == ParserTreeConstants.JJTSTRINGLITERAL) {
69+
} else if (child.getType() == StandardParserTreeConstants.JJTSTRINGLITERAL) {
7070
String value = (String) ((ASTStringLiteral) child).value(context);
7171
if (i == 2) {
7272
this.column = value;

src/main/java/org/mybatis/scripting/velocity/RepeatDirective.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -31,7 +31,7 @@
3131
import org.apache.velocity.runtime.parser.node.ASTReference;
3232
import org.apache.velocity.runtime.parser.node.ASTStringLiteral;
3333
import org.apache.velocity.runtime.parser.node.Node;
34-
import org.apache.velocity.runtime.parser.node.ParserTreeConstants;
34+
import org.apache.velocity.runtime.parser.node.StandardParserTreeConstants;
3535
import org.apache.velocity.util.introspection.Info;
3636

3737
/**
@@ -60,12 +60,12 @@ public void init(RuntimeServices rs, InternalContextAdapter context, Node node)
6060
for (int i = 1; i < n; i++) {
6161
Node child = node.jjtGetChild(i);
6262
if (i == 1) {
63-
if (child.getType() == ParserTreeConstants.JJTREFERENCE) {
63+
if (child.getType() == StandardParserTreeConstants.JJTREFERENCE) {
6464
this.var = ((ASTReference) child).getRootString();
6565
} else {
6666
throw new TemplateInitException("Syntax error", getTemplateName(), getLine(), getColumn());
6767
}
68-
} else if (child.getType() == ParserTreeConstants.JJTSTRINGLITERAL) {
68+
} else if (child.getType() == StandardParserTreeConstants.JJTSTRINGLITERAL) {
6969
String value = (String) ((ASTStringLiteral) child).value(context);
7070
switch (i) {
7171
case 2:

0 commit comments

Comments
 (0)