8293961: Unused ClassPathZipEntry::contents_do
Reviewed-by: ccheung, dholmes
This commit is contained in:
parent
7515b304ca
commit
4fb424ba5f
@ -90,14 +90,12 @@ typedef void * * (*ZipOpen_t)(const char *name, char **pmsg);
|
||||
typedef void (*ZipClose_t)(jzfile *zip);
|
||||
typedef jzentry* (*FindEntry_t)(jzfile *zip, const char *name, jint *sizeP, jint *nameLen);
|
||||
typedef jboolean (*ReadEntry_t)(jzfile *zip, jzentry *entry, unsigned char *buf, char *namebuf);
|
||||
typedef jzentry* (*GetNextEntry_t)(jzfile *zip, jint n);
|
||||
typedef jint (*Crc32_t)(jint crc, const jbyte *buf, jint len);
|
||||
|
||||
static ZipOpen_t ZipOpen = NULL;
|
||||
static ZipClose_t ZipClose = NULL;
|
||||
static FindEntry_t FindEntry = NULL;
|
||||
static ReadEntry_t ReadEntry = NULL;
|
||||
static GetNextEntry_t GetNextEntry = NULL;
|
||||
static Crc32_t Crc32 = NULL;
|
||||
int ClassLoader::_libzip_loaded = 0;
|
||||
void* ClassLoader::_zip_handle = NULL;
|
||||
@ -337,18 +335,6 @@ ClassFileStream* ClassPathZipEntry::open_stream(JavaThread* current, const char*
|
||||
ClassFileStream::verify);
|
||||
}
|
||||
|
||||
// invoke function for each entry in the zip file
|
||||
void ClassPathZipEntry::contents_do(void f(const char* name, void* context), void* context) {
|
||||
JavaThread* thread = JavaThread::current();
|
||||
HandleMark handle_mark(thread);
|
||||
ThreadToNativeFromVM ttn(thread);
|
||||
for (int n = 0; ; n++) {
|
||||
jzentry * ze = ((*GetNextEntry)(_zip, n));
|
||||
if (ze == NULL) break;
|
||||
(*f)(ze->name, context);
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG_ONLY(ClassPathImageEntry* ClassPathImageEntry::_singleton = NULL;)
|
||||
|
||||
JImageFile* ClassPathImageEntry::jimage() const {
|
||||
@ -954,7 +940,6 @@ void ClassLoader::load_zip_library() {
|
||||
ZipClose = CAST_TO_FN_PTR(ZipClose_t, dll_lookup(_zip_handle, "ZIP_Close", path));
|
||||
FindEntry = CAST_TO_FN_PTR(FindEntry_t, dll_lookup(_zip_handle, "ZIP_FindEntry", path));
|
||||
ReadEntry = CAST_TO_FN_PTR(ReadEntry_t, dll_lookup(_zip_handle, "ZIP_ReadEntry", path));
|
||||
GetNextEntry = CAST_TO_FN_PTR(GetNextEntry_t, dll_lookup(_zip_handle, "ZIP_GetNextEntry", path));
|
||||
Crc32 = CAST_TO_FN_PTR(Crc32_t, dll_lookup(_zip_handle, "ZIP_CRC32", path));
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,6 @@ class ClassPathZipEntry: public ClassPathEntry {
|
||||
virtual ~ClassPathZipEntry();
|
||||
u1* open_entry(JavaThread* current, const char* name, jint* filesize, bool nul_terminate);
|
||||
ClassFileStream* open_stream(JavaThread* current, const char* name);
|
||||
void contents_do(void f(const char* name, void* context), void* context);
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user