Bug 116514 - support building against IBM JDK
Summary: support building against IBM JDK
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Mik Kersten CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2005-11-15 16:29 EST by Igor Fedorenko CLA
Modified: 2006-03-04 10:23 EST (History)
2 users (show)

See Also:


Attachments
Partial attempt to move to java.util.regex.Pattern (14.87 KB, text/plain)
2005-12-16 19:10 EST, Mik Kersten CLA
no flags Details
Partial attempt to move to java.util.regex.Pattern (14.87 KB, text/plain)
2005-12-16 19:10 EST, Mik Kersten CLA
no flags Details
Functional java.util.regex patch (10.73 KB, patch)
2006-02-28 11:42 EST, Ian Whalley CLA
no flags Details | Diff
Improved patch (10.76 KB, patch)
2006-02-28 14:58 EST, Ian Whalley CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Fedorenko CLA 2005-11-15 16:29:43 EST
BugzillaSearchEngine and related tests use SUN JDK specific
com.sun.org.apache.xerces... classes and do not compile using IBM JDK.
Comment 1 Mik Kersten CLA 2005-11-15 17:06:39 EST
Was that the only compile problem that you saw?  I should be able to fix it by moving
to java.util.regex.
Comment 2 Igor Fedorenko CLA 2005-11-15 17:12:45 EST
Yes, this was the only problem.
Comment 3 Mik Kersten CLA 2005-12-16 19:10:39 EST
Created attachment 31895 [details]
Partial attempt to move to java.util.regex.Pattern
Comment 4 Mik Kersten CLA 2005-12-16 19:10:43 EST
Created attachment 31896 [details]
Partial attempt to move to java.util.regex.Pattern
Comment 5 Mik Kersten CLA 2005-12-16 19:14:50 EST
(please ignore the double attachement, I accidentally hit submit twice)

I spent a little time trying to move to the java.util.regex package but there are a few differences and grossly insufficient test coverage here so it would be too distabailizing to do right now.  Unfortuantely the tests pass with the attached partial move but queries fail, which means the first thing that needs to happen is increased test coverage (since this code is manually verified to work with 2.16, 2.18, and 2.20).  Marking as helpwanted in case there are any regex gurus out there interested in tackling this one.
Comment 6 Ian Whalley CLA 2006-02-28 11:42:31 EST
Created attachment 35478 [details]
Functional java.util.regex patch

Support for the IBM JDK is important for my day job, so I am providing here an
updated version of Mik's proto-patch from comment 3 and comment 4.

This removes references to internal Sun-only classes from BugzillaSearchEngine
and RegularExpressionMatchTest.  I have tested the changes under IBM and Sun
JDKs(5.0.0), and against Bugzilla repositories of versions 2.20 and 2.18.  I
couldn't find a 2.16 against which to test.

I am (coupled with my fix in bug 129459) now able to access Bugzilla
repositories from Mylar in Eclipse 3.2M5 running from IBM JDK 5.0.0 without
problems.
Comment 7 Ian Whalley CLA 2006-02-28 13:11:17 EST
The change in visibility of 'RegularExpression re' from protected to public is no longer necessary -- my apologies.  It should still be protected.
Comment 8 Ian Whalley CLA 2006-02-28 14:58:26 EST
Created attachment 35491 [details]
Improved patch

This version fixes the protected/public oversight mentioned in comment 7,
and also fixes a problem with a customised 2.16 Bugzilla that I've been
trying to access.

It does not cause Mylar to be able to access that 2.16 Bugzilla, but it
does restore the behaviour of the unpatched version.  Specifically, moving
the 'matcher = null' assignment inside the 'do...while' fixes a potential
IllegalStateException.
Comment 9 Mik Kersten CLA 2006-03-02 12:47:04 EST
Thanks for these patches Ian!  We now have additional unit tests that cover the supported versions of Bugzilla, so I plan on applying them today.
Comment 10 Ian Whalley CLA 2006-03-02 13:02:03 EST
You're most welcome.  It's purely enlightened self-interest :).

I tried to do patches to get it working with the internal 2.16 Bugzilla that I
mentioned (a different internal Bugzilla than the one mentioned in bug 129459),
but I found it too difficult to ensure that I wasn't breaking anything.  Are
we even sure that the 2.16 Bugzilla integration works?!  I can only find this one
internal repository, and it does appear to have been customised in some way.
Perhaps the improved tests to which you refer will enable me to be more sure.

I also attempted a patch to make the Bugzilla version configuration
per-repository instead of system wide (couldn't find a bug for that), but
got hopelessly tangled up.  I'm not a UI person :).
Comment 11 Mik Kersten CLA 2006-03-02 15:48:32 EST
I applied the patch, and this looks great Ian, and is a valuable contribution since this has been lingering.  Self-interest is always the best motivator, and we woudn't get anywhere if we didn't use Mylar ourselves :)  

Coincidentally we just fixed bug 123813, and bugzilla versions are now specified per-repository.  So that's all set, and I don't blame you for punting on that patch because it was disruptive due to the weak architecture that's still dominant in the bugzilla stuff (we've been continually hardening an initial prototype that we inherited).  

Regarding 2.16, our new test harness will allow us to write search test against each live repository.  This is bug 130217, and once that's done (probably today), it would be great if you could verify that HEAD works for everything you need (and submit more patches if it doesn't ;)
Comment 12 Ian Whalley CLA 2006-03-04 10:23:34 EST
Verified as fixed in the 2006-03-03 builds.