Details
Description
This bug is related to QDOX-144.
The stack trace is this:
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] syntax error @[57,54] in file:/C:/GSOC/workspace/myfaces/current12-1/core
/impl/src/main/java/org/apache/myfaces/el/unified/resolver/FacesCompositeELResol
ver.java
[INFO] ------------------------------------------------------------------------
[INFO] Trace
com.thoughtworks.qdox.parser.ParseException: syntax error @[57,54] in file:/C:/G
SOC/workspace/myfaces/current12-1/core/impl/src/main/java/org/apache/myfaces/el/
unified/resolver/FacesCompositeELResolver.java
at com.thoughtworks.qdox.parser.impl.Parser.yyerror(Parser.java:987)
at com.thoughtworks.qdox.parser.impl.Parser.yyparse(Parser.java:1293)
at com.thoughtworks.qdox.parser.impl.Parser.parse(Parser.java:968)
at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:31
7)
at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:34
9)
at com.thoughtworks.qdox.JavaDocBuilder.addSource(JavaDocBuilder.java:34
5)
at com.thoughtworks.qdox.JavaDocBuilder$2.visitFile(JavaDocBuilder.java:
435)
at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(Directory
Scanner.java:43)
at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(Directory
Scanner.java:34)
at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(Directory
Scanner.java:34)
at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(Directory
Scanner.java:34)
at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(Directory
Scanner.java:34)
at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(Directory
Scanner.java:34)
at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(Directory
Scanner.java:34)
at com.thoughtworks.qdox.directorywalker.DirectoryScanner.walk(Directory
Scanner.java:34)
at com.thoughtworks.qdox.directorywalker.DirectoryScanner.scan(Directory
Scanner.java:52)
at com.thoughtworks.qdox.JavaDocBuilder.addSourceTree(JavaDocBuilder.jav
a:432)
at com.thoughtworks.qdox.JavaDocBuilder.addSourceTree(JavaDocBuilder.jav
a:421)
at org.apache.myfaces.buildtools.maven2.plugin.builder.qdox.QdoxModelBui
lder.buildModel(QdoxModelBuilder.java:323)
at org.apache.myfaces.buildtools.maven2.plugin.builder.qdox.QdoxModelBui
lder.buildModel(QdoxModelBuilder.java:135)
at org.apache.myfaces.buildtools.maven2.plugin.builder.BuildMetaDataMojo
.buildModel(BuildMetaDataMojo.java:386)
at org.apache.myfaces.buildtools.maven2.plugin.builder.BuildMetaDataMojo
.execute(BuildMetaDataMojo.java:290)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:451)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:558)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:499)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:478)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:330)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:291)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 34 seconds
[INFO] Finished at: Fri Mar 06 19:06:01 COT 2009
[INFO] Final Memory: 41M/254M
[INFO] ------------------------------------------------------------------------
The file looks like this (just the important parts are included):
package org.apache.myfaces.el.unified.resolver;
public final class FacesCompositeELResolver extends org.apache.myfaces.el.CompositeELResolver
{
private final Scope _scope;
public enum Scope
{ Faces, JSP } public FacesCompositeELResolver(final Scope scope)
{
if (scope == null)
_scope = scope;
}
........
Inner enums used inside the class fails. But this code:
public final class FacesCompositeELResolver extends org.apache.myfaces.el.CompositeELResolver
{
private final Scope _scope;
public enum Scope
{
}
Works correctly. It seems to be something wrong with the parser.
Activity
Field | Original Value | New Value |
---|---|---|
Fix Version/s | 1.10 [ 15020 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Resolution | Fixed [ 1 ] |
Resolution | Fixed [ 1 ] | |
Status | Closed [ 6 ] | Reopened [ 4 ] |
Resolution | Fixed [ 1 ] | |
Fix Version/s | 1.9.1 [ 15252 ] | |
Status | Reopened [ 4 ] | Closed [ 6 ] |
Fix Version/s | 1.10 [ 15020 ] |
Seems you found another issue considering the position of the enum and/or missing semicolon.
Workarounds are: moving the enum to the bottom of the class or adding a semi-colon after JSP
I've added a test for this issue in enumsTest