Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tao chen
asm
Commits
ac42a689
Commit
ac42a689
authored
Apr 24, 2021
by
Eric Bruneton
Browse files
Fix the formatting of reference array types in stack map frame outputs.
parent
6775daee
Changes
2
Hide whitespace changes
Inline
Side-by-side
asm-util/src/main/java/org/objectweb/asm/util/CheckClassAdapter.java
View file @
ac42a689
...
...
@@ -1114,7 +1114,11 @@ public class CheckClassAdapter extends ClassVisitor {
if
(
name
.
charAt
(
endIndex
-
1
)
==
';'
)
{
endIndex
--;
}
return
name
.
substring
(
lastSlashIndex
+
1
,
endIndex
);
int
lastBracketIndex
=
name
.
lastIndexOf
(
'['
);
if
(
lastBracketIndex
==
-
1
)
{
return
name
.
substring
(
lastSlashIndex
+
1
,
endIndex
);
}
return
name
.
substring
(
0
,
lastBracketIndex
+
1
)
+
name
.
substring
(
lastSlashIndex
+
1
,
endIndex
);
}
}
}
asm-util/src/test/java/org/objectweb/asm/util/CheckClassAdapterTest.java
View file @
ac42a689
...
...
@@ -549,6 +549,7 @@ public class CheckClassAdapterTest extends AsmTest implements Opcodes {
String
log
=
logger
.
toString
();
assertFalse
(
log
.
startsWith
(
AnalyzerException
.
class
.
getName
()
+
": Error at instruction"
));
assertTrue
(
log
.
contains
(
"00000 CheckClassAdapterTest : : ALOAD 0"
));
assertTrue
(
log
.
contains
(
"00001 CheckClassAdapterTest [Object : [Object : ARETURN"
));
}
@Test
...
...
@@ -578,4 +579,8 @@ public class CheckClassAdapterTest extends AsmTest implements Opcodes {
private
static
Attribute
[]
attributes
()
{
return
new
Attribute
[]
{
new
Comment
(),
new
CodeComment
()};
}
Object
methodWithObjectArrayArgument
(
final
Object
[]
arg
)
{
return
arg
;
}
}
Write
Preview
Supports
Markdown
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