Stevo, thanks for the contribution. I've folded your patch in with the code that was already present, such that it hopefully satisfies all platforms - os x / linux / windows. My machine (OS X) is fine. The CI build will tell us about Linux. Perhaps you can next snapshot a try and reopen this issue if problems persist on Windows.

Chris Beams
added a comment - 30/May/11 11:36 PM Stevo, thanks for the contribution. I've folded your patch in with the code that was already present, such that it hopefully satisfies all platforms - os x / linux / windows. My machine (OS X) is fine. The CI build will tell us about Linux. Perhaps you can next snapshot a try and reopen this issue if problems persist on Windows.
Thanks,
Chris

Btw, same issue in PropertyPlaceholderConfigurerTests hasn't been touched. Maybe this test support for obtaining modifiable environment could be factored out into a utility class to make it reusable and maintainable.

Stevo Slavić
added a comment - 31/May/11 1:12 AM Chris,
Unfortunatelly it doesn't work, OS X and Linux part gets used on Windows since on Windows
Object obj = field.get(env);
returns not null obj which is instance of java.lang.ProcessEnvironment, and putting into it, seems to silently fail.
I'm not sure what field.get(env) returns on Linux. If it's not java.lang.ProcessEnvironment then adding to OS X / Linux part something like:
Object obj = field.get(env);
if (obj != null && !obj.getClass().getName().equals("java.lang.ProcessEnvironment")) {
return (Map<String, String>) obj;
}
would do the trick.
Btw, same issue in PropertyPlaceholderConfigurerTests hasn't been touched. Maybe this test support for obtaining modifiable environment could be factored out into a utility class to make it reusable and maintainable.

Chris Beams
added a comment - 31/May/11 4:02 AM I'm afraid this has become a losing battle. I've @Ignored these tests, at least for the moment. Stevo, would you please verify that you get a successful build now?
Whether or not we have perfect coverage, I do want to make sure that the source builds under Windows for the upcoming 3.1 M2 release!
Thanks.

Stevo Slavić
added a comment - 02/Jun/11 2:18 AM Yes, Ignored tests get skipped.
Here is SPR-8245.patch which fixes both EnvironmentTests and PropertyPlaceholderConfigurerTests to work on Linux and Windows. Maybe someone could check if patch works for OS X as well.
Only remaining failing tests on Windows are JibxMarshallerTests, I've reported that under separate issue SPR-8360

Chris Beams
added a comment - 02/Jun/11 11:36 PM Thanks, Stevo! Looks like this may finally have done the trick across platforms. I've committed the patch and asked Juergen to take a look at SPR-8360 .