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

Make io.arlas.server.utils.MapExplorer more generic #302

Open
sylvaingaudan opened this issue Jun 11, 2018 · 0 comments
Open

Make io.arlas.server.utils.MapExplorer more generic #302

sylvaingaudan opened this issue Jun 11, 2018 · 0 comments
Labels
type:maintenance Minor change, optimization or refactoring

Comments

@sylvaingaudan
Copy link
Member

The method public static Object getObjectFromPath(String path, Object source) is supposed to be generic. However it contains a specific block with a strong dependence on CollectionReferenceDescriptionProperty. Removing this block might have an impact on classes trying to access properties on CollectionReferenceDescriptionProperty.

Code to remove:

if (source instanceof CollectionReferenceDescriptionProperty
                    && ((CollectionReferenceDescriptionProperty) source).properties != null
                    && ((CollectionReferenceDescriptionProperty) source).properties.containsKey(pathLevels[0])) {
                return getObjectFromPath(newPath.toString(), ((CollectionReferenceDescriptionProperty) source).properties.get(pathLevels[0]));
            }
@sylvaingaudan sylvaingaudan added the type:maintenance Minor change, optimization or refactoring label Jun 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:maintenance Minor change, optimization or refactoring
Projects
None yet
Development

No branches or pull requests

1 participant