SimplifiedTernary: Incorrect ternary operation can be simplified Maven PMD
When checking the quality of the code, you may encounter a problem that sounds like this: Or like this: This is not a bug in PMD. Here are some examples:
READ MOREsimply about difficult
When checking the quality of the code, you may encounter a problem that sounds like this: Or like this: This is not a bug in PMD. Here are some examples:
READ MOREThe error looks like this: To solve the problem, you need to update the bytebuddy version to 1.9.3: If the version update did not fix the error, you need to find the correct version of the dependency. Instructions are here: https://mchesnavsky.tech/determine-versions-of-dependencies-of-library-maven/
READ MOREImagine you need to determine the version of Apache commons-lang dependency in ZooKeeper 3.6.2. The easiest way to do this is to find the artifact page in the mvn repository. For ZooKeeper 3.6.2: https://mvnrepository.com/artifact/org.apache.zookeeper/zookeeper/3.6.2. On the page, you need to find the Compile Dependencies section, and find the required dependency there. In our case, the commons-lang 2.6 dependency […]
READ MOREWhen you try to execute the mvn deploy command, you may encounter the error: The error could actually means (thanks to randomsimon): That is, maven cannot find the repository at the specified url. Check, that the url of the repository is correct, and in general it exists and specified. A repository url can be specified via […]
READ MORESuppose, that you need to exclude the package from the maven-pmd-plugin, or you need to exclude the package from findbugs-maven-plugin. maven-pmd-plugin Pmd definition in project pom.xml: Pmd configuration file pmd-exclude.xml: findbugs-maven-plugin Findbugs definition in project pom.xml: Findbugs configuration file findbugs-exclude.xml:
READ MORESpring Boot errors Pure Java exceptions Suggested solutions Method Guava version com.google.common.base.Preconditions.checkArgument 26.0-jre / 26.0-android com.google.common.base.Preconditions.checkState 21.0 com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor 18.0 / 19.0 Let me remind you that guava with maven is connected like this: If suggested verions don’t fix the problem, you can try connecting the specified versions in order: 18.0 / 19.0 / 21.0 / […]
READ MOREErrors of the same type look like this: Most likely this means that you have included the plugin in the pom.xml like this: The reason for the error is that the plugin version is not specified. Let’s specify, for example, 1.8: After that, you need to load changes from pom.xml to Maven and the error […]
READ MOREThe error looks like this: Stacktrace: maven-shade-plugin tries to open classes folder as zip file. This happens when one of the dependencies is found on the local filesystem and not in the local maven repository. Before unpacking, the plugin should check whether target\classes is a directory or a zip file, but it doesn’t. One solution […]
READ MORE