Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Bug in EndConnectionState.java

I can make this change; now ... commit made as of -r31900

(This fix will of course not be in the 1.2-SNAPSHOT from a few days ago)

You may also want to get commit access for quick fixes such as this - we try and have an open project for just that reason.

Jody

On 31/07/2010, at 10:00 PM, Bastian Schäffer wrote:

> List,
> 
> I noticed a bug in the EndConnectionState.java
> 
> The variable
> 
>  errors
> 
> 
> is in some cases not initialized when the next() method is called.
> 
> I would like to replace line 295
> 
> if (errors.isEmpty()) {
> 
> with
> 
> if (errors != null && errors.isEmpty())
> 
> to avoid NullPointerExceptions.
> 
> Whole method:
> 
> public State next() {
>        // if errors occured, go a handling state, otherwise defer back
> to pipe
>        if ((getErrors() == null || getErrors().isEmpty()) && super. ==
> null) {
>            return null;
>        } else {
>            if (errors != null && errors.isEmpty()) {
>                return new ConnectionErrorState(errors);
>            } else {
>                return nextState;
>            }
> 
>        }
> 
>    }
> 
> 
> @dev team: could you check that and perhaps modify the trunk?
> 
> Regards,
> Bastian Schäffer
> 
> 
> -- 
> Bastian Schäffer
> Institute for Geoinformatics (IfGI), University of Muenster, Germany
> Weseler Str. 253, 48151 Muenster
> Fon: +49 (0)251 - 83-30046   Fax: +49 (0)251 - 83-39763
> email: schaeffer@xxxxxxxxxxxxxxx
> IfGI-site: http://ifgi.uni-muenster.de
> 
> 
> 
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel



Back to the top