Hi Stefan,
I guess that first and foremost it's about what works--and if there are
non-edgecase situations where a static method won't do the trick, it won't
make sense to go that way.
There are other reasons for preferring the status quo too: If we moved the
Version class in line with this proposed standard (which never did get much
support, IIRC), then it becomes difficult for people to tell which Xerces
comes first on their classpaths if two happen to be there and they have
different Version conventions.
So we're probably stuck for the time being...
Cheers,
Neil
Neil Graham
XML Parser Development
IBM Toronto Lab
Phone: 905-413-3519, T/L 969-3519
E-mail: [EMAIL PROTECTED]
|---------+---------------------------->
| | "Stefan Geelen" |
| | <stefan.geelen@xe|
| | ntri.com> |
| | |
| | 09/04/2002 03:53 |
| | PM |
| | Please respond to|
| | xerces-j-dev |
| | |
|---------+---------------------------->
>---------------------------------------------------------------------------------------------------------------------------------------------|
|
|
| To: <[EMAIL PROTECTED]>
|
| cc:
|
| Subject: Re: org.apache.xerces.impl.Version.getVersion() should be static ?
|
|
|
|
|
>---------------------------------------------------------------------------------------------------------------------------------------------|
OK,
but what about (from the Xalan javadoc api org.apache.xalan.Version):
'This class implements the --> upcoming standard of having
org.apache.project-name.Version.getVersion() be a standard way to get
version information <-- ???? . '
What will be the standard ? A static or non-static class ?
I prefer the non-static method (much more easy to call).
Stefan
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 04, 2002 9:43 PM
Subject: Re: org.apache.xerces.impl.Version.getVersion() should be static ?
> I wrote:
>
> > Yes, this sure makes sense to me. Wonder why I didn't do that in the >
> first place...
>
> Ah; now I think I recall. If getVersion is static, then the compiler can
> convert a check like:
>
> if(Version.getVersion().equals("Xerces 2.0.2")) {
> // take account of some bug
> }
>
> into a compile-time check, not a run-time check as would be desired. The
> only way to get around this is by making getVersion a dynamic method.
>
> Does that make sense?
>
> Cheers,
> Neil
> Neil Graham
> XML Parser Development
> IBM Toronto Lab
> Phone: 905-413-3519, T/L 969-3519
> E-mail: [EMAIL PROTECTED]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]