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
92e28326
Commit
92e28326
authored
Jul 13, 2019
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
misc: don't add same edge insn several times
parent
2dbdd1f0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
2 deletions
+27
-2
EdgeInsnAttr.java
...ain/java/jadx/core/dex/attributes/nodes/EdgeInsnAttr.java
+27
-2
No files found.
jadx-core/src/main/java/jadx/core/dex/attributes/nodes/EdgeInsnAttr.java
View file @
92e28326
package
jadx
.
core
.
dex
.
attributes
.
nodes
;
import
java.util.Objects
;
import
jadx.core.dex.attributes.AType
;
import
jadx.core.dex.attributes.AttrList
;
import
jadx.core.dex.attributes.IAttribute
;
...
...
@@ -14,9 +16,13 @@ public class EdgeInsnAttr implements IAttribute {
public
static
void
addEdgeInsn
(
BlockNode
start
,
BlockNode
end
,
InsnNode
insn
)
{
EdgeInsnAttr
edgeInsnAttr
=
new
EdgeInsnAttr
(
start
,
end
,
insn
);
if
(!
start
.
getAll
(
AType
.
EDGE_INSN
).
contains
(
edgeInsnAttr
))
{
start
.
addAttr
(
AType
.
EDGE_INSN
,
edgeInsnAttr
);
}
if
(!
end
.
getAll
(
AType
.
EDGE_INSN
).
contains
(
edgeInsnAttr
))
{
end
.
addAttr
(
AType
.
EDGE_INSN
,
edgeInsnAttr
);
}
}
public
EdgeInsnAttr
(
BlockNode
start
,
BlockNode
end
,
InsnNode
insn
)
{
this
.
start
=
start
;
...
...
@@ -42,6 +48,25 @@ public class EdgeInsnAttr implements IAttribute {
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
{
return
true
;
}
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
{
return
false
;
}
EdgeInsnAttr
that
=
(
EdgeInsnAttr
)
o
;
return
start
.
equals
(
that
.
start
)
&&
end
.
equals
(
that
.
end
)
&&
insn
.
isDeepEquals
(
that
.
insn
);
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
start
,
end
,
insn
);
}
@Override
public
String
toString
()
{
return
"EDGE_INSN: "
+
start
+
"->"
+
end
+
' '
+
insn
;
}
...
...
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