File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
sentry/src/main/java/io/sentry/featureflags Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,19 @@ public IFeatureFlagBuffer clone() {
9797 currentBuffer instanceof FeatureFlagBuffer ? (FeatureFlagBuffer ) currentBuffer : null );
9898 }
9999
100+ /**
101+ * Iterates all incoming buffers from the end, always taking the latest item across all buffers,
102+ * until maxSize has been reached or no more items are available.
103+ *
104+ * <p>If a duplicate is found we skip it since we're iterating in reverse order and we already
105+ * have the latest entry.
106+ *
107+ * @param maxSize max number of feature flags
108+ * @param globalBuffer buffer from global scope
109+ * @param isolationBuffer buffer from isolation scope
110+ * @param currentBuffer buffer from current scope
111+ * @return merged buffer containing at most maxSize latest items from incoming buffers
112+ */
100113 private static @ NotNull IFeatureFlagBuffer merged (
101114 final int maxSize ,
102115 final @ Nullable FeatureFlagBuffer globalBuffer ,
You can’t perform that action at this time.
0 commit comments