biomart / BioMart

21 stars 5 forks source link

ArrayOutOfBoundsException in org.bomart/BackwardCompatibility.parseDynamicDatasets #2

Closed JoeCarlson closed 8 years ago

JoeCarlson commented 8 years ago

I'm attempting to migrate a 0.7 biomart to 0.9 and am seeing problems with the code for migrating.

One thing I'm seeing is that when parsing the aliases (line 401) String[] splitAlias = alias.split("=",-1); There is no check on whether alias contains an = sign or on the size of splitAlias. The line currentAliases.put(splitAlias[0], splitAlias[1]); throws an ArrayOutOfBoundsException.

I'm not clear (yet) on how the aliases are pulled in from the existing mart, so I cannot say if our configuration is invalid. It appears that the alias that was generated the error was an empty string "". I've introduced a if (splitAlias.lenght > 1) test before putting the values into currentAliases.