Clone this wiki locally
This page describes the effort toward a JDOM 2.0. The purpose of JDOM 2.0 is to make use of features introduced in Java 5, such as generics. Unfortunately the generics changes will break binary backward compatibility so we're moving to a new version as well as a new package name: org.jdom2. People who want to use the JDOM 1.1.x branch can continue to do so, but people who want the modern features can use JDOM 2.0. The same program can even mix and match. Yes there's downsides ((http://markmail.org/message/avsyrgfii7z3u6m5) but it's probably worth it.
How much backward compatibility will we break? Only what's necessary. We may maintain source code compatibility so all a programmer will need to do is update their package imports and recompile their project. But if we decide as a group that some changes are so advantageous they're worth requiring code edits, we'll do it.
We'll do the work on GitHub because it simplifies the task of doing experimental branches. I expect a lot of discussion about whether a certain change is worthwhile or not, and GitHub makes it easy to discuss code not just ideas. The JDOM mailing lists will host the discussion. You can also watch for updates on Twitter from @jdomproject and @jdomcommits.
Possible JDOM 2.0 improvements (each should probably get a wiki page):
- Support for generics, varargs, enums, covariant return types
- Change JDOM's TextBuffer to StringBuilder
- Examine whether Document should be a Content, or a Node, or what
- Examine if the Collection API rules match what's best (set() method on Collections are not supposed to impact Concurrent Modification)
- Remove code that's in the default package
- Switch out CVS_ID to probably an annotation
- Look at XPath 2.0 support
- Look at StAX support, such as a StAXOutputter
- Michael Kay's suggestion for XPath 2.0 http://markmail.org/message/hvrthg7r647sldrb
- Remove code that checks for JAXP version http://markmail.org/message/q3sjsvnk3igf5cip
- Checks adds before an error occurs http://markmail.org/message/q3sjsvnk3igf5cip
- Reduce compiler warnings for Java 5 features http://markmail.org/message/332lmgoiyjpbqfnm
- Generic return types http://markmail.org/message/332lmgoiyjpbqfnm
- A builder and outputter for JDOM 1.x classes, for people who need to convert
- Investigate a Maven distribution:- Mail Reference and Wiki Page
People who have volunteered to be heavily involved in the project:
- Jason Hunter (project owner)
- Rolf Lear (See http://markmail.org/message/e2ljuk56mz337fqj for what he's done before on this subject)
- (Mail the list if you want to be added here)
- Migrate the code from CVS to GitHub (keeping all the history). DONE - see SOURCE and for the procedure see CVS to Git
- Create a branch for 2.0 DONE - see Source Branches and JDOM2
- Do the basic package renames. DONE - code is 'rebased' to org.jdom2 and the AllTests junit suite runs. See Commit
- Fix the test case that's currently failing (test_TCM__void_setExpandEntities_boolean) DONE - this was pobably not broken. Probably because I used JUnit 4 when I reported the failure.
- Upgrade the JUnit libraries and tests - DONE All tests using JUnit4 structures now.
- Use Emma to build up the JUnit test cases to get much better coverage of the junit tests on JDOM (currently have only got 40% coverage of the org.junit code from the JUnit test cases....). Fix any issues that arise in untested code. DONE - Using Cobertura instead of Emma
- Modify the core code and the test harness together to implement the changes - document what changes are made so that we can get a list of rules for migration from JDOM 1 to JDOM 2. IN PROGRESS
- Confirm any deviations from 'compatibility' with the jdom-interest list to ensure that all changes are reasonable.
- Complete the migration, ensure all JavaDoc is complete. All Tests are run, and code test coverage is 'complete'.