Inefficient code of String.indexOf(String)

2013-06-16 Thread Anubhav Chaturvedi
Hello, I have recently started to explore the source code and am new to the open source community. I observed that in String.class within java.lang , the indexOf method, line 1715, uses the bruteforce approach when it comes to string matching. This method is used by the contains(CharSequence) meth

Re: Inefficient code of String.indexOf(String)

2013-06-16 Thread Alan Bateman
On 16/06/2013 11:53, Anubhav Chaturvedi wrote: Hello, I have recently started to explore the source code and am new to the open source community. I observed that in String.class within java.lang , the indexOf method, line 1715, uses the bruteforce approach when it comes to string matching. This

Re: Inefficient code of String.indexOf(String)

2013-06-16 Thread Aleksey Shipilev
Hi Anubhav, On 16.06.2013, at 14:53, Anubhav Chaturvedi wrote: > I would like to bring the required changes and needed your advice on this. Welcome to OpenJDK! Please read through OpenJDK contributors page for the process we follow: http://openjdk.java.net/contribute/ It would be great if y

Re: Thoughts on adding getElementClass() method to StackTraceElement?

2013-06-16 Thread Nick Williams
On Jun 16, 2013, at 1:25 AM, Jeroen Frijters wrote: > Nick Williams wrote: >> I'm going to stick by my original assessment that I'm not convinced >> there's a security issue. It's possible that getClassContext() filters >> out classes the caller can't access, but nothing in the documentation >> i

Re: Thoughts on adding getElementClass() method to StackTraceElement?

2013-06-16 Thread Alan Bateman
On 16/06/2013 15:29, Nick Williams wrote: On Jun 16, 2013, at 1:25 AM, Jeroen Frijters wrote: : SecurityManager.getClassContext() is not available to unpriviliged callers, so I don't think this a valid argument. Can you define what "is not available to unprivileged callers" means a little be

Re: RFR (S) CR 8016236: Class.getGenericInterfaces performance improvement

2013-06-16 Thread Alan Bateman
On 13/06/2013 12:47, Aleksey Shipilev wrote: Friendly reminder for the reviewers. On 06/10/2013 07:53 PM, Aleksey Shipilev wrote: This is the follow-up on the issue Doug identified: http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-June/017798.html I had reworked the patch, webrev i

Re: RFR (S) CR 8016236: Class.getGenericInterfaces performance improvement

2013-06-16 Thread Alan Bateman
On 10/06/2013 21:57, Peter Levart wrote: : I should note that ReflectionData is invalidated when the class is redefined. I don't know if generic signature is one of those things that can change with class redefinition, but invalidation is just one purpose of ReflectionData and the other is ca

Re: Thoughts on adding getElementClass() method to StackTraceElement?

2013-06-16 Thread Nick Williams
On Jun 16, 2013, at 9:29 AM, Nick Williams wrote: > > On Jun 16, 2013, at 1:25 AM, Jeroen Frijters wrote: > >> Nick Williams wrote: >>> I'm going to stick by my original assessment that I'm not convinced >>> there's a security issue. It's possible that getClassContext() filters >>> out classes

Cleanup of doclint warnings in java.lang.{annotation, reflect}

2013-06-16 Thread Joe Darcy
Hello, Please review the diff below of changes to get java.lang.annotation and java.lang.reflect clean on doclint warnings. I soon plan to send out another patch to cleanup java.lang; I'll file one or more bugs to cover this work depending on how reviews come in. Thanks, -Joe diff -r 45a3

Cleanup of some doclint warnings in java.lang

2013-06-16 Thread Joe Darcy
Hello, Please review the patch below which resolves a subset of the doclint warnings in java.lang. Thanks, -Joe diff -r 45a3584bfacf src/share/classes/java/lang/Boolean.java --- a/src/share/classes/java/lang/Boolean.javaFri Jun 14 15:14:56 2013 +0400 +++ b/src/share/classes/java/lang/Bo

Re: RFR (S) CR 8016236: Class.getGenericInterfaces performance improvement

2013-06-16 Thread Peter Levart
On 06/16/2013 09:44 PM, Alan Bateman wrote: On 13/06/2013 12:47, Aleksey Shipilev wrote: Friendly reminder for the reviewers. On 06/10/2013 07:53 PM, Aleksey Shipilev wrote: This is the follow-up on the issue Doug identified: http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-June/01779

RE: Thoughts on adding getElementClass() method to StackTraceElement?

