Skip to content

Commit

Permalink
Multi languages auto maping : bug fix in case of unsupported language
Browse files Browse the repository at this point in the history
MultiLangBuilder parse should always consume externalValue from
ParseContext.
  • Loading branch information
David JANSSEN committed Oct 4, 2013
1 parent 5758fdb commit f5e7b33
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ public void parse(String language, ParseContext context) throws IOException {
LangAnalyser existing = (LangAnalyser) this.langAnalysers.get(language);
if (existing != null) {
existing.mapper.parse(context);
} else {
// consume context external value
context.externalValue();
}
}

Expand Down Expand Up @@ -248,7 +251,7 @@ public void parse(ParseContext context) throws IOException {
langMapper.parse(context);
}
} catch(LanguageDetectionException e) {
throw new IOException(e);
// language detection failed, continue
}
if (langs !=null && !langs.isEmpty())
{
Expand Down

0 comments on commit f5e7b33

Please sign in to comment.