diff --git a/WHATSNEW b/WHATSNEW index 9cfed43b9..fd82f060d 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -195,7 +195,11 @@ Fixed bugs: * 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: -------------- diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnlock.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnlock.java index 70856e3a2..c6e4c2ea2 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnlock.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnlock.java @@ -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(); } }