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
19cf7c9f
Commit
19cf7c9f
authored
May 13, 2019
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: improve multi line warning print
parent
363cd85b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
5 deletions
+7
-5
ResourcesLoader.java
jadx-core/src/main/java/jadx/api/ResourcesLoader.java
+1
-1
ClassGen.java
jadx-core/src/main/java/jadx/core/codegen/ClassGen.java
+1
-1
CodeWriter.java
jadx-core/src/main/java/jadx/core/codegen/CodeWriter.java
+3
-1
CheckRegions.java
...ain/java/jadx/core/dex/visitors/regions/CheckRegions.java
+2
-2
No files found.
jadx-core/src/main/java/jadx/api/ResourcesLoader.java
View file @
19cf7c9f
...
...
@@ -84,7 +84,7 @@ public final class ResourcesLoader {
LOG
.
error
(
"Decode error"
,
e
);
CodeWriter
cw
=
new
CodeWriter
();
cw
.
add
(
"Error decode "
).
add
(
rf
.
getType
().
toString
().
toLowerCase
());
cw
.
startLine
(
Utils
.
getStackTrace
(
e
.
getCause
()
));
Utils
.
appendStackTrace
(
cw
,
e
.
getCause
(
));
return
ResContainer
.
textResource
(
rf
.
getName
(),
cw
);
}
}
...
...
jadx-core/src/main/java/jadx/core/codegen/ClassGen.java
View file @
19cf7c9f
...
...
@@ -263,7 +263,7 @@ public class ClassGen {
}
catch
(
Exception
e
)
{
code
.
newLine
().
add
(
"/*"
);
code
.
newLine
().
addMultiLine
(
ErrorsCounter
.
methodError
(
mth
,
"Method generation error"
,
e
));
code
.
newLine
().
addMultiLine
(
Utils
.
getStackTrace
(
e
)
);
Utils
.
appendStackTrace
(
code
,
e
);
code
.
newLine
().
add
(
"*/"
);
code
.
setIndent
(
savedIndent
);
mth
.
addError
(
"Method generation error: "
+
e
.
getMessage
(),
e
);
...
...
jadx-core/src/main/java/jadx/core/codegen/CodeWriter.java
View file @
19cf7c9f
...
...
@@ -97,10 +97,12 @@ public class CodeWriter {
}
public
CodeWriter
addMultiLine
(
String
str
)
{
buf
.
append
(
str
);
if
(
str
.
contains
(
NL
))
{
buf
.
append
(
str
.
replace
(
NL
,
NL
+
indentStr
));
line
+=
StringUtils
.
countMatches
(
str
,
NL
);
offset
=
0
;
}
else
{
buf
.
append
(
str
);
}
return
this
;
}
...
...
jadx-core/src/main/java/jadx/core/dex/visitors/regions/CheckRegions.java
View file @
19cf7c9f
...
...
@@ -84,8 +84,8 @@ public class CheckRegions extends AbstractVisitor {
private
static
String
getBlockInsnStr
(
MethodNode
mth
,
IBlock
block
)
{
CodeWriter
code
=
new
CodeWriter
();
code
.
incIndent
();
code
.
newLine
();
code
.
setIndent
(
3
);
MethodGen
mg
=
MethodGen
.
getFallbackMethodGen
(
mth
);
InsnGen
ig
=
new
InsnGen
(
mg
,
true
);
for
(
InsnNode
insn
:
block
.
getInstructions
())
{
...
...
@@ -95,7 +95,7 @@ public class CheckRegions extends AbstractVisitor {
// ignore
}
}
code
.
newLine
()
.
addIndent
()
;
code
.
newLine
();
code
.
finish
();
return
code
.
toString
();
}
...
...
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