Skip to content

Commit 29270a2

Browse files
SentryManrbygrave
andauthored
[jex-generator] Remove Exception from generated signature (#554)
* Update ControllerMethodWriter.java * Bump to Jex 3.0-RC15 --------- Co-authored-by: Rob Bygrave <robin.bygrave@gmail.com>
1 parent 19acb3c commit 29270a2

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

http-generator-jex/src/main/java/io/avaje/http/generator/jex/ControllerMethodWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ void writeHandler(boolean requestScoped) {
157157
if (method.isErrorMethod()) {
158158
writer.append(" private void _%s(Context ctx, %s ex) {", method.simpleName(), method.exceptionShortName());
159159
} else if (isFilter) {
160-
writer.append(" private void _%s(Context ctx, FilterChain chain) throws Exception {", method.simpleName());
160+
writer.append(" private void _%s(Context ctx, FilterChain chain) {", method.simpleName());
161161
} else {
162162
writer.append(" private void _%s(Context ctx) throws Exception {", method.simpleName());
163163
}

tests/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<junit.version>5.11.4</junit.version>
1616
<assertj.version>3.27.3</assertj.version>
1717
<jackson.version>2.18.2</jackson.version>
18-
<jex.version>3.0-RC14</jex.version>
18+
<jex.version>3.0-RC15</jex.version>
1919
<avaje-inject.version>11.1</avaje-inject.version>
2020
<nima.version>4.1.6</nima.version>
2121
<javalin.version>6.4.0</javalin.version>

tests/test-client/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@
5858
<dependency>
5959
<groupId>io.avaje</groupId>
6060
<artifactId>avaje-jex</artifactId>
61-
<version>3.0-RC14</version>
61+
<version>${jex.version}</version>
6262
<scope>test</scope>
6363
</dependency>
64-
64+
6565
<dependency>
6666
<groupId>io.avaje</groupId>
6767
<artifactId>avaje-http-client-generator</artifactId>

tests/test-jex/src/main/java/org/example/web/TestController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ String strBody(@BodyString String body, Context ctx) {
4646
}
4747

4848
@Filter
49-
void filter(FilterChain chain) throws Exception {
50-
System.err.println("do nothing lmao");
49+
void filter(FilterChain chain) {
50+
// do nothing
5151
chain.proceed();
5252
}
5353

0 commit comments

Comments
 (0)