From c593f8bf59dbe5d002c3b843796e54db6dd69bec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Jeli=C5=84ski?= Date: Fri, 27 Oct 2023 16:09:27 +0000 Subject: [PATCH] 8318091: Remove empty initIDs functions Reviewed-by: prr, aivanov --- .../macosx/native/libawt_lwawt/awt/InitIDs.m | 32 +------ .../share/classes/java/awt/Button.java | 17 +--- .../share/classes/java/awt/Color.java | 22 +---- .../share/classes/java/awt/FileDialog.java | 20 +---- .../java/awt/KeyboardFocusManager.java | 12 +-- .../share/classes/java/awt/Rectangle.java | 15 +--- .../share/classes/java/awt/TextField.java | 15 +--- .../unix/native/common/awt/X11Color.c | 3 +- .../unix/native/libawt/awt/initIDs.c | 16 +--- .../unix/native/libawt_xawt/xawt/XToolkit.c | 35 -------- .../native/libawt/windows/awt_Button.h | 3 +- .../native/libawt/windows/awt_Color.cpp | 44 ---------- .../native/libawt/windows/awt_Component.cpp | 3 +- .../windows/awt_KeyboardFocusManager.cpp | 14 +-- .../native/libawt/windows/awt_Rectangle.cpp | 38 --------- .../native/libawt/windows/awt_TextField.h | 3 +- .../windows/native/libawt/windows/initIDs.cpp | 85 ------------------- 17 files changed, 16 insertions(+), 361 deletions(-) delete mode 100644 src/java.desktop/windows/native/libawt/windows/awt_Color.cpp delete mode 100644 src/java.desktop/windows/native/libawt/windows/awt_Rectangle.cpp delete mode 100644 src/java.desktop/windows/native/libawt/windows/initIDs.cpp diff --git a/src/java.desktop/macosx/native/libawt_lwawt/awt/InitIDs.m b/src/java.desktop/macosx/native/libawt_lwawt/awt/InitIDs.m index 44cb6307b80..38d453ff835 100644 --- a/src/java.desktop/macosx/native/libawt_lwawt/awt/InitIDs.m +++ b/src/java.desktop/macosx/native/libawt_lwawt/awt/InitIDs.m @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,11 +32,6 @@ JNIEXPORT void JNICALL Java_java_awt_AWTEvent_initIDs { } -JNIEXPORT void JNICALL Java_java_awt_Button_initIDs -(JNIEnv *env, jclass cls) -{ -} - JNIEXPORT void JNICALL Java_java_awt_Checkbox_initIDs (JNIEnv *env, jclass cls) { @@ -52,11 +47,6 @@ JNIEXPORT void JNICALL Java_java_awt_Choice_initIDs { } -JNIEXPORT void JNICALL Java_java_awt_Color_initIDs -(JNIEnv *env, jclass cls) -{ -} - JNIEXPORT void JNICALL Java_java_awt_Component_initIDs (JNIEnv *env, jclass cls) { @@ -87,11 +77,6 @@ JNIEXPORT void JNICALL Java_java_awt_Event_initIDs { } -JNIEXPORT void JNICALL Java_java_awt_FileDialog_initIDs -(JNIEnv *env, jclass cls) -{ -} - JNIEXPORT void JNICALL Java_java_awt_Font_initIDs (JNIEnv *env, jclass cls) { @@ -112,11 +97,6 @@ JNIEXPORT void JNICALL Java_java_awt_Insets_initIDs { } -JNIEXPORT void JNICALL Java_java_awt_KeyboardFocusManager_initIDs -(JNIEnv *env, jclass cls) -{ -} - JNIEXPORT void JNICALL Java_java_awt_Label_initIDs (JNIEnv *env, jclass cls) { @@ -142,11 +122,6 @@ JNIEXPORT void JNICALL Java_java_awt_MenuItem_initIDs { } -JNIEXPORT void JNICALL Java_java_awt_Rectangle_initIDs -(JNIEnv *env, jclass cls) -{ -} - JNIEXPORT void JNICALL Java_java_awt_ScrollPane_initIDs (JNIEnv *env, jclass cls) { @@ -167,11 +142,6 @@ JNIEXPORT void JNICALL Java_java_awt_TextArea_initIDs { } -JNIEXPORT void JNICALL Java_java_awt_TextField_initIDs -(JNIEnv *env, jclass cls) -{ -} - JNIEXPORT void JNICALL Java_java_awt_Toolkit_initIDs (JNIEnv *env, jclass cls) { diff --git a/src/java.desktop/share/classes/java/awt/Button.java b/src/java.desktop/share/classes/java/awt/Button.java index 1eaee299b99..d414ad9b965 100644 --- a/src/java.desktop/share/classes/java/awt/Button.java +++ b/src/java.desktop/share/classes/java/awt/Button.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -122,21 +122,6 @@ public class Button extends Component implements Accessible { @Serial private static final long serialVersionUID = -8774683716313001058L; - - static { - /* ensure that the necessary native libraries are loaded */ - Toolkit.loadLibraries(); - if (!GraphicsEnvironment.isHeadless()) { - initIDs(); - } - } - - /** - * Initialize JNI field and method IDs for fields that may be - * accessed from C. - */ - private static native void initIDs(); - /** * Constructs a button with an empty string for its label. * diff --git a/src/java.desktop/share/classes/java/awt/Color.java b/src/java.desktop/share/classes/java/awt/Color.java index 6bb4befd8e8..3b67cd6ee3b 100644 --- a/src/java.desktop/share/classes/java/awt/Color.java +++ b/src/java.desktop/share/classes/java/awt/Color.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -260,26 +260,6 @@ public class Color implements Paint, java.io.Serializable { @Serial private static final long serialVersionUID = 118526816881161077L; - /** - * Initialize JNI field and method IDs - */ - private static native void initIDs(); - - static { - /** 4112352 - Calling getDefaultToolkit() - ** here can cause this class to be accessed before it is fully - ** initialized. DON'T DO IT!!! - ** - ** Toolkit.getDefaultToolkit(); - **/ - - /* ensure that the necessary native libraries are loaded */ - Toolkit.loadLibraries(); - if (!GraphicsEnvironment.isHeadless()) { - initIDs(); - } - } - /** * Checks the color integer components supplied for validity. * Throws an {@link IllegalArgumentException} if the value is out of diff --git a/src/java.desktop/share/classes/java/awt/FileDialog.java b/src/java.desktop/share/classes/java/awt/FileDialog.java index 399544b9547..2c2e1624549 100644 --- a/src/java.desktop/share/classes/java/awt/FileDialog.java +++ b/src/java.desktop/share/classes/java/awt/FileDialog.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,7 @@ import java.io.FilenameFilter; import java.io.IOException; import java.io.ObjectInputStream; import java.io.Serial; +import java.lang.annotation.Native; import sun.awt.AWTAccessor; @@ -55,12 +56,14 @@ public class FileDialog extends Dialog { * This constant value indicates that the purpose of the file * dialog window is to locate a file from which to read. */ + @Native public static final int LOAD = 0; /** * This constant value indicates that the purpose of the file * dialog window is to locate a file to which to write. */ + @Native public static final int SAVE = 1; /** @@ -140,15 +143,6 @@ public class FileDialog extends Dialog { @Serial private static final long serialVersionUID = 5035145889651310422L; - - static { - /* ensure that the necessary native libraries are loaded */ - Toolkit.loadLibraries(); - if (!GraphicsEnvironment.isHeadless()) { - initIDs(); - } - } - static { AWTAccessor.setFileDialogAccessor( new AWTAccessor.FileDialogAccessor() { @@ -169,12 +163,6 @@ public class FileDialog extends Dialog { }); } - /** - * Initialize JNI field and method IDs for fields that may be - accessed from C. - */ - private static native void initIDs(); - /** * Creates a file dialog for loading a file. The title of the * file dialog is initially empty. This is a convenience method for diff --git a/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java b/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java index 820bdc25279..d3547094843 100644 --- a/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java +++ b/src/java.desktop/share/classes/java/awt/KeyboardFocusManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -109,11 +109,6 @@ public abstract class KeyboardFocusManager private static final PlatformLogger focusLog = PlatformLogger.getLogger("java.awt.focus.KeyboardFocusManager"); static { - /* ensure that the necessary native libraries are loaded */ - Toolkit.loadLibraries(); - if (!GraphicsEnvironment.isHeadless()) { - initIDs(); - } AWTAccessor.setKeyboardFocusManagerAccessor( new AWTAccessor.KeyboardFocusManagerAccessor() { public int shouldNativelyFocusHeavyweight(Component heavyweight, @@ -157,11 +152,6 @@ public abstract class KeyboardFocusManager transient KeyboardFocusManagerPeer peer; - /** - * Initialize JNI field and method IDs - */ - private static native void initIDs(); - private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.KeyboardFocusManager"); /** diff --git a/src/java.desktop/share/classes/java/awt/Rectangle.java b/src/java.desktop/share/classes/java/awt/Rectangle.java index 46ea34a4765..cd4c908f789 100644 --- a/src/java.desktop/share/classes/java/awt/Rectangle.java +++ b/src/java.desktop/share/classes/java/awt/Rectangle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -165,19 +165,6 @@ public class Rectangle extends Rectangle2D @Serial private static final long serialVersionUID = -4345857070255674764L; - /** - * Initialize JNI field and method IDs - */ - private static native void initIDs(); - - static { - /* ensure that the necessary native libraries are loaded */ - Toolkit.loadLibraries(); - if (!GraphicsEnvironment.isHeadless()) { - initIDs(); - } - } - /** * Constructs a new {@code Rectangle} whose upper-left corner * is at (0, 0) in the coordinate space, and whose width and diff --git a/src/java.desktop/share/classes/java/awt/TextField.java b/src/java.desktop/share/classes/java/awt/TextField.java index 0d74f238a87..82296f62706 100644 --- a/src/java.desktop/share/classes/java/awt/TextField.java +++ b/src/java.desktop/share/classes/java/awt/TextField.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -137,19 +137,6 @@ public non-sealed class TextField extends TextComponent { @Serial private static final long serialVersionUID = -2966288784432217853L; - /** - * Initialize JNI field and method ids - */ - private static native void initIDs(); - - static { - /* ensure that the necessary native libraries are loaded */ - Toolkit.loadLibraries(); - if (!GraphicsEnvironment.isHeadless()) { - initIDs(); - } - } - /** * Constructs a new text field. * @throws HeadlessException if GraphicsEnvironment.isHeadless() diff --git a/src/java.desktop/unix/native/common/awt/X11Color.c b/src/java.desktop/unix/native/common/awt/X11Color.c index b1602bb5ae4..6d3f4e7b246 100644 --- a/src/java.desktop/unix/native/common/awt/X11Color.c +++ b/src/java.desktop/unix/native/common/awt/X11Color.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,7 +39,6 @@ #include #endif /* !HEADLESS */ #include "awt_p.h" -#include "java_awt_Color.h" #include "java_awt_SystemColor.h" #include "java_awt_color_ColorSpace.h" #include "java_awt_Transparency.h" diff --git a/src/java.desktop/unix/native/libawt/awt/initIDs.c b/src/java.desktop/unix/native/libawt/awt/initIDs.c index d1c24c76af6..ddba5d1338a 100644 --- a/src/java.desktop/unix/native/libawt/awt/initIDs.c +++ b/src/java.desktop/unix/native/libawt/awt/initIDs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,10 @@ * questions. */ -#include "java_awt_Color.h" #include "java_awt_Dimension.h" #include "java_awt_MenuBar.h" #include "java_awt_FontMetrics.h" #include "java_awt_event_MouseEvent.h" -#include "java_awt_Rectangle.h" #include "java_awt_ScrollPaneAdjustable.h" #include "java_awt_Toolkit.h" #include "java_awt_CheckboxMenuItem.h" @@ -40,12 +38,6 @@ * which are used in the win32 awt. */ -JNIEXPORT void JNICALL -Java_java_awt_Color_initIDs - (JNIEnv *env, jclass clazz) -{ -} - JNIEXPORT void JNICALL Java_java_awt_MenuBar_initIDs (JNIEnv *env, jclass clazz) @@ -94,12 +86,6 @@ Java_java_awt_Dimension_initIDs { } -JNIEXPORT void JNICALL -Java_java_awt_Rectangle_initIDs - (JNIEnv *env, jclass clazz) -{ -} - JNIEXPORT void JNICALL Java_java_awt_event_MouseEvent_initIDs (JNIEnv *env, jclass clazz) diff --git a/src/java.desktop/unix/native/libawt_xawt/xawt/XToolkit.c b/src/java.desktop/unix/native/libawt_xawt/xawt/XToolkit.c index dc8338ecae8..4e69c2a1c66 100644 --- a/src/java.desktop/unix/native/libawt_xawt/xawt/XToolkit.c +++ b/src/java.desktop/unix/native/libawt_xawt/xawt/XToolkit.c @@ -78,16 +78,6 @@ extern Display* awt_init_Display(JNIEnv *env, jobject this); extern void freeNativeStringArray(char **array, jsize length); extern char** stringArrayToNative(JNIEnv *env, jobjectArray array, jsize * ret_length); -/* This function gets called from the static initializer for FileDialog.java - to initialize the fieldIDs for fields that may be accessed from C */ - -JNIEXPORT void JNICALL -Java_java_awt_FileDialog_initIDs - (JNIEnv *env, jclass cls) -{ - -} - JNIEXPORT void JNICALL Java_sun_awt_X11_XToolkit_initIDs (JNIEnv *env, jclass clazz) @@ -223,14 +213,6 @@ Java_java_awt_Container_initIDs } - -JNIEXPORT void JNICALL -Java_java_awt_Button_initIDs - (JNIEnv *env, jclass cls) -{ - -} - JNIEXPORT void JNICALL Java_java_awt_Scrollbar_initIDs (JNIEnv *env, jclass cls) @@ -297,12 +279,6 @@ JNIEXPORT void JNICALL Java_java_awt_ScrollPane_initIDs { } -JNIEXPORT void JNICALL -Java_java_awt_TextField_initIDs - (JNIEnv *env, jclass cls) -{ -} - JNIEXPORT void JNICALL Java_java_awt_Dialog_initIDs (JNIEnv *env, jclass cls) { } @@ -733,17 +709,6 @@ static void wakeUp() { /* ========================== End poll section ================================= */ -/* - * Class: java_awt_KeyboardFocusManager - * Method: initIDs - * Signature: ()V - */ -JNIEXPORT void JNICALL -Java_java_awt_KeyboardFocusManager_initIDs - (JNIEnv *env, jclass cls) -{ -} - /* * Class: sun_awt_X11_XToolkit * Method: getEnv diff --git a/src/java.desktop/windows/native/libawt/windows/awt_Button.h b/src/java.desktop/windows/native/libawt/windows/awt_Button.h index 1de51bcf4ce..5ef046b3504 100644 --- a/src/java.desktop/windows/native/libawt/windows/awt_Button.h +++ b/src/java.desktop/windows/native/libawt/windows/awt_Button.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,7 +28,6 @@ #include "awt_Component.h" -#include "java_awt_Button.h" #include "sun_awt_windows_WButtonPeer.h" diff --git a/src/java.desktop/windows/native/libawt/windows/awt_Color.cpp b/src/java.desktop/windows/native/libawt/windows/awt_Color.cpp deleted file mode 100644 index d65222ae7b5..00000000000 --- a/src/java.desktop/windows/native/libawt/windows/awt_Color.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -#include "java_awt_Color.h" - -/************************************************************************ - * Color native methods - */ - -extern "C" { - -/* - * Class: java_awt_Color - * Method: initIDs - * Signature: ()V; - */ -JNIEXPORT void JNICALL -Java_java_awt_Color_initIDs(JNIEnv *env, jclass cls) -{ -} - -} /* extern "C" */ diff --git a/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp b/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp index 1a7f0a8c863..b9e55848f75 100644 --- a/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp +++ b/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -56,7 +56,6 @@ #include #include -#include #include #include #include diff --git a/src/java.desktop/windows/native/libawt/windows/awt_KeyboardFocusManager.cpp b/src/java.desktop/windows/native/libawt/windows/awt_KeyboardFocusManager.cpp index 32fac31ec51..fb4d5334bff 100644 --- a/src/java.desktop/windows/native/libawt/windows/awt_KeyboardFocusManager.cpp +++ b/src/java.desktop/windows/native/libawt/windows/awt_KeyboardFocusManager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,7 +26,6 @@ #include "awt.h" #include "awt_Component.h" #include "awt_Toolkit.h" -#include #include static jobject getNativeFocusState(JNIEnv *env, void*(*ftn)()) { @@ -42,17 +41,6 @@ static jobject getNativeFocusState(JNIEnv *env, void*(*ftn)()) { extern "C" { -/* - * Class: java_awt_KeyboardFocusManager - * Method: initIDs - * Signature: ()V - */ -JNIEXPORT void JNICALL -Java_java_awt_KeyboardFocusManager_initIDs - (JNIEnv *env, jclass cls) -{ -} - /* * Class: sun_awt_windows_WKeyboardFocusManagerPeer * Method: setNativeFocusOwner diff --git a/src/java.desktop/windows/native/libawt/windows/awt_Rectangle.cpp b/src/java.desktop/windows/native/libawt/windows/awt_Rectangle.cpp deleted file mode 100644 index b50e8d22730..00000000000 --- a/src/java.desktop/windows/native/libawt/windows/awt_Rectangle.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -#include "java_awt_Rectangle.h" - -/************************************************************************ - * AwtRectangle native methods - */ - -extern "C" { - -JNIEXPORT void JNICALL -Java_java_awt_Rectangle_initIDs(JNIEnv *env, jclass cls) { -} - -} /* extern "C" */ diff --git a/src/java.desktop/windows/native/libawt/windows/awt_TextField.h b/src/java.desktop/windows/native/libawt/windows/awt_TextField.h index ced7a48def5..1da11c825a1 100644 --- a/src/java.desktop/windows/native/libawt/windows/awt_TextField.h +++ b/src/java.desktop/windows/native/libawt/windows/awt_TextField.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,7 +28,6 @@ #include "awt_TextComponent.h" -#include "java_awt_TextField.h" #include "sun_awt_windows_WTextFieldPeer.h" #include diff --git a/src/java.desktop/windows/native/libawt/windows/initIDs.cpp b/src/java.desktop/windows/native/libawt/windows/initIDs.cpp deleted file mode 100644 index 977a1e6bca8..00000000000 --- a/src/java.desktop/windows/native/libawt/windows/initIDs.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - - -#include -#include - -/************************************************************************ - * Button initIDs - */ - -extern "C" { - -/* - * Class: java_awt_Button - * Method: initIDs - * Signature: ()V - */ -JNIEXPORT void JNICALL -Java_java_awt_Button_initIDs(JNIEnv *env, jclass cls) -{ - /* This stub is needed, because the Solaris code needs this method. */ -} - -} /* extern "C" */ - -/************************************************************************ - * FileDialog initIDs - */ - -extern "C" { - -/* - * Class: java_awt_FileDialog - * Method: initIDs - * Signature: ()V - */ -JNIEXPORT void JNICALL -Java_java_awt_FileDialog_initIDs(JNIEnv *env, jclass cls) -{ - /* This stub is needed, because the Solaris code needs this method. */ -} - -} /* extern "C" */ - -/************************************************************************ - * TextField initIDs - */ - -extern "C" { - -/* - * Class: java_awt_TextField - * Method: initIDs - * Signature: ()V - */ -JNIEXPORT void JNICALL -Java_java_awt_TextField_initIDs(JNIEnv *env, jclass cls) -{ - /* This stub is needed, because the Solaris code needs this method. */ -} - -} /* extern "C" */