Skip to content

Fix infinite recursion in ZStorageManager.getType() - #247

Merged
Maxlego08 merged 1 commit into
Maxlego08:developfrom
Smorki:fix-storage-manager-recursion
Aug 12, 2026
Merged

Fix infinite recursion in ZStorageManager.getType()#247
Maxlego08 merged 1 commit into
Maxlego08:developfrom
Smorki:fix-storage-manager-recursion

Conversation

@Smorki

@Smorki Smorki commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

The getType() method in ZStorageManager calls this.plugin.getStorageManager().getType(), which returns the same ZStorageManager instance and calls itself recursively with no base case. Any invocation causes a StackOverflowError.

Fix: store the StorageType in a field during construction (it's already resolved locally in the constructor) and return it directly in getType().

@Maxlego08
Maxlego08 merged commit 0288017 into Maxlego08:develop Aug 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants