changeset 18869:b4928a2b8ccf

Add ModuleReferenceImpl::toString
author alanb
date Thu, 26 Jan 2017 13:12:33 +0000
parents 1592d65d0123
children 2cd45b2d66a8
files src/java.base/share/classes/jdk/internal/module/ModuleReferenceImpl.java
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/jdk/internal/module/ModuleReferenceImpl.java	Thu Jan 26 13:03:49 2017 +0000
+++ b/src/java.base/share/classes/jdk/internal/module/ModuleReferenceImpl.java	Thu Jan 26 13:12:33 2017 +0000
@@ -163,7 +163,14 @@
 
     @Override
     public String toString() {
-        return super.toString();
+        StringBuilder sb = new StringBuilder();
+        sb.append("[module ");
+        sb.append(descriptor().name());
+        sb.append(", location=");
+        sb.append(location().orElseThrow(() -> new InternalError()));
+        if (isPatched()) sb.append(" (patched)");
+        sb.append("]");
+        return sb.toString();
     }
 
 }