From 76bb61812e38de46efd1ec0d9e1226670a836945 Mon Sep 17 00:00:00 2001 From: Egor Ushakov Date: Tue, 31 Oct 2017 13:23:28 +0300 Subject: [PATCH] extracted a method for IDEA-CR-26008 --- .../src/com/intellij/rt/debugger/agent/CaptureAgent.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/java/debugger/debugger-agent/src/com/intellij/rt/debugger/agent/CaptureAgent.java b/java/debugger/debugger-agent/src/com/intellij/rt/debugger/agent/CaptureAgent.java index d32f7063815e..8dc07573923b 100644 --- a/java/debugger/debugger-agent/src/com/intellij/rt/debugger/agent/CaptureAgent.java +++ b/java/debugger/debugger-agent/src/com/intellij/rt/debugger/agent/CaptureAgent.java @@ -207,12 +207,16 @@ public class CaptureAgent { return name + "$$$capture"; } + private static String getMethodDisplayName(String className, String methodName, String desc) { + return className + "." + methodName + desc; + } + @Override public MethodVisitor visitMethod(final int access, String name, final String desc, String signature, String[] exceptions) { if ((access & Opcodes.ACC_BRIDGE) == 0) { for (final CapturePoint capturePoint : myCapturePoints) { if (capturePoint.myMethodName.equals(name)) { - final String methodDisplayName = capturePoint.myClassName + "." + name + desc; + final String methodDisplayName = getMethodDisplayName(capturePoint.myClassName, name, desc); if (DEBUG) { System.out.println("Capture agent: instrumented capture point at " + methodDisplayName); } @@ -244,7 +248,7 @@ public class CaptureAgent { for (InsertPoint insertPoint : myInsertPoints) { if (insertPoint.myMethodName.equals(name)) { - String methodDisplayName = insertPoint.myClassName + "." + name + desc; + String methodDisplayName = getMethodDisplayName(insertPoint.myClassName, name, desc); if (DEBUG) { System.out.println("Capture agent: instrumented insert point at " + methodDisplayName); }