mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-29 15:32:06 +01:00
Merge pull request #179 from damencho/4.2
Makes xmpperror descriptive text optional as said in the rfc.
This commit is contained in:
commit
fe61922fb7
1 changed files with 7 additions and 3 deletions
|
@ -271,9 +271,13 @@ public class XMPPError extends AbstractError {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static XMPPError.Builder from(Condition condition, String descriptiveText) {
|
public static XMPPError.Builder from(Condition condition, String descriptiveText) {
|
||||||
Map<String, String> descriptiveTexts = new HashMap<String, String>();
|
XMPPError.Builder builder = getBuilder().setCondition(condition);
|
||||||
|
if (descriptiveText != null) {
|
||||||
|
Map<String, String> descriptiveTexts = new HashMap<>();
|
||||||
descriptiveTexts.put("en", descriptiveText);
|
descriptiveTexts.put("en", descriptiveText);
|
||||||
return getBuilder().setCondition(condition).setDescriptiveTexts(descriptiveTexts);
|
builder.setDescriptiveTexts(descriptiveTexts);
|
||||||
|
}
|
||||||
|
return builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Builder getBuilder() {
|
public static Builder getBuilder() {
|
||||||
|
|
Loading…
Reference in a new issue