Method.java (toString): Avoid extra whitespace on method with no modifiers.

* java/lang/reflect/Method.java (toString): Avoid extra whitespace
	on method with no modifiers.

From-SVN: r72919
This commit is contained in:
Bryce McKinlay 2003-10-25 06:55:21 +00:00 committed by Bryce McKinlay
parent a10fd35601
commit 8822f4aaf9
2 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2003-10-25 Bryce McKinlay <bryce@mckinlay.net.nz>
* java/lang/reflect/Method.java (toString): Avoid extra whitespace
on method with no modifiers.
2003-10-25 Bryce McKinlay <bryce@mckinlay.net.nz>
PR libgcj/11780:

View File

@ -163,8 +163,12 @@ public final class Method extends AccessibleObject implements Member
getType ();
StringBuffer b = new StringBuffer ();
Modifier.toString(getModifiers(), b);
b.append(" ");
int mods = getModifiers();
if (mods != 0)
{
Modifier.toString(mods, b);
b.append(" ");
}
appendClassName (b, return_type);
b.append(" ");
appendClassName (b, declaringClass);