if (!versionNr.equals("0.0.0.0")) {
if (!versionNr.equals("0.0.0.0") && os != -1) {
    private void checkUserAttributes(Attributes attr){        int id = -1;        int downloadId = -1;        for (int i = 0; i < attr.getLength(); i++) {            if (attr.getLocalName(i).equals("id")) {                id = Integer.parseInt(attr.getValue(i));                continue;            }            else if (attr.getLocalName(i).equals("downloadid")) {                downloadId = Integer.parseInt(attr.getValue(i));                continue;            }        }        if (id == -1 || downloadId == -1) {            return;        }        String downloadKey = Integer.toString(downloadId);        DownloadDO downloadDO = (DownloadDO) downloadMap.get(downloadKey);        DownloadSourceDO downloadSourceDO = null;        if (downloadDO != null) {            downloadSourceDO = downloadDO.getSourceById(id);            if (downloadSourceDO == null) {                downloadSourceDO = new DownloadSourceDO(id);                downloadDO.addSource(downloadSourceDO);                sourcenZuDownloads.put(Integer.toString(id),                                       downloadDO);            }        }        else{            downloadSourceDO = new DownloadSourceDO(id);            downloadSourcesToDo.add(downloadSourceDO);        }        downloadSourceDO.setDownloadId(downloadId);        String versionNr = "";        int os = -1;        for (int i = 0; i < attr.getLength(); i++) {            if (attr.getLocalName(i).equals("id")) {                continue;            }            else if (attr.getLocalName(i).equals("downloadid")) {                continue;            }            else if (attr.getLocalName(i).equals("status")) {                downloadSourceDO.setStatus(Integer.parseInt(attr.getValue(i)));            }            else if (attr.getLocalName(i).equals("directstate")) {                downloadSourceDO.setDirectstate(Integer.parseInt(attr.getValue(                    i)));            }            else if (attr.getLocalName(i).equals("downloadfrom")) {                downloadSourceDO.setDownloadFrom(Integer.parseInt(attr.getValue(                    i)));            }            else if (attr.getLocalName(i).equals("downloadto")) {                downloadSourceDO.setDownloadTo(Integer.parseInt(attr.getValue(i)));            }            else if (attr.getLocalName(i).equals("actualdownloadposition")) {                downloadSourceDO.setActualDownloadPosition(Integer.parseInt(                    attr.getValue(i)));            }            else if (attr.getLocalName(i).equals("speed")) {                downloadSourceDO.setSpeed(Integer.parseInt(attr.getValue(i)));            }            else if (attr.getLocalName(i).equals("version")) {                versionNr = attr.getValue(i);            }            else if (attr.getLocalName(i).equals("operatingsystem")) {                os = Integer.parseInt(attr.getValue(i));            }            else if (attr.getLocalName(i).equals("queueposition")) {                downloadSourceDO.setQueuePosition(Integer.parseInt(attr.                    getValue(i)));            }            else if (attr.getLocalName(i).equals("powerdownload")) {                downloadSourceDO.setPowerDownload(Integer.parseInt(attr.                    getValue(i)));            }            else if (attr.getLocalName(i).equals("filename")) {                downloadSourceDO.setFilename(attr.getValue(i));            }            else if (attr.getLocalName(i).equals("nickname")) {                downloadSourceDO.setNickname(attr.getValue(i));            }            if (!versionNr.equals("0.0.0.0")) {                Version version = new Version(versionNr, os);                downloadSourceDO.setVersion(version);            }        }    }