JDK-8039210: Fix type error in DefaultResourceInjector