9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8006334
27 * @summary javap: JavapTask constructor breaks with null pointer exception if
28 * parameter options is null
29 * @modules jdk.compiler
30 */
31
32 import java.io.File;
33 import java.util.Arrays;
34 import java.io.PrintWriter;
35 import java.io.StringWriter;
36 import java.util.List;
37 import java.util.Locale;
38 import javax.tools.Diagnostic;
39 import javax.tools.DiagnosticCollector;
40 import javax.tools.JavaFileManager;
41 import javax.tools.JavaFileObject;
42 import com.sun.tools.javap.JavapFileManager;
43 import com.sun.tools.javap.JavapTask;
44
45 public class JavapTaskCtorFailWithNPE {
46
47 //we will also check the output just to confirm that we get the expected one
48 private static final String expOutput =
49 "Compiled from \"JavapTaskCtorFailWithNPE.java\"\n" +
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8006334
27 * @summary javap: JavapTask constructor breaks with null pointer exception if
28 * parameter options is null
29 * @modules jdk.jdeps
30 */
31
32 import java.io.File;
33 import java.util.Arrays;
34 import java.io.PrintWriter;
35 import java.io.StringWriter;
36 import java.util.List;
37 import java.util.Locale;
38 import javax.tools.Diagnostic;
39 import javax.tools.DiagnosticCollector;
40 import javax.tools.JavaFileManager;
41 import javax.tools.JavaFileObject;
42 import com.sun.tools.javap.JavapFileManager;
43 import com.sun.tools.javap.JavapTask;
44
45 public class JavapTaskCtorFailWithNPE {
46
47 //we will also check the output just to confirm that we get the expected one
48 private static final String expOutput =
49 "Compiled from \"JavapTaskCtorFailWithNPE.java\"\n" +
|