[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| [udig-devel] Bug in EndConnectionState.java | 
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