Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in CVTerm.removeResource(String) #80

Closed
mephenor opened this issue Apr 7, 2014 · 2 comments
Closed

Bug in CVTerm.removeResource(String) #80

mephenor opened this issue Apr 7, 2014 · 2 comments

Comments

@mephenor
Copy link
Collaborator

mephenor commented Apr 7, 2014

Hi,

The method CVTerm.removeResource(String) does not seem to work as expected. For example, if there is only one Resource in the CVTerm, a call to the method will trigger:

Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at org.sbml.jsbml.CVTerm.removeResource(CVTerm.java:748)

Using the jar: jsbml-1.0-beta-with-dependencies-20140314.jar

Reported by: perkeo

@mephenor
Copy link
Collaborator Author

mephenor commented Apr 8, 2014

  • status: unread --> closed
  • assigned_to: Nicolas Rodriguez

Original comment by: niko-rodrigue

@mephenor
Copy link
Collaborator Author

mephenor commented Apr 8, 2014

Good catch, I have committed a fix that should solve this issue.
I have also added a junit test for this method.

Thanks,
Nico

Original comment by: niko-rodrigue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants