openbaton / openstack4j-plugin

Apache License 2.0
3 stars 12 forks source link

null pointer exception when region field is empty #5

Closed gc4rella closed 7 years ago

gc4rella commented 7 years ago

the plugin is throwing a null pointer exception when there is no region specified in the vim object. In particular, the exception is thrown by the line https://github.com/openbaton/openstack4j-plugin/blob/develop/src/main/java/org/openbaton/drivers/openstack4j/OpenStack4JDriver.java#L117 which tries to log a warning message saying that the region was not found.

error log:

[pool-1-thread-2] ERROR org.openbaton.drivers.openstack4j.OpenStack4JDriver - null java.lang.NullPointerException at org.openbaton.drivers.openstack4j.OpenStack4JDriver.authenticate(OpenStack4JDriver.java:117) at org.openbaton.drivers.openstack4j.OpenStack4JDriver.listImages(OpenStack4JDriver.java:332) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.openbaton.plugin.PluginListener.executeMethod(PluginListener.java:208) at org.openbaton.plugin.PluginListener.run(PluginListener.java:124) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)

lorenzotomasini commented 7 years ago

this should be fixed now