Skip to content

Reflections returns classes outside of configured package #457

@kevinm416

Description

@kevinm416

Both of these attempts to search for Repository sub-types within the org.tamarack.models package returned classes outside of org.tamarack.models:

new Reflections(new ConfigurationBuilder().forPackages("com.tamarack.models"))
        .getSubTypesOf(Repository.class);

new Reflections("com.tamarack.models")
        .getSubTypesOf(Repository.class);

In particular, org.springframework.data.repository.PagingAndSortingRepository and org.springframework.data.repository.CrudRepository were returned in addition to the expected results. I would expect Reflections to only return classes in the package com.tamarack.models for both of those calls. Lmk if I'm using the library wrong!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions