Merge branch 'rawhide' into f35

This commit is contained in:
Jiri 2022-01-07 17:09:48 +01:00
commit 214c859f50
6 changed files with 84 additions and 11 deletions

4
.gitignore vendored
View file

@ -4,3 +4,7 @@
/java-runtime-decompiler-5.0.beta2.tar.gz
/java-runtime-decompiler-5.0.rc1.tar.gz
/java-runtime-decompiler-5.1.tar.gz
/java-runtime-decompiler-6.0.0.pre.1.tar.gz
/java-runtime-decompiler-6.0.0.pre.2.tar.gz
/java-runtime-decompiler-6.0.0.pre.3.tar.gz
/java-runtime-decompiler-6.1.tar.gz

View file

@ -7,6 +7,15 @@
. /usr/share/java-utils/java-functions
echo $@ | grep -q -e "-verbose"
verbose=$?
function warning() {
if [ $verbose -eq 0 ] ; then
echo ${1} >&2
fi
}
# identify directory tree
JRD=`basename $0`
CONF_HOME=$XDG_CONFIG_HOME
@ -41,7 +50,7 @@ _set_java_home
set_jvm
# all dependencies must be on classpath
set_classpath java-runtime-decompiler rsyntaxtextarea byteman google-gson classpathless-compiler
set_classpath java-runtime-decompiler rsyntaxtextarea byteman google-gson classpathless-compiler objectweb-asm
CLASSPATH=$CLASSPATH:${JAVA_HOME}/lib/tools.jar
# set path to agent automatically
@ -58,7 +67,7 @@ for cpfile in $CP_FILES; do
then
cp $cpfile $PLUGIN_HOME
else
echo "Configuration files were not copied for $FILE_NAME - the existing configuration would be overwritten." >&2
warning "Configuration files were not copied for $FILE_NAME - the existing configuration would be overwritten."
fi
done
@ -69,11 +78,11 @@ if [ -e $AGENT ]
then
if grep -Fxq $AGENT_STRING $CONFIG_FILE
then
echo "Default agent path is already set in $CONFIG_FILE. Skipping agent path setting." >&2
warning "Default agent path is already set in $CONFIG_FILE. Skipping agent path setting."
elif grep -rq $AGENT_PREFIX $CONFIG_FILE
then
RESULT_OF_GREP="$(grep -rq $AGENT_PREFIX $CONFIG_FILE)"
echo "Agent path is already set in $CONFIG_FILE as ${RESULT_OF_GREP}. Skipping agent path setting." >&2
warning "Agent path is already set in $CONFIG_FILE as ${RESULT_OF_GREP}. Skipping agent path setting."
else
echo $AGENT_STRING >> $CONFIG_FILE
@ -82,5 +91,5 @@ else
echo "Agent was not found and agent path was not set correctly. This has to be done manually in the decompiler GUI, or set AGENT_PATH===path_to_agent_jar in the configuration file: $CONFIG_FILE" >&2
fi
export FLAGS="$FLAGS -Djdk.attach.allowAttachSelf=true"
export FLAGS="$FLAGS -Djdk.attach.allowAttachSelf=true --add-exports jdk.jdeps/com.sun.tools.javap=ALL-UNNAMED" # jdk11+ do not allow attach by default; jdk17 is hiding javap api
run "$@"

View file

@ -1,6 +1,6 @@
Summary: Application for extraction and decompilation of JVM byte code
Name: java-runtime-decompiler
Version: 5.1
Version: 6.1
Release: 1%{?dist}
License: GPLv3
URL: https://github.com/pmikova/java-runtime-decompiler
@ -13,7 +13,7 @@ Patch3: rsyntaxVersion.patch
Patch4: systemCfr.patch
Patch5: systemJasm.patch
Patch6: systemJcoder.patch
Patch7: removeMultilineSpotbugs.patch
BuildArch: noarch
BuildRequires: maven-local
@ -28,7 +28,7 @@ BuildRequires: maven-surefire-provider-junit5
BuildRequires: maven-surefire
BuildRequires: maven-surefire-plugin
BuildRequires: maven-clean-plugin
BuildRequires: java-11-devel
BuildRequires: java-devel
BuildRequires: google-gson
BuildRequires: desktop-file-utils
BuildRequires: classpathless-compiler
@ -59,13 +59,23 @@ This package contains the API documentation for %{name}.
%patch4 -p0
%patch5 -p0
%patch6 -p0
%patch7 -p1
%build
pushd runtime-decompiler
%pom_remove_plugin :maven-jar-plugin
popd
%pom_remove_plugin :spotbugs-maven-plugin
%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
%mvn_build -f --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
%install
@ -107,6 +117,17 @@ desktop-file-install --vendor="fedora" \
%license LICENSE
%changelog
* Sun Dec 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0.pre.3-1
- bumped sources to upstream rc candidate
* Sun Dec 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0.pre.2-1
- bumped sources to upstream pre release
* Thu Aug 12 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0.pre.1-1
- umped sources to upstream pre release
- adapted jcoder plugin
- todo, patch for removed plugins
* Thu Aug 12 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.1-1
- bumped to final sources

View 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() {

View file

@ -1 +1 @@
SHA512 (java-runtime-decompiler-5.1.tar.gz) = 0a1e644696c7fc0595a9b4ca05ef1f392a78e5a6bb6e9631ede8a93776740ae8cf65ced0cfaacd7890985ee659e41947bcf17a87d7bc3ba5958ae84a943b64d9
SHA512 (java-runtime-decompiler-6.1.tar.gz) = 41bd87f0311d47819107fbd34173e4e1cebef71eb8651a337fb71a30947ffbb6bcaea6877508e0a02b0b2fcead7fe51497ed6251329a0254a8ee48220275e86f

View file

@ -6,7 +6,7 @@
- "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/JcoderDecompilerWrapper.java",
+ "WrapperURL": "file:/etc/java-runtime-decompiler/plugins/JcoderDecompilerWrapper.java",
"DependencyURL": [
- "file://${HOME}/.m2/repository/org/openjdk/asmtools/7.0.b10-ea/asmtools-core-7.0.b10-ea.jar"
- "file://${HOME}/.m2/repository/org/openjdk/asmtools/asmtools-core/7.0.b10-ea/asmtools-core-7.0.b10-ea.jar"
+ "file:/usr/share/java/openjdk-asmtools/asmtools-core.jar"
],
"DecompilerDownloadURL": "https://github.com/openjdk/asmtools"