owlcs/owlapi — pull request #110 by sesuncedu (2014-03-19 23:25:00+00:00)
Title: Utf 8 test case problem

Utf8TestCase::testInvalidUTF8roundTrip has two errors.

1) String::getBytes is called with no arguments, which uses the default charset encoder to generate an octet stream.
With a default charset of UTF-8, this results in a valid UTF-8 octet stream.
Unfix lack of error by bytes as ISO_8859_1.

2) The call to loadOntologyFromOntologyDocument was succeeding on the valid UTF-8 stream, and hitting
the fail statement. Unfortunately, the catch block was catching Throwable, rather than Exception. Since Throwable is a superclass of the AssertionError thrown by fail, the call to fail to indicate a failure to fail was getting caught as if the method had successfully failed. (Prime Minister).

With these changes in place, the bad octet in the UTF-8 stream is detected and an exception is thrown.