You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by sv...@apache.org on 2020/04/27 20:10:15 UTC
[wicket] branch master updated: WICKET-6773 Improve performance of
`getBehaviors` by returning `Collections.emptyList` instead of wrapping the
empty result
This is an automated email from the ASF dual-hosted git repository.
svenmeier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git
The following commit(s) were added to refs/heads/master by this push:
new ee2c0d9 WICKET-6773 Improve performance of `getBehaviors` by returning `Collections.emptyList` instead of wrapping the empty result
ee2c0d9 is described below
commit ee2c0d9ea0dfa4609ef32db09921b9094bea4780
Author: Thomas Heigl <th...@gmail.com>
AuthorDate: Mon Apr 27 18:53:36 2020 +0200
WICKET-6773 Improve performance of `getBehaviors` by returning `Collections.emptyList` instead of wrapping the empty result
this closes #422
---
wicket-core/src/main/java/org/apache/wicket/Behaviors.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/wicket-core/src/main/java/org/apache/wicket/Behaviors.java b/wicket-core/src/main/java/org/apache/wicket/Behaviors.java
index 672cc57..aceb318 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Behaviors.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Behaviors.java
@@ -91,6 +91,9 @@ final class Behaviors implements IDetachable
}
}
}
+ if (subset.isEmpty()) {
+ return Collections.emptyList();
+ }
return Collections.unmodifiableList(subset);
}