Menu

#18 Compilation warning - operations will be denied in a future release

open
nobody
None
3
2018-09-19
2018-08-10
Profetiko
No

Paolo Ucchino ucchino@gmail.com
15:41 (1 ora fa)
a foxtrot-user
Hi there

using foxtrot with java 1.8 i obtained the folling message :

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by foxtrot.pumps.ConditionalEventPump$1 (file:/N:/AppName/lib/foxtrot-core-4.0.jar) to method java.awt.EventDispatchThread.pumpEvents(java.awt.Conditional)
WARNING: Please consider reporting this to the maintainers of foxtrot.pumps.ConditionalEventPump$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

using the suggested --illegal-access=warn i obtained :

WARNING: Illegal reflective access by foxtrot.pumps.ConditionalEventPump$1 (file:/project/lib/foxtrot-core-4.0.jar) to method java.awt.EventDispatchThread.pumpEvents(java.awt.Conditional)
WARNING: Illegal reflective access by foxtrot.pumps.SunJDK141ConditionalEventPump$1 (file:/N:/AppName/lib/foxtrot-core-4.0.jar) to method java.awt.SequencedEvent.getFirst()

I usually use this fragment to invike foxtrot :

Worker.post(CLASS_TO_INVOKE);

and CLASS_TO_INVOKE extends Job

Any ideas about?

Best regards

Related

Feature Requests: #18

