Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
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
478d186a
Commit
478d186a
authored
Mar 23, 2013
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix incorrect variable declaration
parent
79114520
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
ProcessVariables.java
...main/java/jadx/dex/visitors/regions/ProcessVariables.java
+0
-6
TestTryCatch.java
src/samples/java/jadx/samples/TestTryCatch.java
+12
-0
No files found.
src/main/java/jadx/dex/visitors/regions/ProcessVariables.java
View file @
478d186a
...
...
@@ -114,12 +114,6 @@ public class ProcessVariables extends AbstractVisitor {
continue
;
// }
}
// suppose variables always initialized
if
(
u
.
getAssigns
().
size
()
==
1
&&
u
.
getUseRegions
().
size
()
<=
1
)
{
r
.
getParentInsn
().
getAttributes
().
add
(
new
DeclareVariableAttr
());
it
.
remove
();
continue
;
}
// check if we can declare variable at current assigns
for
(
IRegion
assignRegion
:
u
.
getAssigns
())
{
if
(
canDeclareInRegion
(
u
,
assignRegion
))
{
...
...
src/samples/java/jadx/samples/TestTryCatch.java
View file @
478d186a
...
...
@@ -131,6 +131,17 @@ public class TestTryCatch extends AbstractTest {
return
obj
.
toString
()
!=
null
;
}
public
Object
mObject
=
new
Object
();
public
boolean
mDiscovering
=
true
;
private
boolean
testSynchronize3
()
{
boolean
b
=
false
;
synchronized
(
mObject
)
{
b
=
this
.
mDiscovering
;
}
return
b
;
}
@Override
public
boolean
testRun
()
throws
Exception
{
Object
obj
=
new
Object
();
...
...
@@ -147,6 +158,7 @@ public class TestTryCatch extends AbstractTest {
assertTrue
(
testSynchronize
(
"str"
)
==
false
);
assertTrue
(
testSynchronize2
(
"str"
));
assertTrue
(
testSynchronize3
());
return
true
;
}
...
...
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