URLConnection urlConnection = null;
try {
System.out.println(CLASS_NAME + ": Downloading Firmware from URL " + deviceFirmware.getUrl());
firmwareURL = new URL(deviceFirmware.getUrl());
urlConnection = firmwareURL.openConnection();
<BUG>if(deviceFirmware.getName() != null) {

downloadedFirmwareName = deviceFirmware.getName();</BUG>
} else {
downloadedFirmwareName = "firmware_" +new Date().getTime()+".deb";

URLConnection urlConnection = null;
try {
System.out.println(CLASS_NAME + ": Downloading Firmware from URL " + deviceFirmware.getUrl());
firmwareURL = new URL(deviceFirmware.getUrl());
urlConnection = firmwareURL.openConnection();
if(deviceFirmware.getName() != null &&
!"".equals(deviceFirmware.getName())) {
downloadedFirmwareName = deviceFirmware.getName();
} else {
downloadedFirmwareName = "firmware_" +new Date().getTime()+".deb";
