Changeset 16691 for release-kits
- Timestamp:
- 2008-08-09T12:00:33+12:00 (16 years ago)
- Location:
- release-kits/shared/ant/src/main/org/apache/tools/ant
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
release-kits/shared/ant/src/main/org/apache/tools/ant/Task.java
r16685 r16691 359 359 360 360 //if in sim mode, dont execute tasks except antcall and tasks outside of any target 361 boolean dontExecute = 362 project.getProperty("execute") != null && project.getProperty("execute").equals( "false" ) && 363 getOwningTarget() != null && !getOwningTarget().getName().equals("") && 364 !getTaskName().equals("antcall"); 365 366 367 if ( dontExecute ) { 361 boolean execute = 362 project.getProperty("execute") == null || 363 !project.getProperty("execute").equals( "false" ) || 364 getOwningTarget() == null || 365 getOwningTarget().getName().equals("") || 366 getTaskName().equals("antcall"); 367 368 369 if ( !execute ) { 368 370 return; 369 371 } -
release-kits/shared/ant/src/main/org/apache/tools/ant/taskdefs/CallTarget.java
r16685 r16691 131 131 //check that all are true 132 132 boolean execute = shouldExecOnFrom && shouldExecuteOnDescend && shouldExecOnTo; 133 //log( "oran: address: " + address ); 134 //log( "oran: execute: " + execute); 133 135 134 136 if ( !execute ) { … … 286 288 } 287 289 290 291 //everything is after root 292 if ( y.equals("root") ) { 293 return true; 294 } 295 296 //root is after nothing 297 //(except itself, but that's already caught) 298 if ( x.equals("root") ) { 299 return false; 300 } 301 302 //infinity is after everything 303 if ( x.equals("infinity") ) 304 return true; 305 306 //nothing is after infinity 307 // (except itself, but that's already caught) 308 if ( y.equals("infinity") ) 309 return false; 310 288 311 //check that both are in the form int.int.int 289 312 … … 327 350 } 328 351 352 353 //everything decends from root 354 if ( y.equals("root") ) 355 return true; 356 357 //root descends from nothing 358 //(except itself but that's already caught) 359 if ( x.equals("root") ) 360 return false; 361 362 //infinity descends from itself 363 if ( x.equals("infinity") && y.equals("infinity") ) { 364 return true; 365 } 366 367 //nothing descends from infinity 368 //(except itself but that's already caught) 369 if ( y.equals("infinity") ) { 370 return false; 371 } 372 373 //infinity descends only from nothing 374 //(except root and itself, but that's already caught) 375 if ( x.equals("infinity") ) { 376 return false; 377 } 378 379 380 381 329 382 //check that both are in the form int.int.int 330 383 … … 359 412 } 360 413 361 public static boolean isEqualTo(String x, String y) {362 363 System.out.println( "x: " + x );364 System.out.println( "y: " + y );365 366 if ( x.equals("") || y.equals("") ) {367 throw new BuildException("Error - x or y not specified !!");368 }369 370 //check that both are in the form int.int.int371 372 //break into chambers373 String[] xs = x.split("\\.");374 String[] ys = y.split("\\.");375 376 //make sure x is exactly as deep as y377 if ( xs.length != ys.length ) {378 System.out.println("x not equal to y");379 return false;380 }381 382 //figure out n383 int n = xs.length;384 385 //step through, making sure x values are equal to y values386 for ( int i=0; i<n; i++ ) {387 int xValue = Integer.parseInt( xs[i] );388 int yValue = Integer.parseInt( ys[i] );389 390 System.out.println( xValue + " " + yValue );391 if( xValue != yValue ) {392 System.out.println("x not equal to y");393 return false;394 }395 }396 397 // if execution reaches here, first all places398 System.out.println("x is equal to y");399 return true;400 }401 402 403 414 }
Note:
See TracChangeset
for help on using the changeset viewer.