You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 10, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: surf-cloud-api/surf-cloud-api-common/src/main/kotlin/dev/slne/surf/cloud/api/common/player/ppdc/PersistentPlayerDataContainerView.kt
throw exceptionFactory("Exceeded maximum allowed nesting depth of $MAX_NESTING_DEPTH. This likely indicates a corrupted or maliciously crafted data structure.")
Copy file name to clipboardExpand all lines: surf-cloud-core/surf-cloud-core-common/src/main/kotlin/dev/slne/surf/cloud/core/common/player/ppdc/PersistentPlayerDataContainerViewImpl.kt
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -143,8 +143,14 @@ abstract class PersistentPlayerDataContainerViewImpl : PersistentPlayerDataConta
143
143
* to build a complete copy. It avoids stack overflow issues that can occur with deeply nested structures
144
144
* when using a recursive approach.
145
145
*
146
+
* Uses `ArrayDeque` instead of `Stack` for better performance characteristics:
147
+
* - `ArrayDeque` is not synchronized, making it faster for single-threaded use
148
+
* - `Stack` extends `Vector`, which has legacy synchronization overhead
149
+
* - `ArrayDeque` is the recommended implementation for stack operations in modern Java/Kotlin
150
+
*
146
151
* @param root The root `CompoundBinaryTag` to be deep copied.
147
152
* @return A deep copy of the specified `CompoundBinaryTag`.
153
+
* @throws IllegalStateException if the structure is too deeply nested (exceeds [MAX_NESTING_DEPTH])
Copy file name to clipboardExpand all lines: surf-cloud-core/surf-cloud-core-common/src/main/kotlin/dev/slne/surf/cloud/core/common/player/ppdc/network/PdcOp.kt
0 commit comments