Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@clifforous
Copy link
Contributor

This approach allows for control which FileSystemCreator is evaluated first. It may be considered a breaking change if anyone is depending on Fat32FileSystemCreator being registered automatically and also registering their own creators.

@clifforous clifforous changed the title Issue 332 - Lazily register Fat32FileSystemCreator Issue 332 - Priority control of FileSystemFactory creators Feb 5, 2022
@clifforous
Copy link
Contributor Author

I switched this to use a prioritized list with your suggestion of registering the Fat32FileSystemCreator and DEFAULT_PRIORITY + 1.


private var count = 0
private val fileSystems = TreeSet(
compareBy<PrioritizedFileSystemCreator> { it.priority }.thenBy { it.count }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love it!

@magnusja magnusja merged commit 566a5a9 into magnusja:develop Feb 5, 2022
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