Download Firefox: WindowsMac OS X
logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: cvs commit: jakarta-turbine-jcs/src/experimental/org/apache/jcs/engine/: msg#00045

Subject: Re: cvs commit: jakarta-turbine-jcs/src/experimental/org/apache/jcs/engine/memory/lru LHMLRUMemoryCache.java
Yeah, but you'd have to wrap the class rather than extend it (and class load the right version), or you'll get a LinkageError at runtime.

Aaron Smuts wrote:
You can test for the 1.4 class by name, but to use it you have to extend
it.  So, it could be built and run on an earlier jdk, but you'd need 1.4
to build the project. . . .

Aaron



-----Original Message-----
From: Daniel Rall [mailto:dlr@xxxxxxxxxx]
Sent: Thursday, April 15, 2004 3:37 PM
To: Turbine JCS Developers List
Subject: Re: cvs commit: jakarta-turbine-
jcs/src/experimental/org/apache/jcs/engine/memory/lru
LHMLRUMemoryCache.java

Aaron Smuts wrote:

I have it in the experimental for now since it requires jdk1.4.

I'm not sure what the standard jdk for projects is.

Aaron, the ASF doesn't have a "standard" JDK per say.  It's up to each
individual project to define that for itself.  Most projects support

the

earliest version of JDK reasonable for the functionality they provide,

go

with a
runtime dependency upon JRE 1.2 (I think that Ant is the only one

still

supporting JRE 1.1), with a variable compile-time dependency on JDK
version.
For instance, some classes in a project may require JDK 1.4 at

compile-

time, but
examine what's available at runtime and fall back to an alternate
implementation
(e.g. JDK LinkedHashMap vs. Jakarta Commons SequencedHashMap).

I recommend against a hard runtime dependency upon JRE 1.4, for as

much as

we'd
like to believe otherwise, there is a lot of production code out there
which is
written for and/or tested against older JREs which are unlikely to be
upgraded
any time soon.  1.2 is preferable, or 1.3 if it's too much trouble to
swing that.


Travis has a way to either use this if you are running 1.4 or to

fall

back to a commons package.  I need to make sure that fallback is ok

or

find another.

Yup, +1.


I need more tests on how this LinkedHashMap performs.  Travis is

right

that it makes the coed much cleaner, or at least there is less of us
this way.

One very small problem is that there is no way to do a quiet get

with

the LinkedHashMap.

...


<Prev in Thread] Current Thread [Next in Thread>