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
Jason Zaugg
asm
Commits
f9180ab4
Commit
f9180ab4
authored
Apr 25, 2018
by
Eric Bruneton
Browse files
Address the merge request review comments.
parent
2af7508d
Changes
1
Hide whitespace changes
Inline
Side-by-side
asm/src/main/java/org/objectweb/asm/ClassReader.java
View file @
f9180ab4
...
...
@@ -3371,11 +3371,12 @@ public class ClassReader {
*/
final
String
readUTF
(
final
int
constantPoolEntryIndex
,
final
char
[]
charBuffer
)
{
String
value
=
(
String
)
cpInfoValues
[
constantPoolEntryIndex
];
if
(
value
==
null
)
{
int
cpInfoOffset
=
cpInfoOffsets
[
constantPoolEntryIndex
];
value
=
readUTF
(
cpInfoOffset
+
2
,
readUnsignedShort
(
cpInfoOffset
),
charBuffer
);
cpInfoValues
[
constantPoolEntryIndex
]
=
value
;
if
(
value
!=
null
)
{
return
value
;
}
int
cpInfoOffset
=
cpInfoOffsets
[
constantPoolEntryIndex
];
value
=
readUTF
(
cpInfoOffset
+
2
,
readUnsignedShort
(
cpInfoOffset
),
charBuffer
);
cpInfoValues
[
constantPoolEntryIndex
]
=
value
;
return
value
;
}
...
...
@@ -3483,23 +3484,23 @@ public class ClassReader {
private
ConstantDynamic
readConstantDynamic
(
final
int
constantPoolEntryIndex
,
final
char
[]
charBuffer
)
{
ConstantDynamic
constantDynamic
=
(
ConstantDynamic
)
cpInfoValues
[
constantPoolEntryIndex
];
if
(
constantDynamic
==
null
)
{
int
cpInfoOffset
=
cpInfoOffsets
[
constantPoolEntryIndex
];
int
nameAndTypeCpInfoOffset
=
cpInfoOffsets
[
readUnsignedShort
(
cpInfoOffset
+
2
)];
String
name
=
readUTF8
(
nameAndTypeCpInfoOffset
,
charBuffer
);
String
descriptor
=
readUTF8
(
nameAndTypeCpInfoOffset
+
2
,
charBuffer
);
int
bootstrapMethodOffset
=
bootstrapMethodOffsets
[
readUnsignedShort
(
cpInfoOffset
)];
Handle
handle
=
(
Handle
)
readConst
(
readUnsignedShort
(
bootstrapMethodOffset
),
charBuffer
);
Object
[]
bootstrapMethodArguments
=
new
Object
[
readUnsignedShort
(
bootstrapMethodOffset
+
2
)];
bootstrapMethodOffset
+=
4
;
for
(
int
i
=
0
;
i
<
bootstrapMethodArguments
.
length
;
i
++)
{
bootstrapMethodArguments
[
i
]
=
readConst
(
readUnsignedShort
(
bootstrapMethodOffset
),
charBuffer
);
bootstrapMethodOffset
+=
2
;
}
constantDynamic
=
new
ConstantDynamic
(
name
,
descriptor
,
handle
,
bootstrapMethodArguments
);
cpInfoValues
[
constantPoolEntryIndex
]
=
constantDynamic
;
if
(
constantDynamic
!=
null
)
{
return
constantDynamic
;
}
int
cpInfoOffset
=
cpInfoOffsets
[
constantPoolEntryIndex
];
int
nameAndTypeCpInfoOffset
=
cpInfoOffsets
[
readUnsignedShort
(
cpInfoOffset
+
2
)];
String
name
=
readUTF8
(
nameAndTypeCpInfoOffset
,
charBuffer
);
String
descriptor
=
readUTF8
(
nameAndTypeCpInfoOffset
+
2
,
charBuffer
);
int
bootstrapMethodOffset
=
bootstrapMethodOffsets
[
readUnsignedShort
(
cpInfoOffset
)];
Handle
handle
=
(
Handle
)
readConst
(
readUnsignedShort
(
bootstrapMethodOffset
),
charBuffer
);
Object
[]
bootstrapMethodArguments
=
new
Object
[
readUnsignedShort
(
bootstrapMethodOffset
+
2
)];
bootstrapMethodOffset
+=
4
;
for
(
int
i
=
0
;
i
<
bootstrapMethodArguments
.
length
;
i
++)
{
bootstrapMethodArguments
[
i
]
=
readConst
(
readUnsignedShort
(
bootstrapMethodOffset
),
charBuffer
);
bootstrapMethodOffset
+=
2
;
}
constantDynamic
=
new
ConstantDynamic
(
name
,
descriptor
,
handle
,
bootstrapMethodArguments
);
cpInfoValues
[
constantPoolEntryIndex
]
=
constantDynamic
;
return
constantDynamic
;
}
...
...
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