diff --git a/CHANGELOG.md b/CHANGELOG.md index 0416137..e6b168d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deprecated ### Removed ### Fixed +* Send Formality options in API requests even if it is default. ### Security diff --git a/deepl-java/src/main/java/com/deepl/api/Translator.java b/deepl-java/src/main/java/com/deepl/api/Translator.java index 13d25c8..712221c 100644 --- a/deepl-java/src/main/java/com/deepl/api/Translator.java +++ b/deepl-java/src/main/java/com/deepl/api/Translator.java @@ -848,7 +848,7 @@ private static ArrayList> createHttpParamsCommon( } params.add(new KeyValuePair<>("target_lang", targetLang)); - if (formality != null && formality != Formality.Default) { + if (formality != null) { switch (formality) { case More: params.add(new KeyValuePair<>("formality", "more")); @@ -862,7 +862,9 @@ private static ArrayList> createHttpParamsCommon( case PreferLess: params.add(new KeyValuePair<>("formality", "prefer_less")); break; + case Default: default: + params.add(new KeyValuePair<>("formality", "default")); break; } }