1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-21 22:02:06 +01:00

[core] Move IqData construction API to the right place

AbstractIqBuilder is the wrong place for those methods, they belong in
IqData.
This commit is contained in:
Florian Schmaus 2021-05-02 17:12:22 +02:00
parent 6b14fcab75
commit a806595a77
2 changed files with 10 additions and 0 deletions

View file

@ -40,10 +40,12 @@ public abstract class AbstractIqBuilder<IB extends AbstractIqBuilder<IB>> extend
super(stanzaId);
}
// TODO: Deprecate and use corresponding method in IqData instead.
public static IqData createResponse(IqView request) {
return createResponse(request, IQ.ResponseType.result);
}
// TODO: Deprecate and use corresponding method in IqData instead.
public static IqData createErrorResponse(IqView request) {
return createResponse(request, IQ.ResponseType.error);
}

View file

@ -46,4 +46,12 @@ public final class IqData extends AbstractIqBuilder<IqData> {
public Stanza build() {
throw new UnsupportedOperationException();
}
public static IqData createResponseData(IqView request) {
return createResponse(request, IQ.ResponseType.result);
}
public static IqData createErrorResponseDAta(IqView request) {
return createResponse(request, IQ.ResponseType.error);
}
}