http://nagoya.apache.org/bugzilla/show_bug.cgi?id=904
*** shadow/904 Mon Mar 12 05:32:47 2001
--- shadow/904.tmp.28987 Mon Mar 12 05:58:46 2001
***************
*** 52,55 ****
block. getProperty will only return String-values, and will also search any
defaults that the Properties block has, which is another important Properties
feature. (Note: I have not looked at the surrounding code much, so I don't
! actually know if you want this - just wanted to point it out)
--- 52,96 ----
block. getProperty will only return String-values, and will also search any
defaults that the Properties block has, which is another important Properties
feature. (Note: I have not looked at the surrounding code much, so I don't
! actually know if you want this - just wanted to point it out)
!
! ------- Additional Comments From [EMAIL PROTECTED] 2001-03-12 05:58 -------
! (I used reply to send my answer, but that didn't show up anywhere, so I'm
trying
! out the form now...)
!
! we're using ant from within our ArcStyler IDE in-process. Inside our IDE,
we're
! using the system properties to transport context information between classes
! that run within different class loaders. As an example, we're writing things
! like
!
! ----------------------------------
! System.getProperties().put("myKey", new Integer(3));
! ----------------------------------
!
! This appears to be completely legal regarding the JDK. The getProperty()
method
! implemented in the JDK simply ignores non-string values:
! ----------------------------------
! public String getProperty(String key) {
! Object oval = super.get(key);
! String sval = (oval instanceof String) ? (String)oval : null;
! return ((sval == null) && (defaults != null)) ? defaults.getProperty(key) :
! sval;
! }
! ----------------------------------
!
! This might be feasible for ant, too. Or, ant may use a toString() on the
! objects. Both make sense in some situations. However, the current behaviour
of
! ant is that it throws a class cast exception, which shouldn't be.
!
! If you decide to interpret the semantics of the Properties class in a strict
! way, I would suggest writing
!
! ----------------------------------
! String value = systemP.getProperty(name);
! ----------------------------------
!
! instead of
!
! ----------------------------------
! String value = (String) systemP.get(name);
! ----------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]