Skip to content

Commit

Permalink
Changed algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
masesdevelopers committed Sep 25, 2024
1 parent 4fbfefa commit a2bed17
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/net/JNetReflector/JNetReflectorHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,13 @@ public static IDictionary<Class, IReadOnlyDictionary<string, string>> ExtractJav
}
else { lines.Add(line); cycleCounter = 0; }

if (line.TrimEnd() == "}") foundParenthesis = true;
if (line.TrimEnd() == "}")
{
foundParenthesis = true;
break;
}
}
while (!foundParenthesis || cycleCounter >= 100);
while (cycleCounter < 100);

Dictionary<string, string> map = new Dictionary<string, string>();
int classCounter = -1;
Expand All @@ -135,6 +139,8 @@ public static IDictionary<Class, IReadOnlyDictionary<string, string>> ExtractJav
bool nextLineIsDescriptor = false;
foreach (var line in lines)
{
if (string.IsNullOrWhiteSpace(line)) continue;

if (line.Contains("Compiled from"))
{
if (classCounter != -1) { dict.TryAdd(toBeAnalyzed[classCounter], map); }
Expand Down

0 comments on commit a2bed17

Please sign in to comment.