alicederyn / antipatterns Goto Github PK
View Code? Open in Web Editor NEWA FindBugs plugin to detect misuse of inheritance and the final keyword in Java.
License: Apache License 2.0
A FindBugs plugin to detect misuse of inheritance and the final keyword in Java.
License: Apache License 2.0
palantir/gradle-processors excludes certain classes from being analysed by findbugs. Antipatterns blows up when trying to analyse classes that extend these types.
Exception analyzing INTERNALCLASSNAME using detector com.palantir.antipatterns.FinalSignatureDetector
java.lang.RuntimeException: java.lang.ClassNotFoundException: Class not found: ImmutableINTERNALCLASSNAME
At com.palantir.antipatterns.FinalSignatureDetector.isIllegalFinalType(FinalSignatureDetector.java:86)
At com.palantir.antipatterns.FinalSignatureDetector.visitClassContext(FinalSignatureDetector.java:47)
At edu.umd.cs.findbugs.DetectorToDetector2Adapter.visitClass(DetectorToDetector2Adapter.java:76)
At edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java:1089)
At edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:283)
At org.gradle.api.plugins.quality.internal.findbugs.FindBugsExecuter.runFindbugs(FindBugsExecuter.java:39)
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:498)
At org.gradle.process.internal.worker.request.WorkerAction.run(WorkerAction.java:87)
At org.gradle.process.internal.worker.request.WorkerAction.runThenStop(WorkerAction.java:71)
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:498)
At org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
At org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
At org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:377)
At org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
At org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
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)
Since they're unmockable anyway.
Value types, e.g. like typed String wrappers, seem to make sense to return verbatim - they should be mocked with values anyway, since mocking breaks the notion of a value type anyway (e.g. equals(), hashCode()).
Builders, furthermore, are often final (as a proxy for their constructors) and will naturally be returned by the modification methods.
(Side note: PT_FINAL_TYPE_CONSTRUCTOR doesn't make sense to me. PT_FINAL_TYPE_RETURN guards against final types returned from methods, because someone might want to mock those methods - in turn, they might want to mock the returned objects as well, which doesn't work if the return type is final. But how exactly would one mock a constructor?)
@alicederyn We are moving away from FindBugs; would you be interested in taking over ownership of this repository?
Can't find it here: https://jcenter.bintray.com/com/palantir/
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.