cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: [Fwd: Examples and wrappers for Cocoon (from other applications)]
Date Wed, 22 Dec 1999 16:30:55 GMT
Brett McLaughlin wrote:

>                              Name: CocoonFromServlet.java
>    CocoonFromServlet.java    Type: Java Source File (application/x-unknown-content-type-java_auto_file)
>                          Encoding: base64
> 
>                                 Name: CocoonServletRequest.java
>    CocoonServletRequest.java    Type: Java Source File (application/x-unknown-content-type-java_auto_file)
>                             Encoding: base64
> 
>                                  Name: CocoonServletResponse.java
>    CocoonServletResponse.java    Type: Java Source File (application/x-unknown-content-type-java_auto_file)
>                              Encoding: base64

I know you'll hate me, but instead of

    public String getRemoteHost() {
        if (req != null)
            return req.getRemoteHost();
        return null;
    }

is there any reason why you didn't use

    public String getRemoteHost() {
        return (req != null) ? req.getRemoteHost() : null;
    }

which is much more readable and standard (IMO)?

Besides this, I like them and I also like the approach, it's not that
dirty as it seemed to me at first.

I'm going to put them in the samples, any problem with that?

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------



Mime
View raw message