1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 00:59:39 +02:00

[disco/caps] Fix DiscoverInfo.asBuilder()

The method would not copy the extensions elements, which would lead to
a false calculation of the caps hash by EntityCapsManager.
This commit is contained in:
Florian Schmaus 2020-05-22 15:38:16 +02:00
parent 0db6406262
commit a137944e50
5 changed files with 16 additions and 8 deletions

View file

@ -1,6 +1,6 @@
/**
*
* Copyright 2019 Florian Schmaus
* Copyright 2019-2020 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -23,6 +23,10 @@ public abstract class AbstractIqBuilder<IB extends AbstractIqBuilder<IB>> extend
protected IQ.Type type = IQ.Type.get;
AbstractIqBuilder(IQ other, String stanzaId) {
super(other, stanzaId);
}
AbstractIqBuilder(AbstractIqBuilder<?> other) {
super(other);
type = other.type;

View file

@ -1,6 +1,6 @@
/**
*
* Copyright 2019 Florian Schmaus
* Copyright 2019-2020 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -22,6 +22,10 @@ import org.jivesoftware.smack.util.Objects;
public abstract class IqBuilder<IB extends IqBuilder<IB, I>, I extends IQ>
extends AbstractIqBuilder<IB> {
protected IqBuilder(IQ other, String stanzaId) {
super(other, stanzaId);
}
protected IqBuilder(AbstractIqBuilder<?> other) {
super(other);
}