Wizard for documenting ontologies. WIDOCO is a step by step generator of HTML templates with the documentation of your ontology. It uses the LODE environment to create part of the template.
Apache License 2.0
295
stars
89
forks
source link
Missing hasNext() Check Before Using next() in Iterator #681
Describe the bug
The current implementation utilizes an Iterator without checking the hasNext() method before calling next(). This can lead to NoSuchElementException if there are no more elements in the Iterator.
The "printEvaluation" method in the "oops.OOPSevaluation" class utilizes the "elementos.hasNext" check to ensure that "first" has a value. However, it does not guarantee that "second" will have a hasNext() value of true.
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
Additional context
To mitigate this issue, it is recommended to add a hasNext() check before accessing the "second" element, line 350 and line 327 .
Describe the bug The current implementation utilizes an Iterator without checking the hasNext() method before calling next(). This can lead to NoSuchElementException if there are no more elements in the Iterator. The "printEvaluation" method in the "oops.OOPSevaluation" class utilizes the "elementos.hasNext" check to ensure that "first" has a value. However, it does not guarantee that "second" will have a hasNext() value of true.
Expected behavior A clear and concise description of what you expected to happen.
Screenshots
Additional context To mitigate this issue, it is recommended to add a hasNext() check before accessing the "second" element, line 350 and line 327 .