If you call addShutdownHook after shutdown has already started, you should get IllegalStateException, as specified. If the call to addShutdownHook is the first one in this JDK, you will get an ExceptionInInitializerError instead, as below:
Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.Runtime.addShutdownHook(Runtime.java:209)
at java.util.logging.LogManager.<init>(LogManager.java:246)
at java.util.logging.LogManager$1.run(LogManager.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.<clinit>(LogManager.java:175)
at LoggingDeadlock2$JavaChild.main(LoggingDeadlock2.java:106)
Caused by: java.lang.IllegalStateException: Shutdown in progress
at java.lang.Shutdown.add(Shutdown.java:77)
at java.lang.ApplicationShutdownHooks.<clinit>(ApplicationShutdownHooks.java:39)