Redundant Throws Clause  

 

Redundant Throws Clause  ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ �޼ҵ� ���� �Ǵ� �� implementations/derivatives ���� �׷� �ڵ� ���� ���ܸ� ������ �Ϳ� ���� ����Ǿ��� �޼ҵ带 �˻��մϴ�.


���� Redundant throws clause  üũ �ڽ��� ���õǰ� Inspection�� �ƹ��� ������ �߰����� ������, Inspection  �� ������� �޼ҵ� �ñ׳��Ŀ��� ����� ���ܰ� �޼ҵ忡 ���ؼ��� �ƴϰ� �� implementations/derivatives�� ���ؼ��� �������� ���� ���� �ִ� �޼ҵ��� ����� �����ϴ� Unneeded throws clause  ï¿½ï¿½ï¿½ï¿½ ǥ���մϴ�.

�� Ʈ�� ���⿡�� �׸��� ������ ��ư�� Ŭ���ϴ� �Ϳ� ���� �Ҹ��� ���� �޴��� ���� �ذ�μ� ���ʿ��� ������ ������ ������ ���� �����մϴ�.


�� �˻�� � �ɼǵ� ������ �ʽ��ϴ�.


 

��� ��



���� �ڵ带 ���ʽÿ�:

 
import java.io.IOException;
 
public class AClass {
 
    public void methodA() throws IOException {
        //some code here
    }
}
 


Inspection ï¿½ï¿½ AClass �� ����ǰ� �� �Ŀ������� �� �����찡 ��Ÿ�� ���Դϴ�.



methodA �� �װ��� ���� ����Ǵ� ���ܸ� ������ ���� �Ϳ� ���� �����Ǿ����ϴ� .