Skip to content
Open
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
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ lib/

# XPath parser generated during compilation
/src/org/apache/xalan/processor/XSLProcessorVersion.java
/src/org/apache/xalan/xsltc/compiler/XPathLexer.java
/src/org/apache/xalan/xsltc/compiler/XPathParser.java
/src/org/apache/xalan/xsltc/compiler/sym.java
xalan/src/main/java/org/apache/xalan/xsltc/compiler/XPathLexer.java
xalan/src/main/java/org/apache/xalan/xsltc/compiler/XPathParser.java
xalan/src/main/java/org/apache/xalan/xsltc/compiler/sym.java

# Stylebook processing progress flags.
/stylebook/sources/xalan/DONE
Expand Down
16 changes: 8 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
<stylebook.classpath>
"stylebook/stylebook-1.0-b3_xalan-2.jar${path.separator}serializer/target/classes${path.separator}xalan/target/classes${path.separator}"
</stylebook.classpath>
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
<exec-maven-plugin.version>3.1.0</exec-maven-plugin.version>
<maven-compiler-plugin.version>3.12.1</maven-compiler-plugin.version>
<exec-maven-plugin.version>3.1.1</exec-maven-plugin.version>
<maven-shade-plugin.version>3.5.1</maven-shade-plugin.version>
<junit-jupiter.version>5.10.1</junit-jupiter.version>
<junit-jupiter.version>5.10.2</junit-jupiter.version>
<!-- TODO: Upgrade to 5.x after dropping requirement to build on JDK 8 -->
<mockito.version>4.11.0</mockito.version>
<maven-javadoc-plugin.version>3.6.0</maven-javadoc-plugin.version>
<maven-javadoc-plugin.version>3.6.3</maven-javadoc-plugin.version>
<maven-source-plugin.version>3.3.0</maven-source-plugin.version>
</properties>

Expand Down Expand Up @@ -264,7 +264,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.2</version>
<version>3.2.5</version>
<configuration>
<argLine>${maven-surefire-plugin.argLine}</argLine>
</configuration>
Expand Down Expand Up @@ -423,15 +423,15 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
<version>3.12.1</version>
</plugin>

<!-- Maven finds this without assistance, but grumbles about
unspecified plugin version, so... -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.4.5</version>
<version>3.5.0</version>
</plugin>

<!-- During cleaning phase, empty directories ./build and ./lib, which
Expand Down Expand Up @@ -459,7 +459,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-resources</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ public abstract class ExtensionHandlerJava extends ExtensionHandler
* needed.
*
* @param namespaceUri the extension namespace URI that I'm implementing
* @param funcNames string containing list of functions of extension NS
* @param lang language of code implementing the extension
* @param srcURL value of src attribute (if any) - treated as a URL
* or a classname depending on the value of lang. If
* srcURL is not null, then scriptSrc is ignored.
* @param scriptSrc the actual script code (if any)
* @param scriptLang the scripting language
* @param className the extension class name
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public JNDIConnectionPool(String jndiDatasourcePath)
}

/**
* Sets the path for the jndi datasource
* Sets the path for the jndi datasource
* @param jndiPath
*/
public void setJndiPath(String jndiPath)
Expand All @@ -97,8 +97,7 @@ public void setJndiPath(String jndiPath)
}

