On Thu, 29 Nov 2001 14:08, Erik Hatcher wrote:
> Well, here it is, the patch I worked myself into by bringing up the
> immutability issues.

excellent - just applied!

> I would love to add <available> to this patch - just say the word!  :)
>
> The warning messages probably aren't as big and bold as Peter had
> requested, so feel free to modify them to your liking.

3 line annoyances done!

> Not that much code changed, and my test cases should exercise things
> reasonably.

almost. You missed a case. When <antcall/> uses propertys internally it will 
display a warning when it shouldn't. I have reattached your test file with a 
small demo and you test it by running test8

Im not sure what the best way to fix this is. What do you think?

As soon as you figure out a way around this I will apply and that will get 
rid of all those pesky deprecation warnings that now appear in ants own build 
file ;)

> I think I've taken care of all the tasks that we mentioned - and because
> setProperty was modified to issue a warning when a property override
> occurs, the tasks that still call setProperty (like <junit>) will get that
> message when overriding a property (but not otherwise).

kool.

> I'll go back and check all the e-mails on this topic tomorrow to make sure
> all the bases have been covered.  The one loose end is that getProperties
> and getUserProperties return back the actual Hashtable object - so to close
> that hole we need to make it return a copy instead.  Anyone object to that
> copy being made and returned?

+1 to copy ... is there an actual use case for grabbing all properties 
anyways?


BTW could you name your patches something more specific (like 
immutability.patch) - I got so many patchfile.txts it is not funny ;)

BTW2 would you consider making immutability.xml part of a Junit testcase ? ;)

BTW3 would you mind sending apatch for WHATSNEW to describe these features

BTW4 maybe even add a FAQ entry because I am sure the new warnings are bound 
to cause a few quesions ;) 

-- 
Cheers,

Pete

----------------------------------------
"Liberty means responsibility. That is 
      why most men dread it." - Locke
----------------------------------------


<?xml version="1.0"?>

<project name="available-test" basedir="." default="test1">

  <target name="test1">
    <property name="test" value="original"/>
    <available file="immutable.xml" property="test" value="override"/>
  </target>
  
  <target name="test2">
    <tstamp/>
    <tstamp prefix="start"/>
  </target>

  <target name="test3">
    <property name="DSTAMP" value="original"/>
    <tstamp/>
  </target>

  <target name="test4">
    <property name="test" value="original"/>
    <condition property="test" value="override">
      <equals arg1="1" arg2="1"/>
    </condition>
  </target>

  <target name="test5">
    <property name="test" value="original"/>
    <checksum file="immutable.xml" verifyProperty="test"/>
  </target>
  
  <target name="test6">
    <property name="test1" value="original"/>
    <property name="test2" value="original"/>
    <!--  How to make this cross-platform? -->
    <exec executable="cmd.exe" os="Windows 2000" outputproperty="test1" resultProperty="test2">
      <arg line="/c dir"/>
    </exec>
  </target>

  <target name="test7">
    <property name="test" value="original"/>
    <pathconvert targetos="unix" property="test" >
      <path>
        <pathelement location="/lib/weblogicaux.jar" />
        <pathelement location="/classes" />
        <pathelement location="/mssqlserver4/classes" />
        <pathelement location="c:\winnt\System32" />
      </path>
    </pathconvert>
  </target>

  <target name="test8">
    <antcall inheritAll="false" target="echo-target">
      <param name="echo.value" value="Meep meep!" />
    </antcall>
  </target>

  <target name="echo-target">
    <echo message="Value of echo=${echo.value}"/>
  </target>

</project>
--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to