Re: RFR: 8136570: Avoid setting environment variables related to /usr/dt

2015-09-18 Thread Martin Buchholz
On Thu, Sep 17, 2015 at 11:00 AM, Stuart Marks 
wrote:

> Doctor Deprecator approves.
>
> Not only is this a win because it's a pure-deletion change, it's a double
> win because it removes a side effect from a function that's supposed to
> "get" and initialize Java properties values.


It's hard for everyone to accept that putenv really is a crash time bomb,
especially us old timers from the pre-threading days.


Re: RFR: 8136570: Avoid setting environment variables related to /usr/dt

2015-09-17 Thread Phil Race

+1 ( ie approved). May need a core-libs reviewer too ?

-phil.

On 9/16/2015 10:53 AM, Martin Buchholz wrote:

Webrev regenerated
http://cr.openjdk.java.net/~martin/webrevs/openjdk9/usr-dt-environment/usr-dt-environment.patch 
 


and is now the best kind of change, a pure-deletion change.

On Wed, Sep 16, 2015 at 9:00 AM, Phil Race > wrote:


That is fine by me. If any one on awt-dev knows of a reason to keep it
they should speak up.

-phil.


On 9/15/15 5:09 PM, Martin Buchholz wrote:

We would be entirely happy if the environment frobbing code were
to be deleted.
Should I change my code to do that?

On Tue, Sep 15, 2015 at 3:49 PM, Phil Race
> wrote:

I don't understand that original assessment.
Switching to XAWT had no impact on this code except to make
it pointless.
i.e it did not prevent its execution.

I doubt there is any code left in the JDK that will derive any
benefit from it still being there. All CDE/Motif & Xt related
code is gone.
This should have been removed along with it but was doubtless not
in plain sight to whoever did that.

So unless I am missing something you could go further and
just delete it.

-phil.


On 9/15/2015 3:13 PM, Martin Buchholz wrote:

I reported this bug 12 years ago, but it was closed Will
Not Fix, and this year I see java programs crashing
because of it!
This is a partial fix.

https://bugs.openjdk.java.net/browse/JDK-8136570
https://bugs.openjdk.java.net/browse/JDK-4953367

http://cr.openjdk.java.net/~martin/webrevs/openjdk9/usr-dt-environment/














Re: RFR: 8136570: Avoid setting environment variables related to /usr/dt

2015-09-17 Thread Martin Buchholz
Too late, I just committed...
If people have second thoughts, this change should be watered down rather
than reverted anyways, so an independent followup change seems reasonable.

On Thu, Sep 17, 2015 at 9:10 AM, Phil Race  wrote:

> +1 ( ie approved). May need a core-libs reviewer too ?
>
> -phil.
>
> On 9/16/2015 10:53 AM, Martin Buchholz wrote:
>
>> Webrev regenerated
>>
>> http://cr.openjdk.java.net/~martin/webrevs/openjdk9/usr-dt-environment/usr-dt-environment.patch
>> <
>> http://cr.openjdk.java.net/%7Emartin/webrevs/openjdk9/usr-dt-environment/usr-dt-environment.patch>
>>
>> and is now the best kind of change, a pure-deletion change.
>>
>> On Wed, Sep 16, 2015 at 9:00 AM, Phil Race > > wrote:
>>
>> That is fine by me. If any one on awt-dev knows of a reason to keep it
>> they should speak up.
>>
>> -phil.
>>
>>
>> On 9/15/15 5:09 PM, Martin Buchholz wrote:
>>
>>> We would be entirely happy if the environment frobbing code were
>>> to be deleted.
>>> Should I change my code to do that?
>>>
>>> On Tue, Sep 15, 2015 at 3:49 PM, Phil Race
>>> > wrote:
>>>
>>> I don't understand that original assessment.
>>> Switching to XAWT had no impact on this code except to make
>>> it pointless.
>>> i.e it did not prevent its execution.
>>>
>>> I doubt there is any code left in the JDK that will derive any
>>> benefit from it still being there. All CDE/Motif & Xt related
>>> code is gone.
>>> This should have been removed along with it but was doubtless not
>>> in plain sight to whoever did that.
>>>
>>> So unless I am missing something you could go further and
>>> just delete it.
>>>
>>> -phil.
>>>
>>>
>>> On 9/15/2015 3:13 PM, Martin Buchholz wrote:
>>>
>>> I reported this bug 12 years ago, but it was closed Will
>>> Not Fix, and this year I see java programs crashing
>>> because of it!
>>> This is a partial fix.
>>>
>>> https://bugs.openjdk.java.net/browse/JDK-8136570
>>> https://bugs.openjdk.java.net/browse/JDK-4953367
>>>
>>> http://cr.openjdk.java.net/~martin/webrevs/openjdk9/usr-dt-environment/
>>> <
>>> http://cr.openjdk.java.net/%7Emartin/webrevs/openjdk9/usr-dt-environment/
>>> >
>>> <
>>> http://cr.openjdk.java.net/%7Emartin/webrevs/openjdk9/usr-dt-environment/
>>> >
>>>
>>>
>>>
>>>
>>
>>
>


