Closed realdadfish closed 4 years ago
I would need more information @realdadfish in order to offer more insights. Your exception is thrown by PMD / CPD internals while creating a language see here. Following the code there uses a ServiceLoader
but the default PMD version does not fit to your stacktrace ...
So here are my questions:
gradle-cpd-plugin
do you use? I guess 3.1
(= newest).cpd
and cpdCheck*
configuration for the executed tasks? Better would be the whole build file...I assume it is related with #51 but there it worked, right? So what's the difference?
What PMD version do you use?
6.25.0
What verson of gradle-cpd-plugin do you use? I guess 3.1 (= newest).
3.1, yes.
Do you bulid an Android app? I have never tried nor used this plugin with an Android build to be honest...
Yes, it works quite well.
What is you cpd and cpdCheck* configuration for the executed tasks? Better would be the whole build file...
I have a custom plugin written for that. I've posted the code for that here: https://gist.github.com/realdadfish/52e6d79ffaf913ab6a87b1a321727a47
Could you provide a small reproducer or is it open source even?
No, unfortunately not, it's closed source. The thing is, it never popped up for me on local tests, only once or twice on CI. My hope was that you'd eventually recognize the stacktrace and could pin-point me to something.
I assume it is related with #51 but there it worked, right? So what's the difference?
No, its actually not related with #51, as I've figured I should have just RTFM to see that this is not supported :) This is a different issue. I'll monitor the setup in the next couple of days, if it was just a glitch in the matrix (TM) and I cannot give you any more detail, feel free to close this issue again.
No, unfortunately not, it's closed source. The thing is, it never popped up for me on local tests, only once or twice on CI. My hope was that you'd eventually recognize the stacktrace and could pin-point me to something. I don't recognize this stacktrace, sorry. Though, I have some ideas now as I have the correct version of PMD you are using:
Caused by: java.lang.NullPointerException: Inflater has been closed
seems as a closed stream of anything should be processedLanguageFactory.java:39
tries iterator.hasNext()
ServiceLoader<Language> languageLoader = ServiceLoader.load(Language.class);
Iterator<Language> iterator = languageLoader.iterator();
ServiceLoader
works on jar
file on classpath normally which are simple zips...=> Ideas:
All of that can obviously happen for matter or worse, but for now if you have no other sights of this, I'd close this issue and come back to you if I have more information. I think speculation won't bring us further :) - thanks for your time!
We got an NPE recently during CPD execution. Seems as if something in the internals of CPD throws an NPE. Looking at other bugs on the internet with the same signature, there doesn't seem to be a lot one can do about it.
Have you seen this elsewhere already?