Changeset 30475 for main/trunk
- Timestamp:
- 2016-04-14T13:49:00+12:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/ServiceRack.java
r28966 r30475 474 474 475 475 // now we try class names for dictionary names 476 String class_name = this.getClass().getName();477 class_name = class_name.substring(class_name.lastIndexOf('.') + 1);478 Dictionary dict = new Dictionary( class_name, lang, this.class_loader);476 String original_class_name = this.getClass().getName(); 477 original_class_name = original_class_name.substring(original_class_name.lastIndexOf('.') + 1); 478 Dictionary dict = new Dictionary(original_class_name, lang, this.class_loader); 479 479 String result = dict.get(key, args); 480 480 if (result != null) … … 484 484 485 485 // we have to try super classes 486 String class_name; 486 487 Class c = this.getClass().getSuperclass(); 487 488 while (result == null && c != null) … … 500 501 if (result == null) 501 502 { 502 return "_" + key + "_"; 503 // try the ServiceRack properties 504 // at the moment we look for original_class_name.key, then just key 505 // if there is lots of inheritance, may want to try down the list of superclasses too... 506 class_name = "ServiceRack"; 507 dict = new Dictionary(class_name, lang, this.class_loader); 508 String full_key = original_class_name+"."+key; 509 result = dict.get(full_key, args); 510 if(result == null) { 511 result = dict.get(key, args); 512 } 513 if(result == null) { 514 return "_" + key + "_"; 515 } 503 516 } 504 517 return result; 505 518 506 519 } 507 520
Note:
See TracChangeset
for help on using the changeset viewer.