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
395cae43
Commit
395cae43
authored
Apr 12, 2019
by
Ahmed Ashour
Committed by
skylot
Apr 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: handle NPE for methods with removed instructions (#342) (PR #583)
parent
eb77aa51
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
ExtractFieldInit.java
...rc/main/java/jadx/core/dex/visitors/ExtractFieldInit.java
+3
-2
ReSugarCode.java
...ore/src/main/java/jadx/core/dex/visitors/ReSugarCode.java
+1
-1
No files found.
jadx-core/src/main/java/jadx/core/dex/visitors/ExtractFieldInit.java
View file @
395cae43
...
@@ -51,7 +51,8 @@ public class ExtractFieldInit extends AbstractVisitor {
...
@@ -51,7 +51,8 @@ public class ExtractFieldInit extends AbstractVisitor {
MethodNode
clinit
=
cls
.
getClassInitMth
();
MethodNode
clinit
=
cls
.
getClassInitMth
();
if
(
clinit
==
null
if
(
clinit
==
null
||
!
clinit
.
getAccessFlags
().
isStatic
()
||
!
clinit
.
getAccessFlags
().
isStatic
()
||
clinit
.
isNoCode
())
{
||
clinit
.
isNoCode
()
||
clinit
.
getBasicBlocks
()
==
null
)
{
return
;
return
;
}
}
...
@@ -235,7 +236,7 @@ public class ExtractFieldInit extends AbstractVisitor {
...
@@ -235,7 +236,7 @@ public class ExtractFieldInit extends AbstractVisitor {
}
}
private
static
List
<
InsnNode
>
getFieldAssigns
(
MethodNode
mth
,
FieldNode
field
,
InsnType
putInsn
)
{
private
static
List
<
InsnNode
>
getFieldAssigns
(
MethodNode
mth
,
FieldNode
field
,
InsnType
putInsn
)
{
if
(
mth
.
isNoCode
())
{
if
(
mth
.
isNoCode
()
||
mth
.
getBasicBlocks
()
==
null
)
{
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
}
}
List
<
InsnNode
>
assignInsns
=
new
ArrayList
<>();
List
<
InsnNode
>
assignInsns
=
new
ArrayList
<>();
...
...
jadx-core/src/main/java/jadx/core/dex/visitors/ReSugarCode.java
View file @
395cae43
...
@@ -218,7 +218,7 @@ public class ReSugarCode extends AbstractVisitor {
...
@@ -218,7 +218,7 @@ public class ReSugarCode extends AbstractVisitor {
private
static
void
initClsEnumMap
(
ClassNode
enumCls
)
{
private
static
void
initClsEnumMap
(
ClassNode
enumCls
)
{
MethodNode
clsInitMth
=
enumCls
.
getClassInitMth
();
MethodNode
clsInitMth
=
enumCls
.
getClassInitMth
();
if
(
clsInitMth
==
null
||
clsInitMth
.
isNoCode
())
{
if
(
clsInitMth
==
null
||
clsInitMth
.
isNoCode
()
||
clsInitMth
.
getBasicBlocks
()
==
null
)
{
return
;
return
;
}
}
EnumMapAttr
mapAttr
=
new
EnumMapAttr
();
EnumMapAttr
mapAttr
=
new
EnumMapAttr
();
...
...
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