Discussion

  • Simone Bordet

    Simone Bordet - 2018-08-13

    Paolo,

    yes, Foxtrot does deep reflection on AWT classes.

    However, Foxtrot is now a bit out of date, it served a purpose back in the days of JDK 1.3.

    With JDK 1.7, a standard API for pumping AWT events has been added to the JDK, so applications should rely on that instead, see https://docs.oracle.com/javase/7/docs/api/java/awt/EventQueue.html#createSecondaryLoop().

    Ciao!

     
    • Paolo Ucchino

      Paolo Ucchino - 2018-08-13

      The strength of foxtrot compared to swingutilities is undoubtedly the
      possibility of using its "Synchronous Solution".

      Using the API you mentioned, it is possible to replicate the feasibility
      using the secondaryloop (
      https://docs.oracle.com/javase/7/docs/api/java/awt/SecondaryLoop.html) i
      see... Is it correct?

      Using a barbarian method and not wanting to go into detail it would be
      equivalent to invoke SwingUtilities.invokelater and then open a modal
      dialog.

      2018-08-13 14:56 GMT+02:00 Simone Bordet <simonebordet@users.sourceforge.net

      :

      Paolo,

      yes, Foxtrot does deep reflection on AWT classes.

      However, Foxtrot is now a bit out of date, it served a purpose back in the
      days of JDK 1.3.

      With JDK 1.7, a standard API for pumping AWT events has been added to the
      JDK, so applications should rely on that instead, see
      https://docs.oracle.com/javase/7/docs/api/java/awt/EventQueue.html#
      createSecondaryLoop().

      Ciao!

      Status: open
      Group: Next Release (example)
      Created: Fri Aug 10, 2018 02:58 PM UTC by Profetiko
      Last Updated: Fri Aug 10, 2018 02:58 PM UTC
      Owner: nobody

      Paolo Ucchino ucchino@gmail.com
      15:41 (1 ora fa)
      a foxtrot-user
      Hi there

      using foxtrot with java 1.8 i obtained the folling message :

      WARNING: An illegal reflective access operation has occurred
      WARNING: Illegal reflective access by foxtrot.pumps.ConditionalEventPump$1
      (file:/N:/AppName/lib/foxtrot-core-4.0.jar) to method
      java.awt.EventDispatchThread.pumpEvents(java.awt.Conditional)
      WARNING: Please consider reporting this to the maintainers of
      foxtrot.pumps.ConditionalEventPump$1
      WARNING: Use --illegal-access=warn to enable warnings of further illegal
      reflective access operations
      WARNING: All illegal access operations will be denied in a future release

      using the suggested --illegal-access=warn i obtained :

      WARNING: Illegal reflective access by foxtrot.pumps.ConditionalEventPump$1
      (file:/project/lib/foxtrot-core-4.0.jar) to method
      java.awt.EventDispatchThread.pumpEvents(java.awt.Conditional)
      WARNING: Illegal reflective access by foxtrot.pumps.
      SunJDK141ConditionalEventPump$1 (file:/N:/AppName/lib/foxtrot-core-4.0.jar)
      to method java.awt.SequencedEvent.getFirst()

      I usually use this fragment to invike foxtrot :

      Worker.post(CLASS_TO_INVOKE);

      and CLASS_TO_INVOKE extends Job

      Any ideas about?

      Best regards

      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/foxtrot/feature-requests/18/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Feature Requests: #18

  • Simone Bordet

    Simone Bordet - 2018-08-13

    Foxtrot could have an implementation based on SecondaryLoop, but this was not done.

    Rather than using SwingUtilities.invokelater(), you want to do this (did not try, just to give you an idea):

    Executor executor = ...;
    
    EventQueue queue = Toolkit.getDefaultToolkit().getSystemEventQueue();
    SecondaryLoop loop = queue.createSecondaryLoop();
    executor.execute(() -> {
        doWork();
        loop.exit();
    });
    loop.enter();
    

    Ciao!

     
    • Paolo Ucchino

      Paolo Ucchino - 2018-08-14

      confess I'm sorry to leave foxtrot but what to say ... it's time.

      Thanks for the support Simone.

      Ciao!

      2018-08-13 15:52 GMT+02:00 Simone Bordet <simonebordet@users.sourceforge.net

      :

      Foxtrot could have an implementation based on SecondaryLoop, but this was
      not done.

      Rather than using SwingUtilities.invokelater(), you want to do this (did
      not try, just to give you an idea):

      Executor executor = ...;

      EventQueue queue = Toolkit.getDefaultToolkit().getSystemEventQueue();
      SecondaryLoop loop = queue.createSecondaryLoop();
      executor.execute(() -> {
      doWork();
      loop.exit();
      });
      loop.enter();

      Ciao!

      Status: open
      Group: Next Release (example)
      Created: Fri Aug 10, 2018 02:58 PM UTC by Profetiko
      Last Updated: Mon Aug 13, 2018 12:56 PM UTC
      Owner: nobody

      Paolo Ucchino ucchino@gmail.com
      15:41 (1 ora fa)
      a foxtrot-user
      Hi there

      using foxtrot with java 1.8 i obtained the folling message :

      WARNING: An illegal reflective access operation has occurred
      WARNING: Illegal reflective access by foxtrot.pumps.ConditionalEventPump$1
      (file:/N:/AppName/lib/foxtrot-core-4.0.jar) to method
      java.awt.EventDispatchThread.pumpEvents(java.awt.Conditional)
      WARNING: Please consider reporting this to the maintainers of
      foxtrot.pumps.ConditionalEventPump$1
      WARNING: Use --illegal-access=warn to enable warnings of further illegal
      reflective access operations
      WARNING: All illegal access operations will be denied in a future release

      using the suggested --illegal-access=warn i obtained :

      WARNING: Illegal reflective access by foxtrot.pumps.ConditionalEventPump$1
      (file:/project/lib/foxtrot-core-4.0.jar) to method
      java.awt.EventDispatchThread.pumpEvents(java.awt.Conditional)
      WARNING: Illegal reflective access by foxtrot.pumps.
      SunJDK141ConditionalEventPump$1 (file:/N:/AppName/lib/foxtrot-core-4.0.jar)
      to method java.awt.SequencedEvent.getFirst()

      I usually use this fragment to invike foxtrot :

      Worker.post(CLASS_TO_INVOKE);

      and CLASS_TO_INVOKE extends Job

      Any ideas about?

      Best regards

      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/foxtrot/feature-requests/18/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Feature Requests: #18

      • Simone Bordet

        Simone Bordet - 2018-08-14

        @Paolo

        well, perhaps you don't need to leave it. I may have some time to look at the project and implement the pump using SecondaryLoop.

        Cheers

         
        • Raymond Martin

          Raymond Martin - 2018-09-19

          Hi, so is there any chance of this change over to SecondaryLoop in the foreseeable future? I will have to gut an appalication I made with Foxtrot otherwise to get around the synchronization issues it had before using the lib. Thanks.

           

Log in to post a comment.

MongoDB Logo MongoDB