deskmetrics/jDeskMetrics — pull request #1 by cyberfox (2012-02-27 09:29:57+00:00)
Title: jDeskMetrics doesn't work with Java 1.5 due to File#getTotalSpace and File#getFreeSpace.

Greetings,
Java 1.5 support is necessary for me because not everybody updates their desktop Java regularly, and on some operating systems (older Mac OS X versions) you can't upgrade past 1.5 without upgrading your OS entirely.

Without this change, the code fails on 1.5 JRE's (and fails to build on a 1.5 JDK) because the File class doesn't contain the two mentioned methods.

Instead of directly calling the two methods, this patch makes them be called via Method.invoke, and any exception is treated as a zero return, i.e. the same value as those two methods return when they can't resolve the partition being queried.

I hope this helps!

Your product seems very interesting and very cool; unfortunately my open source project is likely to generate more than 25,000 interesting events a month if delivered fully, so I'm probably not going to be able to widely deploy it. Still, I think it's a great tool, and I'm going to try it out with my beta testers!

-- Morgan Schweers, Cyber**FOX**!