willhains / guicebox

Automatically exported from code.google.com/p/guicebox
1 stars 2 forks source link

Test GuiceBox with Java 5 #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The home page lists "Java 6" as a requirement for GuiceBox, but that's just 
because I've never tested 
it with Java 5. I can't think of any reason it wouldn't work fine on Java 5.

If it does indeed work on Java 5, update the home page.

Original issue reported on code.google.com by willhains on 13 Jun 2008 at 10:35

GoogleCodeExporter commented 9 years ago
hi i tried to compile on java5 but it will require some changes due to compile 
error.
How you want to handle this? and how can a submit modified code and details?

Original comment by sandeepd...@gmail.com on 11 Apr 2009 at 11:18

GoogleCodeExporter commented 9 years ago
Welcome sandeepdost!

If you have a fix, please post it here as a patch file with a description of 
how you
fixed it, plus any impact you think it might have on the functionality, 
performance, etc.

If not, please just post the errors you are getting.

Thank you for your contribution!

Original comment by willhains on 12 Apr 2009 at 12:41

GoogleCodeExporter commented 9 years ago
Here are description of changes:
1. StartThreadCommand.java
a. TimeUnit.DAYS is replace with TimeUnit.SECONDS as former is not available in 
JAVA5.
b. isEmpty method of String class is replaced with name.trim().length() == 0
2. PropertiesModule.java
a. Property class load method do not accept 'reader' object. So a new method
"_readViaStream(File)" is added.
b. Modified '_loadPropertiesFiles' method to return List<InputStream>
c. Modifed 'PropertiesModule' constructor to accept List<InputStream> parameter

3. @Override annotation is removed from several places where method were 
actually
implementation of some interface not overrider. JAVA5 gives error if method is 
not
direct overrider of method from class. [Several files have this modification]

Replacing TimeUnit.DAYS with TimeUnit.SECONDS can affect functionality but i 
dont see
any other option. Attached zip file contains complete src folder.

Let me know if you have questions on this.

Original comment by sandeepd...@gmail.com on 12 Apr 2009 at 7:11

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed in r123. Requirements section on home page updated.
Thanks again sandeepdost!

Original comment by willhains on 3 May 2009 at 3:06