Removed spotbugs in code
This commit is contained in:
parent
28ef89d33d
commit
bfa609e149
2 changed files with 46 additions and 1 deletions
|
|
@ -13,7 +13,7 @@ Patch3: rsyntaxVersion.patch
|
|||
Patch4: systemCfr.patch
|
||||
Patch5: systemJasm.patch
|
||||
Patch6: systemJcoder.patch
|
||||
|
||||
Patch7: removeMultilineSpotbugs.patch
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: maven-local
|
||||
|
|
@ -59,6 +59,7 @@ This package contains the API documentation for %{name}.
|
|||
%patch4 -p0
|
||||
%patch5 -p0
|
||||
%patch6 -p0
|
||||
%patch7 -p1
|
||||
|
||||
%build
|
||||
pushd runtime-decompiler
|
||||
|
|
@ -68,6 +69,11 @@ popd
|
|||
%pom_remove_plugin :maven-checkstyle-plugin
|
||||
%pom_remove_plugin :formatter-maven-plugin
|
||||
%pom_remove_dep :spotbugs-annotations
|
||||
a=`find | grep ".*\.java$"`
|
||||
for x in $a ; do
|
||||
#grep -e ".*SuppressFBWarnings.*" $x && echo "^ $x ^"
|
||||
sed "s/.*SuppressFBWarnings.*//g" $x -i
|
||||
done
|
||||
|
||||
%mvn_build --xmvn-javadoc -- -Plegacy
|
||||
java -cp /usr/share/java/classpathless-compiler/classpathless-compiler.jar:runtime-decompiler/target/runtime-decompiler-%{version}.jar org.jrd.backend.data.Help > %{name}.1
|
||||
|
|
|
|||
39
removeMultilineSpotbugs.patch
Normal file
39
removeMultilineSpotbugs.patch
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
--- a/runtime-decompiler/src/main/java/org/jrd/backend/core/DecompilerRequestReceiver.java
|
||||
+++ a/runtime-decompiler/src/main/java/org/jrd/backend/core/XDecompilerRequestReceiver.java
|
||||
@@ -262,10 +262,6 @@
|
||||
private static class ClassesComparator implements Comparator<ClassInfo>, Serializable {
|
||||
|
||||
@SuppressWarnings({"ReturnCount", "CyclomaticComplexity"}) // comparator syntax
|
||||
- @SuppressFBWarnings(
|
||||
- value = "NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE",
|
||||
- justification = "False report of possible NP dereference, despite testing both o1 & o2 for nullness."
|
||||
- )
|
||||
@Override
|
||||
public int compare(ClassInfo c1, ClassInfo c2) {
|
||||
if (c1 == null && c2 == null) {
|
||||
--- a/runtime-decompiler/src/main/java/org/jrd/backend/data/VmInfo.java
|
||||
+++ a/runtime-decompiler/src/main/java/org/jrd/backend/data/XVmInfo.java
|
||||
@@ -112,10 +112,6 @@
|
||||
this.type = local;
|
||||
}
|
||||
|
||||
- @SuppressFBWarnings(
|
||||
- value = "NP_LOAD_OF_KNOWN_NULL_VALUE",
|
||||
- justification = "Classpath is only used for FS VMs, in other cases getCp() does not get called"
|
||||
- )
|
||||
public void setCp(List<File> cp) {
|
||||
if (cp == null) {
|
||||
this.cp = null;
|
||||
--- a/runtime-decompiler/src/test/java/org/jrd/frontend/frame/plugins/FileSelectorArrayRowTest.java
|
||||
+++ a/runtime-decompiler/src/test/java/org/jrd/frontend/frame/plugins/XFileSelectorArrayRowTest.java
|
||||
@@ -11,9 +11,6 @@
|
||||
import java.io.File;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
-@SuppressFBWarnings(
|
||||
- value = "DMI_HARDCODED_ABSOLUTE_FILENAME", justification = "Hardcoded paths aren't used for manipulating with an actual filesystem."
|
||||
-)
|
||||
class FileSelectorArrayRowTest {
|
||||
@BeforeAll
|
||||
static void setup() {
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue