In terms of the mechanics of the change, this is fine.

However, there are a few details that could be improved, and some missing tests and documentation.

The typedef line you've added is indented too much - it's indented with a tab, which is equivalent to 8 spaces in the Xapian source code - as you can see above, that makes it a level too deep.  Make sure your editor is set to show a tab character as 8 spaces when working with Xapian code, or you'll end up having to fix such issues a lot.

Also, the `///` comment is a documentation comment (`/***` comments are too) - these are collated by a tool called doxygen to give our API docs - see http://xapian.org/docs/apidoc/ - but because of where you've added the typedef, the documentation comment for the enum is now attached to the typedef not the enum.

So put the typedef separately (either before of after the enum is fine) and give it its own documentation comment, explaining that it's for backward compatibility with Xapian 1.2.

We should also have some code in SmokeTest.java which actually uses the wrapped method - this means that firstly we know the bug described in the ticket is fixed, and (perhaps more importantly) means that if this bug got reintroduced in the code, we'd spot it right away because a test would fail.