xmlgraphics-batik-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 45572] New: PreferenceManager gerPoint always returns default value
Date Wed, 06 Aug 2008 02:14:32 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=45572

           Summary: PreferenceManager gerPoint always returns default value
           Product: Batik
           Version: 1.7
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Utilities
        AssignedTo: batik-dev@xmlgraphics.apache.org
        ReportedBy: pauls@clearboxsystems.com.au


There is a bug in the org.apache.batik.util.PreferenceManager where the
function public Point getPoint(String key) always returns the default value for
a given key.

This is due to what looks like a simple cut and paste error in the code, and
can be resolved by removing the 4 marked lines in the code snippet below.

x = Integer.parseInt(token);
if (!st.hasMoreTokens()) {
  internal.remove(key);
  return defaultValue;
}
token = st.nextToken();
y = Integer.parseInt(token);
-- if (!st.hasMoreTokens()) {
--   internal.remove(key);
--   return defaultValue;
-- }
result.setLocation(x,y);
return result;


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org


Mime
View raw message