You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RepositoryRestHandlerMapping constructor change breaks backwards compatibility after crossorigin was added. RepositoryCorsConfigurationAccessor constructor arg "repositories" is marked @NonNull causing the legacy 2 arg constructor for the outer class to fail lombok validation. This was probably an oversight as "repositories" param desc still lists it as optional. Cross posting for springfox-data-rest compatibility issue.
RepositoryRestHandlerMapping.java
publicRepositoryRestHandlerMapping(ResourceMappingsmappings, RepositoryRestConfigurationconfig) {
this(mappings, config, null);
}
/** * Creates a new {@link RepositoryRestHandlerMapping} for the given {@link ResourceMappings} * {@link RepositoryRestConfiguration} and {@link Repositories}. * * @param mappings must not be {@literal null}. * @param config must not be {@literal null}. * @param repositories can be {@literal null} if {@link CrossOrigin} resolution is not required. */publicRepositoryRestHandlerMapping(ResourceMappingsmappings, RepositoryRestConfigurationconfig,
Repositoriesrepositories) {
super(config);
Assert.notNull(mappings, "ResourceMappings must not be null!");
Assert.notNull(config, "RepositoryRestConfiguration must not be null!");
this.mappings = mappings;
this.configuration = config;
this.repositories = repositories;
this.corsConfigurationAccessor = newRepositoryCorsConfigurationAccessor(mappings, repositories,
NoOpStringValueResolver.INSTANCE);
Commit msg
DATAREST-573 - Polishing. …
Removed RepositoryRestConfiguration.addCorsMapping(…) as we currently don't have any other shortcut methods for configuration like this.
Tweaked the setup of (now Repository)CorsConfigurationAccessor to be created earlier so that we avoid recreation for every lookup. Introduced a NoOpStringValueResolver to be used by default so that we don't need to deal with the case of the resolver being null at the end of the call chain. Replaced constructor of RepositoryCorsConfigurationAccessor with corresponding Lombok annotation.
Updated reference documentation accordingly.
Original pull request: #233.
olivergierke committed on Oct 28, 2016 40bb8e8
Colin Steele opened DATAREST-994 and commented
RepositoryRestHandlerMapping constructor change breaks backwards compatibility after crossorigin was added. RepositoryCorsConfigurationAccessor constructor arg "repositories" is marked
@NonNull
causing the legacy 2 arg constructor for the outer class to fail lombok validation. This was probably an oversight as "repositories" param desc still lists it as optional. Cross posting for springfox-data-rest compatibility issue.RepositoryRestHandlerMapping.java
Commit msg
Affects: 3.0 M1 (Kay), 3.0 M2 (Kay), 2.6 GA (Ingalls), 2.6.1 (Ingalls SR1)
Referenced from: pull request #257, and commits 3e5f4bd, e580c04, 3715b1c, d622ff0, db770fb, ea482e0, e94ba4a
Backported to: 2.6.1 (Ingalls SR1)
The text was updated successfully, but these errors were encountered: