mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 14:22:05 +01:00
Fix Presence.setPriority(int): Range is [-128,127]
Thanks to Guus der Kinderen for reporting this.
This commit is contained in:
parent
4c63cfafd7
commit
fa10a01831
1 changed files with 3 additions and 3 deletions
|
@ -185,15 +185,15 @@ public final class Presence extends Stanza implements TypedCloneable<Presence> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the priority of the presence. The valid range is -128 through 128.
|
||||
* Sets the priority of the presence. The valid range is -128 through 127.
|
||||
*
|
||||
* @param priority the priority of the presence.
|
||||
* @throws IllegalArgumentException if the priority is outside the valid range.
|
||||
*/
|
||||
public void setPriority(int priority) {
|
||||
if (priority < -128 || priority > 128) {
|
||||
if (priority < -128 || priority > 127) {
|
||||
throw new IllegalArgumentException("Priority value " + priority +
|
||||
" is not valid. Valid range is -128 through 128.");
|
||||
" is not valid. Valid range is -128 through 127.");
|
||||
}
|
||||
this.priority = priority;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue