-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xml parsing error #9
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
The
fromXml
method in XmlParserReader class is throwing an error when trying to deserialize an XML file using JAXB.Steps to Reproduce
Code
INFO: No strings found in xml
Exception in thread "main" java.lang.NullPointerException: Cannot read the array length because the return value of "com.owino.mobiletranslate.android.model.Resources.getStrings()" is null
at com.owino.mobiletranslate.android.translate.AndroidTranslateFactory.translateResources(AndroidTranslateFactory.java:26)
at com.owino.mobiletranslate.android.translate.AndroidTranslateFactory.getTranslatedResources(AndroidTranslateFactory.java:20)
at com.owino.mobiletranslate.android.xml.XmlParserReader.executeXmlAndTranslationParser(XmlParserReader.java:31)
at com.owino.mobiletranslate.android.AndroidTranslationProcessor.runTranslation(AndroidTranslationProcessor.java:10)
at com.owino.mobiletranslate.TranslateApplication.main(TranslateApplication.java:28)
expected behavior
The project will generate localised content and place them in the project/target directory, in the format of [locale].xml e.g de.xml or zh.xml.
Actual behavior
The method 'executeXmlAndTranslationParser` in the class XmlParserReader expects a type of File as it inputs to its parameters but in the method main of TranslateApplication we pass a type string which is the path to the xml file hence a type mismatch leading to the xml file not being parsed well
environment
ran it on windows 10 and arch
both have openjdk17
possible solution
if allowed will fix it since my main goal was to take care of previous issues on the issues page
The text was updated successfully, but these errors were encountered: