Skip to content

Commit e3f34d5

Browse files
committed
api: Rename Servlets/Filters value() to mappings()
1 parent aafa487 commit e3f34d5

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

dumbo-api/src/main/java/com/kohlschutter/dumbo/annotations/Filters.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@
2727
@Target(ElementType.TYPE)
2828
@Retention(RetentionPolicy.RUNTIME)
2929
public @interface Filters {
30-
FilterMapping[] value() default {};
30+
FilterMapping[] mappings() default {};
3131
}

dumbo-api/src/main/java/com/kohlschutter/dumbo/annotations/Servlets.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
@Target(ElementType.TYPE)
2828
@Retention(RetentionPolicy.RUNTIME)
2929
public @interface Servlets {
30-
ServletMapping[] value() default {};
30+
ServletMapping[] mappings() default {};
3131

3232
ServletContextAttribute[] contextAttributes() default {};
3333
}

dumbo-core/src/main/java/com/kohlschutter/dumbo/BaseSupport.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@
3030
/**
3131
* Base resources, such as jQuery and json-rpc.
3232
*/
33-
@Servlets({ //
33+
@Servlets(mappings = { //
3434
@ServletMapping(map = "*.jsp.js", to = JspCachingServlet.class, initOrder = 0, initParameters = {
3535
@ServletInitParameter(key = "scratchdir", value = "getJspWorkDir", valueProvider = ServerApp.class)}),
3636
@ServletMapping(map = "*.jsp", to = JspCachingServlet.class, initOrder = 0, initParameters = {
3737
@ServletInitParameter(key = "scratchdir", value = "getJspWorkDir", valueProvider = ServerApp.class)}),
3838
//
3939
})
40-
@Filters({@FilterMapping(map = "*.js", to = JsFilter.class, initOrder = 0, //
40+
@Filters(mappings = {@FilterMapping(map = "*.js", to = JsFilter.class, initOrder = 0, //
4141
dispatcherTypes = {DispatcherType.REQUEST}),
4242
//
4343
})

dumbo-core/src/main/java/com/kohlschutter/dumbo/DumboServerImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ private void mapServlets(ServletContext servletContext, ComponentImpl comp, Serv
765765
Set<String> pathFilters) {
766766
Map<String, ServletMapping> mappings = new HashMap<>();
767767
for (Servlets s : comp.getAnnotatedMappingsFromAllReachableComponents(Servlets.class)) {
768-
for (ServletMapping mapping : s.value()) {
768+
for (ServletMapping mapping : s.mappings()) {
769769
String[] mapPaths = mapping.map();
770770
for (String mapPath : mapPaths) {
771771
pathFilters.add(mapPath); // NOPMD.UseArraysAsList false positive
@@ -882,7 +882,7 @@ private void mapServlets(ServletContext servletContext, ComponentImpl comp, Serv
882882
private void mapFilters(ComponentImpl comp, ServletHandler sh, Set<String> pathFilters) {
883883
Map<String, List<FilterMapping>> mappings = new HashMap<>();
884884
for (Filters f : comp.getAnnotatedMappingsFromAllReachableComponents(Filters.class)) {
885-
for (FilterMapping mapping : f.value()) {
885+
for (FilterMapping mapping : f.mappings()) {
886886
String[] mapPaths = mapping.map();
887887
for (String mapPath : mapPaths) {
888888
pathFilters.add(mapPath); // NOPMD.UseArraysAsList false positive

0 commit comments

Comments
 (0)