felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall" <he...@ungoverned.org>
Subject Re: [jira] Updated: (FELIX-26) Improve native library matching algorithm
Date Wed, 30 Aug 2006 13:01:20 GMT
Arnaud Quiblier wrote:
> The 'normalizeOSVersion(...)' is only used to normalize the version of 
> the
> underlying OS, which you get back reading the value of jvm property '
> os.version'. But the standardized org.osgi.framework.Version can only 
> parse
> version like major.minor.micro.qualifier, where all but qualifier are 
> int,
> and qualifier is text. In other words, I can't call parseVersion(), 
> cause it
> won't compute the given example 2.4.2-kwt.
>
> So what should I do :

Just assume <w>.<x>.<y><z> pattern and stop parsing as soon as it
fails 
and return what you have. This should be fine for now.

> - What should I return if I can't parse Version ? null, emptyVersion 
> and /
> or Exception ?

We can try emptyVersion for now.

> - To pase the version, I need of course to know the separator between 
> parts
> of version. The "." used in Version.parseVersion() is declared as 
> "constant"
> but is not visible ? Should I change it, add a new value to 
> FelixConstants,
> only use a local definition for separator ? (it's a matter of maintenance
> and evolution)

Declare it locally for now.

> 2/ modify org.osgi.framework.Version in order to parse this kind of 
> Version.
> I can easily change the parser, but now I can't read the parsed 
> version as
> String without qualifier. So I think that I would be doomed to modify the
> API of Version, and that's surely unwanted.

I wouldn't recommend it.

-> richard

Mime
View raw message