[ 
https://issues.apache.org/jira/browse/VELOCITY-551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12500607
 ] 

Michiel Toneman commented on VELOCITY-551:
------------------------------------------

Sorry, I haven't. Velocity 1.5 doesn't build for me on Java 6 and I have no 
time at the moment to spend on it.

------------------------------------------------
compile-test:
    [javac] Compiling 4 source files to 
/Users/michiel/src/velocity-1.5/bin/test-classes
    [javac] 
/Users/michiel/src/velocity-1.5/bin/test-src/org/apache/velocity/test/sql/HsqlDataSource.java:31:
 org.apache.velocity.test.sql.HsqlDataSource is not abstract and does not 
override abstract method 
<T>createQueryObject(java.lang.Class<T>,javax.sql.DataSource) in 
javax.sql.DataSource
    [javac] public class HsqlDataSource implements DataSource {
    [javac]        ^
    [javac] Note: 
/Users/michiel/src/velocity-1.5/bin/test-src/org/apache/velocity/test/sql/HsqlDataSource.java
 uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 1 error
------------------------------------------------

> IncludeNotFound event handler not including the "notfound" page
> ---------------------------------------------------------------
>
>                 Key: VELOCITY-551
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-551
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.5
>         Environment: Linux (Fedora Core 5) / OSX 10.4.9
> Java 6
> Tomcat 6.0.10
> Struts2
>            Reporter: Michiel Toneman
>
> The IncludeNotFound event handler claims in the log "Can't find include not 
> found
> page: " even though the "notfound" page exists.
> I've tracked this in the source:
> ------------------------------------------------
>  boolean exists = (rs.getLoaderNameForResource(includeResourcePath) != null);
>        if (!exists)
>        {
>            if (rs.getLoaderNameForResource(notfound) == null)
>            {
>                return notfound;
>            }
>            else
>            {
>                /**
>                 * can't find not found, so display nothing
>                 */
>                rs.getLog().error("Can't find include not found page:
> " + notfound);
>                return null;
>            }
>        }
>        else
>            return includeResourcePath;
> ---------------------------------------------------
> I think the condition:
>  if (rs.getLoaderNameForResource(notfound) == null)
> should read:
>  if (rs.getLoaderNameForResource(notfound) != null)
> Changing this fixed the problem for me.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to