Skip to content
This repository was archived by the owner on Dec 10, 2025. It is now read-only.

docs: add KDoc to ensureValidNestingDepth function#125

Merged
twisti-dev merged 4 commits intofeat/ppdc-viewfrom
copilot/sub-pr-113
Nov 1, 2025
Merged

docs: add KDoc to ensureValidNestingDepth function#125
twisti-dev merged 4 commits intofeat/ppdc-viewfrom
copilot/sub-pr-113

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 1, 2025

Addresses review feedback requesting documentation for the ensureValidNestingDepth public API function.

Changes

  • Added KDoc to PersistentPlayerDataContainerView.ensureValidNestingDepth() documenting:
    • Function purpose (validates nesting depth to prevent memory exhaustion)
    • Parameters (depth and exceptionFactory)
    • Thrown exceptions (@throws Throwable when depth exceeds limit)
/**
 * Ensures that the nesting depth does not exceed the maximum allowed limit.
 *
 * This function validates that the provided depth is within acceptable bounds,
 * preventing memory exhaustion from extremely deep nested structures.
 *
 * @param depth The current nesting depth to validate.
 * @param exceptionFactory A factory function that creates the exception to throw
 *                         when the depth exceeds the limit. Defaults to [IllegalStateException].
 * @throws Throwable When the depth exceeds [MAX_NESTING_DEPTH]. The specific exception
 *                   type is determined by the [exceptionFactory] parameter.
 */
inline fun ensureValidNestingDepth(
    depth: Int,
    exceptionFactory: (message: String) -> Throwable = ::IllegalStateException
)

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Nov 1, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • repo.slne.dev
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED -Xmx4G -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.14.3-bin/cv11ve7ro1n3o1j4so8xd9n66/gradle-8.14.3/lib/gradle-daemon-main-8.14.3.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-8.14.3-bin/cv11ve7ro1n3o1j4so8xd9n66/gradle-8.14.3/lib/agents/gradle-instrumentation-agent-8.14.3.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.14.3 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Update persistent player data tracking and tag handling docs: add KDoc to ensureValidNestingDepth function Nov 1, 2025
Copilot AI requested a review from twisti-dev November 1, 2025 14:21
- Modified `response` to use lazy initialization with `CompletableDeferred` for proper memory handling.
- Ensure exception completion if response is accessed after connection garbage collection.
@twisti-dev twisti-dev marked this pull request as ready for review November 1, 2025 14:26
@twisti-dev twisti-dev merged commit 5efba7a into feat/ppdc-view Nov 1, 2025
1 check passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in surf-cloud Nov 1, 2025
@twisti-dev twisti-dev deleted the copilot/sub-pr-113 branch November 1, 2025 14:28
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Nov 1, 2025

Qodana for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants