Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
.idea
*.iml
.github/keys/
release.properties
pom.xml.releaseBackup
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
<version>2.3</version>
<version>2.4</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/mybatis/scripting/velocity/InDirective.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -28,7 +28,7 @@
import org.apache.velocity.runtime.parser.node.ASTReference;
import org.apache.velocity.runtime.parser.node.ASTStringLiteral;
import org.apache.velocity.runtime.parser.node.Node;
import org.apache.velocity.runtime.parser.node.ParserTreeConstants;
import org.apache.velocity.runtime.parser.node.StandardParserTreeConstants;
import org.apache.velocity.util.introspection.Info;

/**
Expand Down Expand Up @@ -61,12 +61,12 @@ public void init(RuntimeServices rs, InternalContextAdapter context, Node node)
for (int i = 1; i < n; i++) {
Node child = node.jjtGetChild(i);
if (i == 1) {
if (child.getType() == ParserTreeConstants.JJTREFERENCE) {
if (child.getType() == StandardParserTreeConstants.JJTREFERENCE) {
this.var = ((ASTReference) child).getRootString();
} else {
throw new TemplateInitException("Syntax error", getTemplateName(), getLine(), getColumn());
}
} else if (child.getType() == ParserTreeConstants.JJTSTRINGLITERAL) {
} else if (child.getType() == StandardParserTreeConstants.JJTSTRINGLITERAL) {
String value = (String) ((ASTStringLiteral) child).value(context);
if (i == 2) {
this.column = value;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -31,7 +31,7 @@
import org.apache.velocity.runtime.parser.node.ASTReference;
import org.apache.velocity.runtime.parser.node.ASTStringLiteral;
import org.apache.velocity.runtime.parser.node.Node;
import org.apache.velocity.runtime.parser.node.ParserTreeConstants;
import org.apache.velocity.runtime.parser.node.StandardParserTreeConstants;
import org.apache.velocity.util.introspection.Info;

/**
Expand Down Expand Up @@ -60,12 +60,12 @@ public void init(RuntimeServices rs, InternalContextAdapter context, Node node)
for (int i = 1; i < n; i++) {
Node child = node.jjtGetChild(i);
if (i == 1) {
if (child.getType() == ParserTreeConstants.JJTREFERENCE) {
if (child.getType() == StandardParserTreeConstants.JJTREFERENCE) {
this.var = ((ASTReference) child).getRootString();
} else {
throw new TemplateInitException("Syntax error", getTemplateName(), getLine(), getColumn());
}
} else if (child.getType() == ParserTreeConstants.JJTSTRINGLITERAL) {
} else if (child.getType() == StandardParserTreeConstants.JJTSTRINGLITERAL) {
String value = (String) ((ASTStringLiteral) child).value(context);
switch (i) {
case 2:
Expand Down