On Monday 15 November 2004 13:47, Bernhard Messer wrote:


Hi,

since the last changes in lucene, we are not longer backward compatible
with jdk 1.3. All the pure guys, running IBM WebSphere 4.x with IBM JDK
1.3, lost their chances to run lucene newer than version 1.4.2.
Especially in huge companies, where it is not so trivial to upgrade to a
new java version, this could reduce the acceptance for lucene

There are two major reasons for loosing the compatibility:


...


- several code parts like:
   ...
   catch (ClassNotFoundException e) {
     throw new RuntimeException(e);
   }
   ...
;-) The second problem could be solved easily using the string constructor
in java.lang.RuntimeException which is available since 1.0.
At least we have to document it somehow. There is a chapter "What are
Lucene system requirements" in the faq. Is this an ideal place to
document it.

I'd like to make the changes for being backward compatible as far as
possible. Does anybody disagree ?



It is also possible to solve this second problem in a way that both allows Lucene code to use proper Exception nesting, if available (running on 1.4+), and omit it if not (1.3). This can be done using bit of Reflection.


The reason this is sometimes useful is that knowledge about nested exception is very useful for debugging; especially line numbers.
(in my case I use it to keep Woodstox XML-parser 1.2 compatible, while using LinkedHashMap, and nested exceptions, if possible)


The solution is not a one-liner though (if someone is interested, let me know and I can point you to the source code), so maybe it's easier to just "dumb it down" to using String constructor. But I just thought I'll mention that it can be completely resolved if it seems worthwhile. :-)


you're right, i like the idea creating a nested exception. For the particular case, it would be enough to create a NestedRuntimeException which works under both JVM's.

bernhard

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






Reply via email to