On Sat, 29 Dec 2001, Bernhard Huber wrote:

>   hi,
>
> tried to solve BUG 5060, see
>
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5060
>
> ,
> see also
> http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=100866335220243&w=2
>
> As this problem only appears in the commandline environment, I check
> org.apache.cocoon.environment.commandline.CommandlineContext
>
> I think that the implementation of getResource, and getRealPath of
> CommandlineContext is wrong.
> I want to replace it by:
>     /**
>      * Constructs a CommandlineContext object from a ServletContext object
>      */
>     public CommandlineContext (String contextDir) {
>         String contextDirPath = new File(contextDir).getAbsolutePath();
>         this.contextDir = contextDirPath;
>         this.attributes = new HashMap();
>     }
>     public URL getResource(String path) throws MalformedURLException {
>         getLogger().debug("CommandlineContext: getResource=" + path);
>         File f = new File( contextDir, path );
>         return f.toURL();
>     }
>
>     public String getRealPath(String path) {
>         getLogger().debug("CommandlineContext: getRealPath=" + path);
>         File f = new File( this.contextDir, path );
>         return f.getAbsolutePath();
>     }
>
> As I'm also writing JUnit Testcases for CommandlineContext, and
> ResolverImpl,
> which are not finished yet, and I will only able to test it on W2K, I
> will wait a bit, checking in the CommandlineContext changes.

You have a impression when you are ready to commit it. I'm asking as I'm
checking Kens patch for the Notifyer stuff so I need anothe day or two
until I'm ready to do the repo restructuring. If you want me to wait
just say so.

> As CommandlineContext is very fundamental, any objections against the
> CommandlineContext changes?

If it fixes bug, than go for it.

Giacomo


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

Reply via email to