You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, this function returns the instance of the programming language if it is found, the instance of the default programming language otherwise.
This behavior is the cause of some issues, in particular when we are deserializing an exercise from its JSON: when we encounters an unknown programming language, we overrides the instance of SourceFile corresponding to the default programming language (generally Java) by the SourceFile corresponding to this unknown language (see code here).
We should edit ProgrammingLanguage.getProgrammingLanguage() to return a null value or to throw an error if the programming language is unknown and should update the code calling this function to deal with this case.
The text was updated successfully, but these errors were encountered:
ProgrammingLanguage.getProgrammingLanguage() allows to retrieve the instance of a programming language from its name.
Currently, this function returns the instance of the programming language if it is found, the instance of the default programming language otherwise.
This behavior is the cause of some issues, in particular when we are deserializing an exercise from its JSON: when we encounters an unknown programming language, we overrides the instance of SourceFile corresponding to the default programming language (generally Java) by the SourceFile corresponding to this unknown language (see code here).
We should edit ProgrammingLanguage.getProgrammingLanguage() to return a null value or to throw an error if the programming language is unknown and should update the code calling this function to deal with this case.
The text was updated successfully, but these errors were encountered: