Kelly,

> i myself find the x trick ugly
> i have not had a need to do the x trick for 10 years
> what sh or bash shell that we use has this problem still??????

I checked for supported platforms (Linux, Solaris 10,8 Cygwin) - all
shells work fine.

So probably all modern shells handle [ "$NONEXISTING_VAR" = "" ] correctly.

The x trick originated to /usr/bin/[ that processed command line
arguments one by one, end up to just  =  and report a syntax error.

Hmm - at least my linux's /usr/bin/test handles it correctly as well.

May be it's a time to become less paranoid and stop adding x ;))

-Dmitry

On 2012-08-16 09:28, Kelly Ohair wrote:
> 
> 
> Sent from my iPhone
> 
> On Aug 15, 2012, at 19:39, Dmitry Samersoff <dmitry.samers...@oracle.com> 
> wrote:
> 
>> Dan,
>>
>> VerifyLocalVariableTableOnRetransformTest.sh
>>
>> 1.
>>
>> if [ "${TESTJAVA}" = "" ]
>>
>> Some shells doesn't handle it correctly.
>> It's more safe to do
>>
>> if [ "x${TESTJAVA}" = "x" ]
>>
>> (the same is for other conditions below)
>>
> 
> i myself find the x trick ugly
> 
> i have not had a need to do the x trick for 10 years
> 
> what sh or bash shell that we use has this problem still??????
> 
>> 2.
>>
>> ll. 69
>>
>> it's better to add quotes around 0 or
>> use -eq instead of =
> 
> yup i agree there
> 
>>
>> besides that looks good for me.
>>
>> -Dmitry
>>
>>
>> On 2012-08-15 20:58, Daniel D. Daugherty wrote:
>>> Greetings,
>>>
>>> I wrote a test for the following bug:
>>>
>>>    7064927 4/4 retransformClasses() does not pass in
>>>                LocalVariableTable of a method
>>>
>>> a long time ago. 7064927 was fixed in the hotspot repo back in
>>> HSX-23-B09 by Thomas W. and Coleen, but the test was never pushed
>>> to the JDK repo. The java.lang.instrument (JLI) tests live in the
>>> JDK repo.
>>>
>>> I'm using the following bug:
>>>
>>>    7191322 4/4 add test for 7064927 to java.lang.instrument
>>>
>>> to get the test into the JDK8 T&L repo. Here is the webrev URL:
>>>
>>>    http://cr.openjdk.java.net/~dcubed/7191322-webrev/0/
>>>
>>> Thanks, in advance, for any comments.
>>>
>>> Dan
>>>
>>> P.S.
>>> The new test has been executed and passes on all platforms
>>> supported by JPRT except for MacOS X. There is a temporary
>>> build issue on MacOS X at the moment.
>>
>>
>> -- 
>> Dmitry Samersoff
>> Java Hotspot development team, SPB04
>> * There will come soft rains ...
>>
>>


-- 
Dmitry Samersoff
Java Hotspot development team, SPB04
* There will come soft rains ...


Reply via email to