Re: RFR: 8136570: Avoid setting environment variables related to /usr/dt

2015-09-17 Thread Stuart Marks

Doctor Deprecator approves.

Not only is this a win because it's a pure-deletion change, it's a double win 
because it removes a side effect from a function that's supposed to "get" and 
initialize Java properties values.


s'marks

On 9/17/15 9:12 AM, Martin Buchholz wrote:

Too late, I just committed...
If people have second thoughts, this change should be watered down rather
than reverted anyways, so an independent followup change seems reasonable.

On Thu, Sep 17, 2015 at 9:10 AM, Phil Race  wrote:


+1 ( ie approved). May need a core-libs reviewer too ?

-phil.

On 9/16/2015 10:53 AM, Martin Buchholz wrote:


Webrev regenerated

http://cr.openjdk.java.net/~martin/webrevs/openjdk9/usr-dt-environment/usr-dt-environment.patch
<
http://cr.openjdk.java.net/%7Emartin/webrevs/openjdk9/usr-dt-environment/usr-dt-environment.patch>

and is now the best kind of change, a pure-deletion change.

On Wed, Sep 16, 2015 at 9:00 AM, Phil Race > wrote:

 That is fine by me. If any one on awt-dev knows of a reason to keep it
 they should speak up.

 -phil.


 On 9/15/15 5:09 PM, Martin Buchholz wrote:


 We would be entirely happy if the environment frobbing code were
 to be deleted.
 Should I change my code to do that?

 On Tue, Sep 15, 2015 at 3:49 PM, Phil Race
 > wrote:

 I don't understand that original assessment.
 Switching to XAWT had no impact on this code except to make
 it pointless.
 i.e it did not prevent its execution.

 I doubt there is any code left in the JDK that will derive any
 benefit from it still being there. All CDE/Motif & Xt related
 code is gone.
 This should have been removed along with it but was doubtless not
 in plain sight to whoever did that.

 So unless I am missing something you could go further and
 just delete it.

 -phil.


 On 9/15/2015 3:13 PM, Martin Buchholz wrote:

 I reported this bug 12 years ago, but it was closed Will
 Not Fix, and this year I see java programs crashing
 because of it!
 This is a partial fix.

 https://bugs.openjdk.java.net/browse/JDK-8136570
 https://bugs.openjdk.java.net/browse/JDK-4953367

http://cr.openjdk.java.net/~martin/webrevs/openjdk9/usr-dt-environment/
 <
http://cr.openjdk.java.net/%7Emartin/webrevs/openjdk9/usr-dt-environment/



 <
http://cr.openjdk.java.net/%7Emartin/webrevs/openjdk9/usr-dt-environment/














Re: RFR: 8136570: Avoid setting environment variables related to /usr/dt

2015-09-16 Thread Thomas Stüfe
Hi Martin,

