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
47917fd5
Commit
47917fd5
authored
Oct 29, 2018
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: resolve some sonar critical issues
parent
0abb51c8
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
16 deletions
+21
-16
EmptyAttrStorage.java
.../main/java/jadx/core/dex/attributes/EmptyAttrStorage.java
+4
-0
IAttribute.java
...re/src/main/java/jadx/core/dex/attributes/IAttribute.java
+1
-1
GotoNode.java
...re/src/main/java/jadx/core/dex/instructions/GotoNode.java
+0
-10
TargetInsnNode.java
.../main/java/jadx/core/dex/instructions/TargetInsnNode.java
+5
-2
JadxSettings.java
jadx-gui/src/main/java/jadx/gui/settings/JadxSettings.java
+1
-1
JadxSettingsWindow.java
...i/src/main/java/jadx/gui/settings/JadxSettingsWindow.java
+1
-1
EditorTheme.java
jadx-gui/src/main/java/jadx/gui/ui/codearea/EditorTheme.java
+9
-1
No files found.
jadx-core/src/main/java/jadx/core/dex/attributes/EmptyAttrStorage.java
View file @
47917fd5
...
...
@@ -34,18 +34,22 @@ public final class EmptyAttrStorage extends AttributeStorage {
@Override
public
void
clear
()
{
// ignore
}
@Override
public
void
remove
(
AFlag
flag
)
{
// ignore
}
@Override
public
<
T
extends
IAttribute
>
void
remove
(
AType
<
T
>
type
)
{
// ignore
}
@Override
public
void
remove
(
IAttribute
attr
)
{
// ignore
}
@Override
...
...
jadx-core/src/main/java/jadx/core/dex/attributes/IAttribute.java
View file @
47917fd5
package
jadx
.
core
.
dex
.
attributes
;
public
interface
IAttribute
{
AType
<?
extends
IAttribute
>
getType
();
<
T
extends
IAttribute
>
AType
<
T
>
getType
();
}
jadx-core/src/main/java/jadx/core/dex/instructions/GotoNode.java
View file @
47917fd5
package
jadx
.
core
.
dex
.
instructions
;
import
jadx.core.dex.nodes.BlockNode
;
import
jadx.core.utils.InsnUtils
;
public
class
GotoNode
extends
TargetInsnNode
{
...
...
@@ -21,15 +20,6 @@ public class GotoNode extends TargetInsnNode {
}
@Override
public
boolean
replaceTargetBlock
(
BlockNode
origin
,
BlockNode
replace
)
{
return
false
;
}
@Override
public
void
initBlocks
(
BlockNode
curBlock
)
{
}
@Override
public
String
toString
()
{
return
super
.
toString
()
+
"-> "
+
InsnUtils
.
formatOffset
(
target
);
}
...
...
jadx-core/src/main/java/jadx/core/dex/instructions/TargetInsnNode.java
View file @
47917fd5
...
...
@@ -9,7 +9,10 @@ public abstract class TargetInsnNode extends InsnNode {
super
(
type
,
argsCount
);
}
public
abstract
void
initBlocks
(
BlockNode
curBlock
);
public
void
initBlocks
(
BlockNode
curBlock
)
{
}
public
abstract
boolean
replaceTargetBlock
(
BlockNode
origin
,
BlockNode
replace
);
public
boolean
replaceTargetBlock
(
BlockNode
origin
,
BlockNode
replace
)
{
return
false
;
}
}
jadx-gui/src/main/java/jadx/gui/settings/JadxSettings.java
View file @
47917fd5
...
...
@@ -276,7 +276,7 @@ public class JadxSettings extends JadxCLIArgs {
fromVersion
++;
}
if
(
fromVersion
==
1
)
{
setEditorThemePath
(
EditorTheme
.
ALL_THEMES
[
0
]
.
getPath
());
setEditorThemePath
(
EditorTheme
.
getDefaultTheme
()
.
getPath
());
fromVersion
++;
}
if
(
fromVersion
==
2
)
{
...
...
jadx-gui/src/main/java/jadx/gui/settings/JadxSettingsWindow.java
View file @
47917fd5
...
...
@@ -190,7 +190,7 @@ public class JadxSettingsWindow extends JDialog {
}
});
EditorTheme
[]
editorThemes
=
EditorTheme
.
ALL_THEMES
;
EditorTheme
[]
editorThemes
=
EditorTheme
.
getAllThemes
()
;
JComboBox
<
EditorTheme
>
themesCbx
=
new
JComboBox
<>(
editorThemes
);
for
(
EditorTheme
theme
:
editorThemes
)
{
if
(
theme
.
getPath
().
equals
(
settings
.
getEditorThemePath
()))
{
...
...
jadx-gui/src/main/java/jadx/gui/ui/codearea/EditorTheme.java
View file @
47917fd5
...
...
@@ -3,7 +3,7 @@ package jadx.gui.ui.codearea;
public
final
class
EditorTheme
{
private
static
final
String
RSTA_THEME_PATH
=
"/org/fife/ui/rsyntaxtextarea/themes/"
;
p
ublic
static
final
EditorTheme
[]
ALL_THEMES
=
p
rivate
static
final
EditorTheme
[]
ALL_THEMES
=
new
EditorTheme
[]{
new
EditorTheme
(
"default"
),
new
EditorTheme
(
"eclipse"
),
...
...
@@ -13,6 +13,14 @@ public final class EditorTheme {
new
EditorTheme
(
"monokai"
)
};
public
static
EditorTheme
[]
getAllThemes
()
{
return
ALL_THEMES
;
}
public
static
EditorTheme
getDefaultTheme
()
{
return
ALL_THEMES
[
0
];
}
private
final
String
name
;
private
final
String
path
;
...
...
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