changeset 7041:888b6fcf7fad

8031394: (sl) Fix exception handling in ServiceLoader Reviewed-by: alanb
author dmeetry
date Tue, 21 Jan 2014 20:38:01 +0400
parents bf6ddbf51dcd
children 7fa6d3ba2cc7
files src/share/classes/java/util/ServiceLoader.java src/share/classes/sun/misc/Service.java
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/util/ServiceLoader.java	Tue Jan 21 10:55:05 2014 +0000
+++ b/src/share/classes/java/util/ServiceLoader.java	Tue Jan 21 20:38:01 2014 +0400
@@ -375,7 +375,7 @@
                 return p;
             } catch (Throwable x) {
                 fail(service,
-                     "Provider " + cn + " could not be instantiated: " + x,
+                     "Provider " + cn + " could not be instantiated",
                      x);
             }
             throw new Error();          // This cannot happen
--- a/src/share/classes/sun/misc/Service.java	Tue Jan 21 10:55:05 2014 +0000
+++ b/src/share/classes/sun/misc/Service.java	Tue Jan 21 20:38:01 2014 +0400
@@ -299,7 +299,7 @@
                 return service.cast(c.newInstance());
             } catch (Throwable x) {
                 fail(service,
-                     "Provider " + cn + " could not be instantiated: " + x,
+                     "Provider " + cn + " could not be instantiated",
                      x);
             }
             return null;        /* This cannot happen */