You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Paul Solomon <pa...@clearboxsystems.com.au> on 2008/08/05 15:43:13 UTC
Bugfix
Hi All,
What is the best way to submit bugfixes? I have found one so far working with batik in the following file. The fix is below
org.apache.batik.util.PreferenceManager
public Point getPoint(String key)
{
Point defaultValue = (Point)getDefault(key);
String sp = internal.getProperty(key);
if (sp == null) {
return defaultValue;
}
Point result = new Point();
try {
int x, y;
String token;
StringTokenizer st = new StringTokenizer(sp," ", false);
if (!st.hasMoreTokens()) {
// the value is not correctly formated => remove it
internal.remove(key);
return defaultValue;
}
token = st.nextToken();
x = Integer.parseInt(token);
if (!st.hasMoreTokens()) {
internal.remove(key);
return defaultValue;
}
token = st.nextToken();
y = Integer.parseInt(token);
// ------------- BUG ----- These 4 lines should be removed
// if (!st.hasMoreTokens()) {
// internal.remove(key);
// return defaultValue;
// }
result.setLocation(x,y);
return result;
} catch (NumberFormatException e) {
internal.remove(key);
return defaultValue;
}
}
Regards,
Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: Bugfix
Posted by Cameron McCormack <ca...@mcc.id.au>.
Hi Paul.
Paul Solomon:
> What is the best way to submit bugfixes? I have found one so far
> working with batik in the following file. The fix is below
Please create a bugzilla entry with the fix, so that it is not
forgotten:
https://issues.apache.org/bugzilla/enter_bug.cgi?product=Batik
Thanks,
Cameron
--
Cameron McCormack ≝ http://mcc.id.au/
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org