alwans / code-diff Goto Github PK
View Code? Open in Web Editor NEWjava code diff
java code diff
作者你好,感谢你的付出,我试用了你的项目,发现不同版本exec合并,走不下去
配置参数如下-javaagent:jacocoagent.jar=includes=com.aa.*,生成的报告里面有其他包的代码
启动参数:
javaagent:./lib/jacocoagent.jar=output=tcpserver,port=8000,address=*,branchName=jacocoTest,commitId=5a57b64e4af618ca571b3d0bf8fa20965e585919"
报错信息:
Connected to the target VM, address: '127.0.0.1:64517', transport: 'socket'
Failed to instantiate SLF4J LoggerFactory
Reported exception:
java.lang.NoClassDefFoundError: org/jacoco/agent/rt/internal_baf4693/core/runtime/ChainNodeHandle
at sun.util.resources.zh.CalendarData_zh.getContents(CalendarData_zh.java)
at sun.util.resources.OpenListResourceBundle.loadLookup(OpenListResourceBundle.java:137)
at sun.util.resources.OpenListResourceBundle.loadLookupTablesIfNecessary(OpenListResourceBundle.java:128)
at sun.util.resources.OpenListResourceBundle.handleKeySet(OpenListResourceBundle.java:96)
at java.util.ResourceBundle.containsKey(ResourceBundle.java:1824)
at sun.util.locale.provider.LocaleResources.getCalendarData(LocaleResources.java:129)
at sun.util.locale.provider.CalendarDataProviderImpl.getFirstDayOfWeek(CalendarDataProviderImpl.java:50)
at sun.util.locale.provider.CalendarDataUtility$CalendarWeekParameterGetter.getObject(CalendarDataUtility.java:197)
at sun.util.locale.provider.CalendarDataUtility$CalendarWeekParameterGetter.getObject(CalendarDataUtility.java:182)
at sun.util.locale.provider.LocaleServiceProviderPool.getLocalizedObjectImpl(LocaleServiceProviderPool.java:281)
at sun.util.locale.provider.LocaleServiceProviderPool.getLocalizedObject(LocaleServiceProviderPool.java:265)
at sun.util.locale.provider.CalendarDataUtility.retrieveFirstDayOfWeek(CalendarDataUtility.java:52)
at java.util.Calendar.setWeekCountData(Calendar.java:3379)
at java.util.Calendar.(Calendar.java:1600)
at java.util.GregorianCalendar.(GregorianCalendar.java:737)
at java.util.Calendar$Builder.build(Calendar.java:1482)
at sun.util.locale.provider.CalendarProviderImpl.getInstance(CalendarProviderImpl.java:88)
at java.util.Calendar.createCalendar(Calendar.java:1666)
at java.util.Calendar.getInstance(Calendar.java:1655)
at java.text.SimpleDateFormat.initializeCalendar(SimpleDateFormat.java:657)
at java.text.SimpleDateFormat.(SimpleDateFormat.java:601)
at java.text.SimpleDateFormat.(SimpleDateFormat.java:580)
at ch.qos.logback.core.util.CachingDateFormatter.(CachingDateFormatter.java:33)
at ch.qos.logback.classic.layout.TTLLLayout.(TTLLLayout.java:25)
at ch.qos.logback.classic.BasicConfigurator.configure(BasicConfigurator.java:48)
at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:164)
at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
at org.slf4j.impl.StaticLoggerBinder.(StaticLoggerBinder.java:55)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:417)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362)
at org.apache.commons.logging.LogAdapter$Slf4jAdapter.createLocationAwareLog(LogAdapter.java:130)
at org.apache.commons.logging.LogAdapter.createLog(LogAdapter.java:91)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:67)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:59)
at org.springframework.boot.SpringApplication.(SpringApplication.java:196)
at com.jidu.peqcenter.web.WebApplication.main(WebApplication.java:20)
Caused by: java.lang.ClassNotFoundException: org.jacoco.agent.rt.internal_baf4693.core.runtime.ChainNodeHandle
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 38 more
Exception in thread "main" java.lang.NoClassDefFoundError: org/jacoco/agent/rt/internal_baf4693/core/runtime/ChainNodeHandle
at sun.util.resources.zh.CalendarData_zh.getContents(CalendarData_zh.java)
at sun.util.resources.OpenListResourceBundle.loadLookup(OpenListResourceBundle.java:137)
at sun.util.resources.OpenListResourceBundle.loadLookupTablesIfNecessary(OpenListResourceBundle.java:128)
at sun.util.resources.OpenListResourceBundle.handleKeySet(OpenListResourceBundle.java:96)
at java.util.ResourceBundle.containsKey(ResourceBundle.java:1824)
at sun.util.locale.provider.LocaleResources.getCalendarData(LocaleResources.java:129)
at sun.util.locale.provider.CalendarDataProviderImpl.getFirstDayOfWeek(CalendarDataProviderImpl.java:50)
at sun.util.locale.provider.CalendarDataUtility$CalendarWeekParameterGetter.getObject(CalendarDataUtility.java:197)
at sun.util.locale.provider.CalendarDataUtility$CalendarWeekParameterGetter.getObject(CalendarDataUtility.java:182)
at sun.util.locale.provider.LocaleServiceProviderPool.getLocalizedObjectImpl(LocaleServiceProviderPool.java:281)
at sun.util.locale.provider.LocaleServiceProviderPool.getLocalizedObject(LocaleServiceProviderPool.java:265)
at sun.util.locale.provider.CalendarDataUtility.retrieveFirstDayOfWeek(CalendarDataUtility.java:52)
at java.util.Calendar.setWeekCountData(Calendar.java:3379)
at java.util.Calendar.(Calendar.java:1600)
at java.util.GregorianCalendar.(GregorianCalendar.java:737)
at java.util.Calendar$Builder.build(Calendar.java:1482)
at sun.util.locale.provider.CalendarProviderImpl.getInstance(CalendarProviderImpl.java:88)
at java.util.Calendar.createCalendar(Calendar.java:1666)
at java.util.Calendar.getInstance(Calendar.java:1655)
at java.text.SimpleDateFormat.initializeCalendar(SimpleDateFormat.java:657)
at java.text.SimpleDateFormat.(SimpleDateFormat.java:601)
at java.text.SimpleDateFormat.(SimpleDateFormat.java:580)
at ch.qos.logback.core.util.CachingDateFormatter.(CachingDateFormatter.java:33)
at ch.qos.logback.classic.layout.TTLLLayout.(TTLLLayout.java:25)
at ch.qos.logback.classic.BasicConfigurator.configure(BasicConfigurator.java:48)
at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:164)
at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
at org.slf4j.impl.StaticLoggerBinder.(StaticLoggerBinder.java:55)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:417)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362)
at org.apache.commons.logging.LogAdapter$Slf4jAdapter.createLocationAwareLog(LogAdapter.java:130)
at org.apache.commons.logging.LogAdapter.createLog(LogAdapter.java:91)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:67)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:59)
at org.springframework.boot.SpringApplication.(SpringApplication.java:196)
at com.web.WebApplication.main(WebApplication.java:20)
Caused by: java.lang.ClassNotFoundException: org.jacoco.agent.rt.internal_baf4693.core.runtime.ChainNodeHandle
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 38 more
大佬有联系方式吗~ 有一些细节问题想咨询一下~
大佬能不能加我微信啊615970781 好多问题咨询。
java.lang.NoClassDefFoundError: org/jacoco/agent/rt/internal_a5cf5b3/core/runtime/ChainNodeHandle
hi~dist源代码能提供下吗
楼主好!我这边目前遇到代码文件中内部类和匿名类的覆盖率合并的问题?想请教下怎么处理比较好?
内部类的,
public class AnonymousClassTest { public class InnerClass { public int sum(int a, int b){ return a + b; }
合并 sum 方法的时候因为解析的 classInfo.className 是 AnonymousClassTest, 按照目前逻辑会获取 AnonymousClassTest.class 进行分析,但是 sum 方法的插桩信息实际需要根据 AnonymousClassTest$InnerClass.class 来解析,会导致 sum 方法的覆盖率没有合并到。
想法:打算在解析 methodInfo 的时候记录下来方法真正所属的类。然后可以根据 AnonymousClassTest$InnerClass 去找 class 文件来解析合并
匿名类的,
匿名类的名称并不固定,而且 classId 等信息也可能会变化,
请问能有什么方式准确拿到新旧 class 的对应关系吗?
抱歉,现在才看到testerhome上的回复。看到评论被禁掉了,所以来git上留个言,微信 wj31673
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.