This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git commit 114fa1689291d735e9e641ada6788c06b66a0eba Author: Eric Chatellier <chatellier@codelutin.com> Date: Wed Jul 10 16:31:38 2019 +0200 fixes #148: An illegal reflective access operation on java 11 --- pom.xml | 4 ++-- src/main/java/org/chorem/jtimer/JTimer.java | 7 ++----- .../java/org/chorem/jtimer/system/SystemInfo.java | 5 ----- .../jtimer/system/macos/MacOSSystemInfo.java | 7 +------ .../chorem/jtimer/system/unix/UnixSystemInfo.java | 24 +--------------------- .../jtimer/system/win32/Win32SystemInfo.java | 7 +------ 6 files changed, 7 insertions(+), 47 deletions(-) diff --git a/pom.xml b/pom.xml index 806e98c..47af84a 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ #%L jTimer %% - Copyright (C) 2007 - 2018 CodeLutin + Copyright (C) 2007 - 2019 CodeLutin %% This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -32,7 +32,7 @@ <groupId>org.chorem</groupId> <artifactId>jtimer</artifactId> - <version>1.6-SNAPSHOT</version> + <version>1.5.3-SNAPSHOT</version> <name>jTimer</name> <description> diff --git a/src/main/java/org/chorem/jtimer/JTimer.java b/src/main/java/org/chorem/jtimer/JTimer.java index b5fb76b..5385a44 100644 --- a/src/main/java/org/chorem/jtimer/JTimer.java +++ b/src/main/java/org/chorem/jtimer/JTimer.java @@ -2,7 +2,7 @@ * #%L * jTimer * %% - * Copyright (C) 2007 - 2018 CodeLutin + * Copyright (C) 2007 - 2019 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as @@ -185,10 +185,7 @@ public class JTimer extends SingleFrameApplication implements resourceMap = ctxt.getResourceMap(); // native init - Optional<SystemInfo> systemInfo = SystemInfoFactory.getSystemInfo(); - if (systemInfo.isPresent()) { - systemInfo.get().systemInit(); - } + SystemInfoFactory.getSystemInfo(); // fix start in iconified mode ctxt.getSessionStorage().putProperty(JFrame.class, new WindowProperty2()); diff --git a/src/main/java/org/chorem/jtimer/system/SystemInfo.java b/src/main/java/org/chorem/jtimer/system/SystemInfo.java index 2769efe..f02bc82 100644 --- a/src/main/java/org/chorem/jtimer/system/SystemInfo.java +++ b/src/main/java/org/chorem/jtimer/system/SystemInfo.java @@ -33,11 +33,6 @@ package org.chorem.jtimer.system; */ public interface SystemInfo { - /** - * Perform additional init related to system native call. - */ - void systemInit(); - /** * Get system idle time in milliseconds. * diff --git a/src/main/java/org/chorem/jtimer/system/macos/MacOSSystemInfo.java b/src/main/java/org/chorem/jtimer/system/macos/MacOSSystemInfo.java index 085f2df..6e7b4ec 100644 --- a/src/main/java/org/chorem/jtimer/system/macos/MacOSSystemInfo.java +++ b/src/main/java/org/chorem/jtimer/system/macos/MacOSSystemInfo.java @@ -2,7 +2,7 @@ * #%L * jTimer * %% - * Copyright (C) 2010 - 2016 CodeLutin + * Copyright (C) 2010 - 2019 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as @@ -38,11 +38,6 @@ import org.chorem.jtimer.system.SystemInfo; */ public class MacOSSystemInfo implements SystemInfo { - @Override - public void systemInit() { - - } - @Override public long getIdleTime() { double idleTimeSeconds = ApplicationServices.INSTANCE diff --git a/src/main/java/org/chorem/jtimer/system/unix/UnixSystemInfo.java b/src/main/java/org/chorem/jtimer/system/unix/UnixSystemInfo.java index 6ff5a51..3751c8c 100644 --- a/src/main/java/org/chorem/jtimer/system/unix/UnixSystemInfo.java +++ b/src/main/java/org/chorem/jtimer/system/unix/UnixSystemInfo.java @@ -2,7 +2,7 @@ * #%L * jTimer * %% - * Copyright (C) 2007 - 2016 CodeLutin + * Copyright (C) 2007 - 2019 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as @@ -46,28 +46,6 @@ public class UnixSystemInfo implements SystemInfo { /** log. */ private static Log log = LogFactory.getLog(UnixSystemInfo.class); - @Override - public void systemInit() { - // fixme awt application name. Can be seen only with gnome-shell - // tray icon is displayed with name "org-chorem-jtimer-JTimer" instead of - // only "jTimer" with following fix : - try { - Toolkit xToolkit = Toolkit.getDefaultToolkit(); - java.lang.reflect.Field awtAppClassNameField = xToolkit.getClass().getDeclaredField("awtAppClassName"); - awtAppClassNameField.setAccessible(true); - awtAppClassNameField.set(xToolkit, "jTimer"); - } catch (NoSuchFieldException ex) { - // probably not running on linux - if (log.isTraceEnabled()) { - log.trace("Can't find any field named 'awtAppClassName'", ex); - } - } catch (Exception ex) { - if (log.isWarnEnabled()) { - log.warn("Can change awt application name", ex); - } - } - } - @Override public long getIdleTime() { diff --git a/src/main/java/org/chorem/jtimer/system/win32/Win32SystemInfo.java b/src/main/java/org/chorem/jtimer/system/win32/Win32SystemInfo.java index ea613c7..889b8c6 100644 --- a/src/main/java/org/chorem/jtimer/system/win32/Win32SystemInfo.java +++ b/src/main/java/org/chorem/jtimer/system/win32/Win32SystemInfo.java @@ -2,7 +2,7 @@ * #%L * jTimer * %% - * Copyright (C) 2007 - 2016 CodeLutin + * Copyright (C) 2007 - 2019 CodeLutin * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as @@ -60,11 +60,6 @@ public class Win32SystemInfo implements SystemInfo { return Kernel32.INSTANCE.GetTickCount() - lastInputInfo.dwTime; } - @Override - public void systemInit() { - - } - @Override public long getIdleTime() { long millisTime = getIdleTimeMillisWin32(); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.