Skip to content

Commit

Permalink
Fix resource node
Browse files Browse the repository at this point in the history
  • Loading branch information
alvieboy committed Mar 28, 2014
1 parent 1cd3530 commit 43e87d0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/alvieboy/arduinoupdater/ReleaseData.java
Expand Up @@ -99,6 +99,7 @@ public void showFiles()
{
ReleaseFileList files = getFiles();
for (ReleaseFile f: files) {
Debugger.debug("File info: res "+f.rsid+" to "+f.target);
Debugger.debug("File: " + m_resources.get(f.rsid).sha + " " +f.target);
}
}
Expand All @@ -111,6 +112,7 @@ public class DownloadError extends Exception
public ReleaseData() {
m_branches=new ArrayList<Branch>();
m_releases=new ArrayList<Release>();
m_resources= new HashMap<Integer,Resource>();
}

public Release findReleaseByVersion(String version)
Expand Down Expand Up @@ -147,7 +149,7 @@ public void parse(Document doc) throws MalformedXMLException {
}


NodeList resources = resourceNode.getElementsByTagName("Resources");
NodeList resources = resourceNode.getElementsByTagName("Res");
for (i=0; i<resources.getLength();i++){
Element e = (Element)resources.item(i);
Resource r = new Resource();
Expand All @@ -156,6 +158,7 @@ public void parse(Document doc) throws MalformedXMLException {
r.size =Integer.parseInt( e.getAttribute("size"));
r.sha = e.getAttribute("sha");
m_resources.put(new Integer(r.id),r);
Debugger.debug("New resource "+r.id+" with SHA "+r.sha);
}

Debugger.debug("Iterating through branches");
Expand Down

0 comments on commit 43e87d0

Please sign in to comment.