diff --git a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/security/ApexCRUDViolationRule.java b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/security/ApexCRUDViolationRule.java index 525436904c..a56eacf693 100644 --- a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/security/ApexCRUDViolationRule.java +++ b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/security/ApexCRUDViolationRule.java @@ -43,7 +43,7 @@ import com.google.common.collect.ListMultimap; * */ public class ApexCRUDViolationRule extends AbstractApexRule { - private static final Pattern p = Pattern.compile("^(string|void)$", Pattern.CASE_INSENSITIVE); + private static final Pattern VOID_OR_STRING_PATTERN = Pattern.compile("^(string|void)$", Pattern.CASE_INSENSITIVE); private final HashMap varToTypeMapping = new HashMap<>(); private final ListMultimap typeToDMLOperationMapping = ArrayListMultimap.create(); @@ -258,7 +258,7 @@ public class ApexCRUDViolationRule extends AbstractApexRule { } } - private void checkForCRUD(final AbstractApexNode node, final Object data, final String CRUDMethod) { + private void checkForCRUD(final AbstractApexNode node, final Object data, final String crudMethod) { final ASTMethod wrappingMethod = node.getFirstParentOfType(ASTMethod.class); final ASTUserClass wrappingClass = node.getFirstParentOfType(ASTUserClass.class); @@ -274,7 +274,7 @@ public class ApexCRUDViolationRule extends AbstractApexRule { StringBuilder typeCheck = new StringBuilder().append(node.getNode().getDefiningType()).append(":") .append(type); - validateCRUDCheckPresent(node, data, CRUDMethod, typeCheck.toString()); + validateCRUDCheckPresent(node, data, crudMethod, typeCheck.toString()); } } } @@ -310,10 +310,10 @@ public class ApexCRUDViolationRule extends AbstractApexRule { } - private void validateCRUDCheckPresent(final AbstractApexNode node, final Object data, final String CRUDMethod, + private void validateCRUDCheckPresent(final AbstractApexNode node, final Object data, final String crudMethod, final String typeCheck) { if (!typeToDMLOperationMapping.containsKey(typeCheck)) { - if (!isProperESAPICheckForDML(typeCheck, CRUDMethod)) { + if (!isProperESAPICheckForDML(typeCheck, crudMethod)) { addViolation(data, node); } } else { @@ -321,11 +321,11 @@ public class ApexCRUDViolationRule extends AbstractApexRule { List dmlOperationsChecked = typeToDMLOperationMapping.get(typeCheck); for (String dmlOp : dmlOperationsChecked) { - if (dmlOp.equalsIgnoreCase(CRUDMethod)) { + if (dmlOp.equalsIgnoreCase(crudMethod)) { properChecksHappened = true; break; } - if (CRUDMethod.equals(ANY)) { + if (crudMethod.equals(ANY)) { properChecksHappened = true; break; } @@ -397,7 +397,7 @@ public class ApexCRUDViolationRule extends AbstractApexRule { private boolean isMethodAGetter(final ASTMethod method) { final boolean startsWithGet = method.getNode().getMethodInfo().getCanonicalName().startsWith("get"); - final boolean voidOrString = p + final boolean voidOrString = VOID_OR_STRING_PATTERN .matcher(method.getNode().getMethodInfo().getEmitSignature().getReturnType().getApexName()).matches(); return (startsWithGet && !voidOrString); diff --git a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/security/ApexDangerousMethodsRule.java b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/security/ApexDangerousMethodsRule.java index 1e6c3e3473..54fd0b4ddf 100644 --- a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/security/ApexDangerousMethodsRule.java +++ b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/security/ApexDangerousMethodsRule.java @@ -27,7 +27,7 @@ import net.sourceforge.pmd.lang.apex.rule.AbstractApexRule; public class ApexDangerousMethodsRule extends AbstractApexRule { private static final String BOOLEAN = "boolean"; - private static final Pattern regexp = Pattern.compile("^.*?(pass|pwd|crypt|auth|session|token|saml)(?!id|user).*?$", + private static final Pattern REGEXP = Pattern.compile("^.*?(pass|pwd|crypt|auth|session|token|saml)(?!id|user).*?$", Pattern.CASE_INSENSITIVE); private static final String DISABLE_CRUD = "disableTriggerCRUDSecurity"; @@ -89,7 +89,7 @@ public class ApexDangerousMethodsRule extends AbstractApexRule { private void validateParameters(ASTMethodCallExpression methodCall, Object data) { List variables = methodCall.findDescendantsOfType(ASTVariableExpression.class); for (ASTVariableExpression var : variables) { - if (regexp.matcher(var.getNode().getIdentifier().value).matches()) { + if (REGEXP.matcher(var.getNode().getIdentifier().value).matches()) { if (!whiteListedVariables.contains(Helper.getFQVariableName(var))) { addViolation(data, methodCall); } diff --git a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/security/ApexInsecureEndpointRule.java b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/security/ApexInsecureEndpointRule.java index df1bfa8ff7..ddbffa0c90 100644 --- a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/security/ApexInsecureEndpointRule.java +++ b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/security/ApexInsecureEndpointRule.java @@ -29,7 +29,7 @@ public class ApexInsecureEndpointRule extends AbstractApexRule { private static final String SET_ENDPOINT = "setEndpoint"; private static final Pattern PATTERN = Pattern.compile("^http://.+?$", Pattern.CASE_INSENSITIVE); - private static final Set httpEndpointStrings = new HashSet<>(); + private static final Set HTTP_ENDPOINT_STRINGS = new HashSet<>(); public ApexInsecureEndpointRule() { setProperty(CODECLIMATE_CATEGORIES, new String[] { "Security" }); @@ -74,7 +74,7 @@ public class ApexInsecureEndpointRule extends AbstractApexRule { if (o instanceof String) { String literal = (String) o; if (PATTERN.matcher(literal).matches()) { - httpEndpointStrings.add(Helper.getFQVariableName(variableNode)); + HTTP_ENDPOINT_STRINGS.add(Helper.getFQVariableName(variableNode)); } } } @@ -114,7 +114,7 @@ public class ApexInsecureEndpointRule extends AbstractApexRule { ASTVariableExpression variableNode = node.getFirstChildOfType(ASTVariableExpression.class); if (variableNode != null) { - if (httpEndpointStrings.contains(Helper.getFQVariableName(variableNode))) { + if (HTTP_ENDPOINT_STRINGS.contains(Helper.getFQVariableName(variableNode))) { addViolation(data, variableNode); } diff --git a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/security/ApexSOQLInjectionRule.java b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/security/ApexSOQLInjectionRule.java index d844583979..c48aea4a50 100644 --- a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/security/ApexSOQLInjectionRule.java +++ b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/security/ApexSOQLInjectionRule.java @@ -33,9 +33,9 @@ public class ApexSOQLInjectionRule extends AbstractApexRule { private static final String STRING = "String"; private static final String DATABASE = "Database"; private static final String QUERY = "query"; + private static final Pattern SELECT_PATTERN = Pattern.compile("^select[\\s]+?.+?$", Pattern.CASE_INSENSITIVE); private final HashSet safeVariables = new HashSet<>(); private final HashMap selectContainingVariables = new HashMap<>(); - private static final Pattern pattern = Pattern.compile("^select[\\s]+?.+?$", Pattern.CASE_INSENSITIVE); public ApexSOQLInjectionRule() { setProperty(CODECLIMATE_CATEGORIES, new String[] { "Security" }); @@ -94,7 +94,7 @@ public class ApexSOQLInjectionRule extends AbstractApexRule { if (left != null) { Object o = literal.getNode().getLiteral(); if (o instanceof String) { - if (pattern.matcher((String) o).matches()) { + if (SELECT_PATTERN.matcher((String) o).matches()) { selectContainingVariables.put(Helper.getFQVariableName(left), Boolean.TRUE); } else { safeVariables.add(Helper.getFQVariableName(left)); @@ -141,7 +141,7 @@ public class ApexSOQLInjectionRule extends AbstractApexRule { Object o = literal.getNode().getLiteral(); if (o instanceof String) { - if (pattern.matcher((String) o).matches()) { + if (SELECT_PATTERN.matcher((String) o).matches()) { if (!isSafeVariable) { // select literal + other unsafe vars selectContainingVariables.put(Helper.getFQVariableName(var), Boolean.FALSE); diff --git a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/security/ApexXSSFromURLParamRule.java b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/security/ApexXSSFromURLParamRule.java index 10f1829ef7..c3050049be 100644 --- a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/security/ApexXSSFromURLParamRule.java +++ b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/security/ApexXSSFromURLParamRule.java @@ -40,7 +40,7 @@ public class ApexXSSFromURLParamRule extends AbstractApexRule { private static final String[] DOUBLE_VALUEOF = new String[] { "Double", "valueOf" }; private static final String[] STRING_ISEMPTY = new String[] { "String", "isEmpty" }; - private static final Set urlParameterString = new HashSet<>(); + private static final Set URL_PARAMETER_STRINGS = new HashSet<>(); public ApexXSSFromURLParamRule() { setProperty(CODECLIMATE_CATEGORIES, new String[] { "Security" }); @@ -91,7 +91,7 @@ public class ApexXSSFromURLParamRule extends AbstractApexRule { List nodes = node.findChildrenOfType(ASTVariableExpression.class); for (ASTVariableExpression varExpression : nodes) { - if (urlParameterString.contains(Helper.getFQVariableName(varExpression))) { + if (URL_PARAMETER_STRINGS.contains(Helper.getFQVariableName(varExpression))) { addViolation(data, nodes.get(0)); } } @@ -133,7 +133,7 @@ public class ApexXSSFromURLParamRule extends AbstractApexRule { ASTVariableExpression left = node.getFirstChildOfType(ASTVariableExpression.class); if (left != null) { - urlParameterString.add(Helper.getFQVariableName(left)); + URL_PARAMETER_STRINGS.add(Helper.getFQVariableName(left)); } } @@ -157,7 +157,7 @@ public class ApexXSSFromURLParamRule extends AbstractApexRule { return; } - if (urlParameterString.contains(Helper.getFQVariableName(variable))) { + if (URL_PARAMETER_STRINGS.contains(Helper.getFQVariableName(variable))) { if (!isEscapingMethod(methodNode)) { addViolation(data, variable); } @@ -190,7 +190,7 @@ public class ApexXSSFromURLParamRule extends AbstractApexRule { // Look for: foo = bar; final ASTVariableExpression right = reverseOrder ? nodes.get(0) : nodes.get(1); - if (urlParameterString.contains(Helper.getFQVariableName(right))) { + if (URL_PARAMETER_STRINGS.contains(Helper.getFQVariableName(right))) { addViolation(data, right); } } @@ -215,7 +215,7 @@ public class ApexXSSFromURLParamRule extends AbstractApexRule { final List nodes = node.findChildrenOfType(ASTVariableExpression.class); for (ASTVariableExpression n : nodes) { - if (urlParameterString.contains(Helper.getFQVariableName(n))) { + if (URL_PARAMETER_STRINGS.contains(Helper.getFQVariableName(n))) { addViolation(data, n); } } diff --git a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/style/VariableNamingConventionsRule.java b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/style/VariableNamingConventionsRule.java index ac17ebfa1f..b60c8afe46 100644 --- a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/style/VariableNamingConventionsRule.java +++ b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/style/VariableNamingConventionsRule.java @@ -145,7 +145,7 @@ public class VariableNamingConventionsRule extends AbstractApexRule { String varName = node.getImage(); // Skip on null (with exception classes) and serialVersionUID - if (varName == null || varName.equals("serialVersionUID")) { + if (varName == null || "serialVersionUID".equals(varName)) { return data; } diff --git a/pmd-apex/src/test/java/net/sourceforge/pmd/lang/apex/ast/ApexParserTestHelpers.java b/pmd-apex/src/test/java/net/sourceforge/pmd/lang/apex/ast/ApexParserTestHelpers.java index 5896f0fa45..73781595de 100644 --- a/pmd-apex/src/test/java/net/sourceforge/pmd/lang/apex/ast/ApexParserTestHelpers.java +++ b/pmd-apex/src/test/java/net/sourceforge/pmd/lang/apex/ast/ApexParserTestHelpers.java @@ -14,6 +14,8 @@ import net.sourceforge.pmd.lang.ast.Node; import apex.jorje.semantic.ast.compilation.Compilation; public class ApexParserTestHelpers { + private ApexParserTestHelpers() { } + public static ApexNode parse(String code) { ApexParser parser = new ApexParser(new ApexParserOptions()); Reader reader = new StringReader(code); diff --git a/pmd-java8/src/test/java/net/sourceforge/pmd/lang/java/bugs/InterfaceMethodTest.java b/pmd-java8/src/test/java/net/sourceforge/pmd/lang/java/bugs/InterfaceMethodTest.java index 4ddb4a19cf..af097bbd7f 100644 --- a/pmd-java8/src/test/java/net/sourceforge/pmd/lang/java/bugs/InterfaceMethodTest.java +++ b/pmd-java8/src/test/java/net/sourceforge/pmd/lang/java/bugs/InterfaceMethodTest.java @@ -20,7 +20,7 @@ import net.sourceforge.pmd.typeresolution.testdata.UsesJavaStreams; public class InterfaceMethodTest { @Test - public void should_not_fail() { + public void shouldNotFail() { ASTCompilationUnit acu = parseAndTypeResolveForClass(UsesJavaStreams.class); } diff --git a/pmd-java8/src/test/java/net/sourceforge/pmd/typeresolution/ClassTypeResolverJava8Test.java b/pmd-java8/src/test/java/net/sourceforge/pmd/typeresolution/ClassTypeResolverJava8Test.java index aa69875a6a..5f5091bb47 100644 --- a/pmd-java8/src/test/java/net/sourceforge/pmd/typeresolution/ClassTypeResolverJava8Test.java +++ b/pmd-java8/src/test/java/net/sourceforge/pmd/typeresolution/ClassTypeResolverJava8Test.java @@ -19,19 +19,15 @@ import net.sourceforge.pmd.typeresolution.testdata.UsesRepeatableAnnotations; public class ClassTypeResolverJava8Test { @Test - public void interface_method_should_be_parseable() { + public void interfaceMethodShouldBeParseable() { ASTCompilationUnit acu = parseAndTypeResolveForClass18(UsesJavaStreams.class); } @Test - public void repeatable_annotations_method_should_be_parseable() { + public void repeatableAnnotationsMethodShouldBeParseable() { ASTCompilationUnit acu = parseAndTypeResolveForClass18(UsesRepeatableAnnotations.class); } - public static junit.framework.Test suite() { - return new junit.framework.JUnit4TestAdapter(ClassTypeResolverJava8Test.class); - } - private ASTCompilationUnit parseAndTypeResolveForClass18(Class clazz) { return parseAndTypeResolveForClass(clazz, "1.8"); } diff --git a/pmd-javascript/src/test/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserTest.java b/pmd-javascript/src/test/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserTest.java index bc6a51961e..3c6c300e59 100644 --- a/pmd-javascript/src/test/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserTest.java +++ b/pmd-javascript/src/test/java/net/sourceforge/pmd/lang/ecmascript/ast/EcmascriptParserTest.java @@ -31,7 +31,7 @@ public class EcmascriptParserTest extends EcmascriptParserTestBase { */ @Test public void testLineNumbers() { - String SOURCE_CODE = "function a() {" + PMD.EOL + " alert('hello');" + PMD.EOL + "}" + PMD.EOL; + final String SOURCE_CODE = "function a() {" + PMD.EOL + " alert('hello');" + PMD.EOL + "}" + PMD.EOL; EcmascriptNode node = parse(SOURCE_CODE); assertEquals(1, node.getBeginLine()); assertEquals(1, node.getBeginColumn()); diff --git a/pmd-plsql/src/main/java/net/sourceforge/pmd/lang/plsql/symboltable/TypeSet.java b/pmd-plsql/src/main/java/net/sourceforge/pmd/lang/plsql/symboltable/TypeSet.java index 3a0343cd8c..f43d9b6776 100644 --- a/pmd-plsql/src/main/java/net/sourceforge/pmd/lang/plsql/symboltable/TypeSet.java +++ b/pmd-plsql/src/main/java/net/sourceforge/pmd/lang/plsql/symboltable/TypeSet.java @@ -107,7 +107,7 @@ public class TypeSet { public static class VoidResolver implements Resolver { public Class resolve(String name) throws ClassNotFoundException { - if (name.equals("void")) { + if ("void".equals(name)) { return void.class; } throw new ClassNotFoundException(); diff --git a/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/ast/NodeUtils.java b/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/ast/NodeUtils.java index d635a5bc18..95e5f1e8ec 100644 --- a/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/ast/NodeUtils.java +++ b/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/ast/NodeUtils.java @@ -30,6 +30,7 @@ import org.apache.commons.lang3.text.StrBuilder; * @version $Id: NodeUtils.java 687386 2008-08-20 16:57:07Z nbubna $ */ public class NodeUtils { + private NodeUtils() { } /** * Collect all the s that are carried along with a token. diff --git a/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/ast/TokenMgrError.java b/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/ast/TokenMgrError.java index 45cf19719c..fc7b2a14a3 100644 --- a/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/ast/TokenMgrError.java +++ b/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/ast/TokenMgrError.java @@ -52,9 +52,9 @@ public class TokenMgrError extends RuntimeException { errorCode = reason; } - public TokenMgrError(final boolean EOFSeen, final int lexState, final int errorLine, final int errorColumn, + public TokenMgrError(final boolean eofSeen, final int lexState, final int errorLine, final int errorColumn, final String errorAfter, final char curChar, final int reason) { - this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); + this(lexicalError(eofSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); } /** @@ -115,10 +115,10 @@ public class TokenMgrError extends RuntimeException { * before this error occured curchar : the offending character Note: You can * customize the lexical error message by modifying this method. */ - protected static String LexicalError(final boolean EOFSeen, final int lexState, final int errorLine, + protected static String lexicalError(final boolean eofSeen, final int lexState, final int errorLine, final int errorColumn, final String errorAfter, final char curChar) { return ("Lexical error at line " + errorLine + ", column " + errorColumn + ". Encountered: " - + (EOFSeen ? " " + + (eofSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int) curChar + "), ") + "after : \"" + addEscapes(errorAfter) + "\""); } diff --git a/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/util/DirectiveMapper.java b/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/util/DirectiveMapper.java index 6cd433ccef..ed7eb9caaa 100644 --- a/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/util/DirectiveMapper.java +++ b/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/util/DirectiveMapper.java @@ -21,6 +21,7 @@ import net.sourceforge.pmd.lang.vm.directive.Parse; import net.sourceforge.pmd.lang.vm.directive.Stop; public class DirectiveMapper { + private DirectiveMapper() { } private static final Map DIRECTIVE_MAP = new HashMap<>(); diff --git a/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/util/LogUtil.java b/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/util/LogUtil.java index c772265536..b925c5b1fa 100644 --- a/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/util/LogUtil.java +++ b/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/util/LogUtil.java @@ -33,6 +33,7 @@ import net.sourceforge.pmd.lang.vm.directive.Directive; * @since 1.5 */ public class LogUtil { + private LogUtil() { } /** * Creates a string that formats the template filename with line number and @@ -65,7 +66,7 @@ public class LogUtil { * Column number withing the file at linenum */ public static final String formatFileString(String template, final int linenum, final int colnum) { - if (template == null || template.equals("")) { + if (template == null || "".equals(template)) { template = ""; } return template + "[line " + linenum + ", column " + colnum + "]"; diff --git a/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/util/VelocityCharStream.java b/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/util/VelocityCharStream.java index 94ba0c0f19..4d557d53c6 100644 --- a/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/util/VelocityCharStream.java +++ b/pmd-vm/src/main/java/net/sourceforge/pmd/lang/vm/util/VelocityCharStream.java @@ -108,7 +108,7 @@ public final class VelocityCharStream implements CharStream { this(dstream, startline, startcolumn, 4096); } - private void ExpandBuff(boolean wrapAround) { + private void expandBuff(boolean wrapAround) { char[] newbuffer = new char[bufsize + nextBufExpand]; int[] newbufline = new int[bufsize + nextBufExpand]; int[] newbufcolumn = new int[bufsize + nextBufExpand]; @@ -152,7 +152,7 @@ public final class VelocityCharStream implements CharStream { tokenBegin = 0; } - private void FillBuff() throws java.io.IOException { + private void fillBuff() throws java.io.IOException { if (maxNextCharInd == available) { if (available == bufsize) { if (tokenBegin > nextBufExpand) { @@ -163,12 +163,12 @@ public final class VelocityCharStream implements CharStream { bufpos = 0; maxNextCharInd = 0; } else { - ExpandBuff(false); + expandBuff(false); } } else if (available > tokenBegin) { available = bufsize; } else if ((tokenBegin - available) < nextBufExpand) { - ExpandBuff(true); + expandBuff(true); } else { available = tokenBegin; } @@ -206,7 +206,7 @@ public final class VelocityCharStream implements CharStream { return c; } - private void UpdateLineColumn(char c) { + private void updateLineColumn(char c) { column++; if (prevCharIsLF) { @@ -264,7 +264,7 @@ public final class VelocityCharStream implements CharStream { bufpos++; if (bufpos >= maxNextCharInd) { - FillBuff(); + fillBuff(); } /* @@ -272,7 +272,7 @@ public final class VelocityCharStream implements CharStream { */ char c = buffer[bufpos]; - UpdateLineColumn(c); + updateLineColumn(c); return c; } @@ -347,7 +347,7 @@ public final class VelocityCharStream implements CharStream { * @param startcolumn * @param buffersize */ - public void ReInit(java.io.Reader dstream, int startline, int startcolumn, int buffersize) { + public void reInit(java.io.Reader dstream, int startline, int startcolumn, int buffersize) { inputStream = dstream; line = startline; column = startcolumn - 1; @@ -373,8 +373,8 @@ public final class VelocityCharStream implements CharStream { * @param startline * @param startcolumn */ - public void ReInit(java.io.Reader dstream, int startline, int startcolumn) { - ReInit(dstream, startline, startcolumn, 4096); + public void reInit(java.io.Reader dstream, int startline, int startcolumn) { + reInit(dstream, startline, startcolumn, 4096); } /** @@ -383,8 +383,8 @@ public final class VelocityCharStream implements CharStream { * @param startcolumn * @param buffersize */ - public void ReInit(java.io.InputStream dstream, int startline, int startcolumn, int buffersize) { - ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); + public void reInit(java.io.InputStream dstream, int startline, int startcolumn, int buffersize) { + reInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); } /** @@ -392,8 +392,8 @@ public final class VelocityCharStream implements CharStream { * @param startline * @param startcolumn */ - public void ReInit(java.io.InputStream dstream, int startline, int startcolumn) { - ReInit(dstream, startline, startcolumn, 4096); + public void reInit(java.io.InputStream dstream, int startline, int startcolumn) { + reInit(dstream, startline, startcolumn, 4096); } /**