From: David G. <dav...@ob...> - 2006-06-08 08:38:27
|
Hi, The next release of GNU Classpath[1] will feature a Java2D implementation that allows JFreeChart[2] to run[3] out-of-the-box on Classpath. So I'm now trying to make sure that StatCVS can also run on Classpath. Recent improvements in Classpath's java.util.logging code have uncovered a portability issue in StatCVS. The LogFormatter class uses an undocumented Sun-specific class, sun.security.action.GetPropertyAction. Classes in the sun.* namespace are not provided by non-Sun runtimes, so this code ties StatCVS to one particular implementation. The following patch fixes the problem for me: diff -ru statcvs-src-clean/src/net/sf/statcvs/util/LogFormatter.java statcvs-src-mod/src/net/sf/statcvs/util/LogFormatter.java --- statcvs-src-clean/src/net/sf/statcvs/util/LogFormatter.java 2003-04-13 19:41:44.000000000 +0100 +++ statcvs-src-mod/src/net/sf/statcvs/util/LogFormatter.java 2006-06-05 14:15:21.000000000 +0100 @@ -36,9 +36,7 @@ */ public class LogFormatter extends Formatter { - private String lineSeparator = - (String) java.security.AccessController.doPrivileged( - new sun.security.action.GetPropertyAction("line.separator")); + private String lineSeparator = System.getProperty("line.separator"); /** * @see java.util.logging.Formatter#format(LogRecord) It would be really great to get this into a new release of StatCVS so that end-users can choose which runtime (Sun's, IBM's, GNU's or anyone elses) they use for running StatCVS. I'll follow this e-mail with another small patch to update StatCVS to use JFreeChart 1.0.x. Regards, Dave Gilbert [1] http://www.classpath.org/ [2] http://www.jfree.org/jfreechart/ [3] http://www.jfree.org/jfreechart/samples-gnu.html |