Skip to content

Commit adb837b

Browse files
fix: fixed the following bug -> Issue#33: Inner classes with $ symbol cannot be retrieved via /class-source endpoint
Co-authored-by: Leo <[email protected]>
1 parent ce631e3 commit adb837b

File tree

1 file changed

+28
-7
lines changed

1 file changed

+28
-7
lines changed

src/main/java/jadx/gui/plugins/JadxAIMCP.java

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,10 @@ private void handleMethodByName(Context ctx) {
798798
ctx.status(400).json(Map.of("error", "Missing 'method' parameter"));
799799
return;
800800
}
801-
className = className.replace('$', '.');
801+
802+
// Removing this line to solve issue #37 as raised and contributed by github@ljt270864457
803+
// This solves following bug -> Bug: Inner classes with $ symbol cannot be retrieved via /class-source endpoint
804+
// className = className.replace('$', '.');
802805

803806
try {
804807
JadxWrapper wrapper = mainWindow.getWrapper();
@@ -876,7 +879,10 @@ private void handleClassSource(Context ctx) {
876879
ctx.status(400).json(Map.of("error", "Missing 'class' parameter."));
877880
return;
878881
}
879-
className = className.replace('$', '.');
882+
883+
// Removing this line to solve issue #37 as raised and contributed by github@ljt270864457
884+
// This solves following bug -> Bug: Inner classes with $ symbol cannot be retrieved via /class-source endpoint
885+
// className = className.replace('$', '.');
880886

881887
try {
882888
JadxWrapper wrapper = mainWindow.getWrapper();
@@ -929,7 +935,10 @@ private void handleMethodsOfClass(Context ctx) {
929935
ctx.status(400).json(Map.of("error", "Missing required parameter 'class'"));
930936
return;
931937
}
932-
className = className.replace('$', '.');
938+
939+
// Removing this line to solve issue #37 as raised and contributed by github@ljt270864457
940+
// This solves following bug -> Bug: Inner classes with $ symbol cannot be retrieved via /class-source endpoint
941+
// className = className.replace('$', '.');
933942

934943
try {
935944
JadxWrapper wrapper = mainWindow.getWrapper();
@@ -963,7 +972,10 @@ private void handleFieldsOfClass(Context ctx) {
963972
ctx.status(400).json(Map.of("error", "Missing required parameter 'class'"));
964973
return;
965974
}
966-
className = className.replace('$', '.');
975+
976+
// Removing this line to solve issue #37 as raised and contributed by github@ljt270864457
977+
// This solves following bug -> Bug: Inner classes with $ symbol cannot be retrieved via /class-source endpoint
978+
// className = className.replace('$', '.');
967979

968980
try {
969981
JadxWrapper wrapper = mainWindow.getWrapper();
@@ -997,7 +1009,10 @@ private void handleRenameClass(Context ctx) {
9971009
ctx.status(400).json(Map.of("error", "Missing required parameter 'class' or 'newName'"));
9981010
return;
9991011
}
1000-
className = className.replace('$', '.');
1012+
1013+
// Removing this line to solve issue #37 as raised and contributed by github@ljt270864457
1014+
// This solves following bug -> Bug: Inner classes with $ symbol cannot be retrieved via /class-source endpoint
1015+
// className = className.replace('$', '.');
10011016

10021017
try {
10031018
JadxWrapper wrapper = mainWindow.getWrapper();
@@ -1084,7 +1099,10 @@ private void handleRenameField(Context ctx) {
10841099
ctx.status(400).json(Map.of("error", "Missing required parameter 'class' or 'field'"));
10851100
return;
10861101
}
1087-
className = className.replace('$', '.');
1102+
1103+
// Removing this line to solve issue #37 as raised and contributed by github@ljt270864457
1104+
// This solves following bug -> Bug: Inner classes with $ symbol cannot be retrieved via /class-source endpoint
1105+
// className = className.replace('$', '.');
10881106

10891107
try {
10901108
JadxWrapper wrapper = mainWindow.getWrapper();
@@ -1124,7 +1142,10 @@ private void handleSmaliOfClass(Context ctx) {
11241142
ctx.status(400).json(Map.of("error", "Missing 'class' parameter."));
11251143
return;
11261144
}
1127-
className = className.replace('$', '.');
1145+
1146+
// Removing this line to solve issue #37 as raised and contributed by github@ljt270864457
1147+
// This solves following bug -> Bug: Inner classes with $ symbol cannot be retrieved via /class-source endpoint
1148+
// className = className.replace('$', '.');
11281149

11291150
try {
11301151
JadxWrapper wrapper = mainWindow.getWrapper();

0 commit comments

Comments
 (0)