Hi SVN developers,
First, there are 2 classes of NativeException, one in
org.tigris.subversion.javahl package, the other in
org.apache.subversion.javahl package. They only slightly differ in a
constructor parameter. I recommend to use one class with 2 constructors
instead.
Second, the getMessage() method might throw a NullPointerException in
the StringBuffer constructor if the NativeException was created with a
null message (happened for a user's bug report).
Third, the usage of StringBuffer is discouraged in favor of StringBuilder.
I recommend to change the code for NativeException from
public String getMessage()
{
StringBuffer msg = new StringBuffer(super.getMessage());
to
public String getMessage()
{
StringBuilder msg = new StringBuilder();
String message = super.getMessage();
if (message != null) {
msg.append(message);
}
--
Best regards,
Thomas Singer
=============
syntevo GmbH
www.syntevo.com