mirror of
https://github.com/uwol/proleap-vb6-parser.git
synced 2025-12-18 20:44:35 +03:00
removed dependency commons-lang
This commit is contained in:
5
pom.xml
5
pom.xml
@@ -25,11 +25,6 @@
|
||||
<slf4j.version>1.7.28</slf4j.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
<version>2.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.antlr</groupId>
|
||||
<artifactId>antlr4</artifactId>
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
package io.proleap.vb6.asg.metamodel.impl;
|
||||
|
||||
import org.antlr.v4.runtime.ParserRuleContext;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import io.proleap.vb6.asg.metamodel.Module;
|
||||
import io.proleap.vb6.asg.metamodel.Program;
|
||||
@@ -59,6 +58,6 @@ public abstract class ScopedElementImpl extends ASGElementImpl implements Scoped
|
||||
}
|
||||
|
||||
protected String getSymbol(final String name) {
|
||||
return StringUtils.isEmpty(name) ? name : name.toLowerCase();
|
||||
return name == null || name.isEmpty() ? name : name.toLowerCase();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ import java.util.Arrays;
|
||||
|
||||
import org.antlr.v4.runtime.CharStreams;
|
||||
import org.antlr.v4.runtime.CommonTokenStream;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -110,7 +109,8 @@ public class TestGenerator {
|
||||
subOutputDirectory.mkdirs();
|
||||
|
||||
// determine the package name of test classes
|
||||
final String subPackageName = StringUtils.isEmpty(packageName) ? subInputDirectoryName
|
||||
final String subPackageName = packageName == null || packageName.isEmpty()
|
||||
? subInputDirectoryName
|
||||
: packageName + "." + subInputDirectoryName;
|
||||
|
||||
generateTestClasses(subInputDirectory, subOutputDirectory, subPackageName);
|
||||
|
||||
@@ -21,7 +21,6 @@ import java.nio.file.Files;
|
||||
import org.antlr.v4.runtime.CharStreams;
|
||||
import org.antlr.v4.runtime.CommonTokenStream;
|
||||
import org.antlr.v4.runtime.tree.Trees;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -58,7 +57,7 @@ public class VbParseTestRunnerImpl implements VbParseTestRunner {
|
||||
|
||||
final String treeFileData = Files.readString(treeFile.toPath(), StandardCharsets.UTF_8);
|
||||
|
||||
if (!StringUtils.isEmpty(treeFileData)) {
|
||||
if (treeFileData != null && !treeFileData.isEmpty()) {
|
||||
LOG.info("Comparing parse tree with file {}.", treeFile.getName());
|
||||
|
||||
final String inputFileTree = Trees.toStringTree(startRule, parser);
|
||||
|
||||
@@ -7,7 +7,6 @@ import org.antlr.v4.runtime.Parser;
|
||||
import org.antlr.v4.runtime.misc.Utils;
|
||||
import org.antlr.v4.runtime.tree.Tree;
|
||||
import org.antlr.v4.runtime.tree.Trees;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
public class TreeUtils {
|
||||
|
||||
@@ -16,7 +15,7 @@ public class TreeUtils {
|
||||
public static final String TAB = "\t";
|
||||
|
||||
public static String indent(final int indent) {
|
||||
return StringUtils.repeat(TAB, indent);
|
||||
return TAB.repeat(indent);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user