You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Bogdan <bo...@op.pl> on 2008/09/14 14:21:02 UTC

[PATCHes] Various utilities' fixes

 Hello.

 I'm sending some patches for the batik project. They aren't directly
related to SVG itself, they rather fix some issues that I've come
across in some utility classes.

 *** NOTE: apply the patches in the each files' directories, NOT in
the batik root directory ***

CSSConstants, XMLConstants, SVGContants:
* make all fields "public static final" instead of "package non-static
  changeable"

CleanerThread:
* some synchronization issues, including in the constructor.
* checks for null in the run() method
* javadoc update

 Perhaps CleanerThread should be an instance of HaltingThread and
check for halt if the run() method? Perhaps its instance should be
available then, so the user can halt it?

HaltingThread:
* javadoc update
* synchronization fixes

JSVGComponent:
* fixes in event dispatching: synchronization and making sure the
  runnable queue is running
* minor javadoc fix

RunnableQueue:
* javadoc update
* interfaces have now public members
* using getRunHandler() instead of "runHandler" for synchronization
* using getThread() instead of "runnableQueueThread" for synchro
* AndWait() methods: returning immediately if the thread is null
* run(): checking if the thread was halted during synchro(stateLock)
* run(): unlocking all the objects on exit

SVGSVGElementBridge:
* fixed the immortal parent bug

UpdateManager:
* javadoc update
* interrupt(): checking for null and better synchro
* dispatchSVGUnLoadEvent(): checking for null and better synchro

-- 
Pozdrawiam/Regards - Bogdan                     (GNU/Linux & FreeDOS)
Kurs asemblera x86 (DOS, GNU/Linux):http://rudy.mif.pg.gda.pl/~bogdro
Grupy dyskusyjne o asm:  pl.comp.lang.asm alt.pl.asm alt.pl.asm.win32
www.JabberPL.org www.TorProject.org Soft (EN): miniurl.pl/bogdro-soft

Re: [PATCHes] Various utilities' fixes

Posted by Cameron McCormack <ca...@mcc.id.au>.
Cameron McCormack:
> … but at some point they’ll be looked at.

I’ve filed a bug to remember the patches:

  https://issues.apache.org/bugzilla/show_bug.cgi?id=45949

-- 
Cameron McCormack ≝ http://mcc.id.au/

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


Re: [PATCHes] Various utilities' fixes

Posted by Cameron McCormack <ca...@mcc.id.au>.
Hi Bogdan.

First, thanks for taking the time to submit some patches.  As you
probably noticed, the developers don’t have much bandwidth for Batik
work at the moment, but at some point they’ll be looked at.

In the meantime, a couple of comments.

Bogdan:
> CSSConstants, XMLConstants, SVGContants:
> * make all fields "public static final" instead of "package non-static
>   changeable"

Since CSSConstants, XMLConstants and SVGConstants are interfaces, all
fields are implicitly “public static final”.  Thus there’s no need to
(and, while there’s no official style guide, are usually preferred not
to) explicitly include these modifiers.

> …
>  Perhaps CleanerThread should be an instance of HaltingThread and
> check for halt if the run() method? Perhaps its instance should be
> available then, so the user can halt it?

Yes, it’d probably be good to be able to kill all of the threads Batik
uses when a program has finished using its classes.  I wonder if there
is an easy way to detect this, to do it automatically (if that’s
desirable)?  Track instances of all SoftReferenceCleared/
WeakReferenceCleared/PhantomReferenceCleared objects maybe?

> …
> RunnableQueue:
> …
> * AndWait() methods: returning immediately if the thread is null

Instead of throwing?  It seems to be useful to know if the Runnable was
able to be invoked or not.

> …

Thanks,

Cameron

-- 
Cameron McCormack ≝ http://mcc.id.au/

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