diff --git a/.github/workflows/maven.yaml b/.github/workflows/maven.yaml index f81f195d..1eb4c73b 100644 --- a/.github/workflows/maven.yaml +++ b/.github/workflows/maven.yaml @@ -15,8 +15,8 @@ jobs: strategy: matrix: - os: [ubuntu-latest, windows-latest] - java-version: [ 11, 17 ] + os: [ubuntu-latest] + java-version: [ 21, 25 ] fail-fast: false name: ${{ matrix.os }} - Java ${{ matrix.java-version }} - Maven @@ -28,38 +28,30 @@ jobs: uses: actions/setup-java@v2 with: java-version: ${{ matrix.java-version }} - distribution: 'adopt' - cache: maven + distribution: 'temurin' + + - name: java version + run: java -version - name: clone and build procyon devel we depeond on Linux if: matrix.os == 'ubuntu-latest' run: | - set -x - git clone https://github.com/mstrobel/procyon.git - cd procyon - git checkout develop - sed "s/6.9/7.3/g" -i gradle/wrapper/gradle-wrapper.properties - sed "s/.*.*//g" -i Procyon.Reflection/src/main/java/com/strobel/reflection/emit/CodeStream.java - ./gradlew install + set -ex + git checkout runtime-decompiler/src/main/java/org/kcc/wordsets/JrdApiKeywords.java + mvn -batch-mode dependency:resolve || echo "this is expected to fail, hoefully all necessary parts for plugins build were downloaded" + bash runtime-decompiler/plugins-build.sh shell: bash - - name: clone and build procyon devel we depeond on Windows - if: matrix.os == 'windows-latest' - run: | - @echo on - git clone https://github.com/mstrobel/procyon.git - cd procyon - git checkout develop - ./gradlew.bat install - shell: cmd - - name: Build JRD with Maven - run: mvn --batch-mode --update-snapshots clean install + run: | + set -ex + git checkout runtime-decompiler/src/main/java/org/kcc/wordsets/JrdApiKeywords.java + mvn --batch-mode --update-snapshots clean install - name: Create and populate config file on Linux if: matrix.os == 'ubuntu-latest' run: | - set -x + set -ex CONFIG_HOME="$HOME/.config/java-runtime-decompiler/conf" mkdir -p -v "$CONFIG_HOME" AGENT_PATH=$(find "${{ github.workspace }}" -name "decompiler-agent-*.jar" | head -n 1) @@ -67,19 +59,23 @@ jobs: cat "$CONFIG_HOME/config.json" shell: bash - - name: Create and populate config file on Windows - if: matrix.os == 'windows-latest' + - name: Test Cli + timeout-minutes: 10 run: | - @echo on - setLocal EnableDelayedExpansion - set "CONFIG_HOME=%UserProfile%\.config\java-runtime-decompiler\conf" - md %CONFIG_HOME% - for /f "delims=" %%i in ('dir *decompiler-agent-*.jar /B /S') do set "AGENT_PATH=%%i" - set "AGENT_PATH=%AGENT_PATH:\=/%" - echo {"AGENT_PATH":"%AGENT_PATH%"} >"%CONFIG_HOME%\config.json" - type "%CONFIG_HOME%\config.json" - shell: cmd + set -e + cd runtime-decompiler + for x in `find -type f | grep src/test/java | sed "s;.*/;;"` ; do + git checkout ../runtime-decompiler/src/main/java/org/kcc/wordsets/JrdApiKeywords.java ; + echo started $x + mvn --batch-mode test -Dtest="**/*$x" -DfailIfNoTests=false "-Dsurefire.reportFormat=plain" + echo finished $x ; + done + git checkout ../runtime-decompiler/src/main/java/org/kcc/wordsets/JrdApiKeywords.java # this was broken by previous mvn run + mvn --batch-mode test -Dtest=*CliTest -DfailIfNoTests=false "-Dsurefire.reportFormat=plain" # run the most important one more times to keep report - - name: Test Cli + - name: try image timeout-minutes: 10 - run: mvn --batch-mode test -Dtest=*CliTest -DfailIfNoTests=false "-Dsurefire.reportFormat=plain" + run: | + set -e + git checkout runtime-decompiler/src/main/java/org/kcc/wordsets/JrdApiKeywords.java && mvn clean install -DskipTests -Pimages -Plegacy + diff --git a/.plugin_config/codestyle.xml b/.plugin_config/codestyle.xml index 5d40d4c7..a6c036ab 100644 --- a/.plugin_config/codestyle.xml +++ b/.plugin_config/codestyle.xml @@ -274,7 +274,7 @@ - + diff --git a/.plugin_config/spotbugs_exclude.xml b/.plugin_config/spotbugs_exclude.xml index 5aa63a18..7bd23064 100644 --- a/.plugin_config/spotbugs_exclude.xml +++ b/.plugin_config/spotbugs_exclude.xml @@ -1,5 +1,10 @@ + + + + + diff --git a/README.md b/README.md index c2345c14..644d7591 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,13 @@ Internal *javap* and *javap -v* decompiling tools are available by default. In i Additionally, external decompilers are supported and can be configured in *Configure → Plugins*: * You can download them using the links below and set them up yourself using the *New* button. * You can use `mvn clean install -PdownloadPlugins` from a terminal in the project's directory and import the necessary files using the *Import* button. +* You can use `sh runtime-decompiler/plugins-build.sh` to build plugins whic are not in maven repos, or are outdated in them + * thee is small chicken-egg problem, so you may need to call it few times in loops + * consult `-PdownloadPlugins`, `plugins-build.sh` and `.github/workflows/maven.yaml` Currently supported decompilers are: * [Fernflower](https://github.com/JetBrains/intellij-community/tree/master/plugins/java-decompiler/engine) -* [Procyon](https://bitbucket.org/mstrobel/procyon/downloads/) +* [Procyon](https://github.com/mstrobel/procyon) * [CFR](https://github.com/leibnitz27/cfr/) * [JD](https://github.com/java-decompiler/jd-core/) @@ -36,7 +39,7 @@ Assemblers/Disassemblers * [jasm7](https://github.com/openjdk/asmtools) (jdk 11 and down, with known, broken lambdas) * [jcoder7](https://github.com/openjdk/asmtools) (jdk 11 and down) * [javap](https://github.com/openjdk/jdk) (disassemble only) -* [Procyon disassembler](https://bitbucket.org/mstrobel/procyon/downloads/)(disassemble only) +* [Procyon disassembler](https://github.com/mstrobel/procyon)(disassemble only) Assemblers/Disassemblers with additional info * [jasmG](https://github.com/openjdk/asmtools) (jdk 17 and up, with lambdas fixed, with -g switch) @@ -138,11 +141,15 @@ $ git clone https://github.com/pmikova/java-runtime-decompiler.git $ cd java-runtime-decompiler $ mvn clean install # builds the runtime decpompiler and agent, downloads also plugins $ mvn clean install -PdownloadPlugins # builds the decompiler and downloads the decompiler plugins for future use, if not already downloaded +$ sh runtime-decompiler/plugins-build.sh` # to build plugins whic are not in maven repos, or are outdated in them $ mvn clean install -Pimages # on Linux, bundles the plugins and JRD into a standalone portable image. Make some basic verifications $ mvn clean install -Plegacy # take care to build agent in oldest resonable way # $PLUGINS and $VERIFY_CP variables may help to solve some weird image building issues. ``` + +Note, that `plugins-build.sh` and`-PdownloadPlugins` are lsightly looped together and you may need to run them both in cycles. Conslut `.github/workflows/maven.yaml` for details + usually the development command is: ``` $ mvn clean install -Dcheckstyle.skip -Dspotbugs.skip=true @@ -153,8 +160,9 @@ usually the release command is: ``` $ mvn clean install -DskipTests -Pimages -Plegacy ``` -if the development command was never run, then plugins profile must be included +if the development command was never run, then plugins profile must be included and `plugins-build.sh` run. ``` +$ sh runtime-decompiler/plugins-build.sh $ mvn clean install -DskipTests -Pimages -Plegacy -PdownloadPlugins ``` Note, that tests requires valid DISPLAY, to have some top level components (like HexEditor) pass @@ -162,6 +170,11 @@ Note, that tests requires valid DISPLAY, to have some top level components (like Then, in images/target/runtime-decompiler... `./start.sh` in a *Linux terminal* or `start.bat` in a *Windows CMD* to start the application. The usage of top level start.sh/bat is only for development purposes. #### Known issues +* `[ERROR] src/main/java/org/kcc/wordsets/JrdApiKeywords.java:[45] (sizes) LineLength: Line is longer than 160 characters (found 13,128).` +The build keeps formatting the file despite itbeing excluded + + `git checkout runtime-decompiler/src/main/java/org/kcc/wordsets/JrdApiKeywords.java` + * `mvn clean install` results in `BUILD FAILURE` with the error `java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty` (spotted on Windows) @@ -182,3 +195,7 @@ Then, in images/target/runtime-decompiler... `./start.sh` in a *Linux terminal* echo $x ; mvn test -Dtest="**/*$x" ; done ``` + +* `bad version? clean .m?` in images/build.log + + Clean `~/m2` cahe. Just nitpicked directories are better then all, but all will do. diff --git a/decompiler_agent/pom.xml b/decompiler_agent/pom.xml index 3a173bf9..bd3dd34e 100644 --- a/decompiler_agent/pom.xml +++ b/decompiler_agent/pom.xml @@ -5,7 +5,7 @@ java-runtime-decompiler java-runtime-decompiler - 9.2 + ${jrd.version} 4.0.0 diff --git a/decompiler_agent/src/main/java/org/jrd/agent/AgentLogger.java b/decompiler_agent/src/main/java/org/jrd/agent/AgentLogger.java index 0e1f1c69..8135b985 100644 --- a/decompiler_agent/src/main/java/org/jrd/agent/AgentLogger.java +++ b/decompiler_agent/src/main/java/org/jrd/agent/AgentLogger.java @@ -7,7 +7,7 @@ public class AgentLogger { private static final String NULL_OBJECT_MESSAGE = "Trying to log null object"; - private static class AgentLoggerHolder { + private static final class AgentLoggerHolder { // https://en.wikipedia.org/wiki/Initialization_on_demand_holder_idiom // https://en.wikipedia.org/wiki/Double-checked_locking#Usage_in_Java private static final AgentLogger INSTANCE = new AgentLogger(); diff --git a/decompiler_agent/src/main/java/org/jrd/agent/Main.java b/decompiler_agent/src/main/java/org/jrd/agent/Main.java index 6770ba15..3e685885 100644 --- a/decompiler_agent/src/main/java/org/jrd/agent/Main.java +++ b/decompiler_agent/src/main/java/org/jrd/agent/Main.java @@ -42,8 +42,6 @@ private Main() { * @param inst instance of instrumentation of given VM */ public static void premain(final String agentArgs, Instrumentation inst) throws Exception { - String hostname = null; - Integer port = null; final String loneliness; // guard against the agent being loaded twice synchronized (Main.class) { @@ -62,6 +60,8 @@ public InstrumentationProvider run() { return p; } }); + String hostname = null; + Integer port = null; if (agentArgs != null) { String[] argsArray = agentArgs.split(","); for (String arg : argsArray) { diff --git a/decompiler_agent/src/main/java/org/jrd/agent/Transformer.java b/decompiler_agent/src/main/java/org/jrd/agent/Transformer.java index 9a968262..6cfbff76 100644 --- a/decompiler_agent/src/main/java/org/jrd/agent/Transformer.java +++ b/decompiler_agent/src/main/java/org/jrd/agent/Transformer.java @@ -16,7 +16,7 @@ */ public class Transformer implements ClassFileTransformer { - private boolean allowToSaveBytecode = false; + private volatile boolean allowToSaveBytecode = false; private ClassClassLoaderMap results = new ClassClassLoaderMap(); private ClassClassLoaderMap overrides = new ClassClassLoaderMap(); diff --git a/decompiler_agent/src/main/java/org/jrd/agent/api/Variables.java b/decompiler_agent/src/main/java/org/jrd/agent/api/Variables.java index 71a4ad0e..9ff88442 100644 --- a/decompiler_agent/src/main/java/org/jrd/agent/api/Variables.java +++ b/decompiler_agent/src/main/java/org/jrd/agent/api/Variables.java @@ -15,8 +15,8 @@ public class Variables { * We have to have all internal classes initialized so any later classes can use them without a manual init. */ public static void init() { - FakeVariableException.init(); - NoSuchFakeVariableException.init(); + FakeVariableException.fakeVariableExceptionInit(); + NoSuchFakeVariableException.noSuchFakeVariableExceptionInit(); FakeVariableAlreadyDeclaredException.init(); Global.init(); Local.init(); @@ -47,7 +47,7 @@ public FakeVariableException(Exception ex) { super(ex); } - public static void init() { + public static void fakeVariableExceptionInit() { } } @@ -61,7 +61,7 @@ public NoSuchFakeVariableException(String s) { super(s); } - public static void init() { + public static void noSuchFakeVariableExceptionInit() { } } diff --git a/decompiler_agent/src/main/java/org/jrd/backend/data/MetadataProperties.java b/decompiler_agent/src/main/java/org/jrd/backend/data/MetadataProperties.java index 866428ff..a1b23e0f 100644 --- a/decompiler_agent/src/main/java/org/jrd/backend/data/MetadataProperties.java +++ b/decompiler_agent/src/main/java/org/jrd/backend/data/MetadataProperties.java @@ -29,7 +29,7 @@ public final class MetadataProperties { private static final String TIMESTAMP_KEY = "timestamp"; private static final String NAME_KEY = "name"; - private static class PropertiesHolder { + private static final class PropertiesHolder { private static final MetadataProperties INSTANCE = new MetadataProperties(); } diff --git a/images/image.sh b/images/image.sh index 943690c7..a8a0d2a8 100755 --- a/images/image.sh +++ b/images/image.sh @@ -21,13 +21,15 @@ if [ "x$PLUGINS" = "x" ] ; then fi if [ "x$VERIFY_CP" = "xTRUE" -a "x$PLUGINS" = "xTRUE" ] ; then - find "$HOME/.m2/repository" -type d | grep -e com/github/mstrobel/ -e org/jboss/windup/decompiler/fernflower -e openjdk/asmtools -e benf/cfr +for x in com/github/mstrobel/ org/jboss/windup/decompiler/fernflower openjdk/asmtools/ asmtools/asmtools-core/ benf/cfr org/jd/jd-core/ ; do + find "$HOME/.m2/repository" -type d | grep -e $x if [ $? -eq 0 ] ; then - echo "decompilers found in maven repo" + echo "$x decompilers found in maven repo" else - echo "no decompilers found! run 'mvn clean install -PdownloadPlugins' to obtain decompilers from maven repos or use VERIFY_CP/PLUGINS" + echo "$x no decompilers found! run 'mvn clean install -PdownloadPlugins' and run 'plugins-build.sh' to obtain decompilers from maven repos or use VERIFY_CP/PLUGINS" exit 1 fi +done fi FROM_CP=`mktemp` diff --git a/images/pom.xml b/images/pom.xml index c4bbc432..577496a1 100644 --- a/images/pom.xml +++ b/images/pom.xml @@ -5,7 +5,7 @@ java-runtime-decompiler java-runtime-decompiler - 9.2 + ${jrd.version} ../ @@ -22,12 +22,12 @@ java-runtime-decompiler runtime-decompiler - 9.2 + ${jrd.version} java-runtime-decompiler decompiler-agent - 9.2 + ${jrd.version} diff --git a/pom.xml b/pom.xml index 946230a2..e2f37b60 100644 --- a/pom.xml +++ b/pom.xml @@ -13,11 +13,12 @@ java-runtime-decompiler java-runtime-decompiler - 9.2 + ${jrd.version} ${project.basedir} ${jrd.root.directory}/.plugin_config + 10.0 @@ -25,7 +26,7 @@ com.github.spotbugs spotbugs-maven-plugin - 4.3.0 + 4.9.6.0 true @@ -49,13 +50,13 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.1.2 + 3.6.0 com.puppycrawl.tools checkstyle - 8.45 + 11.0.1 @@ -84,7 +85,7 @@ net.revelc.code.formatter formatter-maven-plugin - 2.16.0 + 2.29.0 UTF-8 @@ -107,7 +108,7 @@ com.github.spotbugs spotbugs-annotations - 4.4.0 + 4.9.6 compile diff --git a/runtime-decompiler/plugins-build.sh b/runtime-decompiler/plugins-build.sh new file mode 100644 index 00000000..582fdaba --- /dev/null +++ b/runtime-decompiler/plugins-build.sh @@ -0,0 +1,175 @@ +#!/bin/bash +echo "Originally all plugins were available as maven projects." +echo "Unluckily as years passed, some of them stopped to release, moved to other build systems" +echo "or simply died, despite being still working fie. This script is building them and populating them to maven cache" + +## resolve folder of this script, following all symlinks, +## http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in +SCRIPT_SOURCE="${BASH_SOURCE[0]}" +while [ -h "$SCRIPT_SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink + PLUGINS_SCRIPT_DIR="$( cd -P "$( dirname "$SCRIPT_SOURCE" )" && pwd )" + SCRIPT_SOURCE="$(readlink "$SCRIPT_SOURCE")" + # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located + [[ $SCRIPT_SOURCE != /* ]] && SCRIPT_SOURCE="$PLUGINS_SCRIPT_DIR/$SCRIPT_SOURCE" +done +readonly PLUGINS_SCRIPT_DIR="$( cd -P "$( dirname "$SCRIPT_SOURCE" )" && pwd )" + + +set -ex + +targetDir="${PLUGINS_SCRIPT_DIR}/target" +mavenDir="$HOME/.m2/repository" +if [ -z "$procyonVersion" ] ; then + #TODO align with pom.xml? See jcommander... + #procyonVersion=0.6.0 + procyonVersion=1.0-SNAPSHOT #TODO, move to 0.6.0? +fi +procyonName=procyon +if [ -z "$jdVersion" ] ; then + #TODO align with pom.xml? See jcommander... + jdVersion=1.1.3 +fi +jdName=jd-core +if [ -z "$jasmVersionCheckout" -o -z "$jasmVersionName" ] ; then + #TODO align with pom.xml? + jasmVersionCheckout=master + jasmVersionName=9.0.b12-ea #not needed? +fi +jasmName=asmtools +if [ -z "$jasmLegacyVersionCheckout" -o -z "$jasmLegacyVersionName" ] ; then + #TODO align with pom.xml? + jasmLegacyVersionCheckout=at7 + jasmLegacyVersionName=7.0.b10-ea #not needed? +fi +jasmnLegacyName=asmtools-core + +function setup() { + mkdir -p ${targetDir} +} + +function buildProcyon() { + local sourceVersion="-source 8 -target 8 -g" + pushd ${targetDir} + if [ ! -e ${procyonName} ] ; then + git clone https://github.com/mstrobel/procyon.git + else + # to avoid version clash + rm -rf procyon/build/ + fi + pushd ${procyonName} + git checkout develop + mkdir -p build/Procyon.CompilerTools/{libs,classes} + mkdir -p build/Procyon.Core/{libs,classes} + mkdir -p build/Procyon.Decompiler/{libs,classes} + mkdir -p build/Procyon.Expressions/{libs,classes} + mkdir -p build/Procyon.Reflection/{libs,classes} + javac $sourceVersion -d build/Procyon.Core/classes/ ` find Procyon.Core/src/main/java -type f | grep "\.java"` + javac $sourceVersion -d build/Procyon.Reflection/classes/ -cp build/Procyon.Core/classes/ ` find Procyon.Reflection/src/main/java -type f | grep "\.java"` + javac $sourceVersion -d build/Procyon.Expressions/classes/ -cp build/Procyon.Core/classes/:build/Procyon.Reflection/classes/ ` find Procyon.Expressions/src/main/java -type f | grep "\.java"` + javac $sourceVersion -d build/Procyon.CompilerTools/classes/ -cp build/Procyon.Core/classes/ ` find Procyon.CompilerTools/src/main/java -type f | grep "\.java"` + # pack the jars + for x in Procyon.CompilerTools Procyon.Core Procyon.Reflection Procyon.Expressions ; do + pushd build/$x/classes/ + local project=`echo $x | sed -e "s/Procyon.//" | sed -e 's/\(.*\)/\L\1/'` + jar -cf ../../../build/$x/libs/${procyonName}-$project-${procyonVersion}.jar com + popd + done + if [ -z "$JCOMMANDER" ] ; then + echo "no JCOMMANDER set. Using default" + echo "to get the default jcommander, run mvn dependency:resolve || echo 'is ok to fail for this case'" + local jcomName=`cat ${PLUGINS_SCRIPT_DIR}/pom.xml | grep "jcommander" | sed "s/.*//" | sed "s/<.*//"` + local jcomVer=`cat ${PLUGINS_SCRIPT_DIR}/pom.xml | grep "jcommander" -A 1 | tail -n 1 | sed "s/.*//" | sed "s/<.*//"` + JCOMMANDER="$mavenDir/com/beust/${jcomName}/${jcomVer}/jcommander-${jcomVer}.jar" + fi + # create main/launcher jar to be used + mkdir build/launcher-minimal + mkdir build/launcher-minimal/classes + javac $sourceVersion -cp build/Procyon.Core/classes/:build/Procyon.CompilerTools/classes/:$JCOMMANDER -d build/launcher-minimal/classes ` find Procyon.Decompiler/src/main/java -type f | grep "\.java"` + # pack the minimal jar + pushd build/launcher-minimal/classes/ + jar -cf ../../../build/Procyon.Decompiler/libs/${procyonName}-decompiler-${procyonVersion}.jar com + popd + popd + popd +} + +function installProcyon() { + local jars=`find ${targetDir}/${procyonName} | grep -v "gradle-wrapper.jar" | grep "\\.jar$"` + for jar in $jars ; do + echo $jar + local name=`basename $jar` + local pureName=`basename $jar | sed "s/-$procyonVersion.*//"` + local dest="$mavenDir/com/github/mstrobel/$pureName/$procyonVersion/" + mkdir -p "$dest" + cp -v "$jar" "$dest" + done +} + +function buildJd() { + local sourceVersion="-source 8 -target 8 -g" + pushd ${targetDir} + if [ ! -e ${jdName} ] ; then + git clone https://github.com/java-decompiler/$jdName + else + # to avoid version clash + rm -rf ${jdName}/build/ + fi + pushd $jdName + git checkout "v$jdVersion" + rm -rf build + mkdir build + javac $sourceVersion `find src/main/java/ -type f ` -d build + jar -cf $jdName-$jdVersion.jar -C build org + popd + popd +} + +function installJd() { + local mavenTarget="$mavenDir/org/jd/$jdName/$jdVersion/" + rm -rf $mavenTarget + mkdir -p $mavenTarget + cp ${targetDir}/${jdName}/$jdName-$jdVersion.jar $mavenTarget +} + +function buildJasm() { + pushd ${targetDir} + if [ ! -e ${jasmName} ] ; then + git clone https://github.com/openjdk/$jasmName + else + # to avoid version clash + rm -rf ${jasmName}/maven/target + fi + pushd $jasmName + git checkout $jasmVersionCheckout + cd maven/ + bash mvngen.sh + mvn clean package -DskipTests + popd + popd +} + +function installJasm() { + pushd ${targetDir}/$jasmName/maven/ + mvn install -DskipTests + popd +} + + +function cleanAll() { + echo "todo" +} + +#fixme, not working due to PLUGINS_SCRIPT_DIR +if [ ! "x$JUST_LIB" == "xtrue" ] ; then + setup + #if procyon...? + buildProcyon + installProcyon + #if jd...? + buildJd + installJd + #if jasm? + buildJasm + installJasm +fi + diff --git a/runtime-decompiler/pom.xml b/runtime-decompiler/pom.xml index 90738f83..466790d0 100644 --- a/runtime-decompiler/pom.xml +++ b/runtime-decompiler/pom.xml @@ -5,7 +5,7 @@ java-runtime-decompiler java-runtime-decompiler - 9.2 + ${jrd.version} 4.0.0 @@ -22,8 +22,9 @@ jdk.jdeps/com.sun.tools.javap=ALL-UNNAMED ${maven.build.timestamp} yyyy-MM-dd HH:mm - 2.3 - 4.0.15 + 2.4 + 4.0.25 + 6.0.0 @@ -52,7 +53,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.0.2 + 3.4.2 @@ -65,11 +66,11 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.0.0 + 3.12.0 maven-assembly-plugin - 3.4.2 + 3.7.1 install @@ -93,7 +94,7 @@ maven-surefire-plugin - 3.0.0-M7 + 3.5.4 -Djrd.location=${project.parent.basedir} @@ -158,17 +159,17 @@ com.google.code.gson gson - 2.8.9 + 2.13.2 io.github.java-diff-utils java-diff-utils - 4.12 + 4.16 com.fifesoft rsyntaxtextarea - 3.1.2 + 3.6.0 org.jboss.byteman @@ -193,19 +194,19 @@ org.junit.jupiter junit-jupiter-api - 5.5.0 + ${jupiter.version} test org.junit.jupiter junit-jupiter-params - 5.5.0 + ${jupiter.version} test org.junit.jupiter junit-jupiter-engine - 5.5.0 + ${jupiter.version} test @@ -220,7 +221,8 @@ com.beust jcommander - 1.78 + 1.82 org.jboss.windup.decompiler decompiler-fernflower - 5.1.4.Final + 6.3.9.Final provided + org.openjdk asmtools - 8.0.b09-ea + 9.0.b12-ea provided @@ -273,10 +286,20 @@ org.benf cfr - 0.151 + 0.152 provided + org.jd jd-core @@ -297,17 +320,6 @@ - - - - diff --git a/runtime-decompiler/src/main/java/org/fife/ui/hex/ByteBuffer.java b/runtime-decompiler/src/main/java/org/fife/ui/hex/ByteBuffer.java index 9e61bbe2..9aa8fbe4 100644 --- a/runtime-decompiler/src/main/java/org/fife/ui/hex/ByteBuffer.java +++ b/runtime-decompiler/src/main/java/org/fife/ui/hex/ByteBuffer.java @@ -12,6 +12,8 @@ import java.io.InputStream; import java.util.Arrays; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + public class ByteBuffer { private byte[] buffer; @@ -19,10 +21,12 @@ public ByteBuffer(final int size) { this.buffer = new byte[size]; } + @SuppressFBWarnings(value = "CT_CONSTRUCTOR_THROW", justification = "be aware, this constrctor throws") public ByteBuffer(final String file) throws IOException { this(new File(file)); } + @SuppressFBWarnings(value = "CT_CONSTRUCTOR_THROW", justification = "be aware, this constrctor throws") public ByteBuffer(final File file) throws IOException { final int size = (int) file.length(); if (size < 0) { @@ -43,6 +47,7 @@ public ByteBuffer(final File file) throws IOException { } } + @SuppressFBWarnings(value = "CT_CONSTRUCTOR_THROW", justification = "be aware, this constrctor throws") public ByteBuffer(final InputStream in) throws IOException { final ByteArrayOutputStream baos = new ByteArrayOutputStream(); this.buffer = new byte[4096]; diff --git a/runtime-decompiler/src/main/java/org/fife/ui/hex/swing/HexEditorRowHeader.java b/runtime-decompiler/src/main/java/org/fife/ui/hex/swing/HexEditorRowHeader.java index 2a882e86..5197bf12 100644 --- a/runtime-decompiler/src/main/java/org/fife/ui/hex/swing/HexEditorRowHeader.java +++ b/runtime-decompiler/src/main/java/org/fife/ui/hex/swing/HexEditorRowHeader.java @@ -91,7 +91,7 @@ public Component getListCellRendererComponent( } } - private static class RowHeaderListModel extends AbstractListModel { + private static final class RowHeaderListModel extends AbstractListModel { private static final long serialVersionUID = 1L; private int size; diff --git a/runtime-decompiler/src/main/java/org/fife/ui/hex/swing/HexTable.java b/runtime-decompiler/src/main/java/org/fife/ui/hex/swing/HexTable.java index dca33b76..94dc5cb5 100644 --- a/runtime-decompiler/src/main/java/org/fife/ui/hex/swing/HexTable.java +++ b/runtime-decompiler/src/main/java/org/fife/ui/hex/swing/HexTable.java @@ -444,7 +444,7 @@ protected void paintComponent(final Graphics g) { } } - private static class EditorDocumentFilter extends DocumentFilter { + private static final class EditorDocumentFilter extends DocumentFilter { private boolean ensureByteRepresented(final String str) { try { final int i = Integer.parseInt(str, 16); diff --git a/runtime-decompiler/src/main/java/org/jrd/backend/communication/Communicate.java b/runtime-decompiler/src/main/java/org/jrd/backend/communication/Communicate.java index a9c1d635..b1914e64 100644 --- a/runtime-decompiler/src/main/java/org/jrd/backend/communication/Communicate.java +++ b/runtime-decompiler/src/main/java/org/jrd/backend/communication/Communicate.java @@ -91,7 +91,7 @@ private String trimReadLine() throws IOException { String message = "Agent returned null response."; Logger.getLogger().log(Logger.Level.ALL, new RuntimeException(message)); - return ErrorCandidate.toError(message); + return ErrorCandidate.errorCandidateToError(message); } return line.trim(); @@ -110,7 +110,7 @@ public String readResponse() { initLine = trimReadLine(); } catch (IOException ex) { Logger.getLogger().log(Logger.Level.DEBUG, ex); - return ErrorCandidate.toError(ex); + return ErrorCandidate.errorCandidateToError(ex); } // parse body based on header @@ -140,7 +140,7 @@ Logger.Level.ALL, new RuntimeException("Agent returned error in response header: return bytes; } catch (IOException ex) { Logger.getLogger().log(Logger.Level.ALL, ex); - return ErrorCandidate.toError(ex); + return ErrorCandidate.errorCandidateToError(ex); } case SEARCH_CLASSES: case OVERRIDES: @@ -165,7 +165,7 @@ Logger.Level.ALL, new RuntimeException("Agent returned error in response header: default: String message = "Unknown agent response header: '" + initLine + "'."; Logger.getLogger().log(Logger.Level.ALL, message); - return ErrorCandidate.toError(message); + return ErrorCandidate.errorCandidateToError(message); } } diff --git a/runtime-decompiler/src/main/java/org/jrd/backend/communication/ErrorCandidate.java b/runtime-decompiler/src/main/java/org/jrd/backend/communication/ErrorCandidate.java index a33b6638..2c19b354 100644 --- a/runtime-decompiler/src/main/java/org/jrd/backend/communication/ErrorCandidate.java +++ b/runtime-decompiler/src/main/java/org/jrd/backend/communication/ErrorCandidate.java @@ -29,12 +29,12 @@ public String getErrorMessage() { } } - public static String toError(String message) { + public static String errorCandidateToError(String message) { return ERROR_ID + " " + message; } - public static String toError(Exception ex) { - return toError(ex.toString()); + public static String errorCandidateToError(Exception ex) { + return errorCandidateToError(ex.toString()); } /** diff --git a/runtime-decompiler/src/main/java/org/jrd/backend/communication/FsAgent.java b/runtime-decompiler/src/main/java/org/jrd/backend/communication/FsAgent.java index 080d5ccc..512b2ab8 100644 --- a/runtime-decompiler/src/main/java/org/jrd/backend/communication/FsAgent.java +++ b/runtime-decompiler/src/main/java/org/jrd/backend/communication/FsAgent.java @@ -158,7 +158,7 @@ public String submitRequest(final String request) { } } catch (Exception ex) { Logger.getLogger().log(ex); - return ErrorCandidate.toError(ex); + return ErrorCandidate.errorCandidateToError(ex); } } @@ -346,7 +346,7 @@ public Void onJarEntry(File file, ZipFile zipFile, ZipEntry ze) throws IOExcepti } } - private static class ReadingCpOperator implements CpOperator { + private static final class ReadingCpOperator implements CpOperator { @Override public String onDirEntry(File dir, File clazz) throws IOException { byte[] bytes = Files.readAllBytes(clazz.toPath()); diff --git a/runtime-decompiler/src/main/java/org/jrd/backend/communication/TopLevelErrorCandidate.java b/runtime-decompiler/src/main/java/org/jrd/backend/communication/TopLevelErrorCandidate.java index 7b35abdc..8fc33ae9 100644 --- a/runtime-decompiler/src/main/java/org/jrd/backend/communication/TopLevelErrorCandidate.java +++ b/runtime-decompiler/src/main/java/org/jrd/backend/communication/TopLevelErrorCandidate.java @@ -7,12 +7,12 @@ public TopLevelErrorCandidate(String line) { super(line); } - public static String toError(String message) { + public static String topLevelErrorCandidateToError(String message) { return ERROR_RESPONSE + " " + message; } - public static String toError(Exception ex) { - return toError(ex.toString()); + public static String topLevelErrorCandidateToError(Exception ex) { + return topLevelErrorCandidateToError(ex.toString()); } @Override diff --git a/runtime-decompiler/src/main/java/org/jrd/backend/core/DecompilerRequestReceiver.java b/runtime-decompiler/src/main/java/org/jrd/backend/core/DecompilerRequestReceiver.java index 2b142241..af18c97e 100644 --- a/runtime-decompiler/src/main/java/org/jrd/backend/core/DecompilerRequestReceiver.java +++ b/runtime-decompiler/src/main/java/org/jrd/backend/core/DecompilerRequestReceiver.java @@ -41,12 +41,12 @@ public String processRequest(AgentRequestAction request) { RequestAction action; int vmPid; int port; - + checkHostname(hostname, vmId); try { action = RequestAction.fromString(actionStr); } catch (IllegalArgumentException e) { Logger.getLogger().log(Logger.Level.DEBUG, new RuntimeException("Illegal action in request", e)); - return TopLevelErrorCandidate.toError(e); + return TopLevelErrorCandidate.topLevelErrorCandidateToError(e); } port = tryParseInt(portStr, "Listen port is not an integer!"); vmPid = tryParseInt(vmPidStr, "VM PID is not a number!"); @@ -106,12 +106,16 @@ public String processRequest(AgentRequestAction request) { default: String s = "Unknown action given: " + action; Logger.getLogger().log(Logger.Level.DEBUG, s); - return TopLevelErrorCandidate.toError(s); + return TopLevelErrorCandidate.topLevelErrorCandidateToError(s); } return response; } + //Totally worthy to keep checkstyle live; + private void checkHostname(String hostname, String vmId) { + } + private String getListActionSearch( String hostname, int port, String vmId, int vmPid, RequestAction action, String substringAndRegex, String classloader ) { @@ -132,7 +136,7 @@ private String getListActionSearch( vmManager.getVmInfoByID(vmId).replaceVmDecompilerStatus(status); } catch (Exception ex) { Logger.getLogger().log(Logger.Level.ALL, ex); - return TopLevelErrorCandidate.toError(ex); + return TopLevelErrorCandidate.topLevelErrorCandidateToError(ex); } return OK_RESPONSE; } @@ -152,7 +156,7 @@ private String getListActionLoader(String hostname, int port, String vmId, int v vmManager.getVmInfoByID(vmId).replaceVmDecompilerStatus(status); } catch (Exception ex) { Logger.getLogger().log(Logger.Level.ALL, ex); - return TopLevelErrorCandidate.toError(ex); + return TopLevelErrorCandidate.topLevelErrorCandidateToError(ex); } return OK_RESPONSE; } @@ -249,7 +253,7 @@ private String getOverwriteAction( vmManager.getVmInfoByID(vmId).replaceVmDecompilerStatus(status); } catch (Exception ex) { Logger.getLogger().log(Logger.Level.ALL, ex); - return TopLevelErrorCandidate.toError(ex); + return TopLevelErrorCandidate.topLevelErrorCandidateToError(ex); } return OK_RESPONSE; } @@ -265,7 +269,7 @@ private String getVersionAction(String hostname, int listenPort, String vmId, in vmManager.getVmInfoByID(vmId).replaceVmDecompilerStatus(status); } catch (Exception ex) { Logger.getLogger().log(Logger.Level.DEBUG, ex); - return TopLevelErrorCandidate.toError(ex); + return TopLevelErrorCandidate.topLevelErrorCandidateToError(ex); } return OK_RESPONSE; } @@ -288,7 +292,7 @@ private String getNoReplyValue(String hostname, int listenPort, String vmId, int vmManager.getVmInfoByID(vmId).replaceVmDecompilerStatus(status); } catch (Exception ex) { Logger.getLogger().log(Logger.Level.ALL, ex); - return TopLevelErrorCandidate.toError(ex); + return TopLevelErrorCandidate.topLevelErrorCandidateToError(ex); } return OK_RESPONSE; } @@ -307,7 +311,7 @@ private String getByteCodeAction(String hostname, int listenPort, String vmId, i vmManager.getVmInfoByID(vmId).replaceVmDecompilerStatus(status); } catch (Exception ex) { Logger.getLogger().log(Logger.Level.ALL, ex); - return TopLevelErrorCandidate.toError(ex); + return TopLevelErrorCandidate.topLevelErrorCandidateToError(ex); } return OK_RESPONSE; } @@ -327,7 +331,7 @@ private String getListAction(String hostname, int listenPort, String vmId, int v vmManager.getVmInfoByID(vmId).replaceVmDecompilerStatus(status); } catch (Exception ex) { Logger.getLogger().log(Logger.Level.ALL, ex); - return TopLevelErrorCandidate.toError(ex); + return TopLevelErrorCandidate.topLevelErrorCandidateToError(ex); } return OK_RESPONSE; } @@ -371,7 +375,7 @@ private ClassInfo[] parseClasses(String classes) { .toArray(ClassInfo[]::new); } - private static class ClassesComparator implements Comparator, Serializable { + private static final class ClassesComparator implements Comparator, Serializable { @SuppressWarnings({"ReturnCount", "CyclomaticComplexity"}) // comparator syntax @SuppressFBWarnings( diff --git a/runtime-decompiler/src/main/java/org/jrd/backend/core/Logger.java b/runtime-decompiler/src/main/java/org/jrd/backend/core/Logger.java index b5ba2d04..2d7f9177 100644 --- a/runtime-decompiler/src/main/java/org/jrd/backend/core/Logger.java +++ b/runtime-decompiler/src/main/java/org/jrd/backend/core/Logger.java @@ -24,7 +24,7 @@ public boolean isVerbose() { return isVerbose; } - private static class LoggerHolder { + private static final class LoggerHolder { // https://en.wikipedia.org/wiki/Initialization_on_demand_holder_idiom // https://en.wikipedia.org/wiki/Double-checked_locking#Usage_in_Java private static final Logger INSTANCE = new Logger(); diff --git a/runtime-decompiler/src/main/java/org/jrd/backend/core/agentstore/KnownAgent.java b/runtime-decompiler/src/main/java/org/jrd/backend/core/agentstore/KnownAgent.java index 119e9cc8..32451ea7 100644 --- a/runtime-decompiler/src/main/java/org/jrd/backend/core/agentstore/KnownAgent.java +++ b/runtime-decompiler/src/main/java/org/jrd/backend/core/agentstore/KnownAgent.java @@ -16,6 +16,8 @@ import java.util.Date; import java.util.Objects; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + public class KnownAgent { private final int port; @@ -30,6 +32,7 @@ public class KnownAgent { @SuppressWarnings("ExplicitInitialization") //the null have its meaning here private Long deadSince = null; + @SuppressFBWarnings(value = "CT_CONSTRUCTOR_THROW", justification = "be aware, this constrctor throws") KnownAgent(InstallDecompilerAgentImpl install, AgentLiveliness ttl) { this.pid = Integer.parseInt(install.getPid()); this.port = install.getPort(); diff --git a/runtime-decompiler/src/main/java/org/jrd/backend/data/ArchiveManager.java b/runtime-decompiler/src/main/java/org/jrd/backend/data/ArchiveManager.java index daee6d73..3602c98f 100644 --- a/runtime-decompiler/src/main/java/org/jrd/backend/data/ArchiveManager.java +++ b/runtime-decompiler/src/main/java/org/jrd/backend/data/ArchiveManager.java @@ -20,7 +20,7 @@ public class ArchiveManager { - private static class ArchiveManagerHolder { + private static final class ArchiveManagerHolder { private static final ArchiveManager INSTANCE = new ArchiveManager(); } @@ -315,7 +315,7 @@ private boolean deleteRecursive(File f) { return wasDeleted; } - private static class ArchivePathManager { + private static final class ArchivePathManager { private String clazz = ""; private boolean found = false; private boolean extracted = false; diff --git a/runtime-decompiler/src/main/java/org/jrd/backend/data/ArchiveManagerOptions.java b/runtime-decompiler/src/main/java/org/jrd/backend/data/ArchiveManagerOptions.java index d9acb714..f550790c 100644 --- a/runtime-decompiler/src/main/java/org/jrd/backend/data/ArchiveManagerOptions.java +++ b/runtime-decompiler/src/main/java/org/jrd/backend/data/ArchiveManagerOptions.java @@ -6,7 +6,7 @@ public class ArchiveManagerOptions { - private static class ArchiveManagerOptionsHolder { + private static final class ArchiveManagerOptionsHolder { private static final ArchiveManagerOptions INSTANCE = new ArchiveManagerOptions(); } diff --git a/runtime-decompiler/src/main/java/org/jrd/backend/data/Config.java b/runtime-decompiler/src/main/java/org/jrd/backend/data/Config.java index 96f00a2f..156def56 100644 --- a/runtime-decompiler/src/main/java/org/jrd/backend/data/Config.java +++ b/runtime-decompiler/src/main/java/org/jrd/backend/data/Config.java @@ -103,7 +103,7 @@ public DepndenceNumbers getDepndenciesNumber() { return getConfig().doDepndenceNumbers(); } - private static class ConfigHolder { + private static final class ConfigHolder { private static final Config INSTANCE = new Config(); } diff --git a/runtime-decompiler/src/main/java/org/jrd/backend/data/MetadataProperties.java b/runtime-decompiler/src/main/java/org/jrd/backend/data/MetadataProperties.java index 6ebcd386..e548c623 100644 --- a/runtime-decompiler/src/main/java/org/jrd/backend/data/MetadataProperties.java +++ b/runtime-decompiler/src/main/java/org/jrd/backend/data/MetadataProperties.java @@ -20,7 +20,7 @@ public final class MetadataProperties { private static final String TIMESTAMP_KEY = "timestamp"; private static final String NAME_KEY = "name"; - private static class PropertiesHolder { + private static final class PropertiesHolder { private static final MetadataProperties INSTANCE = new MetadataProperties(); } diff --git a/runtime-decompiler/src/main/java/org/jrd/backend/data/VmInfo.java b/runtime-decompiler/src/main/java/org/jrd/backend/data/VmInfo.java index 7944e44a..e1af4bc8 100644 --- a/runtime-decompiler/src/main/java/org/jrd/backend/data/VmInfo.java +++ b/runtime-decompiler/src/main/java/org/jrd/backend/data/VmInfo.java @@ -4,8 +4,6 @@ import com.sun.tools.attach.AgentLoadException; import com.sun.tools.attach.AttachNotSupportedException; -import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; - import org.jboss.byteman.agent.install.Install; import org.jrd.backend.communication.CallDecompilerAgent; import org.jrd.backend.core.Logger; @@ -151,10 +149,6 @@ public void setType(Type local) { 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 cp) { if (cp == null) { this.cp = null; diff --git a/runtime-decompiler/src/main/java/org/jrd/backend/data/VmManager.java b/runtime-decompiler/src/main/java/org/jrd/backend/data/VmManager.java index 84a95d7a..9f92e33d 100644 --- a/runtime-decompiler/src/main/java/org/jrd/backend/data/VmManager.java +++ b/runtime-decompiler/src/main/java/org/jrd/backend/data/VmManager.java @@ -17,6 +17,8 @@ import java.util.Set; import java.util.UUID; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + /** * This class is used for creating/removing/updating information about available Java Virtual Machines. */ @@ -27,6 +29,7 @@ public class VmManager { private Set actionListeners = new HashSet<>(); boolean changed; + @SuppressFBWarnings(value = "CT_CONSTRUCTOR_THROW", justification = "be aware, this constrctor throws") public VmManager() { this.vmInfoSet = new HashSet<>(); updateLocalVMs(); diff --git a/runtime-decompiler/src/main/java/org/jrd/backend/data/cli/Cli.java b/runtime-decompiler/src/main/java/org/jrd/backend/data/cli/Cli.java index b5fef47e..02442258 100644 --- a/runtime-decompiler/src/main/java/org/jrd/backend/data/cli/Cli.java +++ b/runtime-decompiler/src/main/java/org/jrd/backend/data/cli/Cli.java @@ -39,6 +39,8 @@ import static org.jrd.backend.data.cli.CliSwitches.*; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + public class Cli { public enum EdType { @@ -67,6 +69,7 @@ public EdTypeWithData(EdType type, String additionalData) { private AgentConfig currentAgent = AgentConfig.getDefaultSinglePermanentAgent(); + @SuppressFBWarnings(value = "CT_CONSTRUCTOR_THROW", justification = "be aware, this constrctor throws") public Cli(String[] orig) { this.filteredArgs = prefilterArgs(orig); } diff --git a/runtime-decompiler/src/main/java/org/jrd/backend/data/cli/Help.java b/runtime-decompiler/src/main/java/org/jrd/backend/data/cli/Help.java index 7fd7266b..22d823b9 100644 --- a/runtime-decompiler/src/main/java/org/jrd/backend/data/cli/Help.java +++ b/runtime-decompiler/src/main/java/org/jrd/backend/data/cli/Help.java @@ -328,7 +328,7 @@ default String[] launchOptions() { void printNotes(); } - private static class CliHelpFormatter implements HelpFormatter { + private static final class CliHelpFormatter implements HelpFormatter { @Override public void printTitle() { @@ -404,7 +404,7 @@ public void printNotes() { } } - private static class ManPageFormatter implements HelpFormatter { + private static final class ManPageFormatter implements HelpFormatter { String formatWrap(char formatChar, String string) { return "\\f" + formatChar + string + "\\fR"; diff --git a/runtime-decompiler/src/main/java/org/jrd/backend/data/cli/workers/Api.java b/runtime-decompiler/src/main/java/org/jrd/backend/data/cli/workers/Api.java index 5de37dd7..201b0755 100644 --- a/runtime-decompiler/src/main/java/org/jrd/backend/data/cli/workers/Api.java +++ b/runtime-decompiler/src/main/java/org/jrd/backend/data/cli/workers/Api.java @@ -11,8 +11,6 @@ import java.io.PrintStream; import java.util.List; -import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; - public class Api { private final List filteredArgs; @@ -27,7 +25,6 @@ public Api(List filteredArgs, Saving saving, VmManager vmManager, Plugin this.pluginManager = pluginManager; } - @SuppressFBWarnings(value = "OS_OPEN_STREAM", justification = "The stream is clsoed as conditionally as is created") public VmInfo api() throws Exception { PrintStream out = System.out; try { diff --git a/runtime-decompiler/src/main/java/org/jrd/backend/data/cli/workers/ListJvms.java b/runtime-decompiler/src/main/java/org/jrd/backend/data/cli/workers/ListJvms.java index 0b474dee..9195d5f1 100644 --- a/runtime-decompiler/src/main/java/org/jrd/backend/data/cli/workers/ListJvms.java +++ b/runtime-decompiler/src/main/java/org/jrd/backend/data/cli/workers/ListJvms.java @@ -1,6 +1,5 @@ package org.jrd.backend.data.cli.workers; -import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.jrd.backend.data.VmInfo; import org.jrd.backend.data.VmManager; import org.jrd.backend.data.cli.utils.Saving; @@ -23,7 +22,6 @@ public ListJvms(List filteredArgs, Saving saving, VmManager vmManager) { this.vmManager = vmManager; } - @SuppressFBWarnings(value = "OS_OPEN_STREAM", justification = "The stream is clsoed as conditionally as is created") public void listJvms() throws IOException { if (filteredArgs.size() != 1) { throw new RuntimeException(LIST_JVMS + " does not expect arguments."); diff --git a/runtime-decompiler/src/main/java/org/jrd/backend/data/cli/workers/ListPlugins.java b/runtime-decompiler/src/main/java/org/jrd/backend/data/cli/workers/ListPlugins.java index a66d75d6..eb8aa28b 100644 --- a/runtime-decompiler/src/main/java/org/jrd/backend/data/cli/workers/ListPlugins.java +++ b/runtime-decompiler/src/main/java/org/jrd/backend/data/cli/workers/ListPlugins.java @@ -1,6 +1,5 @@ package org.jrd.backend.data.cli.workers; -import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.jrd.backend.data.cli.CliUtils; import org.jrd.backend.data.cli.utils.Saving; import org.jrd.backend.decompiling.DecompilerWrapper; @@ -24,7 +23,6 @@ public ListPlugins(List filteredArgs, Saving saving, PluginManager plugi this.pluginManager = pluginManager; } - @SuppressFBWarnings(value = "OS_OPEN_STREAM", justification = "The stream is clsoed as conditionally as is created") public void listPlugins() throws IOException { if (filteredArgs.size() != 1) { throw new RuntimeException(LIST_PLUGINS + " does not expect arguments."); diff --git a/runtime-decompiler/src/main/java/org/jrd/backend/decompiling/PluginManager.java b/runtime-decompiler/src/main/java/org/jrd/backend/decompiling/PluginManager.java index 0b324c05..0e03cc80 100644 --- a/runtime-decompiler/src/main/java/org/jrd/backend/decompiling/PluginManager.java +++ b/runtime-decompiler/src/main/java/org/jrd/backend/decompiling/PluginManager.java @@ -45,6 +45,8 @@ import java.util.logging.Level; import java.util.regex.Pattern; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + /** * Executes manages external decompiler wrapper plugins. * Wrapper plugins are stored as .java files along with .json file containing classname, wrapper url and dependencies url. @@ -76,6 +78,7 @@ public static boolean isLambdaForm(String s) { return PluginManager.LAMBDA_FORM.matcher(s).matches(); } + @SuppressFBWarnings(value = "CT_CONSTRUCTOR_THROW", justification = "be aware, this constrctor throws") public PluginManager() { wrappers = new LinkedList<>(); @@ -125,6 +128,7 @@ private void loadConfigsFromLocation(String location) { /** * Loads information decompiler json file into ListWrapper. */ + @SuppressFBWarnings(value = "DCN_NULLPOINTER_EXCEPTION", justification = "intentional") private void loadConfig(File file) { if (file.getName().endsWith(".json")) { DecompilerWrapper wrapper; diff --git a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/about/AboutView.java b/runtime-decompiler/src/main/java/org/jrd/frontend/frame/about/AboutView.java index b0cc4685..cdfffbae 100644 --- a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/about/AboutView.java +++ b/runtime-decompiler/src/main/java/org/jrd/frontend/frame/about/AboutView.java @@ -15,8 +15,11 @@ import java.io.IOException; import java.net.URISyntaxException; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + public class AboutView extends JDialog { + @SuppressFBWarnings(value = "CT_CONSTRUCTOR_THROW", justification = "be aware, this constrctor throws") public AboutView(JFrame mainFrameView, boolean showVersion) { JLabel label = new JLabel(); Font font = label.getFont(); diff --git a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/hex/FeatureFullHex.java b/runtime-decompiler/src/main/java/org/jrd/frontend/frame/hex/FeatureFullHex.java index 1e971db4..7b147845 100644 --- a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/hex/FeatureFullHex.java +++ b/runtime-decompiler/src/main/java/org/jrd/frontend/frame/hex/FeatureFullHex.java @@ -23,10 +23,13 @@ import javax.swing.JPanel; import javax.swing.JTabbedPane; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + public class FeatureFullHex extends JPanel { private final LinesProvider hex; + @SuppressFBWarnings(value = "CT_CONSTRUCTOR_THROW", justification = "be aware, this constrctor throws") public FeatureFullHex(final File f, final JTabbedPane parent, LinesProvider impl) throws IOException { this.setLayout(new BorderLayout()); JPanel tool = new JPanel(); diff --git a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/GlobalConsole.java b/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/GlobalConsole.java index 8a0d8fa0..8b4142f3 100644 --- a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/GlobalConsole.java +++ b/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/GlobalConsole.java @@ -32,7 +32,7 @@ import org.jrd.frontend.frame.overwrite.OverwriteClassDialog; import org.jrd.frontend.utility.ScreenFinder; -public class GlobalConsole implements MessagesListener, OverwriteClassDialog.TextLog { +public final class GlobalConsole implements MessagesListener, OverwriteClassDialog.TextLog { public static final String CPLC_DUPLICATED_CODE_VERBOSITY_CONSTANT = "io.github.mkoncek.cplc.log-to-provider"; public static final String CPLC_IL = "IGNORE_LAMBDAS"; @@ -50,7 +50,7 @@ public class GlobalConsole implements MessagesListener, OverwriteClassDialog.Tex private final JDialog frame; private boolean first = true; - public GlobalConsole() { + private GlobalConsole() { JButton tmpClean; TextWithControls tmpLog; JDialog tmpFrame; diff --git a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/MainFrameView.java b/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/MainFrameView.java index 20739905..7d1663f3 100644 --- a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/MainFrameView.java +++ b/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/MainFrameView.java @@ -206,7 +206,7 @@ private static String decostatst(VmDecompilerStatus vmDecompilerStatus) { /** * Custom JList that disables selection with mouse drag. */ - private static class UndraggableJList extends JList { + private static final class UndraggableJList extends JList { @Override protected void processMouseMotionEvent(MouseEvent e) { if (MouseEvent.MOUSE_DRAGGED != e.getID()) { @@ -242,6 +242,7 @@ private void setImageIcon() { mainFrame.setIconImages(images); } + @SuppressFBWarnings(value = "CT_CONSTRUCTOR_THROW", justification = "be aware, this constrctor throws") public MainFrameView(String defaultFs) { // mainFrame, mainPanel, westPanel, localVmPanel. localVmList, localVmScrollPane, localVmLabelPanel @@ -648,7 +649,7 @@ public void switchTabsToRemoteVms() { this.tabbedPane.setSelectedComponent(remoteVmPanel); } - private class LocalVmListMouseListener extends MouseAdapter { + private final class LocalVmListMouseListener extends MouseAdapter { @Override public void mouseClicked(MouseEvent mouseEvent) { if (SwingUtilities.isLeftMouseButton(mouseEvent)) { diff --git a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/decompilerview/BytecodeDecompilerView.java b/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/decompilerview/BytecodeDecompilerView.java index 2d35310f..dab8266a 100644 --- a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/decompilerview/BytecodeDecompilerView.java +++ b/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/decompilerview/BytecodeDecompilerView.java @@ -84,6 +84,8 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + /** * Class that creates GUI for attached VM. */ @@ -1018,6 +1020,7 @@ public void setCompletionHelper(DecompilationController dec) { bytemanScript.setClassesAndMethodsProvider(completionHelper); } + @SuppressFBWarnings(value = "EI_EXPOSE_REP", justification = "intentional") public ClassesAndMethodsProvider getCompletionHelper() { return completionHelper; } @@ -1231,6 +1234,7 @@ public DecompilerWrapper getPluginComboBox() { return (DecompilerWrapper) pluginComboBox.getSelectedItem(); } + @SuppressFBWarnings(value = "EI_EXPOSE_REP", justification = "intentional") public ClasspathProvider getClasspathProvider() { return classpathProvider; } diff --git a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/decompilerview/TextWithControls.java b/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/decompilerview/TextWithControls.java index cb6de8b9..4d22f356 100644 --- a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/decompilerview/TextWithControls.java +++ b/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/decompilerview/TextWithControls.java @@ -390,7 +390,7 @@ public enum CodeCompletionType { STANDALONE } - private class RSyntaxTextAreaWithCompletion extends RSyntaxTextArea { + private final class RSyntaxTextAreaWithCompletion extends RSyntaxTextArea { @Override public void setText(String t) { super.setText(t); @@ -562,7 +562,7 @@ private JMenu createTemplatesMenu() { return templatesMenu; } - private class CodeCompletionMenuActionListener implements ActionListener { + private final class CodeCompletionMenuActionListener implements ActionListener { @Override public void actionPerformed(ActionEvent actionEvent) { SwingUtilities.invokeLater(new Runnable() { diff --git a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/popup/DiffPopup.java b/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/popup/DiffPopup.java index e3637f73..6c9ab48d 100644 --- a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/popup/DiffPopup.java +++ b/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/popup/DiffPopup.java @@ -38,6 +38,8 @@ import java.util.List; import java.util.Optional; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + public class DiffPopup extends JPopupMenu { private static File lastOpened = new File(System.getProperty("user.dir")); @@ -47,10 +49,12 @@ public class DiffPopup extends JPopupMenu { JCheckBox human = new JCheckBox("human readable"); JCheckBox invert = new JCheckBox("invert order"); + @SuppressFBWarnings(value = "CT_CONSTRUCTOR_THROW", justification = "be aware, this constrctor throws") public DiffPopup(List linesProviders, Optional fqn, boolean onlyOne) { this(linesProviders.toArray(new LinesProvider[0]), fqn, onlyOne); } + @SuppressFBWarnings(value = "CT_CONSTRUCTOR_THROW", justification = "be aware, this constrctor throws") public DiffPopup(LinesProvider[] linesProviders, Optional fqn, boolean onlyOne) { this.fqn = fqn; this.linesProviders = linesProviders; diff --git a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/popup/JListPopupMenu.java b/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/popup/JListPopupMenu.java index edac9616..934bde85 100644 --- a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/popup/JListPopupMenu.java +++ b/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/popup/JListPopupMenu.java @@ -140,7 +140,7 @@ public void actionPerformed(ActionEvent actionEvent) { new ClassResolutionInBackground().execute(); } - private class ClassResolutionInBackground extends SwingWorker { + private final class ClassResolutionInBackground extends SwingWorker { @Override protected String doInBackground() throws Exception { final StringBuilder r = new StringBuilder(""); diff --git a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/plugins/MessagePanel.java b/runtime-decompiler/src/main/java/org/jrd/frontend/frame/plugins/MessagePanel.java index 7c5148f3..e52b6399 100644 --- a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/plugins/MessagePanel.java +++ b/runtime-decompiler/src/main/java/org/jrd/frontend/frame/plugins/MessagePanel.java @@ -6,6 +6,9 @@ import java.awt.Color; import java.awt.Dimension; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + +@SuppressFBWarnings(value = "CT_CONSTRUCTOR_THROW", justification = "be aware, this constrctor throws") public class MessagePanel extends JPanel { private final JLabel jLabel; diff --git a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/remote/NewConnectionView.java b/runtime-decompiler/src/main/java/org/jrd/frontend/frame/remote/NewConnectionView.java index 3ecf5e50..e48b43d5 100644 --- a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/remote/NewConnectionView.java +++ b/runtime-decompiler/src/main/java/org/jrd/frontend/frame/remote/NewConnectionView.java @@ -1,6 +1,5 @@ package org.jrd.frontend.frame.remote; -import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.jrd.backend.communication.CallDecompilerAgent; import org.jrd.frontend.frame.main.MainFrameView; @@ -31,8 +30,8 @@ public class NewConnectionView extends JDialog { public static class HostnamePortInputPanel extends JPanel { - private static String lastHost = CallDecompilerAgent.DEFAULT_ADDRESS; - private static String lastPort = "10900"; + private static volatile String lastHost = CallDecompilerAgent.DEFAULT_ADDRESS; + private static volatile String lastPort = "10900"; JTextField hostnameTextField; JTextField portTextField; @@ -144,7 +143,6 @@ String getHostname() { return hostnamePortInputPanel.hostnameTextField.getText(); } - @SuppressFBWarnings(value = "ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD", justification = "Storing for future global usage") void reSetLastHostname() { HostnamePortInputPanel.lastHost = hostnamePortInputPanel.hostnameTextField.getText(); } @@ -153,7 +151,6 @@ String getPortString() throws NumberFormatException { return hostnamePortInputPanel.portTextField.getText(); } - @SuppressFBWarnings(value = "ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD", justification = "Storing for future global usage") void reSetLastPort() { HostnamePortInputPanel.lastPort = hostnamePortInputPanel.portTextField.getText(); } diff --git a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/settings/MiscellaneousSettingsPanel.java b/runtime-decompiler/src/main/java/org/jrd/frontend/frame/settings/MiscellaneousSettingsPanel.java index 5e375eb4..81ad1856 100644 --- a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/settings/MiscellaneousSettingsPanel.java +++ b/runtime-decompiler/src/main/java/org/jrd/frontend/frame/settings/MiscellaneousSettingsPanel.java @@ -30,6 +30,8 @@ import java.util.Arrays; import java.util.Enumeration; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + public class MiscellaneousSettingsPanel extends JPanel implements ChangeReporter { private final JLabel miscSettingsLabel; @@ -47,6 +49,7 @@ public class MiscellaneousSettingsPanel extends JPanel implements ChangeReporter JRadioButton ask = new JRadioButton("ask"); JRadioButton addAndSave = new JRadioButton("add them to remote vms and save"); + @SuppressFBWarnings(value = "CT_CONSTRUCTOR_THROW", justification = "be aware, this constrctor throws") public MiscellaneousSettingsPanel( boolean initialUseJavapSignatures, Config.DepndenceNumbers initialConfigNumbers, String cp, String sp, boolean detectAutocompletion, Config.AdditionalAgentAction additionalAgentAction, int fontSizeOverride, final JFrame parent diff --git a/runtime-decompiler/src/main/java/org/kcc/wordsets/JrdApiKeywords.java b/runtime-decompiler/src/main/java/org/kcc/wordsets/JrdApiKeywords.java index 3b18d871..cd690229 100644 --- a/runtime-decompiler/src/main/java/org/kcc/wordsets/JrdApiKeywords.java +++ b/runtime-decompiler/src/main/java/org/kcc/wordsets/JrdApiKeywords.java @@ -7,6 +7,8 @@ import java.util.List; import java.util.regex.Pattern; +//Warning. Whne working on this file, keep backup. It is often wrongly reformated during mvn build +//ig it is not worked on and formatted, you can git checkout runtime-decompiler/src/main/java/org/kcc/wordsets/JrdApiKeywords.java public class JrdApiKeywords implements CompletionItem.CompletionItemSet { private static final String INTRO = "Unless you are running DCEVM jdk, most JVMs will not allow you to add field or methods.\n" + "To help with this issue, JRD have appi where you can store instances of objects (eg runnable:) or boxed primitive). " + @@ -35,147 +37,222 @@ public class JrdApiKeywords implements CompletionItem.CompletionItemSet { "They represents C/Pascal const wittou namesapce so you can access them globally.\n" + "It is simple pair name/value.\n\n"; - private static final CompletionItem[] BASE_JRDAPI_KEYWORDS = new CompletionItem[]{new CompletionItem( - "org.jrd.agent.api.Variables.NoSuchFakeVariableException", - "exception cast from " + "eg methods which are getting/setting/removing new field/method but are not allowed to create.\n" + - "Extends FakeVariableException"), new CompletionItem( - "(Object)(org.jrd.agent.api.Variables.Local.create(Object, String, Object));", - INTRO + LOCAL + SAFE + "Allows you to create local field/method in object(1st param) of String name of " + - "Object(third param)" + "initial value. Will throw FakeVariableAlreadyDeclaredException if that variable " + - "already exists.\n" + "it returns freshly created field (the 3rd argument)"), new CompletionItem( - "(Object)(org.jrd.agent.api.Variables.Local.get(Object, String));", - INTRO + LOCAL + SAFE + "get the value of stored local field/method in object(1st param) of String name of " + - "Object(second param). Will throw NoSuchFakeVariableException if that variable " + "do not already exists."), - new CompletionItem("(Object)(org.jrd.agent.api.Variables.Local.getOrCreate(Object, String, Object));", + private static final CompletionItem[] BASE_JRDAPI_KEYWORDS = new CompletionItem[] { + new CompletionItem( + "org.jrd.agent.api.Variables.NoSuchFakeVariableException", + "exception cast from " + "eg methods which are getting/setting/removing new field/method but are not allowed to create.\n" + + "Extends FakeVariableException"), + new CompletionItem( + "(Object)(org.jrd.agent.api.Variables.Local.create(Object, String, Object));", + INTRO + LOCAL + SAFE + "Allows you to create local field/method in object(1st param) of String name of " + + "Object(third param)" + "initial value. Will throw FakeVariableAlreadyDeclaredException if that variable " + + "already exists.\n" + "it returns freshly created field (the 3rd argument)"), + new CompletionItem( + "(Object)(org.jrd.agent.api.Variables.Local.get(Object, String));", + INTRO + LOCAL + SAFE + "get the value of stored local field/method in object(1st param) of String name of " + + "Object(second param). Will throw NoSuchFakeVariableException if that variable " + "do not already exists."), + new CompletionItem( + "(Object)(org.jrd.agent.api.Variables.Local.getOrCreate(Object, String, Object));", INTRO + LOCAL + SAFE + "Allows you to adjust/create local field/method in object(1st param) of String name of " + "Object(third param)" + "initial value. If that variable already exists, will be rewritten.\n" + - "it returns freshly created field (the 3rd argument)"), new CompletionItem( - "(Object)(org.jrd.agent.api.Variables.Local.remove(Object, String));", - INTRO + LOCAL + SAFE + "Will remove the declared fake method/variable " + "of name String from instance of Object"), - new CompletionItem("(Object)(org.jrd.agent.api.Variables.Local.set(Object, String, Object));", INTRO + LOCAL + SAFE + + "it returns freshly created field (the 3rd argument)"), + new CompletionItem( + "(Object)(org.jrd.agent.api.Variables.Local.remove(Object, String));", + INTRO + LOCAL + SAFE + "Will remove the declared fake method/variable " + "of name String from instance of Object"), + new CompletionItem( + "(Object)(org.jrd.agent.api.Variables.Local.set(Object, String, Object));", INTRO + LOCAL + SAFE + "Will set the variable/method of String name to instance of Object (first param) to value of " + "Object (3rd param). Unlike create, it do not throw exception if the field is already created. " + - "If field is not created, it will be. Returns freshly inserted value."), new CompletionItem( - "(Object)(org.jrd.agent.api.Variables.Local.setNoReplace(Object, String, Object));", - INTRO + LOCAL + SAFE + "Will set the variable/method of String name to instance of Object (first param) to value of " + - "Object (3rd param). Unlike create, it do not throw exception if the field is already created. " + - "But unlike set, if it already exists, it throws FakeVariableAlreadyDeclaredException if the " + - "variable/method is already set. Returns freshly inserted value."), new CompletionItem( - "(String)(org.jrd.agent.api.Variables.Local.dump());", - "Will dump to String all safe, local variables/methods currently declared"), new CompletionItem( - "(String)(org.jrd.agent.api.Variables.Local.dump(Object...));", - "Will dump to String all safe, local variables/methods currently " + "declared in selected Object...s"), + "If field is not created, it will be. Returns freshly inserted value."), + new CompletionItem( + "(Object)(org.jrd.agent.api.Variables.Local.setNoReplace(Object, String, Object));", + INTRO + LOCAL + SAFE + "Will set the variable/method of String name to instance of Object (first param) to value of " + + "Object (3rd param). Unlike create, it do not throw exception if the field is already created. " + + "But unlike set, if it already exists, it throws FakeVariableAlreadyDeclaredException if the " + + "variable/method is already set. Returns freshly inserted value."), + new CompletionItem( + "(String)(org.jrd.agent.api.Variables.Local.dump());", + "Will dump to String all safe, local variables/methods currently declared"), + new CompletionItem( + "(String)(org.jrd.agent.api.Variables.Local.dump(Object...));", + "Will dump to String all safe, local variables/methods currently " + "declared in selected Object...s"), new CompletionItem("org.jrd.agent.api.Variables.Local.destroy();", - "Will remove all safe, local variables/methods currently declared"), new CompletionItem( - "org.jrd.agent.api.Variables.Local.removeAll(Object);", - "Will remove all safe, local variables/methods bound to given Object"), new CompletionItem( - "(Object)(org.jrd.agent.api.Variables.Global.create(String, Object));", - INTRO + GLOBAL + SAFE + "Allows you to create global field/method of String name of Object(second param)" + - "initial value. Will throw FakeVariableAlreadyDeclaredException if that variable " + "already exists.\n" + - "it returns freshly created field (the 2nf argument)"), new CompletionItem( - "(Object)(org.jrd.agent.api.Variables.Global.get(String));", - INTRO + GLOBAL + SAFE + "get the value of stored global field/method of String name" + - "). Will throw NoSuchFakeVariableException if that variable " + "do not already exists."), new CompletionItem( - "(Object)(org.jrd.agent.api.Variables.Global.getOrCreate(String, Object));", - INTRO + GLOBAL + SAFE + "Allows you to adjust/create global field/method of String name of Object(seconf param)" + - "initial value. If that variable already exists, will be rewritten.\n" + - "it returns freshly created field (the 2nd argument)"), new CompletionItem( - "(Object)(org.jrd.agent.api.Variables.Global.remove(String));", - INTRO + GLOBAL + SAFE + "Will remove the declared fake method/variable " + "of name String from global scope"), + "Will remove all safe, local variables/methods currently declared"), + new CompletionItem( + "org.jrd.agent.api.Variables.Local.removeAll(Object);", + "Will remove all safe, local variables/methods bound to given Object"), + new CompletionItem( + "(Object)(org.jrd.agent.api.Variables.Global.create(String, Object));", + INTRO + GLOBAL + SAFE + "Allows you to create global field/method of String name of Object(second param)" + + "initial value. Will throw FakeVariableAlreadyDeclaredException if that variable " + "already exists.\n" + + "it returns freshly created field (the 2nf argument)"), + new CompletionItem( + "(Object)(org.jrd.agent.api.Variables.Global.get(String));", + INTRO + GLOBAL + SAFE + "get the value of stored global field/method of String name" + + "). Will throw NoSuchFakeVariableException if that variable " + "do not already exists."), + new CompletionItem( + "(Object)(org.jrd.agent.api.Variables.Global.getOrCreate(String, Object));", + INTRO + GLOBAL + SAFE + "Allows you to adjust/create global field/method of String name of Object(seconf param)" + + "initial value. If that variable already exists, will be rewritten.\n" + + "it returns freshly created field (the 2nd argument)"), + new CompletionItem( + "(Object)(org.jrd.agent.api.Variables.Global.remove(String));", + INTRO + GLOBAL + SAFE + "Will remove the declared fake method/variable " + "of name String from global scope"), new CompletionItem("(Object)(org.jrd.agent.api.Variables.Global.set(String, Object));", INTRO + GLOBAL + SAFE + "Will set the global variable/method of String name to value of " + "Object (2nd param). Unlike create, it do not throw exception if the field is already created. " + - "If field is not created, it will be. Returns freshly inserted value."), new CompletionItem( - "(Object)(org.jrd.agent.api.Variables.Global.setNoReplace(String, Object));", - INTRO + GLOBAL + SAFE + "Will set the global variable/method of String name to value of " + - "Object (2nd param). Unlike create, it do not throw exception if the field is already created. " + - "But unlike set, if it already exists, it throws FakeVariableAlreadyDeclaredException if the " + - "variable/method is already set. Returns freshly inserted value."), new CompletionItem( - "(String)(org.jrd.agent.api.Variables.Global.dump());", - INTRO + GLOBAL + SAFE + "Will dump to String all safe, global variables/methods currently declared"), new CompletionItem( - "org.jrd.agent.api.Variables.Global.removeAll();", - INTRO + GLOBAL + SAFE + "Will remove all safe, global variables/methods." + - "It is moreover equal to destroy method of Clazzs anf Locals."), new CompletionItem( - "org.jrd.agent.api.Variables.FakeVariableException", "Generic forefather for all fake values exceptions"), - new CompletionItem("org.jrd.agent.api.Variables.FakeVariableAlreadyDeclaredException", + "If field is not created, it will be. Returns freshly inserted value."), + new CompletionItem( + "(Object)(org.jrd.agent.api.Variables.Global.setNoReplace(String, Object));", + INTRO + GLOBAL + SAFE + "Will set the global variable/method of String name to value of " + + "Object (2nd param). Unlike create, it do not throw exception if the field is already created. " + + "But unlike set, if it already exists, it throws FakeVariableAlreadyDeclaredException if the " + + "variable/method is already set. Returns freshly inserted value."), + new CompletionItem( + "(String)(org.jrd.agent.api.Variables.Global.dump());", + INTRO + GLOBAL + SAFE + "Will dump to String all safe, global variables/methods currently declared"), + new CompletionItem( + "org.jrd.agent.api.Variables.Global.removeAll();", + INTRO + GLOBAL + SAFE + "Will remove all safe, global variables/methods." + + "It is moreover equal to destroy method of Clazzs anf Locals."), + new CompletionItem( + "org.jrd.agent.api.Variables.FakeVariableException", "Generic forefather for all fake values exceptions"), + new CompletionItem( + "org.jrd.agent.api.Variables.FakeVariableAlreadyDeclaredException", "exception cast from " + "eg methods which are creating/setting new field/method but are not allowed to replace.\n" + - "Extends FakeVariableException"), new CompletionItem( - "(Object)(org.jrd.agent.api.Variables.Clazzs.create(Class, String, Object));", INTRO + CLAZZS + SAFE + CLAZZS_FINAL), + "Extends FakeVariableException"), + new CompletionItem( + "(Object)(org.jrd.agent.api.Variables.Clazzs.create(Class, String, Object));", INTRO + CLAZZS + SAFE + CLAZZS_FINAL), new CompletionItem("(Object)(org.jrd.agent.api.Variables.Clazzs.create(String, Object));", - INTRO + CLAZZS + SAFE + CLAZZS_FINAL + CLAZZS_UNBOUND), new CompletionItem( - "(Object)(org.jrd.agent.api.Variables.Clazzs.create(String, String, Object));", INTRO + CLAZZS + SAFE + CLAZZS_FINAL), + INTRO + CLAZZS + SAFE + CLAZZS_FINAL + CLAZZS_UNBOUND), + new CompletionItem( + "(Object)(org.jrd.agent.api.Variables.Clazzs.create(String, String, Object));", INTRO + CLAZZS + SAFE + CLAZZS_FINAL), new CompletionItem("(Object)(org.jrd.agent.api.Variables.Clazzs.get(Class, String));", - INTRO + CLAZZS + SAFE + CLAZZS_FINAL), new CompletionItem( - "(Object)(org.jrd.agent.api.Variables.Clazzs.get(String));", INTRO + CLAZZS + SAFE + CLAZZS_FINAL + CLAZZS_UNBOUND), + INTRO + CLAZZS + SAFE + CLAZZS_FINAL), + new CompletionItem( + "(Object)(org.jrd.agent.api.Variables.Clazzs.get(String));", INTRO + CLAZZS + SAFE + CLAZZS_FINAL + CLAZZS_UNBOUND), new CompletionItem("(Object)(org.jrd.agent.api.Variables.Clazzs.get(String, String));", - INTRO + CLAZZS + SAFE + CLAZZS_FINAL), new CompletionItem( - "(Object)(org.jrd.agent.api.Variables.Clazzs.getOrCreate(Class, String, Object));", INTRO + CLAZZS + SAFE + CLAZZS_FINAL), + INTRO + CLAZZS + SAFE + CLAZZS_FINAL), + new CompletionItem( + "(Object)(org.jrd.agent.api.Variables.Clazzs.getOrCreate(Class, String, Object));", INTRO + CLAZZS + SAFE + CLAZZS_FINAL), new CompletionItem("(Object)(org.jrd.agent.api.Variables.Clazzs.getOrCreate(String, Object));", - INTRO + CLAZZS + SAFE + CLAZZS_FINAL + CLAZZS_UNBOUND), new CompletionItem( - "(Object)(org.jrd.agent.api.Variables.Clazzs.getOrCreate(String, String, Object));", INTRO + CLAZZS + SAFE + CLAZZS_FINAL), + INTRO + CLAZZS + SAFE + CLAZZS_FINAL + CLAZZS_UNBOUND), + new CompletionItem( + "(Object)(org.jrd.agent.api.Variables.Clazzs.getOrCreate(String, String, Object));", INTRO + CLAZZS + SAFE + CLAZZS_FINAL), new CompletionItem("(Object)(org.jrd.agent.api.Variables.Clazzs.remove(Class, String));", - INTRO + CLAZZS + SAFE + CLAZZS_FINAL), new CompletionItem( - "(Object)(org.jrd.agent.api.Variables.Clazzs.remove(String));", INTRO + CLAZZS + SAFE + CLAZZS_FINAL + CLAZZS_UNBOUND), + INTRO + CLAZZS + SAFE + CLAZZS_FINAL), + new CompletionItem( + "(Object)(org.jrd.agent.api.Variables.Clazzs.remove(String));", INTRO + CLAZZS + SAFE + CLAZZS_FINAL + CLAZZS_UNBOUND), new CompletionItem("(Object)(org.jrd.agent.api.Variables.Clazzs.remove(String, String));", - INTRO + CLAZZS + SAFE + CLAZZS_FINAL), new CompletionItem( - "(Object)(org.jrd.agent.api.Variables.Clazzs.set(Class, String, Object));", INTRO + CLAZZS + SAFE + CLAZZS_FINAL), + INTRO + CLAZZS + SAFE + CLAZZS_FINAL), + new CompletionItem( + "(Object)(org.jrd.agent.api.Variables.Clazzs.set(Class, String, Object));", INTRO + CLAZZS + SAFE + CLAZZS_FINAL), new CompletionItem("(Object)(org.jrd.agent.api.Variables.Clazzs.set(String, Object));", - INTRO + CLAZZS + SAFE + CLAZZS_FINAL + CLAZZS_UNBOUND), new CompletionItem( - "(Object)(org.jrd.agent.api.Variables.Clazzs.set(String, String, Object));", INTRO + CLAZZS + SAFE + CLAZZS_FINAL), + INTRO + CLAZZS + SAFE + CLAZZS_FINAL + CLAZZS_UNBOUND), + new CompletionItem( + "(Object)(org.jrd.agent.api.Variables.Clazzs.set(String, String, Object));", INTRO + CLAZZS + SAFE + CLAZZS_FINAL), new CompletionItem("(Object)(org.jrd.agent.api.Variables.Clazzs.setNoReplace(Class, String, Object));", - INTRO + CLAZZS + SAFE + CLAZZS_FINAL), new CompletionItem( - "(Object)(org.jrd.agent.api.Variables.Clazzs.setNoReplace(String, Object));", - INTRO + CLAZZS + SAFE + CLAZZS_FINAL + CLAZZS_UNBOUND), new CompletionItem( - "(Object)(org.jrd.agent.api.Variables.Clazzs.setNoReplace(String, String, Object));", - INTRO + CLAZZS + SAFE + CLAZZS_FINAL), new CompletionItem("(String)(org.jrd.agent.api.Variables.Clazzs.dump());", - INTRO + CLAZZS + SAFE + CLAZZS_FINAL), new CompletionItem("(String)(org.jrd.agent.api.Variables.Clazzs.dump(Class...));", - INTRO + CLAZZS + SAFE + CLAZZS_FINAL), new CompletionItem("org.jrd.agent.api.Variables.Clazzs.destroy();", - INTRO + CLAZZS + SAFE + CLAZZS_FINAL), new CompletionItem("org.jrd.agent.api.Variables.Clazzs.removeAll();", - INTRO + CLAZZS + SAFE + CLAZZS_FINAL), new CompletionItem("org.jrd.agent.api.Variables.Clazzs.removeAll(Class);", - INTRO + CLAZZS + SAFE + CLAZZS_FINAL), new CompletionItem("org.jrd.agent.api.Variables.Clazzs.removeAll(String);", - INTRO + CLAZZS + SAFE + CLAZZS_FINAL + "This calls classForName on String."), new CompletionItem( - "(String)(org.jrd.agent.api.Variables.dumpAll());", "Will dump to String all safe variables currently declared"), + INTRO + CLAZZS + SAFE + CLAZZS_FINAL), + new CompletionItem( + "(Object)(org.jrd.agent.api.Variables.Clazzs.setNoReplace(String, Object));", + INTRO + CLAZZS + SAFE + CLAZZS_FINAL + CLAZZS_UNBOUND), + new CompletionItem( + "(Object)(org.jrd.agent.api.Variables.Clazzs.setNoReplace(String, String, Object));", + INTRO + CLAZZS + SAFE + CLAZZS_FINAL), + new CompletionItem("(String)(org.jrd.agent.api.Variables.Clazzs.dump());", + INTRO + CLAZZS + SAFE + CLAZZS_FINAL), + new CompletionItem("(String)(org.jrd.agent.api.Variables.Clazzs.dump(Class...));", + INTRO + CLAZZS + SAFE + CLAZZS_FINAL), + new CompletionItem("org.jrd.agent.api.Variables.Clazzs.destroy();", + INTRO + CLAZZS + SAFE + CLAZZS_FINAL), + new CompletionItem("org.jrd.agent.api.Variables.Clazzs.removeAll();", + INTRO + CLAZZS + SAFE + CLAZZS_FINAL), + new CompletionItem("org.jrd.agent.api.Variables.Clazzs.removeAll(Class);", + INTRO + CLAZZS + SAFE + CLAZZS_FINAL), + new CompletionItem("org.jrd.agent.api.Variables.Clazzs.removeAll(String);", + INTRO + CLAZZS + SAFE + CLAZZS_FINAL + "This calls classForName on String."), + new CompletionItem( + "(String)(org.jrd.agent.api.Variables.dumpAll());", "Will dump to String all safe variables currently declared"), new CompletionItem("(Object)(org.jrd.agent.api.UnsafeVariables.Local.create(Object, String, Object));", UNSAFE), - new CompletionItem("(Object)(org.jrd.agent.api.UnsafeVariables.Local.get(Object, String));", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Local.getOrCreate(Object, String, Object));", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Local.remove(Object, String));", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Local.set(Object, String, Object));", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Local.setNoReplace(Object, String, Object));", UNSAFE), new CompletionItem( - "(String)(org.jrd.agent.api.UnsafeVariables.Local.dump());", UNSAFE), new CompletionItem( - "org.jrd.agent.api.UnsafeVariables.Local.destroy();", UNSAFE), new CompletionItem( - "org.jrd.agent.api.UnsafeVariables.Local.removeAll(Object);", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Global.create(String, Object));", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Global.get(String));", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Global.getOrCreate(String, Object));", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Global.remove(String));", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Global.set(String, Object));", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Global.setNoReplace(String, Object));", UNSAFE), new CompletionItem( - "(String)(org.jrd.agent.api.UnsafeVariables.Global.dump());", UNSAFE), new CompletionItem( - "org.jrd.agent.api.UnsafeVariables.Global.removeAll();", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.create(Class, String, Object));", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.create(String, Object));", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.create(String, String, Object));", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.get(Class, String));", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.get(String));", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.get(String, String));", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.getOrCreate(Class, String, Object));", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.getOrCreate(String, Object));", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.getOrCreate(String, String, Object));", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.remove(Class, String));", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.remove(String));", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.remove(String, String));", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.set(Class, String, Object));", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.set(String, Object));", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.set(String, String, Object));", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.setNoReplace(Class, String, Object));", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.setNoReplace(String, Object));", UNSAFE), new CompletionItem( - "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.setNoReplace(String, String, Object));", UNSAFE), new CompletionItem( - "(String)(org.jrd.agent.api.UnsafeVariables.Clazzs.dump());", UNSAFE), new CompletionItem( - "org.jrd.agent.api.UnsafeVariables.Clazzs.destroy();", UNSAFE), new CompletionItem( - "org.jrd.agent.api.UnsafeVariables.Clazzs.removeAll();", UNSAFE), new CompletionItem( - "org.jrd.agent.api.UnsafeVariables.Clazzs.removeAll(Class);", UNSAFE), new CompletionItem( - "org.jrd.agent.api.UnsafeVariables.Clazzs.removeAll(String);", UNSAFE), new CompletionItem( - "(String)(org.jrd.agent.api.UnsafeVariables.dumpAll());", "Will dump to String all unsafe variables currently declared")}; + new CompletionItem("(Object)(org.jrd.agent.api.UnsafeVariables.Local.get(Object, String));", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Local.getOrCreate(Object, String, Object));", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Local.remove(Object, String));", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Local.set(Object, String, Object));", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Local.setNoReplace(Object, String, Object));", UNSAFE), + new CompletionItem( + "(String)(org.jrd.agent.api.UnsafeVariables.Local.dump());", UNSAFE), + new CompletionItem( + "org.jrd.agent.api.UnsafeVariables.Local.destroy();", UNSAFE), + new CompletionItem( + "org.jrd.agent.api.UnsafeVariables.Local.removeAll(Object);", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Global.create(String, Object));", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Global.get(String));", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Global.getOrCreate(String, Object));", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Global.remove(String));", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Global.set(String, Object));", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Global.setNoReplace(String, Object));", UNSAFE), + new CompletionItem( + "(String)(org.jrd.agent.api.UnsafeVariables.Global.dump());", UNSAFE), + new CompletionItem( + "org.jrd.agent.api.UnsafeVariables.Global.removeAll();", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.create(Class, String, Object));", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.create(String, Object));", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.create(String, String, Object));", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.get(Class, String));", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.get(String));", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.get(String, String));", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.getOrCreate(Class, String, Object));", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.getOrCreate(String, Object));", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.getOrCreate(String, String, Object));", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.remove(Class, String));", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.remove(String));", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.remove(String, String));", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.set(Class, String, Object));", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.set(String, Object));", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.set(String, String, Object));", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.setNoReplace(Class, String, Object));", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.setNoReplace(String, Object));", UNSAFE), + new CompletionItem( + "(Object)(org.jrd.agent.api.UnsafeVariables.Clazzs.setNoReplace(String, String, Object));", UNSAFE), + new CompletionItem( + "(String)(org.jrd.agent.api.UnsafeVariables.Clazzs.dump());", UNSAFE), + new CompletionItem( + "org.jrd.agent.api.UnsafeVariables.Clazzs.destroy();", UNSAFE), + new CompletionItem( + "org.jrd.agent.api.UnsafeVariables.Clazzs.removeAll();", UNSAFE), + new CompletionItem( + "org.jrd.agent.api.UnsafeVariables.Clazzs.removeAll(Class);", UNSAFE), + new CompletionItem( + "org.jrd.agent.api.UnsafeVariables.Clazzs.removeAll(String);", UNSAFE), + new CompletionItem( + "(String)(org.jrd.agent.api.UnsafeVariables.dumpAll());", "Will dump to String all unsafe variables currently declared")}; private static final CompletionItem[] JRDAPI_KEYWORDS = JavaKeywordsWithHelp.concatWithArrayCopy(JavaKeywordsWithHelp.EXT_JAVA_KEYWORDS, BASE_JRDAPI_KEYWORDS); diff --git a/runtime-decompiler/src/plugins/CfrDecompilerWrapper.json b/runtime-decompiler/src/plugins/CfrDecompilerWrapper.json index cbf6c2c7..6d068626 100644 --- a/runtime-decompiler/src/plugins/CfrDecompilerWrapper.json +++ b/runtime-decompiler/src/plugins/CfrDecompilerWrapper.json @@ -2,7 +2,7 @@ "Name": "Cfr", "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/CfrDecompilerWrapper.java", "DependencyURL": [ - "file://${HOME}/.m2/repository/org/benf/cfr/0.151/cfr-0.151.jar" + "file://${HOME}/.m2/repository/org/benf/cfr/0.152/cfr-0.152.jar" ], "DecompilerDownloadURL": "https://www.benf.org/other/cfr/faq.html" } diff --git a/runtime-decompiler/src/plugins/FernflowerDecompilerWrapper.json b/runtime-decompiler/src/plugins/FernflowerDecompilerWrapper.json index e8ede694..b85c5162 100644 --- a/runtime-decompiler/src/plugins/FernflowerDecompilerWrapper.json +++ b/runtime-decompiler/src/plugins/FernflowerDecompilerWrapper.json @@ -2,7 +2,7 @@ "Name": "Fernflower", "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/FernflowerDecompilerWrapper.java", "DependencyURL": [ - "file://${HOME}/.m2/repository/org/jboss/windup/decompiler/decompiler-fernflower/5.1.4.Final/decompiler-fernflower-5.1.4.Final.jar", + "file://${HOME}/.m2/repository/org/jboss/windup/decompiler/decompiler-fernflower/6.3.9.Final/decompiler-fernflower-6.3.9.Final.jar", "file://${HOME}/.m2/repository/org/jboss/windup/decompiler/fernflower/windup-fernflower/1.0.0.20171018/windup-fernflower-1.0.0.20171018.jar" ], "DecompilerDownloadURL": "https://github.com/JetBrains/intellij-community/tree/master/plugins/java-decompiler/engine" diff --git a/runtime-decompiler/src/plugins/JasmDecompilerWrapper.json b/runtime-decompiler/src/plugins/JasmDecompilerWrapper.json index 43d0a1ff..2c29e45e 100644 --- a/runtime-decompiler/src/plugins/JasmDecompilerWrapper.json +++ b/runtime-decompiler/src/plugins/JasmDecompilerWrapper.json @@ -2,7 +2,7 @@ "Name": "jasm", "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/JasmDecompilerWrapper.java", "DependencyURL": [ - "file://${HOME}/.m2/repository/org/openjdk/asmtools/8.0.b09-ea/asmtools-8.0.b09-ea.jar" + "file://${HOME}/.m2/repository/org/openjdk/asmtools/9.0.b12-ea/asmtools-9.0.b12-ea.jar" ], "DecompilerDownloadURL": "https://github.com/openjdk/asmtools" } diff --git a/runtime-decompiler/src/plugins/JasmGDecompilerWrapper.json b/runtime-decompiler/src/plugins/JasmGDecompilerWrapper.json index 5cfe8953..fd57f2fd 100644 --- a/runtime-decompiler/src/plugins/JasmGDecompilerWrapper.json +++ b/runtime-decompiler/src/plugins/JasmGDecompilerWrapper.json @@ -2,7 +2,7 @@ "Name": "jasmG", "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/JasmGDecompilerWrapper.java", "DependencyURL": [ - "file://${HOME}/.m2/repository/org/openjdk/asmtools/8.0.b09-ea/asmtools-8.0.b09-ea.jar" + "file://${HOME}/.m2/repository/org/openjdk/asmtools/9.0.b12-ea/asmtools-9.0.b12-ea.jar" ], "DecompilerDownloadURL": "https://github.com/openjdk/asmtools" } diff --git a/runtime-decompiler/src/plugins/JcoderDecompilerWrapper.json b/runtime-decompiler/src/plugins/JcoderDecompilerWrapper.json index d00353e4..d1606648 100644 --- a/runtime-decompiler/src/plugins/JcoderDecompilerWrapper.json +++ b/runtime-decompiler/src/plugins/JcoderDecompilerWrapper.json @@ -2,7 +2,7 @@ "Name": "jcoder", "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/JcoderDecompilerWrapper.java", "DependencyURL": [ - "file://${HOME}/.m2/repository/org/openjdk/asmtools/8.0.b09-ea/asmtools-8.0.b09-ea.jar" + "file://${HOME}/.m2/repository/org/openjdk/asmtools/9.0.b12-ea/asmtools-9.0.b12-ea.jar" ], "DecompilerDownloadURL": "https://github.com/openjdk/asmtools" } diff --git a/runtime-decompiler/src/plugins/JcoderGDecompilerWrapper.java b/runtime-decompiler/src/plugins/JcoderGDecompilerWrapper.java index 80df8f00..4720a1cc 100644 --- a/runtime-decompiler/src/plugins/JcoderGDecompilerWrapper.java +++ b/runtime-decompiler/src/plugins/JcoderGDecompilerWrapper.java @@ -25,7 +25,7 @@ public String decompile(byte[] bytecode, String[] options) { SingleDualOutputStreamOutput decodeLog = new StderrLog(); org.openjdk.asmtools.jdec.Main jdec = new org.openjdk.asmtools.jdec.Main(decodedFiles, decodeLog, originalFiles); jdec.setVerboseFlag(true); - jdec.setPrintDetails(); + jdec.setPrintDetails(true); int r = jdec.decode(); return decodedFiles.getOutputs().get(0).getBody(); } catch (Exception e) { diff --git a/runtime-decompiler/src/plugins/JcoderGDecompilerWrapper.json b/runtime-decompiler/src/plugins/JcoderGDecompilerWrapper.json index 2394bb9d..cb66d9fe 100644 --- a/runtime-decompiler/src/plugins/JcoderGDecompilerWrapper.json +++ b/runtime-decompiler/src/plugins/JcoderGDecompilerWrapper.json @@ -2,7 +2,7 @@ "Name": "jcoderG", "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/JcoderGDecompilerWrapper.java", "DependencyURL": [ - "file://${HOME}/.m2/repository/org/openjdk/asmtools/8.0.b09-ea/asmtools-8.0.b09-ea.jar" + "file://${HOME}/.m2/repository/org/openjdk/asmtools/9.0.b12-ea/asmtools-9.0.b12-ea.jar" ], "DecompilerDownloadURL": "https://github.com/openjdk/asmtools" } diff --git a/runtime-decompiler/src/plugins/ProcyonAssemblerDecompilerWrapper.json b/runtime-decompiler/src/plugins/ProcyonAssemblerDecompilerWrapper.json index b312495a..cfef2f23 100644 --- a/runtime-decompiler/src/plugins/ProcyonAssemblerDecompilerWrapper.json +++ b/runtime-decompiler/src/plugins/ProcyonAssemblerDecompilerWrapper.json @@ -5,7 +5,7 @@ "file://${HOME}/.m2/repository/com/github/mstrobel/procyon-core/1.0-SNAPSHOT/procyon-core-1.0-SNAPSHOT.jar", "file://${HOME}/.m2/repository/com/github/mstrobel/procyon-compilertools/1.0-SNAPSHOT/procyon-compilertools-1.0-SNAPSHOT.jar", "file://${HOME}/.m2/repository/com/github/mstrobel/procyon-decompiler/1.0-SNAPSHOT/procyon-decompiler-1.0-SNAPSHOT.jar", - "file://${HOME}/.m2/repository/com/beust/jcommander/1.78/jcommander-1.78.jar" + "file://${HOME}/.m2/repository/com/beust/jcommander/1.82/jcommander-1.82.jar" ], - "DecompilerDownloadURL": "https://github.com/mstrobel/procyon/git " + "DecompilerDownloadURL": "https://github.com/mstrobel/procyon/" } diff --git a/runtime-decompiler/src/plugins/ProcyonDecompilerWrapper.json b/runtime-decompiler/src/plugins/ProcyonDecompilerWrapper.json index d0711a12..b16dc54d 100644 --- a/runtime-decompiler/src/plugins/ProcyonDecompilerWrapper.json +++ b/runtime-decompiler/src/plugins/ProcyonDecompilerWrapper.json @@ -5,7 +5,7 @@ "file://${HOME}/.m2/repository/com/github/mstrobel/procyon-core/1.0-SNAPSHOT/procyon-core-1.0-SNAPSHOT.jar", "file://${HOME}/.m2/repository/com/github/mstrobel/procyon-compilertools/1.0-SNAPSHOT/procyon-compilertools-1.0-SNAPSHOT.jar", "file://${HOME}/.m2/repository/com/github/mstrobel/procyon-decompiler/1.0-SNAPSHOT/procyon-decompiler-1.0-SNAPSHOT.jar", - "file://${HOME}/.m2/repository/com/beust/jcommander/1.78/jcommander-1.78.jar" + "file://${HOME}/.m2/repository/com/beust/jcommander/1.82/jcommander-1.82.jar" ], - "DecompilerDownloadURL": "https://github.com/mstrobel/procyon/git " + "DecompilerDownloadURL": "https://github.com/mstrobel/procyon/" }