Aug 03

It’s called garbage collection, not resource collection!

Java’s garbage collector has made life so easy for us developers that we sometimes confuse between deleting a reference, i.e. a task the GC does, and releasing a resource – a task the GC doesn’t do. That’s because the GC does something else for us called object finalization, where resources usually clean themselves up.

When I say resources, just think of input/output streams, readers/writers, channels, JDBC, JMS.. the list could go on and on. I almost expect to see code such as: Continue reading »

Share
Jan 02

While the Java community celebrates the release of JavaFX 1.0, two JSRs are striving to teach us again how to write Swing applications – this time, the easy way. JSR 295 addresses property manipulations and bindings, not just in the Swing framework but throughout the Java platform; JSR 296 simplifies Java application creation using Swing, bringing a “Swing for the rest of us” kind of approach.

In this post, I’ll discuss JSR 296 and what it brings, and my opinion of where it could be improved; in the followup post I’ll discuss JSR 295, and try to do the same for that. Continue reading »

Share
Dec 19

Recently I took the time to read the early draft of JSR-292, the invokedynamic bytecode specification. For those slightly less familiar with the subject, it makes it possible to perform late binding on method invocations, allowing for calling methods on objects without knowing the object type at compile time. This feature is important for projects such as Jython and JRuby, which provide Java bytecode compilation to the popular Python and Ruby languages.

Continue reading »

Share