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
asm
asm
Commits
424a6244
Commit
424a6244
authored
Jun 15, 2005
by
ebruneton
Browse files
backport of a bug fix in ASM 2.0
parent
ca6939cb
Changes
1
Show whitespace changes
Inline
Side-by-side
src/org/objectweb/asm/Attribute.java
View file @
424a6244
...
...
@@ -182,13 +182,12 @@ public class Attribute {
final
int
maxStack
,
final
int
maxLocals
)
{
int
size
=
0
;
Attribute
attr
=
this
;
int
size
=
0
;
while
(
attr
!=
null
)
{
ByteVector
b
=
attr
.
write
(
cw
,
code
,
len
,
maxStack
,
maxLocals
);
if
(
b
.
length
>
0
)
{
if
(!
attr
.
isUnknown
())
{
cw
.
newUTF8
(
attr
.
type
);
size
+=
b
.
length
+
6
;
size
+=
attr
.
write
(
cw
,
code
,
len
,
maxStack
,
maxLocals
)
.
length
+
6
;
}
attr
=
attr
.
next
;
}
...
...
@@ -225,12 +224,12 @@ public class Attribute {
if
(
next
!=
null
)
{
next
.
put
(
cw
,
code
,
len
,
maxStack
,
maxLocals
,
out
);
}
ByteVector
b
=
write
(
cw
,
code
,
len
,
maxStack
,
maxLocals
);
if
(
b
.
length
==
0
)
{
if
(
isUnknown
())
{
if
(
cw
.
checkAttributes
)
{
throw
new
IllegalArgumentException
(
"Unknown attribute type "
+
type
);
}
}
else
{
ByteVector
b
=
write
(
cw
,
code
,
len
,
maxStack
,
maxLocals
);
out
.
putShort
(
cw
.
newUTF8
(
type
)).
putInt
(
b
.
length
);
out
.
putByteArray
(
b
.
data
,
0
,
b
.
length
);
}
...
...
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