From 5f44b37657159d7ded38d88fa7a184fabe347d10 Mon Sep 17 00:00:00 2001 From: Svjatoslav Agejenko Date: Thu, 4 Jul 2013 10:55:36 +0300 Subject: [PATCH] properly handle nested classes --- .../svjatoslav/inspector/java/structure/ClassDescriptor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/svjatoslav/inspector/java/structure/ClassDescriptor.java b/src/main/java/eu/svjatoslav/inspector/java/structure/ClassDescriptor.java index 7e7c4ee..9f4be8a 100644 --- a/src/main/java/eu/svjatoslav/inspector/java/structure/ClassDescriptor.java +++ b/src/main/java/eu/svjatoslav/inspector/java/structure/ClassDescriptor.java @@ -234,6 +234,8 @@ public class ClassDescriptor implements GraphElement { if (isArray) result += " []"; + // this is needed for nested classes + result = result.replace('$', '.'); return result; } @@ -286,7 +288,7 @@ public class ClassDescriptor implements GraphElement { public String getGraphId() { final String result = "class_" + fullyQualifiedName.replace('.', '_').replace(";", "") - .replace("[L", ""); + .replace("[L", "").replace('$', '_'); return result; } -- 2.20.1