2013-06-16 Thread Jeroen Frijters
Nick Williams wrote: > What if we also added a getStackFrames() method to Throwable? That would > meet my needs but it would also satisfy what I'm observing is a desire > to have a new API for this (StackFrame) instead of adding it to > StackTraceElement. I'm very open to how it's implemented, as l

Re: Thoughts on adding getElementClass() method to StackTraceElement?

2013-06-16 Thread Peter Levart
On 06/17/2013 08:06 AM, Jeroen Frijters wrote: Nick Williams wrote: What if we also added a getStackFrames() method to Throwable? That would meet my needs but it would also satisfy what I'm observing is a desire to have a new API for this (StackFrame) instead of adding it to StackTraceElement. I

hg: jdk8/tl/nashorn: 4 new changesets

2013-06-16 Thread lana . steuck
Changeset: e857ab684db0 Author:cl Date: 2013-06-06 20:48 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/e857ab684db0 Added tag jdk8-b93 for changeset ddbf41575a2b ! .hgtags Changeset: d92b756bc739 Author:lana Date: 2013-06-10 17:04 -0700 URL: http://hg.op

hg: jdk8/tl: 13 new changesets

2013-06-16 Thread lana . steuck
Changeset: 33b6df33a2b7 Author:erikj Date: 2013-05-29 13:58 +0200 URL: http://hg.openjdk.java.net/jdk8/tl/rev/33b6df33a2b7 8013920: Configure sets JOBS to 0 if memory is too low. Reviewed-by: tbell ! common/autoconf/build-performance.m4 ! common/autoconf/generated-configure.sh Cha

hg: jdk8/tl/jaxws: 3 new changesets

2013-06-16 Thread lana . steuck
Changeset: 254c53fd97ab Author:katleman Date: 2013-06-06 09:54 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/jaxws/rev/254c53fd97ab Added tag jdk8-b93 for changeset 7386eca865e1 ! .hgtags Changeset: 1468c94135f9 Author:katleman Date: 2013-06-13 09:48 -0700 URL: http

hg: jdk8/tl/jaxp: 4 new changesets

2013-06-16 Thread lana . steuck
Changeset: 40da96cab40e Author:katleman Date: 2013-06-06 09:54 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/jaxp/rev/40da96cab40e Added tag jdk8-b93 for changeset d583a491d63c ! .hgtags Changeset: c84658e1740d Author:lana Date: 2013-06-10 16:59 -0700 URL: http://hg

hg: jdk8/tl/corba: 3 new changesets

2013-06-16 Thread lana . steuck
Changeset: 22f5d7f261d9 Author:katleman Date: 2013-06-06 09:54 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/corba/rev/22f5d7f261d9 Added tag jdk8-b93 for changeset 8dc9d7ccbb2d ! .hgtags Changeset: 2cf36f43df36 Author:katleman Date: 2013-06-13 09:48 -0700 URL: http

Re: Thoughts on adding getElementClass() method to StackTraceElement?

2013-06-16 Thread Nick Williams
On Jun 17, 2013, at 1:12 AM, Peter Levart wrote: > On 06/17/2013 08:06 AM, Jeroen Frijters wrote: >> Nick Williams wrote: >>> What if we also added a getStackFrames() method to Throwable? That would >>> meet my needs but it would also satisfy what I'm observing is a desire >>> to have a new API f

hg: jdk8/tl/hotspot: 65 new changesets

2013-06-16 Thread lana . steuck
Changeset: 61dcf187a198 Author:katleman Date: 2013-06-06 09:54 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/hotspot/rev/61dcf187a198 Added tag jdk8-b93 for changeset 573d86d412cd ! .hgtags Changeset: 194b27b865bc Author:amurillo Date: 2013-05-24 09:35 -0700 URL: ht

hg: jdk8/tl/langtools: 4 new changesets

2013-06-16 Thread lana . steuck
Changeset: 888386fddc09 Author:katleman Date: 2013-06-06 09:55 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/888386fddc09 Added tag jdk8-b93 for changeset 2c5a568ee36e ! .hgtags Changeset: 48c6e6ab7c81 Author:lana Date: 2013-06-10 17:04 -0700 URL: http

Re: Thoughts on adding getElementClass() method to StackTraceElement?

2013-06-16 Thread Peter Levart
On 06/15/2013 09:59 PM, Nick Williams wrote: On Jun 15, 2013, at 2:22 PM, Remi Forax wrote: Could you be a little more clear why you need a class for your logging API, exactly, why the class name is not enough for logging purpose ? Certainly. Log4j 2 offers "extended stack trace" patterns. Wh