[IMPROVEMENT] Use IgniteSystemProperties.getString(key) instead of System.getenv(key)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[IMPROVEMENT] Use IgniteSystemProperties.getString(key) instead of System.getenv(key)

Alexey Kuznetsov
Hi, Igniters.

What do you think, if we will use " IgniteSystemProperties.getString(key)"
instead of " System.getenv(key)"?

IgniteSystemProperties.getString(key) method check System,properties
 and if not found then check for System.getenv(key).

The main purpose is to use it in tests, because it easily to set system
property in Java code,
and very non trivial to do the same for  environment variables.

Does any body have objections if I create JIRA issue (with pull request) to
replace all direct calls of  "System.getenv(key)" with
IgniteSystemProperties.getString(key)?

--
Alexey Kuznetsov
Reply | Threaded
Open this post in threaded view
|

Re: [IMPROVEMENT] Use IgniteSystemProperties.getString(key) instead of System.getenv(key)

Ilya Kasnacheev
Hello!

I think it does indeed makes sense to always use
*IgniteSystemProperties.getStri**ng*

Regards,
--
Ilya Kasnacheev


чт, 11 апр. 2019 г. в 16:40, Alexey Kuznetsov <[hidden email]>:

> Hi, Igniters.
>
> What do you think, if we will use " IgniteSystemProperties.getString(key)"
> instead of " System.getenv(key)"?
>
> IgniteSystemProperties.getString(key) method check System,properties
>  and if not found then check for System.getenv(key).
>
> The main purpose is to use it in tests, because it easily to set system
> property in Java code,
> and very non trivial to do the same for  environment variables.
>
> Does any body have objections if I create JIRA issue (with pull request) to
> replace all direct calls of  "System.getenv(key)" with
> IgniteSystemProperties.getString(key)?
>
> --
> Alexey Kuznetsov
>
Reply | Threaded
Open this post in threaded view
|

Re: [IMPROVEMENT] Use IgniteSystemProperties.getString(key) instead of System.getenv(key)

Ivan Pavlukhin
Hi,

+1

I failed to imagine a case when IgniteSystemProperties.getString can
make a real harm.

пн, 15 апр. 2019 г. в 09:35, Ilya Kasnacheev <[hidden email]>:

>
> Hello!
>
> I think it does indeed makes sense to always use
> *IgniteSystemProperties.getStri**ng*
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> чт, 11 апр. 2019 г. в 16:40, Alexey Kuznetsov <[hidden email]>:
>
> > Hi, Igniters.
> >
> > What do you think, if we will use " IgniteSystemProperties.getString(key)"
> > instead of " System.getenv(key)"?
> >
> > IgniteSystemProperties.getString(key) method check System,properties
> >  and if not found then check for System.getenv(key).
> >
> > The main purpose is to use it in tests, because it easily to set system
> > property in Java code,
> > and very non trivial to do the same for  environment variables.
> >
> > Does any body have objections if I create JIRA issue (with pull request) to
> > replace all direct calls of  "System.getenv(key)" with
> > IgniteSystemProperties.getString(key)?
> >
> > --
> > Alexey Kuznetsov
> >



--
Best regards,
Ivan Pavlukhin
Reply | Threaded
Open this post in threaded view
|

Re: [IMPROVEMENT] Use IgniteSystemProperties.getString(key) instead of System.getenv(key)

Alexey Kuznetsov
Thanks for responding, I will file JIRA issue shortly.

On Mon, Apr 15, 2019 at 2:24 PM Павлухин Иван <[hidden email]> wrote:

> Hi,
>
> +1
>
> I failed to imagine a case when IgniteSystemProperties.getString can
> make a real harm.
>
> пн, 15 апр. 2019 г. в 09:35, Ilya Kasnacheev <[hidden email]>:
> >
> > Hello!
> >
> > I think it does indeed makes sense to always use
> > *IgniteSystemProperties.getStri**ng*
> >
> > Regards,
> > --
> > Ilya Kasnacheev
> >
> >
> > чт, 11 апр. 2019 г. в 16:40, Alexey Kuznetsov <[hidden email]>:
> >
> > > Hi, Igniters.
> > >
> > > What do you think, if we will use "
> IgniteSystemProperties.getString(key)"
> > > instead of " System.getenv(key)"?
> > >
> > > IgniteSystemProperties.getString(key) method check System,properties
> > >  and if not found then check for System.getenv(key).
> > >
> > > The main purpose is to use it in tests, because it easily to set system
> > > property in Java code,
> > > and very non trivial to do the same for  environment variables.
> > >
> > > Does any body have objections if I create JIRA issue (with pull
> request) to
> > > replace all direct calls of  "System.getenv(key)" with
> > > IgniteSystemProperties.getString(key)?
> > >
> > > --
> > > Alexey Kuznetsov
> > >
>
>
>
> --
> Best regards,
> Ivan Pavlukhin
>


--
Alexey Kuznetsov