158 assert(found <= line_end, "sanity");
159 *line_end = '\0';
160 }
161 line_start = line_end + 1;
162 }
163 return found;
164 }
165
166 void ClassLoaderExt::process_jar_manifest(ClassPathEntry* entry,
167 bool check_for_duplicates) {
168 Thread* THREAD = Thread::current();
169 ResourceMark rm(THREAD);
170 jint manifest_size;
171 char* manifest = read_manifest(entry, &manifest_size, CHECK);
172
173 if (manifest == NULL) {
174 return;
175 }
176
177 if (strstr(manifest, "Extension-List:") != NULL) {
178 tty->print_cr("-Xshare:dump does not support Extension-List in JAR manifest: %s", entry->name());
179 vm_exit(1);
180 }
181
182 char* cp_attr = get_class_path_attr(entry->name(), manifest, manifest_size);
183
184 if (cp_attr != NULL && strlen(cp_attr) > 0) {
185 trace_class_path("found Class-Path: ", cp_attr);
186
187 char sep = os::file_separator()[0];
188 const char* dir_name = entry->name();
189 const char* dir_tail = strrchr(dir_name, sep);
190 int dir_len;
191 if (dir_tail == NULL) {
192 dir_len = 0;
193 } else {
194 dir_len = dir_tail - dir_name + 1;
195 }
196
197 // Split the cp_attr by spaces, and add each file
198 char* file_start = cp_attr;
199 char* end = file_start + strlen(file_start);
|
158 assert(found <= line_end, "sanity");
159 *line_end = '\0';
160 }
161 line_start = line_end + 1;
162 }
163 return found;
164 }
165
166 void ClassLoaderExt::process_jar_manifest(ClassPathEntry* entry,
167 bool check_for_duplicates) {
168 Thread* THREAD = Thread::current();
169 ResourceMark rm(THREAD);
170 jint manifest_size;
171 char* manifest = read_manifest(entry, &manifest_size, CHECK);
172
173 if (manifest == NULL) {
174 return;
175 }
176
177 if (strstr(manifest, "Extension-List:") != NULL) {
178 vm_exit_during_cds_dumping(err_msg("-Xshare:dump does not support Extension-List in JAR manifest: %s", entry->name()));
179 }
180
181 char* cp_attr = get_class_path_attr(entry->name(), manifest, manifest_size);
182
183 if (cp_attr != NULL && strlen(cp_attr) > 0) {
184 trace_class_path("found Class-Path: ", cp_attr);
185
186 char sep = os::file_separator()[0];
187 const char* dir_name = entry->name();
188 const char* dir_tail = strrchr(dir_name, sep);
189 int dir_len;
190 if (dir_tail == NULL) {
191 dir_len = 0;
192 } else {
193 dir_len = dir_tail - dir_name + 1;
194 }
195
196 // Split the cp_attr by spaces, and add each file
197 char* file_start = cp_attr;
198 char* end = file_start + strlen(file_start);
|