would it be not sufficient to just test for existence of /usr/dt before the
two calls to setPathEnvironment() and leave the rest as it is? I also think
the intend would be clearer ("only call this if CDE is installed").

Kind Regards, Thomas



On Wed, Sep 16, 2015 at 12:13 AM, Martin Buchholz 
wrote:

> I reported this bug 12 years ago, but it was closed Will Not Fix, and this
> year I see java programs crashing because of it!
> This is a partial fix.
>
> https://bugs.openjdk.java.net/browse/JDK-8136570
> https://bugs.openjdk.java.net/browse/JDK-4953367
> http://cr.openjdk.java.net/~martin/webrevs/openjdk9/usr-dt-environment/
>


Re: RFR: 8136570: Avoid setting environment variables related to /usr/dt

2015-09-16 Thread Phil Race

That is fine by me. If any one on awt-dev knows of a reason to keep it
they should speak up.

-phil.

On 9/15/15 5:09 PM, Martin Buchholz wrote:
We would be entirely happy if the environment frobbing code were to be 
deleted.

Should I change my code to do that?

On Tue, Sep 15, 2015 at 3:49 PM, Phil Race > wrote:


I don't understand that original assessment.
Switching to XAWT had no impact on this code except to make it
pointless.
i.e it did not prevent its execution.

I doubt there is any code left in the JDK that will derive any
benefit from it still being there. All CDE/Motif & Xt related code
is gone.
This should have been removed along with it but was doubtless not
in plain sight to whoever did that.

So unless I am missing something you could go further and just
delete it.

-phil.


On 9/15/2015 3:13 PM, Martin Buchholz wrote:

I reported this bug 12 years ago, but it was closed Will Not
Fix, and this year I see java programs crashing because of it!
This is a partial fix.

https://bugs.openjdk.java.net/browse/JDK-8136570
https://bugs.openjdk.java.net/browse/JDK-4953367
http://cr.openjdk.java.net/~martin/webrevs/openjdk9/usr-dt-environment/











Re: RFR: 8136570: Avoid setting environment variables related to /usr/dt

2015-09-16 Thread Martin Buchholz
Webrev regenerated
http://cr.openjdk.java.net/~martin/webrevs/openjdk9/usr-dt-environment/usr-dt-environment.patch
and is now the best kind of change, a pure-deletion change.

On Wed, Sep 16, 2015 at 9:00 AM, Phil Race  wrote:

> That is fine by me. If any one on awt-dev knows of a reason to keep it
> they should speak up.
>
> -phil.
>
>
> On 9/15/15 5:09 PM, Martin Buchholz wrote:
>
> We would be entirely happy if the environment frobbing code were to be
> deleted.
> Should I change my code to do that?
>
> On Tue, Sep 15, 2015 at 3:49 PM, Phil Race  wrote:
>
>> I don't understand that original assessment.
>> Switching to XAWT had no impact on this code except to make it pointless.
>> i.e it did not prevent its execution.
>>
>> I doubt there is any code left in the JDK that will derive any
>> benefit from it still being there. All CDE/Motif & Xt related code is
>> gone.
>> This should have been removed along with it but was doubtless not
>> in plain sight to whoever did that.
>>
>> So unless I am missing something you could go further and just delete it.
>>
>> -phil.
>>
>>
>> On 9/15/2015 3:13 PM, Martin Buchholz wrote:
>>
>>> I reported this bug 12 years ago, but it was closed Will Not Fix, and
>>> this year I see java programs crashing because of it!
>>> This is a partial fix.
>>>
>>> https://bugs.openjdk.java.net/browse/JDK-8136570
>>> https://bugs.openjdk.java.net/browse/JDK-4953367
>>> http://cr.openjdk.java.net/~martin/webrevs/openjdk9/usr-dt-environment/
>>> <
>>> http://cr.openjdk.java.net/%7Emartin/webrevs/openjdk9/usr-dt-environment/
>>> >
>>>
>>
>>
>
>


Re: RFR: 8136570: Avoid setting environment variables related to /usr/dt

