Browse Source

apparently benign but untestable fix for PR 37766.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@393317 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 19 years ago
parent
commit
6d9a069231
2 changed files with 15 additions and 14 deletions
  1. +5
    -1
      WHATSNEW
  2. +10
    -13
      src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnlock.java

+ 5
- 1
WHATSNEW View File

@@ -195,7 +195,11 @@ Fixed bugs:

* <available> could leak resources, Bugzilla Report 38260.

* redirector called Thread.sleep in a synchronized method. Bugzilla report 37767.
* Redirector called Thread.sleep in a synchronized block. Bugzilla report 37767.

* CCUnlock's objselect attribute could exhibit unpredictable behavior;
standardized improperly included objselect and objsel property accessors to
delegate to the inherited objSelect property accessor. Bugzilla report 37766.

Other changes:
--------------


+ 10
- 13
src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnlock.java View File

@@ -1,5 +1,5 @@
/*
* Copyright 2003-2004 The Apache Software Foundation
* Copyright 2003-2004, 2006 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,7 +27,6 @@ import org.apache.tools.ant.types.Commandline;
* comment field doesn't include all options yet
*/


/**
* Performs a ClearCase Unlock command.
*
@@ -70,7 +69,6 @@ import org.apache.tools.ant.types.Commandline;
public class CCUnlock extends ClearCase {
private String mComment = null;
private String mPname = null;
private String mObjselect = null;

/**
* Executes the task.
@@ -115,20 +113,20 @@ public class CCUnlock extends ClearCase {
/**
* Check the command line options.
*/
private void checkOptions(Commandline cmd) {
private void checkOptions(Commandline cmd) {
// ClearCase items
getCommentCommand(cmd);

if (getObjselect() == null && getPname() == null) {
if (getObjSelect() == null && getPname() == null) {
throw new BuildException("Should select either an element "
+ "(pname) or an object (objselect)");
}
getPnameCommand(cmd);
// object selector
if (getObjselect() != null) {
cmd.createArgument().setValue(getObjselect());
if (getObjSelect() != null) {
cmd.createArgument().setValue(getObjSelect());
}
}
}

/**
* Sets how comments should be written
@@ -173,7 +171,7 @@ private void checkOptions(Commandline cmd) {
* @param objselect objects to be locked
*/
public void setObjselect(String objselect) {
mObjselect = objselect;
setObjSelect(objselect);
}

/**
@@ -183,7 +181,7 @@ private void checkOptions(Commandline cmd) {
* @since ant 1.6.1
*/
public void setObjSel(String objsel) {
mObjselect = objsel;
setObjSelect(objsel);
}

/**
@@ -192,10 +190,9 @@ private void checkOptions(Commandline cmd) {
* @return String containing the objects to be locked
*/
public String getObjselect() {
return mObjselect;
return getObjSelect();
}


/**
* Get the 'comment' command
*
@@ -246,7 +243,7 @@ private void checkOptions(Commandline cmd) {
if (getPname() != null) {
return getPname();
} else {
return getObjselect();
return getObjSelect();
}
}



Loading…
Cancel
Save