Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
J
jadx
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
jadx
Commits
7b18d3a3
Commit
7b18d3a3
authored
Apr 08, 2019
by
Ahmed Ashour
Committed by
skylot
Apr 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: ignore not generated insns in CodeShrinker visitor (PR #560)
parent
058e4c9f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
InsnNode.java
jadx-core/src/main/java/jadx/core/dex/nodes/InsnNode.java
+9
-1
TestFinally2.java
...st/java/jadx/tests/integration/trycatch/TestFinally2.java
+1
-9
No files found.
jadx-core/src/main/java/jadx/core/dex/nodes/InsnNode.java
View file @
7b18d3a3
...
...
@@ -6,10 +6,12 @@ import java.util.Collections;
import
java.util.List
;
import
java.util.Objects
;
import
org.jetbrains.annotations.Nullable
;
import
com.android.dx.io.instructions.DecodedInstruction
;
import
com.rits.cloning.Cloner
;
import
org.jetbrains.annotations.Nullable
;
import
jadx.core.dex.attributes.AFlag
;
import
jadx.core.dex.attributes.nodes.LineAttrNode
;
import
jadx.core.dex.instructions.InsnType
;
import
jadx.core.dex.instructions.args.ArgType
;
...
...
@@ -195,6 +197,12 @@ public class InsnNode extends LineAttrNode {
}
public
boolean
canReorder
()
{
if
(
contains
(
AFlag
.
DONT_GENERATE
))
{
if
(
getType
()
==
InsnType
.
MONITOR_EXIT
)
{
return
false
;
}
return
true
;
}
switch
(
getType
())
{
case
CONST:
case
CONST_STR:
...
...
jadx-core/src/test/java/jadx/tests/integration/trycatch/TestFinally2.java
View file @
7b18d3a3
...
...
@@ -6,7 +6,6 @@ import java.io.InputStream;
import
org.junit.jupiter.api.Test
;
import
jadx.NotYetImplemented
;
import
jadx.core.dex.nodes.ClassNode
;
import
jadx.tests.api.IntegrationTest
;
...
...
@@ -59,14 +58,7 @@ public class TestFinally2 extends IntegrationTest {
String
code
=
cls
.
getCode
().
toString
();
assertThat
(
code
,
containsOne
(
"decode(inputStream);"
));
}
@Test
@NotYetImplemented
public
void
test2
()
{
ClassNode
cls
=
getClassNode
(
TestCls
.
class
);
String
code
=
cls
.
getCode
().
toString
();
assertThat
(
code
,
containsOne
(
"return new Result(400);"
));
assertThat
(
code
,
not
(
containsOne
(
"result ="
)));
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment