Possible enhanced for loop failure
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start with BackupList.func_230753_a_ and the enhanced-for-loop generation path that produces the shown iterator code. Compare the generated output with the source form and check the other similar cases mentioned in the issue. Done means the loop preserves the expected iterator assignment and existing behavior remains covered by the relevant decompiler tests.
Written by the indexing model from the issue text.
Description
MC 1.16-pre1 BackupList.func_230753_a_
...
try {
JsonElement jsonelement = jsonparser.parse(p_230753_0_).getAsJsonObject().get("backups");
if (jsonelement.isJsonArray()) {
Iterator<JsonElement> iterator = jsonelement.getAsJsonArray().iterator();
while(iterator.hasNext()) {
backuplist.field_230560_a_.add(Backup.func_230750_a_(iterator.next()));
}
}
} catch (Exception exception) {
field_230561_b_.error("Could not parse BackupList: " + exception.getMessage());
}
return backuplist;
There are a few cases like this. The enhanced for loop fails to generate as we expect the first statement in the loop to be iterator.next() being assigned to a variable. In this case, it has already been collapsed into the following statement.
I say this is a possible failure as the iterator variable definition has the correct generic type, which suggest the method was actually written this way.
- Dominant language
- No language data
- Stars
- 110
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MinecraftForge/ForgeFlower
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
MinecraftForge/ForgeFlower#131 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
MinecraftForge/ForgeFlower#86 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
MinecraftForge/ForgeFlower#85 · 3 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
All issues in MinecraftForge/ForgeFlower
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
objectionary/jeo-maven-plugin#1774 ·
-
compiler/runtime
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bot-triaged module: correctness (silent) module: fx release triage triage review
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Grammar Gap: activated › effect clause › {self} deals damage equal to its power to target creature Openarea:mechanics ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
fil-donadoni/tolaria#4317 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
objectionary/eo#8869 · 1 comment ·