Clojure

java.io/do-copy can still garble multibyte characters on IBM JDK 1.5 and 1.6

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Declined
  • Affects Version/s: Release 1.2, Release 1.3, Release 1.4
  • Fix Version/s: Release 1.5
  • Component/s: None
  • Labels:
    None
  • Environment:
    At least Linux + IBM JDK 1.5, and Linux + IBM JDK 1.6
  • Patch:
    Code and Test

Description

Same issue as CLJ-886, but while the patch applied for that issue fixes the problem for many OS/JDK combos, there appear to be differences in how surrogate pair characters are handled in some OS/JDK combos. In particular, at least Linux + IBM JDK 1.5 and Linux + IBM JDK 1.6 still fail the tests checked in for do-copy.

Activity

Hide
Andy Fingerhut added a comment -

clj-886-improved-fix-for-ibm-jdks-patch2.txt dated Apr 7 2012 makes the tests pass with Linux + IBM JDK 1.5, as well as these other combos tested:

Linux + Oracle JDK 1.7
Linux + IBM JDK 1.5
Mac OS X 10.6.8 + Oracle/Apple JDK 1.6

There are still failing tests for Linux + IBM JDK 1.6. This patch currently skips the failing tests whenever the java.vendor is "IBM Corporation" and java.version is "1.6.0", so that "ant" succeeds. It is easy enough to modify the patch so that the failing tests are kept as a bright shining reminder. Let me know if that would be preferred – it just involves removing the function ibm-jdk16, and simplifying where it is called after replacing it with false.

Show
Andy Fingerhut added a comment - clj-886-improved-fix-for-ibm-jdks-patch2.txt dated Apr 7 2012 makes the tests pass with Linux + IBM JDK 1.5, as well as these other combos tested: Linux + Oracle JDK 1.7 Linux + IBM JDK 1.5 Mac OS X 10.6.8 + Oracle/Apple JDK 1.6 There are still failing tests for Linux + IBM JDK 1.6. This patch currently skips the failing tests whenever the java.vendor is "IBM Corporation" and java.version is "1.6.0", so that "ant" succeeds. It is easy enough to modify the patch so that the failing tests are kept as a bright shining reminder. Let me know if that would be preferred – it just involves removing the function ibm-jdk16, and simplifying where it is called after replacing it with false.
Hide
Stuart Halloway added a comment -

Not sure if we should be in the business of building JDK-specific workarounds into our IO library, but marking this as screened.

Option B is to leave the code as-is and only disable the tests. Rich?

Show
Stuart Halloway added a comment - Not sure if we should be in the business of building JDK-specific workarounds into our IO library, but marking this as screened. Option B is to leave the code as-is and only disable the tests. Rich?
Hide
Rich Hickey added a comment -

Please disable the tests. We shouldn't be doing such workarounds.

Show
Rich Hickey added a comment - Please disable the tests. We shouldn't be doing such workarounds.
Hide
Andy Fingerhut added a comment -

clj-967-disable-failing-io-copy-tests-on-ibm-jdk-16-patch1.txt dated May 19, 2012 disables tests of clojure.java.io/copy that fail with IBM JDK 1.6.0. It makes minor changes to the clojure.java.io code file, but these are only to eliminate uses of reflection, and to make a few of the versions of do-copy share more of their implementation code.

Tested that all results are good on Mac OS X 10.6.8 + Oracle/Apple JDK 1.6.0 and Ubuntu 11.10 + Oracle JDK 1.7.0, including that the number of tests run are identical to before this patch. Only 2 tests are disabled on IBM JDK 1.6.0, and all of the rest pass before and after these changes.

Show
Andy Fingerhut added a comment - clj-967-disable-failing-io-copy-tests-on-ibm-jdk-16-patch1.txt dated May 19, 2012 disables tests of clojure.java.io/copy that fail with IBM JDK 1.6.0. It makes minor changes to the clojure.java.io code file, but these are only to eliminate uses of reflection, and to make a few of the versions of do-copy share more of their implementation code. Tested that all results are good on Mac OS X 10.6.8 + Oracle/Apple JDK 1.6.0 and Ubuntu 11.10 + Oracle JDK 1.7.0, including that the number of tests run are identical to before this patch. Only 2 tests are disabled on IBM JDK 1.6.0, and all of the rest pass before and after these changes.
Hide
Andy Fingerhut added a comment -

Hoping that I'm not out of line changing approval from Incomplete to None after attaching a patch that should address the reason it was marked incomplete. The only other way to get a ticket out of Incomplete state is for a core team member to do it for me, which seems like busy-work.

Show
Andy Fingerhut added a comment - Hoping that I'm not out of line changing approval from Incomplete to None after attaching a patch that should address the reason it was marked incomplete. The only other way to get a ticket out of Incomplete state is for a core team member to do it for me, which seems like busy-work.
Hide
Andy Fingerhut added a comment -

Any comments from Rich or other screeners on the status of this one? Just curious, since it seemed to have been screened, and then quietly tossed back into the unscreened pile. Is it considered undesirable to disable selected tests for a particular JDK as the patch clj-967-disable-failing-io-copy-tests-on-ibm-jdk-16-patch1.txt does? My motivation was to selectively disable only the tests that fail, and only on the JDK where they fail, leaving all passing tests to continue to run wherever possible.

Show
Andy Fingerhut added a comment - Any comments from Rich or other screeners on the status of this one? Just curious, since it seemed to have been screened, and then quietly tossed back into the unscreened pile. Is it considered undesirable to disable selected tests for a particular JDK as the patch clj-967-disable-failing-io-copy-tests-on-ibm-jdk-16-patch1.txt does? My motivation was to selectively disable only the tests that fail, and only on the JDK where they fail, leaving all passing tests to continue to run wherever possible.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: