diff --git a/org.ntlab.traceCollector/src/org/ntlab/traceCollector/tracer/OutputStatementsGenerator.java b/org.ntlab.traceCollector/src/org/ntlab/traceCollector/tracer/OutputStatementsGenerator.java index 34a2054..5731930 100644 --- a/org.ntlab.traceCollector/src/org/ntlab/traceCollector/tracer/OutputStatementsGenerator.java +++ b/org.ntlab.traceCollector/src/org/ntlab/traceCollector/tracer/OutputStatementsGenerator.java @@ -1,5 +1,7 @@ package org.ntlab.traceCollector.tracer; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; import java.util.ArrayList; import javassist.CtBehavior; @@ -263,9 +265,13 @@ } public String generateInsertBeforeStatementsForClassDefinition(CtClass cc, CtConstructor classInitializer) throws NotFoundException { - String className = "\"" + cc.getName() + "\""; - String classPath = "\"" + cc.getURL().getPath() + "\""; - String loaderPath = "\"" + cc.getClassPool().getClassLoader().getResource("").getPath() + "\""; - return generator.generateInsertBeforeStatementsForClassDefinition(className, classPath, loaderPath); + try { + String className = "\"" + cc.getName() + "\""; + String classPath = "\"" + URLDecoder.decode(cc.getURL().getPath(), "UTF-8") + "\""; // �p�X�� URL encode �ɂȂ��Ă��邽�� + String loaderPath = "\"" + URLDecoder.decode(cc.getClassPool().getClassLoader().getResource("").getPath(), "UTF-8") + "\""; // �p�X�� URL encode �ɂȂ��Ă��邽�� + return generator.generateInsertBeforeStatementsForClassDefinition(className, classPath, loaderPath); + } catch (UnsupportedEncodingException e) { + return ""; + } } }