ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 1447] New - SQLExce should optionaly replace properties in SQL
Date Fri, 20 Apr 2001 23:01:42 GMT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1447

*** shadow/1447	Fri Apr 20 16:01:42 2001
--- shadow/1447.tmp.11439	Fri Apr 20 16:01:42 2001
***************
*** 0 ****
--- 1,74 ----
+ +============================================================================+
+ | SQLExce should optionaly replace properties in SQL                         |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 1447                        Product: Ant                     |
+ |       Status: NEW                         Version: 1.3                     |
+ |   Resolution:                            Platform: Other                   |
+ |     Severity: Enhancement              OS/Version:                         |
+ |     Priority: Other                     Component: Core tasks              |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: ant-dev@jakarta.apache.org                                   |
+ |  Reported By: davek@prefersoft.com                                         |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ I've run into a sitution where it would be nice replace properties.
+ I've made the changes, here is the dif.
+ 
+ 77c77
+ <
+ ---
+ >
+ 163a164,168
+ > 		/**
+ > 		 * if true sql will be parsed for properties
+ > 		 */
+ > 		private boolean replaceProperties = false;
+ > 		
+ 291a297,304
+ > 		/**
+ > 		* will parse sql text for properties ${name} if true.<BR>
+ > 		* false by default
+ > 		*/
+ > 		public void setReplaceproperties(String flag){
+ > 	
+ 	this.replaceProperties = Boolean.valueOf(flag).booleanValue();
+ > 		}
+ > 		
+ 430c443
+ <                 if (line.startsWith("//")) continue;
+ ---
+ > 	
+ 						if (line.startsWith("//")) continue;
+ 432c445
+ <                 if ( line.length() > 2 ) {
+ ---
+ > 	
+ 						if ( line.length() > 2 ) {
+ 435c448
+ <
+ ---
+ > 	
+ 						line = replaceProperties(line);
+ 543c556
+ <                 log("Processing new result set.", Project.MSG_VERBOSE);
+ ---
+ >       	        log("Processing new result set.", Project.MSG_VERBOSE);
+ 580a594,603
+ > 		/**
+ > 		 * if replaceProperties is true calls
+ > 		 * ProjectHelper.replaceProperties(project, s, project.getProperties())
+ > 		 * otherwise returns s
+ > 		 */
+ > 		protected String replaceProperties(String s){
+ > 	
+ 	if(!replaceProperties){return s;}
+ > 	
+ 	return ProjectHelper.replaceProperties(project, s, project.getProperties());
+ > 		}
+ >
+ 
+ -Peace
+ Dave

Mime
View raw message