Re: Replacement for JDK8 APIs

2016-11-28 Thread Stéphane Nicoll
On Mon, Nov 28, 2016 at 11:49 AM, Alan Bateman wrote: > On 28/11/2016 10:36, Stéphane Nicoll wrote: > > Peter, >> >> Thanks a lot, that helped! [1] >> >> Cheers, >> S. >> >> [1] >> https://github.com/spring-projects/spring-boot/commit/e15b3e >>

Re: Replacement for JDK8 APIs

2016-11-28 Thread Alan Bateman
On 28/11/2016 10:36, Stéphane Nicoll wrote: Peter, Thanks a lot, that helped! [1] Cheers, S. [1] https://github.com/spring-projects/spring-boot/commit/e15b3e463f312524495349673a16cb67cfaa2eae The reflection has come up a number of things so great that Peter tracked this down. So I'm

Re: Replacement for JDK8 APIs

2016-11-28 Thread Stéphane Nicoll
Peter, Thanks a lot, that helped! [1] Cheers, S. [1] https://github.com/spring-projects/spring-boot/commit/e15b3e463f312524495349673a16cb67cfaa2eae On Mon, Nov 28, 2016 at 10:50 AM, Peter Levart wrote: > > > On 11/28/2016 10:39 AM, Peter Levart wrote: > >> final class

Re: Replacement for JDK8 APIs

2016-11-28 Thread Peter Levart
On 11/28/2016 10:39 AM, Peter Levart wrote: final class Trees extends ReflectionWrapper { private Trees(Object instance) { super(com.sun.source.util.Trees.class, instance); } ...ah, you would probably want to use Class.forName("com.sun.source.util.Trees") above... Peter

Re: Replacement for JDK8 APIs

2016-11-28 Thread Peter Levart
Hi Stephan, I thin this is a classical problem with reflection access checking that existed before jigsaw, but is now encountered even more frequently. The problem is that your ReflectionWrapper, given an instnace of some object, takes its runtime Class and searches methods in that class. The

Re: Replacement for JDK8 APIs

2016-11-28 Thread Stéphane Nicoll
Jon, We invoke `com.sun.source.util.Trees#instance(ProcessingEnvironment)` reflectively[1] as this class may not be available. This gives us access to `Tree` that we handle reflectively as well[2]. There is no reference anywhere to com.sun.tools.javac.api.JavacTrees in our codebase so I guess

Re: Replacement for JDK8 APIs

2016-11-27 Thread Jonathan Gibbons
Stéphan, You say you are using com.sun.tools.javac.api.JavacTrees. Although that class is not exported from jdk.compiler, it is an implementation of the interface com.sun.source.util.Trees, which is exported. Is the interface sufficient to your needs? If not, what methods are you calling?

Re: Replacement for JDK8 APIs

2016-11-27 Thread Alan Bateman
On 27/11/2016 09:16, Stéphane Nicoll wrote: Hey, Thanks for all the feedback so far. Any idea about the annotation processor question? Is there a dedicated dev list for it maybe? compiler-dev is the place to bring it up. -Alan

Re: Replacement for JDK8 APIs

2016-11-27 Thread Stéphane Nicoll
Hey, Thanks for all the feedback so far. Any idea about the annotation processor question? Is there a dedicated dev list for it maybe? Thank you, S. On Thu, Nov 24, 2016 at 3:22 PM, Stéphane Nicoll wrote: > Hi, > > I am working on the Spring Boot project[1] and I am

Re: Replacement for JDK8 APIs

2016-11-25 Thread Alan Bateman
On 25/11/2016 12:11, Stéphane Nicoll wrote: : Yes, there is a feature in Spring Boot called devtools that allows you do remote debugging via SSH[1] - Is there any way to achieve the same feature with JDK 9? Nothing has really changed here, it's just that some JDK internal classes have

Re: Replacement for JDK8 APIs

2016-11-25 Thread Eirik Bjørsnøs
Except that wouldn't work with random ports.. Eirik. On Fri, Nov 25, 2016 at 1:37 PM, Eirik Bjørsnøs wrote: > > > Stéphane, > > Could you inspect the JVM command line and parse the debugging agent > options? > > Eirik. > > On Fri, Nov 25, 2016 at 1:11 PM, Stéphane Nicoll

Re: Replacement for JDK8 APIs

2016-11-25 Thread Eirik Bjørsnøs
Stéphane, Could you inspect the JVM command line and parse the debugging agent options? Eirik. On Fri, Nov 25, 2016 at 1:11 PM, Stéphane Nicoll wrote: > On Fri, Nov 25, 2016 at 3:14 AM, Alan Bateman > wrote: > > > On 24/11/2016 14:22, Stéphane

Re: Replacement for JDK8 APIs

2016-11-25 Thread Stéphane Nicoll
On Fri, Nov 25, 2016 at 3:14 AM, Alan Bateman wrote: > On 24/11/2016 14:22, Stéphane Nicoll wrote: > > : >> >> We use "sun.misc.VMSupport" to retrieve the port being used by the Java >> remote debugging. You can find the actual code in >> RemoteDebugPortProvider[3] >> >>

Re: Replacement for JDK8 APIs

2016-11-24 Thread Alan Bateman
On 24/11/2016 14:22, Stéphane Nicoll wrote: : We use "sun.misc.VMSupport" to retrieve the port being used by the Java remote debugging. You can find the actual code in RemoteDebugPortProvider[3] This class was never intended to be used directly of course. It doesn't exist (or rather it has

Replacement for JDK8 APIs

2016-11-24 Thread Stéphane Nicoll
Hi, I am working on the Spring Boot project[1] and I am trying to make sure our codebase compiles with the current JDK9 build[2]. So far I've hit two major issues: We use "sun.misc.VMSupport" to retrieve the port being used by the Java remote debugging. You can find the actual code in