Re: RFR 8027687: The constructors of URLPermission class do not behave as described in javadoc

2013-11-01 Thread Vitaly Davidovich
The size to use is the length of the argument, which you're already using
for the loop.

On a separate note, is toLowerCase in a perf sensitive area? It makes an
assumption that the lowering will need to happen (by always allocating the
stringbuilder) but is that a common case? If this isn't perf sensitive then
disregard.

Thanks

Sent from my phone
On Nov 1, 2013 4:28 PM, "Michael McMahon" 
wrote:

> On 01/11/13 18:06, Mike Duigou wrote:
>
>> A couple minor quibbles
>>
>> - Since the length is know the StringBuildiler can be created with a size.
>>
>
> Right, 255 is probably a good size to use.
>
>  - sb.toString() is probably more efficient than new String(sb)
>>
>
> Since Chris also suggests it, I'm curious why this is. Is there some
> clever sharing going on between
> StringBuilder and String?
>
>  - I would like to see some IDN URL cases in the tests.
>>
>
> The first version of this class doesn't support Unicode strings in the
> hostname labels.
> So, I'm guessing you mean cases of IDNs that have been already converted
> into the ascii encoded form  (eg xn--blahblah.xn-blah.com). Something I'd
> like to do
> for JDK 9 will be to allow transparent Unicode in classes like
> URLPermission with
> automatic IDN conversions taking place in the http protocol handler.
> So, I can add some cases of encoded IDNs in the test okay.
>
> Thanks!
>
> Michael
>
>  Mike
>>
>> On Nov 1 2013, at 07:46 , Michael McMahon 
>> wrote:
>>
>>  Simple bug fix to new URLPermission class, caused by insufficient
>>> parameter checking
>>> of the constructor.
>>>
>>> webrev: 
>>> http://cr.openjdk.java.net/~**michaelm/8027687/webrev.1/
>>>
>>> Thanks,
>>> Michael
>>>
>>
>


hg: jdk8/tl/jdk: 8027624: com/sun/crypto/provider/KeyFactory/TestProviderLeak.java unstable again

2013-11-01 Thread dan . xu
Changeset: 6a6faa00acc4
Author:dxu
Date:  2013-11-01 14:40 -0700
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/6a6faa00acc4

8027624: com/sun/crypto/provider/KeyFactory/TestProviderLeak.java unstable again
Reviewed-by: wetmore

! test/com/sun/crypto/provider/KeyFactory/TestProviderLeak.java



hg: jdk8/tl/langtools: 8027310: Annotation Processor crashes with NPE

2013-11-01 Thread jan . lahoda
Changeset: 8b4e1421a9b7
Author:jlahoda
Date:  2013-11-01 21:43 +0100
URL:   http://hg.openjdk.java.net/jdk8/tl/langtools/rev/8b4e1421a9b7

8027310: Annotation Processor crashes with NPE
Summary: JCAnnotation.attribute is null when annotation type is unavailable
Reviewed-by: jjg, jfranck

! src/share/classes/com/sun/tools/javac/comp/Attr.java
+ test/tools/javac/processing/errors/CrashOnNonExistingAnnotation/Processor.java
+ test/tools/javac/processing/errors/CrashOnNonExistingAnnotation/Source.java



Re: RFR 8027687: The constructors of URLPermission class do not behave as described in javadoc

2013-11-01 Thread Michael McMahon

On 01/11/13 18:06, Mike Duigou wrote:

A couple minor quibbles

- Since the length is know the StringBuildiler can be created with a size.


Right, 255 is probably a good size to use.


- sb.toString() is probably more efficient than new String(sb)


Since Chris also suggests it, I'm curious why this is. Is there some 
clever sharing going on between

StringBuilder and String?


- I would like to see some IDN URL cases in the tests.


The first version of this class doesn't support Unicode strings in the 
hostname labels.

So, I'm guessing you mean cases of IDNs that have been already converted
into the ascii encoded form  (eg xn--blahblah.xn-blah.com). Something 
I'd like to do
for JDK 9 will be to allow transparent Unicode in classes like 
URLPermission with

automatic IDN conversions taking place in the http protocol handler.
So, I can add some cases of encoded IDNs in the test okay.

Thanks!

Michael


Mike

On Nov 1 2013, at 07:46 , Michael McMahon  wrote:


Simple bug fix to new URLPermission class, caused by insufficient parameter 
checking
of the constructor.

webrev: http://cr.openjdk.java.net/~michaelm/8027687/webrev.1/

Thanks,
Michael




hg: jdk8/tl/langtools: 8027660: javac crash while creating LVT entry for a local variable defined in an inner block

2013-11-01 Thread vicente . romero
Changeset: cc80c03c41e4
Author:vromero
Date:  2013-11-01 19:08 +
URL:   http://hg.openjdk.java.net/jdk8/tl/langtools/rev/cc80c03c41e4

8027660: javac crash while creating LVT entry for a local variable defined in 
an inner block
Reviewed-by: jjg
Contributed-by: vicente.rom...@oracle.com, jan.lah...@oracle.com

! src/share/classes/com/sun/tools/javac/jvm/Code.java
! test/tools/javac/flow/LVTHarness.java
+ test/tools/javac/flow/tests/TestCaseLocalInInnerBlock.java



Re: RFR 8027687: The constructors of URLPermission class do not behave as described in javadoc

2013-11-01 Thread Mike Duigou
A couple minor quibbles

- Since the length is know the StringBuilder can be created with a size.

- sb.toString() is probably more efficient than new String(sb)

- I would like to see some IDN URL cases in the tests.

Mike

On Nov 1 2013, at 07:46 , Michael McMahon  wrote:

> Simple bug fix to new URLPermission class, caused by insufficient parameter 
> checking
> of the constructor.
> 
> webrev: http://cr.openjdk.java.net/~michaelm/8027687/webrev.1/
> 
> Thanks,
> Michael



Re: RFR 8027687: The constructors of URLPermission class do not behave as described in javadoc

2013-11-01 Thread Chris Hegarty

Looks good to me Michael.

Trivially, I'd replace 'new String(sb)' with 'sb.toString()' in 
HostPortrange, but that's just me.


-Chris.

On 01/11/2013 14:46, Michael McMahon wrote:

Simple bug fix to new URLPermission class, caused by insufficient
parameter checking
of the constructor.

webrev: http://cr.openjdk.java.net/~michaelm/8027687/webrev.1/

Thanks,
Michael


Re: RFR for JDK-8022963 /java/net/NetworkInterface/Equals.java fails with java.lang.RuntimeException: equality different for net8

2013-11-01 Thread Tristan Yan

Hi everyone
Please review the fix for JDK-8022963.

http://cr.openjdk.java.net/~pzhang/Tristan/8022963/webrev/

Description:
Since windows API has very inconsistent behavior on Teredo Tunneling 
Pesudo-Interface, we removed this network interface for this test.


Thank you.
Tristan

On 01/11/2013 22:43, Chris Hegarty wrote:

Hi Tristan,

From what I understand of the issue I see no problem with what you are 
suggesting. Webrev?


-Chris.

On 01/11/2013 05:44, Tristan Yan wrote:

Hi Everyone

I am working on bug https://bugs.openjdk.java.net/browse/JDK-8022963.
Root cause for this bug is Windows API has inconsistent behavior for
Teredo Tunneling Interface, based on the discussion with Chris Hegarty,
we decided to fix this test with removing "Windows && Teredo Tunneling
Pseudo-Interface" from this test.

Please let me know if you have any comments or suggestions.

Thank you

Tristan

/Tristan Yan(Haibo Yan)/

/Office : 8610-61066212/

/Fax : 8610-61065441/

/Cell : 86-18610696822/

//

/2F, Building No. 24, Zhongguancun Software Park/

/Haidian District Beijing
 


, 100193/

oracle





RFR 8027687: The constructors of URLPermission class do not behave as described in javadoc

2013-11-01 Thread Michael McMahon
Simple bug fix to new URLPermission class, caused by insufficient 
parameter checking

of the constructor.

webrev: http://cr.openjdk.java.net/~michaelm/8027687/webrev.1/

Thanks,
Michael


hg: jdk8/tl/jdk: 8027705: com/sun/jdi/JdbMethodExitTest.sh fails when a background thread is generating events.

2013-11-01 Thread staffan . larsen
Changeset: c59ccad6eb72
Author:sla
Date:  2013-11-01 15:10 +0100
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/c59ccad6eb72

8027705: com/sun/jdi/JdbMethodExitTest.sh fails when a background thread is 
generating events.
Reviewed-by: dcubed

! test/com/sun/jdi/JdbMethodExitTest.sh
! test/com/sun/jdi/ShellScaffold.sh



Re: RFR for JDK-8022963 /java/net/NetworkInterface/Equals.java fails with java.lang.RuntimeException: equality different for net8

2013-11-01 Thread Chris Hegarty

Hi Tristan,

From what I understand of the issue I see no problem with what you are 
suggesting. Webrev?


-Chris.

On 01/11/2013 05:44, Tristan Yan wrote:

Hi Everyone

I am working on bug https://bugs.openjdk.java.net/browse/JDK-8022963.
Root cause for this bug is Windows API has inconsistent behavior for
Teredo Tunneling Interface, based on the discussion with Chris Hegarty,
we decided to fix this test with removing "Windows && Teredo Tunneling
Pseudo-Interface" from this test.

Please let me know if you have any comments or suggestions.

Thank you

Tristan

/Tristan Yan(Haibo Yan)/

/Office : 8610-61066212/

/Fax : 8610-61065441/

/Cell : 86-18610696822/

//

/2F, Building No. 24, Zhongguancun Software Park/

/Haidian District Beijing

, 100193/

oracle



hg: jdk8/tl/jdk: 8027692: Remove java/lang/management/MemoryMXBean/LowMemoryTest2.sh from ProblemList.txt

2013-11-01 Thread staffan . larsen
Changeset: c35f6df5bce9
Author:sla
Date:  2013-11-01 10:08 +0100
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/c35f6df5bce9

8027692: Remove java/lang/management/MemoryMXBean/LowMemoryTest2.sh from 
ProblemList.txt
Reviewed-by: stefank, alanb

! test/ProblemList.txt