Skip to content

Commit c4d801b

Browse files
committed
core: remove use operator and Route.Group class fix jooby-project#1213
1 parent 3caedc3 commit c4d801b

File tree

27 files changed

+274
-1542
lines changed

27 files changed

+274
-1542
lines changed

jooby/src/main/java/org/jooby/Jooby.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -973,8 +973,6 @@ private Jooby use(final Optional<String> path, final Jooby app) {
973973
app.bag.forEach(it -> {
974974
if (it instanceof Route.Definition) {
975975
this.bag.add(rewrite.apply((Definition) it));
976-
} else if (it instanceof Route.Group) {
977-
((Route.Group) it).routes().forEach(r -> this.bag.add(rewrite.apply(r)));
978976
} else if (it instanceof MvcClass) {
979977
Object routes = path.<Object>map(p -> new MvcClass(((MvcClass) it).routeClass, p, prefix))
980978
.orElse(it);
@@ -999,13 +997,6 @@ private Jooby use(final Optional<String> path, final Jooby app) {
999997
return this;
1000998
}
1001999

1002-
@Override
1003-
public Route.Group use(final String pattern) {
1004-
Route.Group group = new Route.Group(pattern, prefix);
1005-
this.bag.add(group);
1006-
return group;
1007-
}
1008-
10091000
/**
10101001
* Set a custom {@link Env.Builder} to use.
10111002
*
@@ -2739,9 +2730,6 @@ private static List<Object> normalize(final List<Object> services, final Env env
27392730
snapshot.forEach(candidate -> {
27402731
if (candidate instanceof Route.Definition) {
27412732
result.add(candidate);
2742-
} else if (candidate instanceof Route.Group) {
2743-
((Route.Group) candidate).routes()
2744-
.forEach(r -> result.add(r));
27452733
} else if (candidate instanceof MvcClass) {
27462734
MvcClass mvcRoute = ((MvcClass) candidate);
27472735
Class<?> mvcClass = mvcRoute.routeClass;

0 commit comments

Comments
 (0)