Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinccheung committed Nov 22, 2024
1 parent 9b2b655 commit d0e6ecc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/hotspot/share/cds/filemap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2701,7 +2701,7 @@ ClassFileStream* FileMapInfo::get_stream_from_class_loader(Handle class_loader,
TempNewSymbol class_name_sym = SymbolTable::new_symbol(file_name);
Handle ext_class_name = java_lang_String::externalize_classname(class_name_sym, CHECK_NULL);

// InputStream ClassLoader.getResourceAsStream(String name)
// byte[] ClassLoader.getResourceAsByteArray(String name)
JavaCalls::call_virtual(&result,
class_loader,
vmClasses::ClassLoader_klass(),
Expand All @@ -2711,7 +2711,7 @@ ClassFileStream* FileMapInfo::get_stream_from_class_loader(Handle class_loader,
CHECK_NULL);
assert(result.get_type() == T_OBJECT, "just checking");
oop obj = result.get_oop();
assert(obj != nullptr, "ClassLoader.getResourceAsStream should not return null");
assert(obj != nullptr, "ClassLoader.getResourceAsByteArray should not return null");

// The result should be a [B
assert(obj->is_typeArray(), "just checking");
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/classfile/vmSymbols.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ class SerializeClosure;
template(generateLambdaFormHolderClasses, "generateLambdaFormHolderClasses") \
template(generateLambdaFormHolderClasses_signature, "([Ljava/lang/String;)[Ljava/lang/Object;") \
template(getResourceAsByteArray_name, "getResourceAsByteArray") \
template(getResourceAsByteArray_signature, "(Ljava/lang/String;)[B") \
template(getResourceAsByteArray_signature, "(Ljava/lang/String;)[B") \
template(java_lang_Enum, "java/lang/Enum") \
template(java_lang_invoke_Invokers_Holder, "java/lang/invoke/Invokers$Holder") \
template(java_lang_invoke_DirectMethodHandle_Holder, "java/lang/invoke/DirectMethodHandle$Holder") \
Expand Down
2 changes: 1 addition & 1 deletion src/java.base/share/classes/java/lang/ClassLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -1686,7 +1686,7 @@ public InputStream getResourceAsStream(String name) {
}

/**
* Called by VM for constructing a ClassFileStream.
* Called by VM for reading class bytes.
*/
private byte[] getResourceAsByteArray(String name) {
Objects.requireNonNull(name);
Expand Down

0 comments on commit d0e6ecc

Please sign in to comment.