1.1 --- a/src/share/vm/classfile/classLoader.hpp Thu Aug 21 13:57:51 2014 -0700 1.2 +++ b/src/share/vm/classfile/classLoader.hpp Tue Sep 02 14:02:57 2014 -0700 1.3 @@ -72,11 +72,11 @@ 1.4 1.5 class ClassPathDirEntry: public ClassPathEntry { 1.6 private: 1.7 - char* _dir; // Name of directory 1.8 + const char* _dir; // Name of directory 1.9 public: 1.10 bool is_jar_file() { return false; } 1.11 const char* name() { return _dir; } 1.12 - ClassPathDirEntry(char* dir); 1.13 + ClassPathDirEntry(const char* dir); 1.14 ClassFileStream* open_stream(const char* name, TRAPS); 1.15 // Debugging 1.16 NOT_PRODUCT(void compile_the_world(Handle loader, TRAPS);) 1.17 @@ -100,8 +100,8 @@ 1.18 1.19 class ClassPathZipEntry: public ClassPathEntry { 1.20 private: 1.21 - jzfile* _zip; // The zip archive 1.22 - char* _zip_name; // Name of zip archive 1.23 + jzfile* _zip; // The zip archive 1.24 + const char* _zip_name; // Name of zip archive 1.25 public: 1.26 bool is_jar_file() { return true; } 1.27 const char* name() { return _zip_name; } 1.28 @@ -123,7 +123,7 @@ 1.29 // For lazier loading of boot class path entries 1.30 class LazyClassPathEntry: public ClassPathEntry { 1.31 private: 1.32 - char* _path; // dir or file 1.33 + const char* _path; // dir or file 1.34 struct stat _st; 1.35 MetaIndex* _meta_index; 1.36 bool _has_error; 1.37 @@ -133,7 +133,7 @@ 1.38 public: 1.39 bool is_jar_file(); 1.40 const char* name() { return _path; } 1.41 - LazyClassPathEntry(char* path, const struct stat* st, bool throw_exception); 1.42 + LazyClassPathEntry(const char* path, const struct stat* st, bool throw_exception); 1.43 u1* open_entry(const char* name, jint* filesize, bool nul_terminate, TRAPS); 1.44 ClassFileStream* open_stream(const char* name, TRAPS); 1.45 void set_meta_index(MetaIndex* meta_index) { _meta_index = meta_index; } 1.46 @@ -218,17 +218,17 @@ 1.47 static void setup_meta_index(const char* meta_index_path, const char* meta_index_dir, 1.48 int start_index); 1.49 static void setup_bootstrap_search_path(); 1.50 - static void setup_search_path(char *class_path); 1.51 + static void setup_search_path(const char *class_path); 1.52 1.53 static void load_zip_library(); 1.54 - static ClassPathEntry* create_class_path_entry(char *path, const struct stat* st, 1.55 + static ClassPathEntry* create_class_path_entry(const char *path, const struct stat* st, 1.56 bool lazy, bool throw_exception, TRAPS); 1.57 1.58 // Canonicalizes path names, so strcmp will work properly. This is mainly 1.59 // to avoid confusing the zip library 1.60 - static bool get_canonical_path(char* orig, char* out, int len); 1.61 + static bool get_canonical_path(const char* orig, char* out, int len); 1.62 public: 1.63 - static bool update_class_path_entry_list(char *path, 1.64 + static bool update_class_path_entry_list(const char *path, 1.65 bool check_for_duplicates, 1.66 bool throw_exception=true); 1.67 static void print_bootclasspath();