phaniteja-24 / hudson-eclipse

Automatically exported from code.google.com/p/hudson-eclipse
0 stars 0 forks source link

Discover gives NullPointerException #42

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. In hudson configuration, on the server, remove the value for the field 
"Hudson URL"
2. Save the new configuration
3. In eclipse try to discover the running instances

The current implementation of HudsonServer.fromXML() will throw a null 
pointer exception. Worse, the exception is not visible to the user.

Because the server will respond with an XML that is missing the <url> 
element, we are not able to decide what is the server's URL. We should 
inform the user that we got a response from a hudson server, but it is 
possible that it is missing the "Hudson URL" field in its configuration.

What would be the best way to handle this? 
1. popup a dialog with an error message.
2. log an info message
3. show an entry in the Hudson Digger dialog, that is not selectable, with 
the IP of the server that responded to the broadcast request and some 
warning signs (192.168.5.20 !!! possible server) .

Original issue reported on code.google.com by dan.corneanu@gmail.com on 25 Jun 2009 at 2:02

GoogleCodeExporter commented 9 years ago
A patch to solve this.
It also solves other stupid mistakes in the digger package.

1. wrongly calling a thread's start() method twice.
2. clean listener interface
3. clean handling of the Cancel/Close events in the DIgger dialog.

Original comment by dan.corneanu@gmail.com on 26 Jun 2009 at 3:22

Attachments:

GoogleCodeExporter commented 9 years ago
Hi

The patch does not apply cleanly to trunk - could you create a new patch based 
on the
trunk? Also, please do not format source automatically in Eclipse, as it makes 
the
patch larger than it needs to be.

Original comment by jre...@gmail.com on 26 Jun 2009 at 6:31

GoogleCodeExporter commented 9 years ago
Sorry, I forgot to say that the patch is made based on the hudson-eclipse 
folder.
Regarding the code formatting, I'll not use it in the future. It is an old 
habit of 
mine, my hands have learned to press CTRL-Shift-F every time.

The new patch contains changes without the formatting bloat.
I made it from inside eclipse, against the hudson-eclipse folder/project.

Original comment by dan.corneanu@gmail.com on 27 Jun 2009 at 6:37

Attachments:

GoogleCodeExporter commented 9 years ago
Patch has been applied in 1.0.8.

Original comment by jre...@gmail.com on 2 Oct 2009 at 6:39

GoogleCodeExporter commented 9 years ago
Is the patch applied to the source code? because I did not see the changes in 
the 
trunk. The last version of the plugin (1.0.10) has a serious bug related to 
calling a 
thread's start() method multiple times.

Original comment by dan.corneanu@gmail.com on 25 Nov 2009 at 9:02