1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-25 21:42:07 +01:00

Avoid adding multiple processing hints to a message

This commit is contained in:
Paul Schaub 2018-07-04 11:55:58 +02:00
parent 78a5f5089a
commit 2347c2a025
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
4 changed files with 4 additions and 4 deletions

View file

@ -56,6 +56,6 @@ public final class NoCopyHint extends MessageProcessingHint {
}
public static void set(Message message) {
message.addExtension(INSTANCE);
message.overrideExtension(INSTANCE);
}
}

View file

@ -60,7 +60,7 @@ public final class NoPermanentStoreHint extends MessageProcessingHint {
// No need to set the no-permanent-store hint when a no-store hint is already set.
return;
}
setExplicitly(message);
message.overrideExtension(INSTANCE);
}
public static void setExplicitly(Message message) {

View file

@ -56,6 +56,6 @@ public final class NoStoreHint extends MessageProcessingHint {
}
public static void set(Message message) {
message.addExtension(INSTANCE);
message.overrideExtension(INSTANCE);
}
}

View file

@ -56,6 +56,6 @@ public final class StoreHint extends MessageProcessingHint {
}
public static void set(Message message) {
message.addExtension(INSTANCE);
message.overrideExtension(INSTANCE);
}
}