Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove direct uses of PageIdentifier objects coming from Confluence-XML logs #107

Open
raphj opened this issue Mar 25, 2024 · 1 comment

Comments

@raphj
Copy link
Contributor

raphj commented Mar 25, 2024

To fix this, find all usages of PageIdentifier in the Confluence Migrator Pro code and fix them.

We can't really use PageIdentifier objects coming from logs because when we upgrade Confluence-XML, the class is unloaded and then reloaded, but this breaks a lot of stuff for existing object, including instanceof PageIdentifier, which becomes false.

At best, using the date from a serialization of the object (for instance by calling toString() on it and ensuring this serialization is stable) would probably be fine, but remember that we can't use instanceof PageIdentifier to identify objects from the logs. Getting the class name and comparing it with a string should work. If we can help it, we should do it another way.

This is the reason for this change, that avoids using PageIdentifier when we can use a Long representing the page Id instead: 1b2ff4a#diff-e3b1eba238490cd712f73f1b6b88e1efd2acfd898ae95ee9f02cd2b41fa256f2R208-R212 (Sorry I didn't do it in a separate commit, I was in a rush)

@raphj
Copy link
Contributor Author

raphj commented Mar 25, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant