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

fix: Swap arguments of isAssignableFrom #872

Merged
merged 3 commits into from
Apr 28, 2021

Commits on Apr 27, 2021

  1. fix: Swap arguments of isAssignableFrom

    Consider we want to inject a ChildCurrentDateTime class. This assignment
    is invalid:
    
      ChildCurrentDateTime param = new CurrentDateTime();
    
    It may be only the other way:
    
      CurrentDateTime param = new ChildCurrentDateTime();
    
    See also the valid implementation:
    
    ```
      private static boolean isInjectableFromContext(Class<?> parameterType) {
        return parameterType.isAssignableFrom(CurrentDateTime.class)
            || parameterType.isAssignableFrom(CountryCode.class);
      }
    ```
    aababilov committed Apr 27, 2021
    Configuration menu
    Copy the full SHA
    4151275 View commit details
    Browse the repository at this point in the history
  2. Add copyright

    aababilov committed Apr 27, 2021
    Configuration menu
    Copy the full SHA
    401b6ca View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bd64f52 View commit details
    Browse the repository at this point in the history