/**
* Returns the path for the jndi datasource
* @param jndiPath
* Returns the path for the jndi datasource
*/
public String getJndiPath()
{
Expand All @@ -108,8 +107,8 @@ public String getJndiPath()
/**
* Always returns true.
* This method was intended to indicate if the pool was enabled, however, in
* this implementation that is not relavant.
* @return
* this implementation that is not relevant.
* @return true
*/
public boolean isEnabled()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,6 @@ private void extractSQLMetaData( ResultSetMetaData meta )
/**
* Populate the Expanded Name Table with the Node that we will use.
* Keep a reference of each of the types for access speed.
* @return
*/
protected void createExpandedNameTable( )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ private void buildBasicStructure( Exception e )
/**
* Populate the Expanded Name Table with the Node that we will use.
* Keep a reference of each of the types for access speed.
* @return
*/
protected void createExpandedNameTable( )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public XConnection( )
* <code>org.apache.xalan.lib.sql.ConnectionPool</code> or a JNDI datasource.
*
* @param exprContext Context automatically passed from the XSLT sheet.
* @param name The name of the ConnectionPool or the JNDI DataSource path.
* @param connPoolName The name of the ConnectionPool or the JNDI DataSource path.
*
*/
public XConnection( ExpressionContext exprContext, String connPoolName )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ public AVT getLiteralResultAttribute(String name)
/**
* Return the raw value of the attribute.
*
* @param namespaceURI:localName or localName if the namespaceURI is null of
* @param rawName Either "namespaceURI:localName" (or "localName" if the namespaceURI is null) of
* the attribute to get
*
* @return The Attr value as a string, or the empty string if that attribute
Expand Down Expand Up @@ -697,12 +697,12 @@ public Node removeNamedItemNS(String namespaceURI, String localName)
/**
* Unimplemented. See org.w3c.dom.NamedNodeMap
*
* @param A node to store in this map
* @param arg A node to store in this map
*
* @return If the new Node replaces an existing node the replaced
* Node is returned, otherwise null is returned
*
* @throws DOMException
* @throws DOMException will be thrown as this method is not implemented
*/
public Node setNamedItem(Node arg) throws DOMException
{
Expand All @@ -714,12 +714,12 @@ public Node setNamedItem(Node arg) throws DOMException
/**
* Unimplemented. See org.w3c.dom.NamedNodeMap
*
* @param A node to store in this map
* @param arg A node to store in this map
*
* @return If the new Node replaces an existing node the replaced
* Node is returned, otherwise null is returned
*
* @throws DOMException
* @throws DOMException will be thrown as this method is not implemented
*/
public Node setNamedItemNS(Node arg) throws DOMException
{
Expand Down
13 changes: 5 additions & 8 deletions xalan/src/main/java/org/apache/xalan/templates/ElemNumber.java
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,6 @@ public void execute(
* @param newChild Child to add to child list
*
* @return Child just added to child list
*
* @throws DOMException
*/
public ElemTemplateElement appendChild(ElemTemplateElement newChild)
{
Expand All @@ -613,7 +611,7 @@ public ElemTemplateElement appendChild(ElemTemplateElement newChild)
*
* @return the first ancestor that matches the given pattern
*
* @throws javax.xml.transform.TransformerException
* @throws javax.xml.transform.TransformerException if cannot get match score
*/
int findAncestor(
XPathContext xctxt, XPath fromMatchPattern, XPath countMatchPattern,
Expand Down Expand Up @@ -1593,7 +1591,7 @@ String getZeroString()
* @param val Value to convert -- must be greater than zero.
* @param table a table containing one character for each digit in the radix
* @return String representing alpha count of number.
* @see TransformerImpl#DecimalToRoman
* @see org.apache.xalan.transformer.DecimalToRoman
*
* Note that the radix of the conversion is inferred from the size
* of the table.
Expand All @@ -1617,11 +1615,10 @@ protected String int2singlealphaCount(long val, CharArrayWrapper table)
* count using the sequence A B C ... Z AA AB AC.... etc.
*
* @param val Value to convert -- must be greater than zero.
* @param table a table containing one character for each digit in the radix
* @param aTable Array of alpha characters representing numbers
* @param stringBuf Buffer where to save the string representing alpha count of number.
*
* @see TransformerImpl#DecimalToRoman
* @see org.apache.xalan.transformer.DecimalToRoman
*
* Note that the radix of the conversion is inferred from the size
* of the table.
Expand Down Expand Up @@ -1722,7 +1719,7 @@ protected void int2alphaCount(long val, CharArrayWrapper aTable,
* @param thisBundle Resource bundle to use
*
* @return String representing alpha count of number.
* @see XSLProcessor#DecimalToRoman
* @see org.apache.xalan.transformer.DecimalToRoman
*
* Note that the radix of the conversion is inferred from the size
* of the table.
Expand Down Expand Up @@ -1933,7 +1930,7 @@ else if (val >= multiplier.getLong(i))
* @param prefixesAreOK true_ to enable prefix notation (e.g. 4 = "IV"),
* false_ to disable prefix notation (e.g. 4 = "IIII").
* @return Roman numeral string.
* @see DecimalToRoman
* @see org.apache.xalan.transformer.DecimalToRoman
* @see m_romanConvertTable
*/
protected String long2roman(long val, boolean prefixesAreOK)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ protected String int2alphaCount(int val, char[] table)
* @param prefixesAreOK true_ to enable prefix notation (e.g. 4 = "IV"),
* false_ to disable prefix notation (e.g. 4 = "IIII").
* @return Roman numeral string.
* @see DecimalToRoman
* @see org.apache.xalan.transformer.DecimalToRoman
* @see m_romanConvertTable
*/
String long2roman(long val, boolean prefixesAreOK)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -798,9 +798,7 @@ public String getBaseURLOfSource()
/**
* Get the base URL of the source.
*
*
* NEEDSDOC @param base
* @return The base URL of the source tree, or null.
*/
public void setBaseURLOfSource(String base)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,14 @@ protected void setQName(QName qname) {
* Set the QName for the SyntaxTreeNode
* @param uri The element's namespace URI
* @param prefix The element's namespace prefix
* @param local The element's local name
* @param localName The element's local name
*/
protected void setQName(String uri, String prefix, String localname) {
_qname = new QName(uri, prefix, localname);
protected void setQName(String uri, String prefix, String localName) {
_qname = new QName(uri, prefix, localName);
}

/**
* Set the QName for the SyntaxTreeNode
* @param qname The QName for the syntax tree node
* Get the QName for the SyntaxTreeNode
*/
protected QName getQName() {
return(_qname);
Expand Down Expand Up @@ -916,7 +915,7 @@ protected final void indent(int indent) {
* @param element The element in which the error occured (normally 'this'
* but it could also be an expression/pattern/etc.)
* @param parser The XSLT parser to report the error to.
* @param error The error code (from util/ErrorMsg).
* @param errorCode The error code (from util/ErrorMsg).
* @param message Any additional error message.
*/
protected void reportError(SyntaxTreeNode element, Parser parser,
Expand All @@ -930,7 +929,7 @@ protected void reportError(SyntaxTreeNode element, Parser parser,
* @param element The element in which the error occured (normally 'this'
* but it could also be an expression/pattern/etc.)
* @param parser The XSLT parser to report the error to.
* @param error The error code (from util/ErrorMsg).
* @param errorCode The error code (from util/ErrorMsg).
* @param message Any additional error message.
*/
protected void reportWarning(SyntaxTreeNode element, Parser parser,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,7 @@

package org.apache.xalan.xsltc.compiler.util;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Map;
import java.util.Stack;
import java.util.*;

import org.apache.bcel.Constants;
import org.apache.bcel.classfile.Field;
Expand Down Expand Up @@ -819,14 +813,13 @@ public int compareTo(Object comparand) {
/**
* Find the outlineable chunks in this method that would be the best choices
* to outline, based on size and position in the method.
* @param classGen The {@link ClassGen} with which the generated methods
* @param classGen The {@link ClassGenerator} with which the generated methods
* will be associated
* @param totalMethodSize the size of the bytecode in the original method
* @return a <code>java.util.ArrayList</code> containing the
* {@link MethodGenerator.Chunk}s that may be outlined from this method
*/
private ArrayList getCandidateChunks(ClassGenerator classGen,
int totalMethodSize) {
private ArrayList getCandidateChunks(ClassGenerator classGen, int totalMethodSize) {
Iterator instructions = getInstructionList().iterator();
ArrayList candidateChunks = new ArrayList();
ArrayList currLevelChunks = new ArrayList();
Expand Down Expand Up @@ -1125,7 +1118,7 @@ private ArrayList mergeAdjacentChunks(Chunk[] chunks) {
* Breaks up the IL for this {@link MethodGenerator} into separate
* outlined methods so that no method exceeds the 64KB limit on the length
* of the byte code associated with a method.
* @param classGen The {@link ClassGen} with which the generated methods
* @param classGen The {@link ClassGenerator} with which the generated methods
* will be associated
* @param originalMethodSize The number of bytes of bytecode represented by
* the {@link InstructionList} of this method
Expand All @@ -1134,7 +1127,7 @@ private ArrayList mergeAdjacentChunks(Chunk[] chunks) {
*/
public Method[] outlineChunks(ClassGenerator classGen,
int originalMethodSize) {
ArrayList methodsOutlined = new ArrayList();
List<Method> methodsOutlined = new ArrayList<>();
int currentMethodSize = originalMethodSize;

int outlinedCount = 0;
Expand Down Expand Up @@ -1788,12 +1781,12 @@ private static Instruction loadLocal(int index, Type type) {

/**
* Helper method to generate an instance of a subclass of
* {@link StoreInstruction} based on the specified {@link Type} that will
* {@link Instruction} based on the specified {@link Type} that will
* store a value in the specified local variable
* @param index the JVM stack frame index of the variable that is to be
* stored
* @param type the {@link Type} of the variable
* @return the generated {@link StoredInstruction}
* @return the generated {@link Instruction}
*/
private static Instruction storeLocal(int index, Type type) {
if (type == Type.BOOLEAN) {
Expand Down Expand Up @@ -1973,7 +1966,7 @@ protected Method getThisMethod() {
* </p>
* @return <code>true</code> if the <code>InstructionList</code> was
* modified; <code>false</code> otherwise
* @see The Java Virtual Machine Specification, Second Edition
* @see <a href="https://docs.oracle.com/javase/specs/jvms/se6/html/VMSpecTOC.doc.html">The Java Virtual Machine Specification, Second Edition</a>
*/
boolean widenConditionalBranchTargetOffsets() {
boolean ilChanged = false;
Expand Down