mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 12:02:05 +01:00
Merge pull request #249 from vanitasvitae/checkHint
Avoid adding multiple storage hints to a message
This commit is contained in:
commit
0ffc29aa67
4 changed files with 4 additions and 4 deletions
|
@ -56,6 +56,6 @@ public final class NoCopyHint extends MessageProcessingHint {
|
|||
}
|
||||
|
||||
public static void set(Message message) {
|
||||
message.addExtension(INSTANCE);
|
||||
message.overrideExtension(INSTANCE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -56,6 +56,6 @@ public final class NoStoreHint extends MessageProcessingHint {
|
|||
}
|
||||
|
||||
public static void set(Message message) {
|
||||
message.addExtension(INSTANCE);
|
||||
message.overrideExtension(INSTANCE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,6 +56,6 @@ public final class StoreHint extends MessageProcessingHint {
|
|||
}
|
||||
|
||||
public static void set(Message message) {
|
||||
message.addExtension(INSTANCE);
|
||||
message.overrideExtension(INSTANCE);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue