OpenJDK / jigsaw / jake / jaxp
changeset 1121:23381518b4ac
8160069: RuntimeException thrown by XPathFactory::newInstance missing the cause
Reviewed-by: lancea
author | joehw |
---|---|
date | Thu, 04 Aug 2016 17:47:31 -0700 |
parents | 222c22a74851 |
children | 874082a9b565 30b9c989ba71 |
files | src/java.xml/share/classes/javax/xml/xpath/XPathFactory.java |
diffstat | 1 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/java.xml/share/classes/javax/xml/xpath/XPathFactory.java Thu Aug 04 17:32:53 2016 +0000 +++ b/src/java.xml/share/classes/javax/xml/xpath/XPathFactory.java Thu Aug 04 17:47:31 2016 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, 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 @@ -93,14 +93,14 @@ public static XPathFactory newInstance() { try { - return newInstance(DEFAULT_OBJECT_MODEL_URI); - } catch (XPathFactoryConfigurationException xpathFactoryConfigurationException) { - throw new RuntimeException( - "XPathFactory#newInstance() failed to create an XPathFactory for the default object model: " - + DEFAULT_OBJECT_MODEL_URI - + " with the XPathFactoryConfigurationException: " - + xpathFactoryConfigurationException.toString() - ); + return newInstance(DEFAULT_OBJECT_MODEL_URI); + } catch (XPathFactoryConfigurationException e) { + throw new RuntimeException( + "XPathFactory#newInstance() failed to create an XPathFactory for the default object model: " + + DEFAULT_OBJECT_MODEL_URI + + " with the XPathFactoryConfigurationException: " + + e.getMessage(), e + ); } }