< prev index next >
test/jdk/com/sun/tools/attach/StartManagementAgent.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2014, 2015, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2014, 2017, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 97,107 ****
System.out.println("Starting management agent with bogus port");
vm.startManagementAgent(p);
} catch(AttachOperationFailedException ex) {
// We expect parsing of "apa" above to fail, but if the file path
// can't be read we get a different exception message
! if (!ex.getMessage().contains("Invalid com.sun.management.jmxremote.port number")) {
throw ex;
}
ex.printStackTrace(System.err);
} catch (Throwable t) {
t.printStackTrace(System.err);
--- 97,107 ----
System.out.println("Starting management agent with bogus port");
vm.startManagementAgent(p);
} catch(AttachOperationFailedException ex) {
// We expect parsing of "apa" above to fail, but if the file path
// can't be read we get a different exception message
! if (!ex.getMessage().contains("NumberFormatException")) {
throw ex;
}
ex.printStackTrace(System.err);
} catch (Throwable t) {
t.printStackTrace(System.err);
< prev index next >