Ticket #787: openmrs-787.patch
| File openmrs-787.patch, 1.5 kB (added by upul, 2 years ago) |
|---|
-
src/web/org/openmrs/web/taglib/fieldgen/FieldGenHandlerFactory.java
old new 28 28 private Map<String,String> handlers = null; 29 29 30 30 private static FieldGenHandlerFactory singleton; 31 31 32 32 /** 33 33 * Generic constructor 34 34 */ 35 35 public FieldGenHandlerFactory() { 36 singleton = this; 36 if (singleton == null) 37 singleton = this; 37 38 } 38 39 39 40 /** … … 52 53 * @return Returns the handlers. 53 54 */ 54 55 public Map<String,String> getHandlers() { 55 return handlers;56 return singleton.handlers; 56 57 } 57 58 58 59 /** … … 61 62 * @param handlers The handlers to set. 62 63 */ 63 64 public void setHandlers(Map<String,String> handlers) { 64 if ( this.handlers == null)65 this.handlers = handlers;65 if (singleton.handlers == null) 66 singleton.handlers = handlers; 66 67 else 67 this.handlers.putAll(handlers);68 singleton.handlers.putAll(handlers); 68 69 } 69 70 70 71 /** … … 75 76 */ 76 77 public String getHandlerByClassName(String className) { 77 78 if ( className != null ) { 78 if ( handlers.containsKey(className) ) {79 return handlers.get(className);79 if ( singleton.handlers.containsKey(className) ) { 80 return singleton.handlers.get(className); 80 81 } else { 81 82 return null; 82 83 }
Download in other formats:
Powered by Trac 0.10.5
By Edgewall Software.
Visit the Trac open source project at
http://trac.edgewall.com/