Skip to content

Instantly share code, notes, and snippets.

@seanjreilly
Created July 8, 2014 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seanjreilly/ea406fad59300c422c16 to your computer and use it in GitHub Desktop.
Save seanjreilly/ea406fad59300c422c16 to your computer and use it in GitHub Desktop.
stack trace trying to use the mutability detector on a class with a field of java.time.Instant
org.mutabilitydetector.checkers.MutabilityAnalysisException:
An unhandled error occurred. Please read message at end of this output.
Class being analysed: com.equalexperts.logging.LogicalLogRecord
Checker that failed: MutableTypeToFieldChecker
Classes analysed so far:
An unhandled error occurred. This is probably my fault, not yours, and I am sorry.
I'd love to get an opportunity to fix this, please report as an issue at:
https://github.com/MutabilityDetector/MutabilityDetector/issues/
Pasting in this error message and stack trace, and if possible,
information about the code causing the error.
For example, one of:
.class files (preferably with source);
compilable .java files;
a jar (again preferably with source);
or, if your project is open source, information on where I can get the code from
(I'm happy to checkout and build your project in order to investigate the error).
Apologies, and thank you for using Mutability Detector.
at org.mutabilitydetector.checkers.UnhandledExceptionBuilder.unhandledException(UnhandledExceptionBuilder.java:54)
at org.mutabilitydetector.checkers.CheckerRunner.attemptRecovery(CheckerRunner.java:98)
at org.mutabilitydetector.checkers.CheckerRunner.run(CheckerRunner.java:66)
at org.mutabilitydetector.checkers.AllChecksRunner.runCheckers(AllChecksRunner.java:65)
at org.mutabilitydetector.ThreadUnsafeAnalysisSession.requestAnalysis(ThreadUnsafeAnalysisSession.java:119)
at org.mutabilitydetector.ThreadUnsafeAnalysisSession.resultFor(ThreadUnsafeAnalysisSession.java:105)
at org.mutabilitydetector.unittesting.MutabilityAsserter.getResultFor(MutabilityAsserter.java:184)
at org.mutabilitydetector.unittesting.MutabilityAsserter.assertInstancesOf(MutabilityAsserter.java:109)
at org.mutabilitydetector.unittesting.MutabilityAssert.assertInstancesOf(MutabilityAssert.java:658)
at com.equalexperts.logging.LogicalLogRecordTest.class_shouldBeImmutable(LogicalLogRecordTest.java:95)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:86)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:49)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:69)
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:105)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.messaging.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:355)
at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.mutabilitydetector.checkers.MutabilityAnalysisException:
An unhandled error occurred. Please read message at end of this output.
Class being analysed: java.time.Instant
Checker that failed: OldSetterMethodChecker
Classes analysed so far:
An unhandled error occurred. This is probably my fault, not yours, and I am sorry.
I'd love to get an opportunity to fix this, please report as an issue at:
https://github.com/MutabilityDetector/MutabilityDetector/issues/
Pasting in this error message and stack trace, and if possible,
information about the code causing the error.
For example, one of:
.class files (preferably with source);
compilable .java files;
a jar (again preferably with source);
or, if your project is open source, information on where I can get the code from
(I'm happy to checkout and build your project in order to investigate the error).
Apologies, and thank you for using Mutability Detector.
at org.mutabilitydetector.checkers.UnhandledExceptionBuilder.unhandledException(UnhandledExceptionBuilder.java:54)
at org.mutabilitydetector.checkers.CheckerRunner.attemptRecovery(CheckerRunner.java:98)
at org.mutabilitydetector.checkers.CheckerRunner.run(CheckerRunner.java:66)
at org.mutabilitydetector.checkers.AllChecksRunner.runCheckers(AllChecksRunner.java:65)
at org.mutabilitydetector.ThreadUnsafeAnalysisSession.requestAnalysis(ThreadUnsafeAnalysisSession.java:119)
at org.mutabilitydetector.ThreadUnsafeAnalysisSession.resultFor(ThreadUnsafeAnalysisSession.java:105)
at org.mutabilitydetector.checkers.info.MutableTypeInformation.resultOf(MutableTypeInformation.java:71)
at org.mutabilitydetector.checkers.MutableTypeToFieldChecker$AssignMutableTypeToFieldChecker.checkIfClassIsMutable(MutableTypeToFieldChecker.java:84)
at org.mutabilitydetector.checkers.MutableTypeToFieldChecker$AssignMutableTypeToFieldChecker.visitFieldAssignmentFrame(MutableTypeToFieldChecker.java:73)
at org.mutabilitydetector.checkers.FieldAssignmentVisitor.visitEnd(FieldAssignmentVisitor.java:85)
at org.mutabilitydetector.internal.org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1021)
at org.mutabilitydetector.internal.org.objectweb.asm.ClassReader.accept(ClassReader.java:693)
at org.mutabilitydetector.internal.org.objectweb.asm.ClassReader.accept(ClassReader.java:506)
at org.mutabilitydetector.checkers.CheckerRunner.analyse(CheckerRunner.java:84)
at org.mutabilitydetector.checkers.CheckerRunner.analyseFromClassLoader(CheckerRunner.java:79)
at org.mutabilitydetector.checkers.CheckerRunner.run(CheckerRunner.java:63)
... 49 more
Caused by: java.lang.IllegalArgumentException: INVOKESPECIAL/STATIC on interfaces require ASM 5
at org.mutabilitydetector.internal.org.objectweb.asm.MethodVisitor.visitMethodInsn(MethodVisitor.java:477)
at org.mutabilitydetector.internal.org.objectweb.asm.tree.MethodNode.visitMethodInsn(MethodNode.java:460)
at org.mutabilitydetector.internal.org.objectweb.asm.ClassReader.readCode(ClassReader.java:1416)
at org.mutabilitydetector.internal.org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1017)
at org.mutabilitydetector.internal.org.objectweb.asm.ClassReader.accept(ClassReader.java:693)
at org.mutabilitydetector.internal.org.objectweb.asm.ClassReader.accept(ClassReader.java:506)
at org.mutabilitydetector.checkers.CheckerRunner.analyse(CheckerRunner.java:84)
at org.mutabilitydetector.checkers.CheckerRunner.analyseFromClassLoader(CheckerRunner.java:79)
at org.mutabilitydetector.checkers.CheckerRunner.run(CheckerRunner.java:63)
... 62 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment