Skip to content

Commit

Permalink
Fix use of attributes as putIfAbsent for a SharedObject pair will not…
Browse files Browse the repository at this point in the history
… check the value, only the key
  • Loading branch information
mondain committed Aug 26, 2024
1 parent 3c277f2 commit f7a8740
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/src/main/java/org/red5/server/AttributeStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public boolean setAttribute(final String name, final Object value) {
boolean result = false;
if (name != null && value != null) {
// get previous value
final Object previous = attributes.putIfAbsent(name, value);
final Object previous = attributes.put(name, value);
// previous will be null if the attribute didn't exist and if it does it will equal the previous value
if (previous != null) {
// if the value is a collection, check the elements for modification
Expand Down

0 comments on commit f7a8740

Please sign in to comment.