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
ab924faa
Commit
ab924faa
authored
Sep 22, 2014
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: don't remove empty catch blocks
parent
b12b129a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
ModVisitor.java
...core/src/main/java/jadx/core/dex/visitors/ModVisitor.java
+3
-2
No files found.
jadx-core/src/main/java/jadx/core/dex/visitors/ModVisitor.java
View file @
ab924faa
...
...
@@ -229,6 +229,7 @@ public class ModVisitor extends AbstractVisitor {
}
ExceptionHandler
excHandler
=
handlerAttr
.
getHandler
();
boolean
noExitNode
=
true
;
// check if handler has exit edge to block not from this handler
boolean
reThrow
=
false
;
for
(
BlockNode
excBlock
:
excHandler
.
getBlocks
())
{
if
(
noExitNode
)
{
noExitNode
=
excHandler
.
getBlocks
().
containsAll
(
excBlock
.
getCleanSuccessors
());
...
...
@@ -239,7 +240,7 @@ public class ModVisitor extends AbstractVisitor {
if
(
excHandler
.
isCatchAll
()
&&
size
>
0
&&
insns
.
get
(
size
-
1
).
getType
()
==
InsnType
.
THROW
)
{
reThrow
=
true
;
InstructionRemover
.
remove
(
mth
,
excBlock
,
size
-
1
);
// move not removed instructions to 'finally' block
...
...
@@ -266,7 +267,7 @@ public class ModVisitor extends AbstractVisitor {
for
(
BlockNode
excBlock
:
excHandler
.
getBlocks
())
{
totalSize
+=
excBlock
.
getInstructions
().
size
();
}
if
(
totalSize
==
0
&&
noExitNode
)
{
if
(
totalSize
==
0
&&
noExitNode
&&
reThrow
)
{
handlerAttr
.
getTryBlock
().
removeHandler
(
mth
,
excHandler
);
}
}
...
...
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