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
4e4b4975
Commit
4e4b4975
authored
Apr 24, 2014
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: fix method redecompilation (issue #6)
parent
93fafcf8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
Decompiler.java
jadx-core/src/main/java/jadx/api/Decompiler.java
+3
-6
MethodNode.java
jadx-core/src/main/java/jadx/core/dex/nodes/MethodNode.java
+1
-1
SaveCode.java
jadx-core/src/main/java/jadx/core/dex/visitors/SaveCode.java
+5
-2
No files found.
jadx-core/src/main/java/jadx/api/Decompiler.java
View file @
4e4b4975
...
...
@@ -110,17 +110,14 @@ public final class Decompiler {
int
threadsCount
=
args
.
getThreadsCount
();
LOG
.
debug
(
"processing threads count: {}"
,
threadsCount
);
final
List
<
IDexTreeVisitor
>
passList
=
new
ArrayList
<
IDexTreeVisitor
>(
passes
);
SaveCode
savePass
=
new
SaveCode
(
outDir
,
args
);
passList
.
add
(
savePass
);
LOG
.
info
(
"processing ..."
);
ThreadPoolExecutor
executor
=
(
ThreadPoolExecutor
)
Executors
.
newFixedThreadPool
(
threadsCount
);
for
(
final
ClassNode
cls
:
root
.
getClasses
(
false
))
{
for
(
final
JavaClass
cls
:
getClasses
(
))
{
executor
.
execute
(
new
Runnable
()
{
@Override
public
void
run
()
{
ProcessClass
.
process
(
cls
,
passList
);
cls
.
decompile
();
SaveCode
.
save
(
outDir
,
args
,
cls
.
getClassNode
());
}
});
}
...
...
jadx-core/src/main/java/jadx/core/dex/nodes/MethodNode.java
View file @
4e4b4975
...
...
@@ -118,6 +118,7 @@ public class MethodNode extends LineAttrNode implements ILoadable {
noCode
=
true
;
// load without code
load
();
noCode
=
false
;
}
throw
new
DecodeException
(
this
,
"Load method exception"
,
e
);
}
...
...
@@ -141,7 +142,6 @@ public class MethodNode extends LineAttrNode implements ILoadable {
blocks
=
null
;
exitBlocks
=
null
;
exceptionHandlers
.
clear
();
noCode
=
true
;
}
private
boolean
parseSignature
()
{
...
...
jadx-core/src/main/java/jadx/core/dex/visitors/SaveCode.java
View file @
4e4b4975
...
...
@@ -18,13 +18,16 @@ public class SaveCode extends AbstractVisitor {
@Override
public
boolean
visit
(
ClassNode
cls
)
throws
CodegenException
{
CodeWriter
clsCode
=
cls
.
getCode
();
save
(
dir
,
args
,
cls
);
return
false
;
}
public
static
void
save
(
File
dir
,
IJadxArgs
args
,
ClassNode
cls
)
{
CodeWriter
clsCode
=
cls
.
getCode
();
String
fileName
=
cls
.
getClassInfo
().
getFullPath
()
+
".java"
;
if
(
args
.
isFallbackMode
())
{
fileName
+=
".jadx"
;
}
clsCode
.
save
(
dir
,
fileName
);
return
false
;
}
}
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