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
4e07d80e
Commit
4e07d80e
authored
Jan 18, 2018
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cli: fix errors list sorting
parent
c4a462d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
ErrorsCounter.java
jadx-core/src/main/java/jadx/core/utils/ErrorsCounter.java
+8
-10
No files found.
jadx-core/src/main/java/jadx/core/utils/ErrorsCounter.java
View file @
4e07d80e
...
...
@@ -20,7 +20,7 @@ import org.slf4j.LoggerFactory;
public
class
ErrorsCounter
{
private
static
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
ErrorsCounter
.
class
);
private
final
Set
<
Object
>
errorNodes
=
new
HashSet
<>();
private
final
Set
<
IAttributeNode
>
errorNodes
=
new
HashSet
<>();
private
int
errorsCount
;
public
int
getErrorCount
()
{
...
...
@@ -69,16 +69,14 @@ public class ErrorsCounter {
public
void
printReport
()
{
if
(
getErrorCount
()
>
0
)
{
LOG
.
error
(
"{} errors occurred in following nodes:"
,
getErrorCount
());
List
<
Object
>
nodes
=
new
ArrayList
<>(
errorNodes
);
Collections
.
sort
(
nodes
,
new
Comparator
<
Object
>()
{
@Override
public
int
compare
(
Object
o1
,
Object
o2
)
{
return
String
.
valueOf
(
o1
).
compareTo
(
String
.
valueOf
(
o2
));
}
});
for
(
Object
node
:
nodes
)
{
List
<
String
>
errors
=
new
ArrayList
<>(
errorNodes
.
size
());
for
(
IAttributeNode
node
:
errorNodes
)
{
String
nodeName
=
node
.
getClass
().
getSimpleName
().
replace
(
"Node"
,
""
);
LOG
.
error
(
" {}: {}"
,
nodeName
,
node
);
errors
.
add
(
nodeName
+
": "
+
node
);
}
Collections
.
sort
(
errors
);
for
(
String
err
:
errors
)
{
LOG
.
error
(
" {}"
,
err
);
}
}
}
...
...
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