[RFC][icedtea-web] Use description param when creating a LaunchException

Andrew Hughes ahughes at redhat.com
Sun Feb 5 06:03:39 PST 2012


----- Original Message -----
> On 02/02/2012 10:06 PM, Deepak Bhole wrote:
> > * Danesh Dadachanji<ddadacha at redhat.com>  [2012-02-02 15:06]:
> >> On 02/02/12 02:00 PM, Danesh Dadachanji wrote:
> >>>
> >>> Pushed.
> >>>
> >>> http://icedtea.classpath.org/hg/release/icedtea-web-1.2/rev/466a2440ed59
> >>>
> >>
> >> Bah sorry, I forgot to test the case where the locale's value is
> >> an
> >> empty string. I did not realize it returns null, I'll have to push
> >> another changeset. =(
> >>
> >> Patch attached handles the null case.
> >>
> >
> > OK for HEAD and 1.2.
> >
> > Deepak
> >
> >> +2012-02-02  Danesh Dadachanji<ddadacha at redhat.com>
> >> +
> >> +	* netx/net/sourceforge/jnlp/LaunchException.java: Fix message
> >> +	to handle null description.
> >> +
> >>
> >> Regards,
> >> Danesh
> >
> >> diff --git a/netx/net/sourceforge/jnlp/LaunchException.java
> >> b/netx/net/sourceforge/jnlp/LaunchException.java
> >> --- a/netx/net/sourceforge/jnlp/LaunchException.java
> >> +++ b/netx/net/sourceforge/jnlp/LaunchException.java
> >> @@ -52,7 +52,8 @@ public class LaunchException extends Exc
> >>        * Creates a LaunchException without detail message.
> >>        */
> >>       public LaunchException(JNLPFile file, Exception cause,
> >>       String severity, String category, String summary, String
> >>       description) {
> >> -        super(severity + ": " + category + ": " + summary + " " +
> >> description);
> >> +        super(severity + ": " + category + ": " + summary + " "
> >> +        	    + description == null ? "" : description);
> >>
> >>           this.file = file;
> >>           this.category = category;
> >
> 
> This is not necessary. When null String is used in "string"+string,
> then just "null" is printed (stringnull in this example)
> 
> Regards J.
> 
> 

True, but it looks ugly.
-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




More information about the distro-pkg-dev mailing list