8006334: javap, JavapTask constructor breaks with null pointer exception if parameter options is null

Reviewed-by: jjg
This commit is contained in:
Vicente Romero 2013-02-12 13:36:56 +00:00
parent 024075fabb
commit 9bdfca5e56
2 changed files with 88 additions and 2 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -362,7 +362,8 @@ public class JavapTask implements DisassemblerTool.DisassemblerTask, Messages {
}
try {
handleOptions(options, false);
if (options != null)
handleOptions(options, false);
} catch (BadArgs e) {
throw new IllegalArgumentException(e.getMessage());
}