oodt-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Starch, Michael D (388L)" <Michael.D.Sta...@jpl.nasa.gov>
Subject Re: Patch For Env Vars
Date Tue, 29 Jan 2013 20:13:42 GMT
Cris et. all,

I have attached a patch for OODT-553 to fix the EnvUtilities to call System.getEnvironment
instead of run env.  I have some suspicions that the latter (exec env) is causing problems
on my project, and this patch updates it to use the native java mechanisms which work as of
java 1.5, or 1.6.  This should be more stable and portable.

The test case needs to run on UNIX to get access to USER and HOME environment variables to
work, so I make that check first.

See below for previous discussion.

-Michael Starch (starch)

On Jan 17, 2013, at 9:37 PM, Mattmann, Chris A (388J) wrote:

Hi Mike,

From: <Starch>, "Michael D (388L)" <Michael.D.Starch@jpl.nasa.gov<mailto:Michael.D.Starch@jpl.nasa.gov>>
Date: Thursday, January 17, 2013 12:05 PM
To: jpluser <chris.a.mattmann@jpl.nasa.gov<mailto:chris.a.mattmann@jpl.nasa.gov>>
Subject: Patch For Env Vars


Here is the patch for the Env Vars (svn diff from trunk level).  Let me know if it is accepted
by OODT, and if I need to send it somewhere else (Not sure where to send it for review).

Thank you! You should:

  1.  File a JIRA issue in Apache OODT — https://issues.apache.org/jira/browse/OODT
  2.  Attach this patch to the issue
  3.  Request someone on the dev@oodt list (by replying to the thread) to review the patch
and commit it

I added some unit tests, the fix to use System.getenv and noticed that the EnvUtilities.java
is in win/dos format not unix.  I did not change the format, just a heads up.

Awesome if you have time file a patch for fixing the line format too (and a separate issue
as you pointed out).

The tests make the assumption that that USER and HOME variables are defined.  If this is a
bad assumption, a new avenue of testing would need to be investigated.

How about if those env vars aren't defined based on OS, then don't run them (e.g., you could
do a test for OS and if it's e.g., windoze, then don't run them or something?)

BTW this and the above can and should be discussed on list. This is for 2 benefits:

  1.  Others can benefit from our convo in the Apache community
  2.  You earn the merit you deserve by having others see what great and cool things you are
doing via your discussion

Thanks Mike and see you on list! Appreciate your contribution.



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message