1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-22 20:47:57 +01:00

Remove clone() from DiscoverInfo.Identity

there is no need to clone immutable types.
This commit is contained in:
Florian Schmaus 2019-10-30 08:22:47 +01:00
parent 63ba524758
commit 63a4212f7e

View file

@ -330,7 +330,7 @@ public class DiscoverInfo extends IQ implements DiscoverInfoView, TypedCloneable
* attributes.
*
*/
public static final class Identity implements Comparable<Identity>, TypedCloneable<Identity> {
public static final class Identity implements Comparable<Identity> {
private final String category;
private final String type;
@ -512,11 +512,6 @@ public class DiscoverInfo extends IQ implements DiscoverInfoView, TypedCloneable
}
}
@Override
public Identity clone() {
return new Identity(this);
}
@Override
public String toString() {
return toXML().toString();