<?xml version="1.0" encoding="UTF-8"?>
<test-data
    xmlns="http://pmd.sourceforge.net/rule-tests"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://pmd.sourceforge.net/rule-tests http://pmd.sourceforge.net/rule-tests_1_0_0.xsd">

    <test-code>
        <description>simple failure case</description>
        <expected-problems>1</expected-problems>
        <code><![CDATA[
public class Foo {
    void foo() {
        try {} catch (Throwable t) {}
    }
}
        ]]></code>
    </test-code>

    <test-code>
        <description>ok</description>
        <expected-problems>0</expected-problems>
        <code><![CDATA[
public class Foo {
    void foo() {
        try {} catch (RuntimeException t) {}
    }
}
        ]]></code>
    </test-code>

    <test-code>
        <description>full class name false-negative test</description>
        <expected-problems>1</expected-problems>
        <expected-linenumbers>5</expected-linenumbers>
        <code><![CDATA[
public class Foo {
    public void bar() {
        try {
            Foo.class.isAssignableFrom(null);
        } catch(java.lang.Throwable e) {
            e.printStackTrace();
        }
    }
}
        ]]></code>
    </test-code>
</test-data>
