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
4 changes: 2 additions & 2 deletions blocks/cocoon-xsp/cocoon-xsp-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>eclipse</groupId>
<artifactId>jdtcore</artifactId>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.core</artifactId>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public void consume(XSPExpressionParser parser, char ch) throws SAXException {
parser.setState(EXPRESSION_CHAR_STATE);
break;

case '':
case '´':
parser.append(ch);
parser.setState(EXPRESSION_SHELL_STATE);
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down Expand Up @@ -64,7 +64,7 @@ public class EclipseJavaCompiler implements LanguageCompiler, Recyclable {
boolean debug;

String sourceDir;
String sourceFile;
String sourceFile;
String destDir;
String sourceEncoding;
int compilerComplianceLevel;
Expand Down Expand Up @@ -99,15 +99,15 @@ public void setDestination(String destDir) {
}

public void setEncoding(String encoding) {
this.sourceEncoding = encoding;
this.sourceEncoding = encoding;
}

/**
* Set the version of the java source code to be compiled
*
* @param compilerComplianceLevel The version of the JVM for which the code was written.
* i.e: 130 = Java 1.3, 140 = Java 1.4 and 150 = Java 1.5
*
*
* @since 2.1.7
*/
public void setCompilerComplianceLevel(int compilerComplianceLevel) {
Expand All @@ -132,7 +132,7 @@ private String makeClassName(String fileName) throws IOException {
String str = fileName;
str = str.replace('\\', '/');
if (sourceDir != null) {
String prefix =
String prefix =
new File(sourceDir).getCanonicalPath().replace('\\', '/');
if (canonical != null) {
if (canonical.startsWith(prefix)) {
Expand Down Expand Up @@ -175,7 +175,7 @@ class CompilationUnit implements ICompilationUnit {
public char[] getFileName() {
return className.toCharArray();
}

public char[] getContents() {
char[] result = null;
FileReader fr = null;
Expand All @@ -201,15 +201,15 @@ public char[] getContents() {
}
return result;
}

public char[] getMainTypeName() {
int dot = className.lastIndexOf('.');
if (dot > 0) {
return className.substring(dot + 1).toCharArray();
}
return className.toCharArray();
}

public char[][] getPackageName() {
StringTokenizer izer = new StringTokenizer(className, ".");
char[][] result = new char[izer.countTokens()-1][];
Expand Down Expand Up @@ -247,24 +247,24 @@ public NameEnvironmentAnswer findType(char[] typeName, char[][] packageName) {
result.append(typeName);
return findType(result.toString());
}

private NameEnvironmentAnswer findType(String className) {

try {
if (className.equals(targetClassName)) {
ICompilationUnit compilationUnit =
ICompilationUnit compilationUnit =
new CompilationUnit(sourceFile, className);
return
return
new NameEnvironmentAnswer(compilationUnit, null);
}
String resourceName =
String resourceName =
className.replace('.', '/') + ".class";
InputStream is =
InputStream is =
classLoader.getResourceAsStream(resourceName);
if (is != null) {
byte[] classBytes;
byte[] buf = new byte[8192];
ByteArrayOutputStream baos =
ByteArrayOutputStream baos =
new ByteArrayOutputStream(buf.length);
int count;
while ((count = is.read(buf, 0, buf.length)) > 0) {
Expand All @@ -273,17 +273,17 @@ private NameEnvironmentAnswer findType(String className) {
baos.flush();
classBytes = baos.toByteArray();
char[] fileName = className.toCharArray();
ClassFileReader classFileReader =
new ClassFileReader(classBytes, fileName,
ClassFileReader classFileReader =
new ClassFileReader(classBytes, fileName,
true);
return
return
new NameEnvironmentAnswer(classFileReader, null);
}
} catch (IOException exc) {
handleError(className, -1, -1,
handleError(className, -1, -1,
exc.getMessage());
} catch (org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException exc) {
handleError(className, -1, -1,
handleError(className, -1, -1,
exc.getMessage());
}
return null;
Expand All @@ -294,7 +294,7 @@ private boolean isPackage(String result) {
return false;
}
String resourceName = result.replace('.', '/') + ".class";
InputStream is =
InputStream is =
classLoader.getResourceAsStream(resourceName);
return is == null;
}
Expand Down Expand Up @@ -322,7 +322,7 @@ public void cleanup() {
// EMPTY
}
};
final IErrorHandlingPolicy policy =
final IErrorHandlingPolicy policy =
DefaultErrorHandlingPolicies.proceedWithAllProblems();
final Map settings = new HashMap(9);
settings.put(CompilerOptions.OPTION_LineNumberAttribute,
Expand All @@ -340,6 +340,18 @@ public void cleanup() {
}
// Set the sourceCodeVersion
switch (this.compilerComplianceLevel) {
case 180:
settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
break;
case 170:
settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_7);
settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_7);
break;
case 160:
settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_6);
settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_6);
break;
case 150:
settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_5);
Expand All @@ -352,6 +364,15 @@ public void cleanup() {
}
// Set the target platform
switch (SystemUtils.JAVA_VERSION_INT) {
case 180:
settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_8);
break;
case 170:
settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_7);
break;
case 160:
settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_6);
break;
case 150:
settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
break;
Expand All @@ -361,7 +382,7 @@ public void cleanup() {
default:
settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_3);
}
final IProblemFactory problemFactory =
final IProblemFactory problemFactory =
new DefaultProblemFactory(Locale.getDefault());

final ICompilerRequestor requestor = new ICompilerRequestor() {
Expand All @@ -387,7 +408,7 @@ public void acceptResult(CompilationResult result) {
className.append(compoundName[j]);
}
byte[] bytes = classFile.getBytes();
String outFile = destDir + "/" +
String outFile = destDir + "/" +
className.toString().replace('.', '/') + ".class";
FileOutputStream fout = new FileOutputStream(outFile);
BufferedOutputStream bos = new BufferedOutputStream(fout);
Expand All @@ -400,7 +421,7 @@ public void acceptResult(CompilationResult result) {
}
}
};
ICompilationUnit[] compilationUnits =
ICompilationUnit[] compilationUnits =
new ICompilationUnit[classNames.length];
for (int i = 0; i < compilationUnits.length; i++) {
String className = classNames[i];
Expand All @@ -416,7 +437,7 @@ public void acceptResult(CompilationResult result) {
}

void handleError(String className, int line, int column, Object errorMessage) {
String fileName =
String fileName =
className.replace('.', File.separatorChar) + ".java";
if (column < 0) column = 0;
errors.add(new CompilerError(fileName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ Parameter '<xsl:value-of select="$name"/>' missing in dynamic tag &lt;<xsl:value
<xsl:when test="esql:pool">
try {
_esql_connection = new Cocoon2EsqlConnection( (DataSourceComponent) _esql_get_selector().select(String.valueOf(<xsl:copy-of select="$pool"/>)) );
setupLogger(_esql_connection);

<xsl:if test="esql:allow-multiple-results">
_esql_connection.setMultipleResults(String.valueOf(<xsl:copy-of select="$allow-multiple-results"/>));
Expand All @@ -268,7 +267,6 @@ Parameter '<xsl:value-of select="$name"/>' missing in dynamic tag &lt;<xsl:value
</xsl:if>
try {
_esql_connection = new Cocoon2EsqlConnection();
setupLogger(_esql_connection);

_esql_connection.setURL(String.valueOf(<xsl:copy-of select="$dburl"/>));
<xsl:if test="esql:username">
Expand Down
32 changes: 16 additions & 16 deletions parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@
<organizationUrl>http://www.apache.org</organizationUrl>
<roles>
<role>ASF member</role>
<role>PMC chair</role>
<role>PMC chair</role>
<role>PMC member</role>
<role>Committer</role>
</roles>
Expand Down Expand Up @@ -506,7 +506,7 @@
<roles>
<role>Emeritus PMC Member</role>
<role>Emeritus Committer</role>
</roles>
</roles>
<timezone>+1</timezone>
</developer>
<developer>
Expand Down Expand Up @@ -1751,9 +1751,9 @@
<version>1.1</version>
</dependency>
<dependency>
<groupId>eclipse</groupId>
<artifactId>jdtcore</artifactId>
<version>3.1.0</version>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.core</artifactId>
<version>3.26.0</version>
</dependency>
<dependency>
<groupId>net.sourceforge.jena</groupId>
Expand Down Expand Up @@ -1970,22 +1970,22 @@
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring.version}</version>
</dependency>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
</dependency>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
<version>${spring.version}</version>
</dependency>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
Expand All @@ -2001,7 +2001,7 @@
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
</dependency>
<dependency>
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
Expand Down Expand Up @@ -2233,7 +2233,7 @@
<groupId>org.apache.cocoon</groupId>
<artifactId>cocoon-block-deployment</artifactId>
<version>1.1.0</version>
</dependency>
</dependency>
<dependency>
<groupId>org.apache.cocoon</groupId>
<artifactId>cocoon-blocks-fw-demo1</artifactId>
Expand Down Expand Up @@ -2773,7 +2773,7 @@
<groupId>org.apache.cocoon</groupId>
<artifactId>cocoon-servlet-service-components-sample</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
</dependency>
<dependency>
<groupId>org.apache.cocoon</groupId>
<artifactId>cocoon-servlet-service-impl</artifactId>
Expand Down Expand Up @@ -3056,12 +3056,12 @@
<exclude>src/site/**</exclude>
</excludes>
</configuration>
</plugin>
</plugin>
<plugin>
<groupId>org.apache.cocoon</groupId>
<artifactId>cocoon-it-fw</artifactId>
<version>1.0.0-M1</version>
</plugin>
</plugin>
</plugins>
</pluginManagement>

Expand Down Expand Up @@ -3237,7 +3237,7 @@
<docs.m.configuration-api.relPath>${docs.m.site-configuration.relPath}configuration-api/</docs.m.configuration-api.relPath>
<docs.m.spring-configurator.relPath>${docs.m.site-configuration.relPath}spring-configurator/</docs.m.spring-configurator.relPath>
<docs.m.jnet.relPath>subprojects/jnet/</docs.m.jnet.relPath>
<docs.m.block-deployment.relPath>subprojects/block-deployment/</docs.m.block-deployment.relPath>
<docs.m.block-deployment.relPath>subprojects/block-deployment/</docs.m.block-deployment.relPath>
<!-- Path and version properties: blocks -->
<docs.m.ajax.version>1.0</docs.m.ajax.version>
<docs.m.ajax.relPath>2.2/blocks/ajax/${docs.m.ajax.version}/</docs.m.ajax.relPath>
Expand Down Expand Up @@ -3329,7 +3329,7 @@
</goals>
</execution>
</executions>
</plugin>
</plugin>
</plugins>
</build>
</profile>
Expand Down