-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pretty-print throws
clause in method signatures
#160
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm investigating in #163 why the CI is failing.
One minor comments, otherwise looks good
@@ -17,7 +17,7 @@ private static String staticOverload(String value) { | |||
return value + "1"; | |||
} | |||
|
|||
public static String app(int n, String m) { | |||
public static String app(int n, String m) throws RuntimeException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised that epoxy doesn't use throws
anywhere. Checked exceptions are IMO one of the biggest pains of working with Java. Can we add one test case where the exception has type parameters just to stress the code path that throws
is Type
and not symbols
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out custom exceptions (that extend Exception/Throwable) cant have type parameters 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where did you find examples with type parameters? Are they only in the JDK?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not exactly "conclusive" or "proving" evidence by any means 😁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ive added an additional exception to the signature to make up for it. Gonna merge 👍
ec7e190
to
6d6a27c
Compare
Add 'throws' field to
MethodSignature
in semanticdb for implementing pretty-printing, to be upstreamed to semanticdb spec.This is a fairly trivial change so it shouldnt be a big deal to upstream.
Closes #147