deweese 2003/11/02 10:18:26 Modified: lib pdf-transcoder.jar sources/org/apache/batik/bridge ScriptingEnvironment.java sources/org/apache/batik/swing/svg JSVGComponent.java Log: 1) Fixed potential race condition in the JSVGComponent for setSVGDocument. 2) Fixed potential race condition in Timers. 3) PDF Transcoder now uses 72dpi for it's Useragent (As this is what the PDF Graphics2D is setup to handle). Revision Changes Path 1.3 +328 -310 xml-batik/lib/pdf-transcoder.jar <<Binary file>> 1.43 +8 -2 xml-batik/sources/org/apache/batik/bridge/ScriptingEnvironment.java Index: ScriptingEnvironment.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/ScriptingEnvironment.java,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- ScriptingEnvironment.java 14 Aug 2003 00:53:51 -0000 1.42 +++ ScriptingEnvironment.java 2 Nov 2003 18:18:26 -0000 1.43 @@ -744,7 +744,13 @@ return; } eir.count++; - updateRunnableQueue.invokeLater(eir); + synchronized (updateRunnableQueue.getIteratorLock()) { + if (updateRunnableQueue.getThread() == null) { + cancel(); + return; + } + updateRunnableQueue.invokeLater(eir); + } if (eir.error) { cancel(); } 1.87 +14 -22 xml-batik/sources/org/apache/batik/swing/svg/JSVGComponent.java Index: JSVGComponent.java =================================================================== RCS file: /home/cvs/xml-batik/sources/org/apache/batik/swing/svg/JSVGComponent.java,v retrieving revision 1.86 retrieving revision 1.87 diff -u -r1.86 -r1.87 --- JSVGComponent.java 31 Oct 2003 22:39:42 -0000 1.86 +++ JSVGComponent.java 2 Nov 2003 18:18:26 -0000 1.87 @@ -84,6 +84,7 @@ import org.apache.batik.bridge.RelaxedExternalResourceSecurity; import org.apache.batik.bridge.ScriptSecurity; import org.apache.batik.bridge.UpdateManager; +import org.apache.batik.bridge.UpdateManagerAdapter; import org.apache.batik.bridge.UpdateManagerEvent; import org.apache.batik.bridge.UpdateManagerListener; import org.apache.batik.bridge.UserAgent; @@ -651,26 +652,18 @@ // We have to wait for the update manager to stop // before we install the new document otherwise bad // things can happen with the update manager. - updateManager.addUpdateManagerListener - (new UpdateManagerListener () { - UpdateManager um = updateManager; - public void managerStopped(UpdateManagerEvent e) { - // Remove ourselves from the old update manger, - // and install the new document. - um.removeUpdateManagerListener(this); - synchronized (JSVGComponent.this) { - EventQueue.invokeLater(afterStopRunnable); - afterStopRunnable = null; - } + addUpdateManagerListener(new UpdateManagerAdapter () { + UpdateManager um = updateManager; + public void managerStopped(UpdateManagerEvent e) { + // Remove ourselves from the old update manger, + // and install the new document. + um.removeUpdateManagerListener(this); + synchronized (JSVGComponent.this) { + EventQueue.invokeLater(afterStopRunnable); + afterStopRunnable = null; } - // There really should be an updateManagerAdapter. - public void managerStarted(UpdateManagerEvent e) { } - public void managerSuspended(UpdateManagerEvent e) { } - public void managerResumed(UpdateManagerEvent e) { } - public void updateStarted(UpdateManagerEvent e) { } - public void updateCompleted(UpdateManagerEvent e) { } - public void updateFailed(UpdateManagerEvent e) { } - }); + } + }); stopProcessing(); } else if (nextUpdateManager != null) { // We have to wait for the rendering to stop @@ -723,9 +716,8 @@ } else { stopProcessing(); synchronized (this) { - Runnable asr = afterStopRunnable; + EventQueue.invokeLater(afterStopRunnable); afterStopRunnable = null; - asr.run(); } } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]