Github user zsxwing commented on the pull request:
https://github.com/apache/spark/pull/3241#issuecomment-63000073
Exception won't be in the method signature.
```scala
scala> import java.io.IOException
import java.io.IOException
scala> class A {
| @throws[IOException]
| def foo() {
| throw new IOException("error!")
| }
|
| def bar(): Unit = {
| foo()
| }
| }
defined class A
scala> :javap -private -c A
Compiled from "<console>"
public class A extends java.lang.Object{
public void foo() throws java.io.IOException;
Code:
0: new #9; //class java/io/IOException
3: dup
4: ldc #11; //String error!
6: invokespecial #15; //Method
java/io/IOException."<init>":(Ljava/lang/String;)V
9: athrow
public void bar();
Code:
0: aload_0
1: invokevirtual #20; //Method foo:()V
4: return
public A();
Code:
0: aload_0
1: invokespecial #22; //Method java/lang/Object."<init>":()V
4: return
}
```
In the `bar()`, the instruction is `1: invokevirtual #20; //Method
foo:()V`. The method is still `foo:()V`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]