Closed patrickdalla closed 8 months ago
PythonParser has some static fields loaded using iped.parsers.util.Messages. PythonTask access PythonParser, also at class loading. Messages get its location info from System properties only once, the first execution saving it internally. This locale System property is set on LocaleConfig object load method. So, before the comit, as the LocaleConfig wasn't loaded, taskinstaller loaded PythonTask that loaded PythonParser that called Messages initialization before locale info in LocaleConfig was set in SystemProperties.
Thank you @patrickdalla. But if you can answer the questions I made on #1979 I would appreciate, so we can tag the issue properly.
PythonParser has some static fields loaded using iped.parsers.util.Messages. PythonTask access PythonParser, also at class loading. Messages get its location info from System properties only once, the first execution saving it internally. This locale System property is set no LocaleConfig load. So, before the comit, as the LocaleConfig wasn't loaded, taskinstaller loaded PythonTask that loaded PythonParser that called Messages initialization before locale info in LocaleConfig was set in SystemProperties.
I detected that it was affecting parser Messages, i. e., only locale info used by classes on iped-parsers.
Thank you @patrickdalla. But if you can answer the questions I made on #1979 I would appreciate, so we can tag the issue properly.
Right. I will check it tomorow. Maybe class loading order is different when running inside eclipse IDE.
Closes #1979 Load config soon after object creation to avoid dependent code execution before it.