Re: Using java.awt.Toolkit.getDefaultToolkit().getScreenSize() reflectively causes InaccessibleObjectException

2017-01-05 Thread Phil Race
This should be discussed on jigsaw-dev. But can you share your code ? - since the following works for me : import java.awt.Toolkit; public class TK { public static void main(String args[]) throws Exception { Toolkit tk = Toolkit.getDefaultToolkit(); Class tkc = Class.forName(

Re: Using java.awt.Toolkit.getDefaultToolkit().getScreenSize() reflectively causes InaccessibleObjectException

2017-01-05 Thread Phil Race
n't work for implementation classes; it's necessary to reflect over exported classes and interfaces instead. Alex On 1/5/2017 11:22 AM, Phil Race wrote: This should be discussed on jigsaw-dev. But can you share your code ? - since the following works for me : import java.awt.Toolki

Re: Using java.awt.Toolkit.getDefaultToolkit().getScreenSize() reflectively causes InaccessibleObjectException

2017-01-05 Thread Phil Race
erAccess(java.base@9-ea/AccessibleObject.java:355) at java.lang.reflect.AccessibleObject.checkAccess(java.base@9-ea/AccessibleObject.java:347) at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:529) at TK8.main(TK8.java:9) -phil. On 01/05/2017 11:45 AM, Phil Race wrote:

Re: Using java.awt.Toolkit.getDefaultToolkit().getScreenSize() reflectively causes InaccessibleObjectException

2017-01-05 Thread Phil Race
ot declared public, it's just more visible in the modular world of Java 9 because to be accessible a class has to be declared public *and* the package has to be exported. cheers, Rémi - Mail original - De: "Phil Race" À: "Alex Buckley" , jigsaw-dev@openjdk.java.

Re: Using java.awt.Toolkit.getDefaultToolkit().getScreenSize() reflectively causes InaccessibleObjectException

2017-01-05 Thread Phil Race
ot declared public, it's just more visible in the modular world of Java 9 because to be accessible a class has to be declared public *and* the package has to be exported. cheers, Rémi - Mail original - De: "Phil Race" À: "Alex Buckley" , jigsaw-dev@openjdk.java.

Re: Better tools for adjusting to strong encapsulation

2017-03-21 Thread Phil Race
Lest folks think they can now sit back and relax until JDK 10, I'd like to point out that there are some cases where what has happened in 9 is that a very small number of old deprecated and non-standard APIs have actually been removed, and some small number of APIs adjusted in behaviour. Whilst th

Re: Provide access to data offset in WritableRaster in Java 9

2017-07-13 Thread Phil Race
Hi Peter, 2d-dev would be the right list. Sounds like you were accessing jdk internals and found that you mostly can do away with that except for sub-images. What you should really do is file an issue at bugs.java.com as client-libs/2d for cat/subcat. If this had been raised earlier in JDK 9

Re: RFR [9] Modular Source Code

2014-08-19 Thread Phil Race
On a related note I am scratching my head about why some files destined to be compiled into libawt or libawt_xawt go into a directory called 'common'. Eg OpenGL sources are in common but aren't common to all libs or even to all awt libs, since they would go into libawt on windows and libawt_xawt o

Re: RFR [9] Modular Source Code

2014-08-28 Thread Phil Race
* All of the awt-related directories (libawt_* and common) include an unnecessary extra layer, the "sun" directory. It is not needed anymore, Let's *not* do that. It also affects the destination package. Remember sun.* is the protected top-level package .. and people won't always be running in j

Re: [OpenJDK 2D-Dev] RFR [9] Modular Source Code

2014-08-28 Thread Phil Race
On 8/28/2014 12:36 PM, Phil Race wrote: * All of the awt-related directories (libawt_* and common) include an unnecessary extra layer, the "sun" directory. It is not needed anymore, Let's *not* do that. It also affects the destination package. Remember sun.* is the protected to

Re: Modular Run-Time Images build fails with JDK8u25 as bootstrap JDK

2014-12-06 Thread Phil Race
yep lots of people have reported this/seen this -phil. On 12/6/14 1:03 PM, Stuart Marks wrote: [Adding build-dev to let them know others are seeing this. I'm not on jigsaw-dev though so this might not make it there.] Hi Peter, I ran into this myself the other day and had a wrestling match wi

Re: Caciocavallo (was Re: Removing all methods that use the AWT peer types in JDK 9)

2015-02-19 Thread Phil Race
On 2/19/2015 8:49 AM, Alan Bateman wrote: On 19/02/2015 16:30, Roman Kennke wrote: : Hmm. I am not totally familiar, but from what I heard at FOSDEM from Mark Reinhold, it is possible to export certain APIs *only to other known modules*. This is similar in concept to C++ friends, except it happe

Re: Fw: SWT_AWT bridge fails with IllegalAccessException in Java 1.9

2016-01-22 Thread Phil Race
s for them in the future. I think this needs someone with expertise in this area to comment, I hope Phil Race or Kevin Rushforth. In particular, I think it needs direction as to whether a standard or JDK-specific make sense here and whether now is the time to try to define that. Maybe there have b

Re: [9] Review Request: 8151041 Jigsaw-only failure of javax/sound/sampled/spi/AudioFileReader/RecognizeWaveExtensible.java

2016-03-04 Thread Phil Race
+1 -phil. On 03/04/2016 10:59 AM, Sergey Bylokhov wrote: Hello, Please review the small fix for jdk9-jake. In the fix the list in "module java.desktop" is updated, and now it contains the same data as META-INF.services/javax.sound.xxx of the current jdk9-dev. I seems I'll need a sponsor to

Re: Initial webrev with changes for JDK 9

2016-03-14 Thread Phil Race
http://cr.openjdk.java.net/~alanb/8142968/2/jdk/test/java/awt/patchlib/java.desktop/java/awt/Helper.java.html 30 //java.awt.Helper.class.getModule().addExports(pn, target); Can we remove the commented out line ? http://cr.openjdk.java.net/~alanb/8142968/2/jdk/src/java.desktop/macosx/c

Re: JDK-8153362: [jigsaw] Add javac -Xlint warning to list exposed types which are not accessible

2016-06-13 Thread Phil Race
Hmm .. given that the majority of the jdk changes are in client - specifically swing & accessibility - including the swing mailing list would have increased the likelihood of the right people clicking on this webrev link. IMO, we should remove these unusable fields from the Swing API - where