taverna-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Dunlop <Ian.Dun...@manchester.ac.uk>
Subject RE: gsoc taverna mobile - Array Index Exception in FavoriteWorkflowAdapter
Date Mon, 06 Jul 2015 15:27:13 GMT
Hello,

Here is the contents of 'data':

[5, , DOI2PMID, To view workflow on the web, click http://www.myexperiment.org/workflows/5,
Jun 29, 2015 3:22:06 PM, 3748665a-1c2c-4345-8607-f1a1e8dd3c89]

There are only 6 entries not 7 which data.get(6) seems to expect.

Cheers,

Ian

-----Original Message-----
From: Ian Dunlop [mailto:Ian.Dunlop@manchester.ac.uk] 
Sent: 06 July 2015 16:05
To: dev@taverna.incubator.apache.org
Subject: gsoc taverna mobile - Array Index Exception in FavoriteWorkflowAdapter

Hello,

I'm not really sure what this code is doing but it causes

java.lang.IndexOutOfBoundsException: Invalid index 6, size is 6
            at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
            at java.util.ArrayList.get(ArrayList.java:308)
            at org.apache.taverna.mobile.adapters.FavoriteWorkflowAdapter.onBindViewHolder(FavoriteWorkflowAdapter.java:66)

every time I try to run the app.

org\apache\taverna\mobile\adapters\FavoriteWorkflowAdapter.java

@Override
public void onBindViewHolder(FViewHolder fViewHolder, int i) {
    //get data 0,1,3 from set;
    ArrayList<Object> data = dataSet.get(i);

    //String[] mdata = dataSet.get(i);
    fViewHolder.author.setText((CharSequence) data.get(6));
    fViewHolder.title.setText((CharSequence) data.get(2));
    fViewHolder.dateMarked.setText((CharSequence) data.get(4));
    //fViewHolder.dateAdd.setText(mdata[3]);
    //fViewHolder.dateModified.setText(mdata[4]);
}

Cheers,

Ian

Mime
View raw message