2015-09-16 Thread Martin Buchholz
Mostly moot, now that we have consensus on just deleting these entirely,
but my (original) code was safer because it calls putenv in fewer cases.
Who knows what /usr/dt is "supposed" to look like these days?  "Common"
Desktop Environment not so "common" anymore...

On Wed, Sep 16, 2015 at 1:33 AM, Thomas Stüfe 
wrote:

> Hi Martin,
>
> would it be not sufficient to just test for existence of /usr/dt before
> the two calls to setPathEnvironment() and leave the rest as it is? I also
> think the intend would be clearer ("only call this if CDE is installed").
>
> Kind Regards, Thomas
>
>
>
> On Wed, Sep 16, 2015 at 12:13 AM, Martin Buchholz 
> wrote:
>
>> I reported this bug 12 years ago, but it was closed Will Not Fix, and this
>> year I see java programs crashing because of it!
>> This is a partial fix.
>>
>> https://bugs.openjdk.java.net/browse/JDK-8136570
>> https://bugs.openjdk.java.net/browse/JDK-4953367
>> http://cr.openjdk.java.net/~martin/webrevs/openjdk9/usr-dt-environment/
>>
>
>


Re: RFR: 8136570: Avoid setting environment variables related to /usr/dt

2015-09-15 Thread Phil Race

I don't understand that original assessment.
Switching to XAWT had no impact on this code except to make it pointless.
i.e it did not prevent its execution.

I doubt there is any code left in the JDK that will derive any
benefit from it still being there. All CDE/Motif & Xt related code is gone.
This should have been removed along with it but was doubtless not
in plain sight to whoever did that.

So unless I am missing something you could go further and just delete it.

-phil.

On 9/15/2015 3:13 PM, Martin Buchholz wrote:
I reported this bug 12 years ago, but it was closed Will Not Fix, and 
this year I see java programs crashing because of it!

This is a partial fix.

https://bugs.openjdk.java.net/browse/JDK-8136570
https://bugs.openjdk.java.net/browse/JDK-4953367
http://cr.openjdk.java.net/~martin/webrevs/openjdk9/usr-dt-environment/ 





Re: RFR: 8136570: Avoid setting environment variables related to /usr/dt

2015-09-15 Thread Martin Buchholz
We would be entirely happy if the environment frobbing code were to be
deleted.
Should I change my code to do that?

On Tue, Sep 15, 2015 at 3:49 PM, Phil Race  wrote:

> I don't understand that original assessment.
> Switching to XAWT had no impact on this code except to make it pointless.
> i.e it did not prevent its execution.
>
> I doubt there is any code left in the JDK that will derive any
> benefit from it still being there. All CDE/Motif & Xt related code is gone.
> This should have been removed along with it but was doubtless not
> in plain sight to whoever did that.
>
> So unless I am missing something you could go further and just delete it.
>
> -phil.
>
>
> On 9/15/2015 3:13 PM, Martin Buchholz wrote:
>
>> I reported this bug 12 years ago, but it was closed Will Not Fix, and
>> this year I see java programs crashing because of it!
>> This is a partial fix.
>>
>> https://bugs.openjdk.java.net/browse/JDK-8136570
>> https://bugs.openjdk.java.net/browse/JDK-4953367
>> http://cr.openjdk.java.net/~martin/webrevs/openjdk9/usr-dt-environment/ <
>> http://cr.openjdk.java.net/%7Emartin/webrevs/openjdk9/usr-dt-environment/
>> >
>>
>
>


RFR: 8136570: Avoid setting environment variables related to /usr/dt

2015-09-15 Thread Martin Buchholz
I reported this bug 12 years ago, but it was closed Will Not Fix, and this
year I see java programs crashing because of it!
This is a partial fix.

https://bugs.openjdk.java.net/browse/JDK-8136570
https://bugs.openjdk.java.net/browse/JDK-4953367
http://cr.openjdk.java.net/~martin/webrevs/openjdk9/usr-dt-environment/