Compare commits

..

10 Commits

Author SHA1 Message Date
Andreas Stadelmeier
98c3bff8ce Disable FieldAccess Checks in the reflection library 2024-12-04 19:10:28 +01:00
David Holmes
e2f8f1aded 8344621: ProblemList runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java
Reviewed-by: jpai
2024-11-20 11:51:52 +00:00
Xiaolong Peng
afee7405bd 8343541: C1: Plain memory accesses are emitted with membars with +AlwaysAtomicAccesses
Reviewed-by: shade, vlivanov
2024-11-20 10:34:07 +00:00
Aggelos Biboudis
3a4a9b7af7 8340145: Problem with generic pattern matching results in internal compiler error
Reviewed-by: jlahoda
2024-11-20 10:29:45 +00:00
Jan Lahoda
cf158bc6cd 8341631: JShell should auto-import java.io.IO.*
Reviewed-by: asotona, cstein
2024-11-20 09:24:05 +00:00
Prasanta Sadhukhan
5b12a87dcb 8344060: Remove doPrivileged calls from shared implementation code in the java.desktop module : part 1
Reviewed-by: aivanov, prr
2024-11-20 09:11:12 +00:00
Hamlin Li
587f2b4b4d 8343827: RISC-V: set AlignVector as false if applicable to enable SLP
Reviewed-by: fyang, luhenry
2024-11-20 08:49:35 +00:00
Amit Kumar
189fc8ddef 8344381: [s390x] Test failures with error: Register type is not known
Reviewed-by: mdoerr, lucy
2024-11-20 08:25:37 +00:00
Archie Cobbs
8a1f9f0a32 8343476: Remove unnecessary @SuppressWarnings annotations (client)
Reviewed-by: prr
2024-11-20 01:57:03 +00:00
SendaoYan
4ddd3dec2d 8344356: Aarch64: implement -XX:+VerifyActivationFrameSize
Reviewed-by: aph
2024-11-20 01:36:56 +00:00
143 changed files with 527 additions and 773 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -142,7 +142,6 @@ public final class SampleTree {
/** Constructs a JPanel containing check boxes for the different
* options that tree supports. */
@SuppressWarnings("serial")
private JPanel constructOptionsPanel() {
JCheckBox aCheckbox;
JPanel retPanel = new JPanel(false);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -97,7 +97,6 @@ public class TableExample3 {
};
// Create a model of the data.
@SuppressWarnings("serial")
TableModel dataModel = new AbstractTableModel() {
// These methods always need to be implemented.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -99,7 +99,6 @@ public class TableExample4 {
};
// Create a model of the data.
@SuppressWarnings("serial")
TableModel dataModel = new AbstractTableModel() {
// These methods always need to be implemented.
@ -180,7 +179,6 @@ public class TableExample4 {
// Show the values in the "Favorite Number" column in different colors.
TableColumn numbersColumn = tableView.getColumn("Favorite Number");
@SuppressWarnings("serial")
DefaultTableCellRenderer numberColumnRenderer
= new DefaultTableCellRenderer() {

View File

@ -393,7 +393,13 @@ void InterpreterMacroAssembler::dispatch_base(TosState state,
bool verifyoop,
bool generate_poll) {
if (VerifyActivationFrameSize) {
Unimplemented();
Label L;
sub(rscratch2, rfp, esp);
int min_frame_size = (frame::link_offset - frame::interpreter_frame_initial_sp_offset) * wordSize;
subs(rscratch2, rscratch2, min_frame_size);
br(Assembler::GE, L);
stop("broken stack frame");
bind(L);
}
if (verifyoop) {
interp_verify_oop(r0, state);

View File

@ -150,11 +150,12 @@ void VM_Version::common_initialize() {
}
if (FLAG_IS_DEFAULT(AvoidUnalignedAccesses)) {
if (unaligned_access.value() != MISALIGNED_FAST) {
FLAG_SET_DEFAULT(AvoidUnalignedAccesses, true);
} else {
FLAG_SET_DEFAULT(AvoidUnalignedAccesses, false);
}
FLAG_SET_DEFAULT(AvoidUnalignedAccesses,
unaligned_access.value() != MISALIGNED_FAST);
}
if (FLAG_IS_DEFAULT(AlignVector)) {
FLAG_SET_DEFAULT(AlignVector, AvoidUnalignedAccesses);
}
// See JDK-8026049

View File

@ -218,10 +218,10 @@ SaveLiveRegisters::SaveLiveRegisters(MacroAssembler *masm, BarrierStubC2 *stub)
const int register_save_size = iterate_over_register_mask(ACTION_COUNT_ONLY) * BytesPerWord;
_frame_size = align_up(register_save_size, frame::alignment_in_bytes) + frame::z_abi_160_size; // FIXME: this could be restricted to argument only
_frame_size = align_up(register_save_size, frame::alignment_in_bytes) + frame::z_abi_160_size;
__ save_return_pc();
__ push_frame(_frame_size, Z_R14); // FIXME: check if Z_R1_scaratch can do a job here;
__ push_frame(_frame_size, Z_R14);
__ z_lg(Z_R14, _z_common_abi(return_pc) + _frame_size, Z_SP);
@ -240,6 +240,7 @@ int SaveLiveRegisters::iterate_over_register_mask(IterationAction action, int of
int reg_save_index = 0;
RegMaskIterator live_regs_iterator(_reg_mask);
// Going to preserve the volatile registers which can be used by Register Allocator.
while(live_regs_iterator.has_next()) {
const OptoReg::Name opto_reg = live_regs_iterator.next();
@ -251,8 +252,11 @@ int SaveLiveRegisters::iterate_over_register_mask(IterationAction action, int of
const VMReg vm_reg = OptoReg::as_VMReg(opto_reg);
if (vm_reg->is_Register()) {
Register std_reg = vm_reg->as_Register();
if (std_reg->encoding() >= Z_R2->encoding() && std_reg->encoding() <= Z_R15->encoding()) {
// Z_R0 and Z_R1 will not be allocated by the register allocator, see s390.ad (Integer Register Classes)
// Z_R6 to Z_R15 are saved registers, except Z_R14 (see Z-Abi)
if (std_reg->encoding() == Z_R14->encoding() ||
(std_reg->encoding() >= Z_R2->encoding() &&
std_reg->encoding() <= Z_R5->encoding())) {
reg_save_index++;
if (action == ACTION_SAVE) {
@ -265,8 +269,10 @@ int SaveLiveRegisters::iterate_over_register_mask(IterationAction action, int of
}
} else if (vm_reg->is_FloatRegister()) {
FloatRegister fp_reg = vm_reg->as_FloatRegister();
if (fp_reg->encoding() >= Z_F0->encoding() && fp_reg->encoding() <= Z_F15->encoding()
&& fp_reg->encoding() != Z_F1->encoding()) {
// Z_R1 will not be allocated by the register allocator, see s390.ad (Float Register Classes)
if (fp_reg->encoding() >= Z_F0->encoding() &&
fp_reg->encoding() <= Z_F7->encoding() &&
fp_reg->encoding() != Z_F1->encoding()) {
reg_save_index++;
if (action == ACTION_SAVE) {
@ -277,8 +283,20 @@ int SaveLiveRegisters::iterate_over_register_mask(IterationAction action, int of
assert(action == ACTION_COUNT_ONLY, "Sanity");
}
}
} else if (false /* vm_reg->is_VectorRegister() */){
fatal("Vector register support is not there yet!");
} else if (vm_reg->is_VectorRegister()) {
VectorRegister vs_reg = vm_reg->as_VectorRegister();
// Z_V0 to Z_V15 will not be allocated by the register allocator, see s390.ad (reg class z_v_reg)
if (vs_reg->encoding() >= Z_V16->encoding() &&
vs_reg->encoding() <= Z_V31->encoding()) {
reg_save_index += 2;
if (action == ACTION_SAVE) {
__ z_vst(vs_reg, Address(Z_SP, offset - reg_save_index * BytesPerWord));
} else if (action == ACTION_RESTORE) {
__ z_vl(vs_reg, Address(Z_SP, offset - reg_save_index * BytesPerWord));
} else {
assert(action == ACTION_COUNT_ONLY, "Sanity");
}
}
} else {
fatal("Register type is not known");
}

View File

@ -140,7 +140,8 @@ LIR_Opr BarrierSetC1::atomic_add_at(LIRAccess& access, LIRItem& value) {
void BarrierSetC1::store_at_resolved(LIRAccess& access, LIR_Opr value) {
DecoratorSet decorators = access.decorators();
bool is_volatile = (((decorators & MO_SEQ_CST) != 0) || AlwaysAtomicAccesses);
bool is_volatile = (decorators & MO_SEQ_CST) != 0;
bool is_atomic = is_volatile || AlwaysAtomicAccesses;
bool needs_patching = (decorators & C1_NEEDS_PATCHING) != 0;
bool mask_boolean = (decorators & C1_MASK_BOOLEAN) != 0;
LIRGenerator* gen = access.gen();
@ -154,7 +155,7 @@ void BarrierSetC1::store_at_resolved(LIRAccess& access, LIR_Opr value) {
}
LIR_PatchCode patch_code = needs_patching ? lir_patch_normal : lir_patch_none;
if (is_volatile && !needs_patching) {
if (is_atomic && !needs_patching) {
gen->volatile_field_store(value, access.resolved_addr()->as_address_ptr(), access.access_emit_info());
} else {
__ store(value, access.resolved_addr()->as_address_ptr(), access.access_emit_info(), patch_code);
@ -168,7 +169,8 @@ void BarrierSetC1::store_at_resolved(LIRAccess& access, LIR_Opr value) {
void BarrierSetC1::load_at_resolved(LIRAccess& access, LIR_Opr result) {
LIRGenerator *gen = access.gen();
DecoratorSet decorators = access.decorators();
bool is_volatile = (((decorators & MO_SEQ_CST) != 0) || AlwaysAtomicAccesses);
bool is_volatile = (decorators & MO_SEQ_CST) != 0;
bool is_atomic = is_volatile || AlwaysAtomicAccesses;
bool needs_patching = (decorators & C1_NEEDS_PATCHING) != 0;
bool mask_boolean = (decorators & C1_MASK_BOOLEAN) != 0;
bool in_native = (decorators & IN_NATIVE) != 0;
@ -180,7 +182,7 @@ void BarrierSetC1::load_at_resolved(LIRAccess& access, LIR_Opr result) {
LIR_PatchCode patch_code = needs_patching ? lir_patch_normal : lir_patch_none;
if (in_native) {
__ move_wide(access.resolved_addr()->as_address_ptr(), result);
} else if (is_volatile && !needs_patching) {
} else if (is_atomic && !needs_patching) {
gen->volatile_field_load(access.resolved_addr()->as_address_ptr(), result, access.access_emit_info());
} else {
__ load(access.resolved_addr()->as_address_ptr(), result, access.access_emit_info(), patch_code);

View File

@ -287,11 +287,8 @@ public class AccessibleObject implements AnnotatedElement {
if (caller == null) {
// No caller frame when a native thread attaches to the VM
// only allow access to a public accessible member
boolean canAccess = Reflection.verifyPublicMemberAccess(declaringClass, declaringClass.getModifiers());
if (!canAccess && throwExceptionIfDenied) {
throwInaccessibleObjectException(caller, declaringClass);
}
return canAccess;
return true;
}
Module callerModule = caller.getModule();
@ -325,10 +322,7 @@ public class AccessibleObject implements AnnotatedElement {
return true;
}
if (throwExceptionIfDenied) {
throwInaccessibleObjectException(caller, declaringClass);
}
return false;
return true;
}
private void throwInaccessibleObjectException(Class<?> caller, Class<?> declaringClass) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2024, 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
@ -63,7 +63,6 @@ class AquaComboBoxButton extends JButton {
boolean isPopDown;
boolean isSquare;
@SuppressWarnings("serial") // anonymous class
protected AquaComboBoxButton(final AquaComboBoxUI ui,
final JComboBox<Object> comboBox,
final CellRendererPane rendererPane,

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2024, 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
@ -161,7 +161,6 @@ final class AquaComboBoxPopup extends BasicComboPopup {
}
@Override
@SuppressWarnings("serial") // anonymous class
protected JList<Object> createList() {
return new JList<Object>(comboBox.getModel()) {
@Override

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2024, 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
@ -230,7 +230,6 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
@SuppressWarnings("serial") // Superclass is not serializable across versions
class AquaCustomComboTextField extends JTextField {
@SuppressWarnings("serial") // anonymous class
public AquaCustomComboTextField() {
final InputMap inputMap = getInputMap();
inputMap.put(KeyStroke.getKeyStroke("DOWN"), highlightNextAction);
@ -350,7 +349,6 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
/**
* Highlight _but do not select_ the next item in the list.
*/
@SuppressWarnings("serial") // anonymous class
private Action highlightNextAction = new ComboBoxAction() {
@Override
public void performComboBoxAction(AquaComboBoxUI ui) {
@ -367,7 +365,6 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
/**
* Highlight _but do not select_ the previous item in the list.
*/
@SuppressWarnings("serial") // anonymous class
private Action highlightPreviousAction = new ComboBoxAction() {
@Override
void performComboBoxAction(final AquaComboBoxUI ui) {
@ -380,7 +377,6 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
}
};
@SuppressWarnings("serial") // anonymous class
private Action highlightFirstAction = new ComboBoxAction() {
@Override
void performComboBoxAction(final AquaComboBoxUI ui) {
@ -389,7 +385,6 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
}
};
@SuppressWarnings("serial") // anonymous class
private Action highlightLastAction = new ComboBoxAction() {
@Override
void performComboBoxAction(final AquaComboBoxUI ui) {
@ -399,7 +394,6 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
}
};
@SuppressWarnings("serial") // anonymous class
private Action highlightPageUpAction = new ComboBoxAction() {
@Override
void performComboBoxAction(final AquaComboBoxUI ui) {
@ -420,7 +414,6 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
}
};
@SuppressWarnings("serial") // anonymous class
private Action highlightPageDownAction = new ComboBoxAction() {
@Override
void performComboBoxAction(final AquaComboBoxUI ui) {
@ -560,7 +553,6 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
// This is somewhat messy. The difference here from BasicComboBoxUI.EnterAction is that
// arrow up or down does not automatically select the
@SuppressWarnings("serial") // anonymous class
private final Action triggerSelectionAction = new AbstractAction() {
public void actionPerformed(final ActionEvent e) {
triggerSelectionEvent((JComboBox)e.getSource(), e);
@ -572,7 +564,6 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
}
};
@SuppressWarnings("serial") // anonymous class
private static final Action toggleSelectionAction = new AbstractAction() {
public void actionPerformed(final ActionEvent e) {
final JComboBox<?> comboBox = (JComboBox<?>) e.getSource();
@ -591,7 +582,6 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
}
};
@SuppressWarnings("serial") // anonymous class
private final Action hideAction = new AbstractAction() {
@Override
public void actionPerformed(final ActionEvent e) {
@ -606,7 +596,6 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
}
};
@SuppressWarnings("serial") // anonymous class
private final Action openPopupOrHighlightLast = new ComboBoxAction() {
@Override
void performComboBoxAction(final AquaComboBoxUI ui) {
@ -617,7 +606,6 @@ public class AquaComboBoxUI extends BasicComboBoxUI implements Sizeable {
}
};
@SuppressWarnings("serial") // anonymous class
private final Action openPopupOrHighlightFirst = new ComboBoxAction() {
@Override
void performComboBoxAction(final AquaComboBoxUI ui) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2024, 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
@ -1240,7 +1240,6 @@ public class AquaFileChooserUI extends FileChooserUI {
return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE);
}
@SuppressWarnings("serial") // anonymous class
protected ListCellRenderer<File> createDirectoryComboBoxRenderer(final JFileChooser fc) {
return new AquaComboBoxRendererInternal<File>(directoryComboBox) {
public Component getListCellRendererComponent(final JList<? extends File> list,
@ -1356,7 +1355,6 @@ public class AquaFileChooserUI extends FileChooserUI {
//
// Renderer for Types ComboBox
//
@SuppressWarnings("serial") // anonymous class
protected ListCellRenderer<FileFilter> createFilterComboBoxRenderer() {
return new AquaComboBoxRendererInternal<FileFilter>(filterComboBox) {
public Component getListCellRendererComponent(final JList<? extends FileFilter> list,
@ -1611,7 +1609,6 @@ public class AquaFileChooserUI extends FileChooserUI {
tPanel.add(labelArea);
// separator line
@SuppressWarnings("serial") // anonymous class
final JSeparator sep = new JSeparator(){
public Dimension getPreferredSize() {
return new Dimension(((JComponent)getParent()).getWidth(), 3);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2024, 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 @@ import com.apple.laf.AquaUtils.RecyclableSingleton;
import static java.nio.charset.StandardCharsets.UTF_8;
@SuppressWarnings("serial") // JDK implementation class
class AquaFileView extends FileView {
private static final boolean DEBUG = false;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2024, 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
@ -1020,7 +1020,6 @@ public class AquaTabbedPaneUI extends AquaTabbedPaneCopyFromBasicUI {
if (component == null) {
menuItem = new JMenuItem(tabPane.getTitleAt(i), tabPane.getIconAt(i));
} else {
@SuppressWarnings("serial") // anonymous class
JMenuItem tmp = new JMenuItem() {
public void paintComponent(final Graphics g) {
super.paintComponent(g);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2024, 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
@ -249,7 +249,6 @@ public class AquaTextFieldSearch {
label.setText(promptText);
}
@SuppressWarnings("serial") // anonymous class inside
protected static JButton getCancelButton(final JTextComponent c) {
final JButton b = createButton(c, getCancelIcon());
b.setName("cancel");
@ -326,7 +325,6 @@ public class AquaTextFieldSearch {
}
protected boolean doingLayout;
@SuppressWarnings("serial") // anonymous class inside
protected LayoutManager getCustomLayout() {
// unfortunately, the default behavior of BorderLayout, which accommodates for margins
// is not what we want, so we "turn off margins" for layout for layout out our buttons

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2024, 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
@ -254,7 +254,6 @@ final class LWListPeer extends LWComponentPeer<List, LWListPeer.ScrollableJList>
}
@Override
@SuppressWarnings("unchecked")
public void valueChanged(final ListSelectionEvent e) {
if (!e.getValueIsAdjusting() && !isSkipStateChangedEvent()) {
final JList<?> source = (JList<?>) e.getSource();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2024, 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
@ -1353,7 +1353,6 @@ public class LWWindowPeer
changeFocusedWindow(activate, null);
}
@SuppressWarnings("deprecation")
private boolean isOneOfOwnersOf(LWWindowPeer peer) {
Window owner = (peer != null ? peer.getTarget().getOwner() : null);
while (owner != null) {

View File

@ -268,7 +268,6 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
}
}
}) {
@SuppressWarnings("deprecation")
public CPlatformWindow convertJComponentToTarget(final JRootPane p) {
Component root = SwingUtilities.getRoot(p);
final ComponentAccessor acc = AWTAccessor.getComponentAccessor();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2024, 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
@ -610,7 +610,6 @@ public class TIFFOldJPEGDecompressor extends TIFFJPEGDecompressor {
JPEGReader.read(0, JPEGParam);
}
@SuppressWarnings("removal")
protected void finalize() throws Throwable {
super.finalize();
JPEGReader.dispose();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, 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
@ -281,7 +281,6 @@ public class MotifFileChooserUI extends BasicFileChooserUI {
fc.setLayout(new BorderLayout(10, 10));
fc.setAlignmentX(JComponent.CENTER_ALIGNMENT);
@SuppressWarnings("serial") // anonymous class
JPanel interior = new JPanel() {
public Insets getInsets() {
return insets;
@ -305,7 +304,6 @@ public class MotifFileChooserUI extends BasicFileChooserUI {
curDirName = currentDirectory.getPath();
}
@SuppressWarnings("serial") // anonymous class
JTextField tmp1 = new JTextField(curDirName, 35) {
public Dimension getMaximumSize() {
Dimension d = super.getMaximumSize();
@ -341,7 +339,6 @@ public class MotifFileChooserUI extends BasicFileChooserUI {
align(l);
leftPanel.add(l);
@SuppressWarnings("serial") // anonymous class
JComboBox<FileFilter> tmp2 = new JComboBox<FileFilter>() {
public Dimension getMaximumSize() {
Dimension d = super.getMaximumSize();
@ -419,7 +416,6 @@ public class MotifFileChooserUI extends BasicFileChooserUI {
align(fileNameLabel);
interior.add(fileNameLabel);
@SuppressWarnings("serial") // anonymous class
JTextField tmp3 = new JTextField(35) {
public Dimension getMaximumSize() {
Dimension d = super.getMaximumSize();
@ -444,7 +440,6 @@ public class MotifFileChooserUI extends BasicFileChooserUI {
buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.LINE_AXIS));
buttonPanel.add(Box.createGlue());
@SuppressWarnings("serial") // anonymous class
JButton tmp4 = new JButton(getApproveButtonText(fc)) {
public Dimension getMaximumSize() {
return new Dimension(MAX_SIZE.width, this.getPreferredSize().height);
@ -460,7 +455,6 @@ public class MotifFileChooserUI extends BasicFileChooserUI {
buttonPanel.add(approveButton);
buttonPanel.add(Box.createGlue());
@SuppressWarnings("serial") // anonymous class
JButton updateButton = new JButton(updateButtonText) {
public Dimension getMaximumSize() {
return new Dimension(MAX_SIZE.width, this.getPreferredSize().height);
@ -475,7 +469,6 @@ public class MotifFileChooserUI extends BasicFileChooserUI {
buttonPanel.add(updateButton);
buttonPanel.add(Box.createGlue());
@SuppressWarnings("serial") // anonymous class
JButton cancelButton = new JButton(cancelButtonText) {
public Dimension getMaximumSize() {
return new Dimension(MAX_SIZE.width, this.getPreferredSize().height);
@ -490,7 +483,6 @@ public class MotifFileChooserUI extends BasicFileChooserUI {
buttonPanel.add(cancelButton);
buttonPanel.add(Box.createGlue());
@SuppressWarnings("serial") // anonymous class
JButton helpButton = new JButton(helpButtonText) {
public Dimension getMaximumSize() {
return new Dimension(MAX_SIZE.width, this.getPreferredSize().height);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, 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
@ -132,7 +132,6 @@ public class MotifInternalFrameUI extends BasicInternalFrameUI {
}
}
@SuppressWarnings("serial") // anonymous class
protected void setupMenuOpenKey(){
super.setupMenuOpenKey();
ActionMap map = SwingUtilities.getUIActionMap(frame);
@ -152,7 +151,6 @@ public class MotifInternalFrameUI extends BasicInternalFrameUI {
}
}
@SuppressWarnings("serial") // anonymous class
protected void setupMenuCloseKey(){
ActionMap map = SwingUtilities.getUIActionMap(frame);
if (map != null) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, 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
@ -72,7 +72,6 @@ public class MotifOptionPaneUI extends BasicOptionPaneUI
return null;
}
@SuppressWarnings("serial") // anonymous class
protected Container createSeparator() {
return new JPanel() {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2024, 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
@ -57,7 +57,7 @@ import javax.sound.sampled.UnsupportedAudioFileException;
* @author Arthur van Hoff, Kara Kytle, Jan Borgersen
* @author Florian Bomers
*/
@SuppressWarnings({"deprecation", "removal"})
@SuppressWarnings("removal")
public final class JavaSoundAudioClip implements AudioClip, MetaEventListener, LineListener {
private long lastPlayCall = 0;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2024, 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
@ -625,7 +625,6 @@ public class AWTEventMulticaster implements
* @return the resulting listener
* @since 1.4
*/
@SuppressWarnings("overloads")
public static WindowStateListener add(WindowStateListener a,
WindowStateListener b) {
return (WindowStateListener)addInternal(a, b);
@ -828,7 +827,6 @@ public class AWTEventMulticaster implements
* @return the resulting listener
* @since 1.4
*/
@SuppressWarnings("overloads")
public static WindowStateListener remove(WindowStateListener l,
WindowStateListener oldl) {
return (WindowStateListener) removeInternal(l, oldl);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2024, 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
@ -7415,7 +7415,6 @@ public abstract class Component implements ImageObserver, MenuContainer,
}
final Set<AWTKeyStroke> getFocusTraversalKeys_NoIDCheck(int id) {
// Okay to return Set directly because it is an unmodifiable view
@SuppressWarnings("unchecked")
Set<AWTKeyStroke> keystrokes = (focusTraversalKeys != null)
? focusTraversalKeys[id]
: null;
@ -8362,7 +8361,6 @@ public abstract class Component implements ImageObserver, MenuContainer,
* @see #add(PopupMenu)
* @since 1.1
*/
@SuppressWarnings("unchecked")
public void remove(MenuComponent popup) {
synchronized (getTreeLock()) {
if (popups == null) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2024, 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
@ -814,7 +814,6 @@ public class Container extends Component {
* to new heavyweight parent.
* @since 1.5
*/
@SuppressWarnings("deprecation")
private void reparentTraverse(ContainerPeer parentPeer, Container child) {
checkTreeLock();
@ -838,7 +837,6 @@ public class Container extends Component {
* Container must be heavyweight.
* @since 1.5
*/
@SuppressWarnings("deprecation")
private void reparentChild(Component comp) {
checkTreeLock();
if (comp == null) {
@ -4203,7 +4201,6 @@ public class Container extends Component {
}
}
@SuppressWarnings("deprecation")
private void recursiveShowHeavyweightChildren() {
if (!hasHeavyweightDescendants() || !isVisible()) {
return;
@ -4225,7 +4222,6 @@ public class Container extends Component {
}
}
@SuppressWarnings("deprecation")
private void recursiveHideHeavyweightChildren() {
if (!hasHeavyweightDescendants()) {
return;
@ -4247,7 +4243,6 @@ public class Container extends Component {
}
}
@SuppressWarnings("deprecation")
private void recursiveRelocateHeavyweightChildren(Point origin) {
for (int index = 0; index < getComponentCount(); index++) {
Component comp = getComponent(index);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2024, 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
@ -1087,7 +1087,6 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
}
}
@SuppressWarnings("deprecation")
private boolean preDispatchKeyEvent(KeyEvent ke) {
if (((AWTEvent) ke).isPosted) {
Component focusOwner = getFocusOwner();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2024, 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
@ -1058,7 +1058,7 @@ public class EventQueue {
}
}
@SuppressWarnings({"deprecation", "removal"})
@SuppressWarnings("removal")
final void initDispatchThread() {
pushPopLock.lock();
try {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2024, 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
@ -927,7 +927,6 @@ abstract class MediaEntry {
* The entry of the list of {@code Images} that is being tracked by the
* {@code MediaTracker}.
*/
@SuppressWarnings("serial") // MediaEntry does not have a no-arg ctor
class ImageMediaEntry extends MediaEntry implements ImageObserver,
java.io.Serializable {
@SuppressWarnings("serial") // Not statically typed as Serializable

View File

@ -43,7 +43,6 @@ import sun.awt.SunToolkit;
*
* @author David Mendenhall
*/
@SuppressWarnings("removal")
class SequencedEvent extends AWTEvent implements ActiveEvent {
/**

View File

@ -121,7 +121,7 @@ public final class SplashScreen {
* @return the {@link SplashScreen} instance, or {@code null} if there is
* none or it has already been closed
*/
@SuppressWarnings({"removal", "restricted"})
@SuppressWarnings("restricted")
public static SplashScreen getSplashScreen() {
synchronized (SplashScreen.class) {
if (GraphicsEnvironment.isHeadless()) {

View File

@ -161,7 +161,6 @@ class WaitDispatchSupport implements SecondaryLoop {
/**
* {@inheritDoc}
*/
@SuppressWarnings("removal")
@Override
public boolean enter() {
if (log.isLoggable(PlatformLogger.Level.FINE)) {

View File

@ -798,7 +798,6 @@ public class Window extends Container implements Accessible {
* @see Component#isDisplayable
* @see #setMinimumSize
*/
@SuppressWarnings("deprecation")
public void pack() {
Container parent = this.parent;
if (parent != null && parent.peer == null) {
@ -3604,7 +3603,6 @@ public class Window extends Container implements Accessible {
*
* @since 1.7
*/
@SuppressWarnings("deprecation")
public void setOpacity(float opacity) {
synchronized (getTreeLock()) {
if (opacity < 0.0f || opacity > 1.0f) {

View File

@ -905,7 +905,6 @@ public class DragSource implements Serializable {
* @since 1.5
*/
public static int getDragThreshold() {
@SuppressWarnings("removal")
int ts = Integer.getInteger("awt.dnd.drag.threshold", 0);
if (ts > 0) {
return ts;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2024, 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
@ -391,7 +391,6 @@ public class FocusEvent extends ComponentEvent {
* @since 9
*/
@Serial
@SuppressWarnings("serial")
Object readResolve() throws ObjectStreamException {
if (cause != null) {
return this;

View File

@ -105,7 +105,7 @@ public class Beans {
* @deprecated this method will be removed when java.beans.beancontext is removed
*/
@Deprecated(since = "23", forRemoval = true)
@SuppressWarnings({"deprecation", "removal"})
@SuppressWarnings("removal")
public static Object instantiate(ClassLoader cls, String beanName,
BeanContext beanContext)
throws IOException, ClassNotFoundException {

View File

@ -41,7 +41,6 @@ import java.awt.Component;
* @see java.beans.beancontext.BeanContextSupport
*/
@SuppressWarnings("removal")
@Deprecated(since = "23", forRemoval = true)
public interface BeanContextChildComponentProxy {

View File

@ -40,7 +40,6 @@ import java.awt.Container;
* @see java.beans.beancontext.BeanContextSupport
*/
@SuppressWarnings("removal")
@Deprecated(since = "23", forRemoval = true)
public interface BeanContextContainerProxy {

View File

@ -35,7 +35,6 @@ import java.beans.BeanInfo;
* services.
*/
@SuppressWarnings("removal")
@Deprecated(since = "23", forRemoval = true)
public interface BeanContextServiceProviderBeanInfo extends BeanInfo {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, 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
@ -47,7 +47,6 @@ import java.util.Comparator;
* @author David Mendenhall
* @since 1.2
*/
@SuppressWarnings("serial") // Obsolete class
public class DefaultFocusManager extends FocusManager {
final FocusTraversalPolicy gluePolicy =

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, 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
@ -714,7 +714,6 @@ class ColorChooserDialog extends JDialog {
cancelButton.getAccessibleContext().setAccessibleDescription(cancelString);
// The following few lines are used to register esc to close the dialog
@SuppressWarnings("serial") // anonymous class
Action cancelKeyAction = new AbstractAction() {
public void actionPerformed(ActionEvent e) {
((AbstractButton)e.getSource()).fireActionPerformed(e);

View File

@ -2949,7 +2949,7 @@ public abstract class JComponent extends Container implements Serializable,
*
* @since 1.3
*/
@SuppressWarnings({"deprecation", "removal"})
@SuppressWarnings("deprecation")
protected boolean processKeyBinding(KeyStroke ks, KeyEvent e,
int condition, boolean pressed) {
InputMap map = getInputMap(condition, false);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2024, 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
@ -735,7 +735,6 @@ public final class JLayer<V extends Component>
*
* @return the AccessibleContext associated with this {@code JLayer}.
*/
@SuppressWarnings("serial") // anonymous class
public AccessibleContext getAccessibleContext() {
if (accessibleContext == null) {
accessibleContext = new AccessibleJComponent() {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, 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
@ -66,7 +66,6 @@ import sun.swing.SwingAccessor;
* @author David Mendenhall
* @since 1.2
*/
@SuppressWarnings("serial") // Same-version serialization only
public class KeyStroke extends AWTKeyStroke {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2024, 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
@ -127,7 +127,6 @@ import java.awt.Component;
* @author Philip Milne
* @since 1.4
*/
@SuppressWarnings("serial") // Same-version serialization only
public abstract class Spring {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2024, 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
@ -184,7 +184,6 @@ import java.util.*;
* @author Joe Winchester
* @since 1.4
*/
@SuppressWarnings("serial") // Same-version serialization only
public class SpringLayout implements LayoutManager2 {
private Map<Component, Constraints> componentConstraints = new HashMap<Component, Constraints>();

View File

@ -597,7 +597,6 @@ public class Timer implements Serializable
return lock;
}
@SuppressWarnings("removal")
@Serial
private void readObject(ObjectInputStream in)
throws ClassNotFoundException, IOException

View File

@ -1261,7 +1261,6 @@ public class UIManager implements Serializable
}
}
@SuppressWarnings("removal")
private static Properties loadSwingProperties()
{
/* Don't bother checking for Swing properties if untrusted, as

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, 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
@ -43,7 +43,6 @@ import javax.swing.JComponent;
*
* @author Steve Wilson
*/
@SuppressWarnings("serial") // Same-version serialization only
public class ColorChooserComponentFactory {
private ColorChooserComponentFactory() { } // can't instantiate

View File

@ -934,7 +934,6 @@ class WindowsFileSystemView extends FileSystemView {
return super.createFileObject(path);
}
@SuppressWarnings("serial") // anonymous class
protected File createFileSystemRoot(File f) {
// Problem: Removable drives on Windows return false on f.exists()
// Workaround: Override exists() to always return true.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2024, 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
@ -615,7 +615,6 @@ public class LayerUI<V extends Component>
* baseline
*/
public int getBaseline(JComponent c, int width, int height) {
@SuppressWarnings("unchecked")
JLayer<?> l = (JLayer) c;
if (l.getView() != null) {
return l.getView().getBaseline(width, height);
@ -633,7 +632,6 @@ public class LayerUI<V extends Component>
* size changes
*/
public Component.BaselineResizeBehavior getBaselineResizeBehavior(JComponent c) {
@SuppressWarnings("unchecked")
JLayer<?> l = (JLayer) c;
if (l.getView() != null) {
return l.getView().getBaselineResizeBehavior();
@ -666,7 +664,6 @@ public class LayerUI<V extends Component>
* @return preferred size for the passed {@code JLayer}
*/
public Dimension getPreferredSize(JComponent c) {
@SuppressWarnings("unchecked")
JLayer<?> l = (JLayer) c;
Component view = l.getView();
if (view != null) {
@ -684,7 +681,6 @@ public class LayerUI<V extends Component>
* @return minimal size for the passed {@code JLayer}
*/
public Dimension getMinimumSize(JComponent c) {
@SuppressWarnings("unchecked")
JLayer<?> l = (JLayer) c;
Component view = l.getView();
if (view != null) {
@ -702,7 +698,6 @@ public class LayerUI<V extends Component>
* @return maximum size for the passed {@code JLayer}
*/
public Dimension getMaximumSize(JComponent c) {
@SuppressWarnings("unchecked")
JLayer<?> l = (JLayer) c;
Component view = l.getView();
if (view != null) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, 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
@ -49,7 +49,6 @@ import java.io.Serializable;
*
* @author Jeff Dinkins
*/
@SuppressWarnings("serial") // Same-version serialization only
public class BasicCheckBoxUI extends BasicRadioButtonUI {
private static final Object BASIC_CHECK_BOX_UI_KEY = new Object();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, 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
@ -173,7 +173,6 @@ public class BasicComboBoxEditor implements ComboBoxEditor,FocusListener {
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
@SuppressWarnings("serial") // Same-version serialization only
public static class UIResource extends BasicComboBoxEditor
implements javax.swing.plaf.UIResource {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, 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
@ -1792,12 +1792,9 @@ public class BasicComboBoxUI extends ComboBoxUI {
comboBox.revalidate();
}
} else {
@SuppressWarnings("unchecked")
JComboBox<?> comboBox = (JComboBox)e.getSource();
if ( propertyName == "model" ) {
@SuppressWarnings("unchecked")
ComboBoxModel<?> newModel = (ComboBoxModel)e.getNewValue();
@SuppressWarnings("unchecked")
ComboBoxModel<?> oldModel = (ComboBoxModel)e.getOldValue();
if ( oldModel != null && listDataListener != null ) {
@ -2012,7 +2009,6 @@ public class BasicComboBoxUI extends ComboBoxUI {
}
public void layoutContainer(Container parent) {
@SuppressWarnings("unchecked")
JComboBox<?> cb = (JComboBox)parent;
int width = cb.getWidth();
int height = cb.getHeight();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, 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
@ -696,7 +696,6 @@ public class BasicFileChooserUI extends FileChooserUI {
if(!evt.getValueIsAdjusting()) {
JFileChooser chooser = getFileChooser();
FileSystemView fsv = chooser.getFileSystemView();
@SuppressWarnings("unchecked")
JList<?> list = (JList)evt.getSource();
int fsm = chooser.getFileSelectionMode();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, 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
@ -1579,7 +1579,6 @@ public class BasicListUI extends ListUI
* @see #installKeyboardActions
* @see #installUI
*/
@SuppressWarnings("serial") // Same-version serialization only
public class MouseInputHandler implements MouseInputListener
{
/**
@ -1703,7 +1702,6 @@ public class BasicListUI extends ListUI
* @see #getCellBounds
* @see #installUI
*/
@SuppressWarnings("serial") // Same-version serialization only
public class ListSelectionHandler implements ListSelectionListener
{
/**
@ -1769,7 +1767,6 @@ public class BasicListUI extends ListUI
* @see #createListDataListener
* @see #installUI
*/
@SuppressWarnings("serial") // Same-version serialization only
public class ListDataHandler implements ListDataListener
{
/**
@ -1842,7 +1839,6 @@ public class BasicListUI extends ListUI
* @see #createPropertyChangeListener
* @see #installUI
*/
@SuppressWarnings("serial") // Same-version serialization only
public class PropertyChangeHandler implements PropertyChangeListener
{
/**
@ -2653,9 +2649,7 @@ public class BasicListUI extends ListUI
* listDataListener from the old model and add it to the new one.
*/
if (propertyName == "model") {
@SuppressWarnings("unchecked")
ListModel<?> oldModel = (ListModel)e.getOldValue();
@SuppressWarnings("unchecked")
ListModel<?> newModel = (ListModel)e.getNewValue();
if (oldModel != null) {
oldModel.removeListDataListener(listDataListener);

View File

@ -482,7 +482,6 @@ public class BasicOptionPaneUI extends OptionPaneUI {
if (nl >= 0) {
// break up newlines
if (nl == 0) {
@SuppressWarnings("serial") // anonymous class
JPanel breakPanel = new JPanel() {
public Dimension getPreferredSize() {
Font f = getFont();

View File

@ -746,7 +746,6 @@ public class BasicSplitPaneDivider extends Container
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
@SuppressWarnings("serial") // Same-version serialization only
protected class DragController
{
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, 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
@ -899,7 +899,6 @@ public class BasicSplitPaneUI extends SplitPaneUI
*
* @return the default non continuous layout divider
*/
@SuppressWarnings("serial") // anonymous class
protected Component createDefaultNonContinuousLayoutDivider() {
return new Canvas() {
public void paint(Graphics g) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, 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
@ -49,7 +49,6 @@ import javax.swing.plaf.*;
*
* @author Timothy Prinzing
*/
@SuppressWarnings("serial") // Same-version serialization only
public class BasicTextAreaUI extends BasicTextUI {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, 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
@ -51,7 +51,6 @@ import sun.swing.DefaultLookup;
*
* @author Timothy Prinzing
*/
@SuppressWarnings("serial") // Same-version serialization only
public class BasicTextFieldUI extends BasicTextUI {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, 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
@ -47,7 +47,6 @@ import javax.swing.border.*;
*
* @author Timothy Prinzing
*/
@SuppressWarnings("serial") // Same-version serialization only
public class BasicTextPaneUI extends BasicEditorPaneUI {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, 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
@ -554,13 +554,11 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
@Deprecated(since = "17", forRemoval = true)
protected JFrame createFloatingFrame(JToolBar toolbar) {
Window window = SwingUtilities.getWindowAncestor(toolbar);
@SuppressWarnings("serial") // anonymous class
JFrame frame = new JFrame(toolbar.getName(),
(window != null) ? window.getGraphicsConfiguration() : null) {
// Override createRootPane() to automatically resize
// the frame when contents change
protected JRootPane createRootPane() {
@SuppressWarnings("serial") // anonymous class
JRootPane rootPane = new JRootPane() {
private boolean packing = false;
@ -606,7 +604,6 @@ public class BasicToolBarUI extends ToolBarUI implements SwingConstants
// Override createRootPane() to automatically resize
// the frame when contents change
protected JRootPane createRootPane() {
@SuppressWarnings("serial") // anonymous class
JRootPane rootPane = new JRootPane() {
private boolean packing = false;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, 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
@ -46,7 +46,6 @@ import javax.swing.JList;
*
* @author Tom Santos
*/
@SuppressWarnings("serial") // Same-version serialization only
public interface ComboPopup {
/**
* Shows the popup

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, 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
@ -87,7 +87,6 @@ import sun.swing.SwingUtilities2;
*
* @author Steve Wilson
*/
@SuppressWarnings("serial") // Same-version serialization only
public class DefaultMetalTheme extends MetalTheme {
/**
* Whether or not fonts should be plain. This is only used if

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, 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
@ -50,7 +50,6 @@ import javax.swing.plaf.*;
*
* @author Tom Santos
*/
@SuppressWarnings("serial") // Same-version serialization only
public class MetalButtonUI extends BasicButtonUI {
// NOTE: These are not really needed, but at this point we can't pull

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, 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
@ -51,7 +51,6 @@ import java.io.Serializable;
* @author Michael C. Albers
*
*/
@SuppressWarnings("serial") // Same-version serialization only
public class MetalCheckBoxUI extends MetalRadioButtonUI {
// NOTE: MetalCheckBoxUI inherits from MetalRadioButtonUI instead

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, 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
@ -135,7 +135,6 @@ public class MetalComboBoxEditor extends BasicComboBoxEditor {
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
@SuppressWarnings("serial") // Same-version serialization only
public static class UIResource extends MetalComboBoxEditor
implements javax.swing.plaf.UIResource {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, 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
@ -238,7 +238,6 @@ public class MetalFileChooserUI extends BasicFileChooserUI {
topPanel.add(lookInLabel, BorderLayout.BEFORE_LINE_BEGINS);
// CurrentDir ComboBox
@SuppressWarnings("serial") // anonymous class
JComboBox<Object> tmp1 = new JComboBox<Object>() {
public Dimension getPreferredSize() {
Dimension d = super.getPreferredSize();
@ -381,7 +380,6 @@ public class MetalFileChooserUI extends BasicFileChooserUI {
populateFileNameLabel();
fileNamePanel.add(fileNameLabel);
@SuppressWarnings("serial") // anonymous class
JTextField tmp2 = new JTextField(35) {
public Dimension getMaximumSize() {
return new Dimension(Short.MAX_VALUE, super.getPreferredSize().height);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, 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
@ -44,7 +44,6 @@ import java.awt.*;
*
* @author Michael C. Albers
*/
@SuppressWarnings("serial") // Same-version serialization only
public class MetalProgressBarUI extends BasicProgressBarUI {
private Rectangle innards;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, 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
@ -53,7 +53,6 @@ import javax.swing.text.View;
* @author Michael C. Albers (Metal modifications)
* @author Jeff Dinkins (original BasicRadioButtonCode)
*/
@SuppressWarnings("serial") // Same-version serialization only
public class MetalRadioButtonUI extends BasicRadioButtonUI {
private static final Object METAL_RADIO_BUTTON_UI_KEY = new Object();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2024, 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
@ -77,7 +77,6 @@ import javax.swing.plaf.basic.BasicRootPaneUI;
* @author Terry Kellerman
* @since 1.4
*/
@SuppressWarnings("serial") // Same-version serialization only
public class MetalRootPaneUI extends BasicRootPaneUI
{
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, 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
@ -50,7 +50,6 @@ import java.awt.event.*;
*
* @author Steve Wilson
*/
@SuppressWarnings("serial") // Same-version serialization only
public class MetalScrollPaneUI extends BasicScrollPaneUI
{

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, 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
@ -50,7 +50,6 @@ import javax.swing.plaf.basic.BasicSeparatorUI;
*
* @author Jeff Shapiro
*/
@SuppressWarnings("serial") // Same-version serialization only
public class MetalSeparatorUI extends BasicSeparatorUI
{
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, 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
@ -50,7 +50,6 @@ import javax.swing.plaf.*;
*
* @author Tom Santos
*/
@SuppressWarnings("serial") // Same-version serialization only
public class MetalSliderUI extends BasicSliderUI {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, 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
@ -43,7 +43,6 @@ import javax.swing.plaf.basic.*;
*
* @author Steve Wilson
*/
@SuppressWarnings("serial") // Same-version serialization only
public class MetalSplitPaneUI extends BasicSplitPaneUI
{
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, 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
@ -47,7 +47,6 @@ import javax.swing.plaf.basic.BasicTabbedPaneUI;
*
* @author Tom Santos
*/
@SuppressWarnings("serial") // Same-version serialization only
public class MetalTabbedPaneUI extends BasicTabbedPaneUI {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, 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
@ -47,7 +47,6 @@ import javax.swing.plaf.basic.*;
*
* @author Steve Wilson
*/
@SuppressWarnings("serial") // Same-version serialization only
public class MetalTextFieldUI extends BasicTextFieldUI {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, 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
@ -55,7 +55,6 @@ import java.io.Serializable;
*
* @author Tom Santos
*/
@SuppressWarnings("serial") // Same-version serialization only
public class MetalToggleButtonUI extends BasicToggleButtonUI {
private static final Object METAL_TOGGLE_BUTTON_UI_KEY = new Object();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, 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
@ -49,7 +49,6 @@ import javax.swing.text.View;
*
* @author Steve Wilson
*/
@SuppressWarnings("serial") // Same-version serialization only
public class MetalToolTipUI extends BasicToolTipUI {
static MetalToolTipUI sharedInstance = new MetalToolTipUI();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, 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
@ -210,7 +210,6 @@ class MetalUtils {
*/
static boolean drawGradient(Component c, Graphics g, String key,
int x, int y, int w, int h, boolean vertical) {
@SuppressWarnings("unchecked")
java.util.List<?> gradient = (java.util.List)UIManager.get(key);
if (gradient == null || !(g instanceof Graphics2D)) {
return false;
@ -275,7 +274,6 @@ class MetalUtils {
protected void paintToImage(Component c, Image image, Graphics g,
int w, int h, Object[] args) {
Graphics2D g2 = (Graphics2D)g;
@SuppressWarnings("unchecked")
java.util.List<?> gradient = (java.util.List)args[0];
boolean isVertical = ((Boolean)args[1]).booleanValue();
// Render to the VolatileImage

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, 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 @@ import javax.swing.plaf.*;
*
* @author Willie Walker
*/
@SuppressWarnings("serial") // Same-version serialization only
public class MultiLookAndFeel extends LookAndFeel {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2024, 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
@ -76,7 +76,6 @@ public class SynthDesktopIconUI extends BasicDesktopIconUI
@Override
protected void installComponents() {
if (UIManager.getBoolean("InternalFrame.useTaskBar")) {
@SuppressWarnings("serial") // anonymous class
JToggleButton tmp = new JToggleButton(frame.getTitle(), frame.getFrameIcon()) {
@Override public String getToolTipText() {
return getText();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2024, 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
@ -376,7 +376,6 @@ public class SynthScrollBarUI extends BasicScrollBarUI
*/
@Override
protected JButton createDecreaseButton(int orientation) {
@SuppressWarnings("serial") // anonymous class
SynthArrowButton synthArrowButton = new SynthArrowButton(orientation) {
@Override
public boolean contains(int x, int y) {
@ -406,7 +405,6 @@ public class SynthScrollBarUI extends BasicScrollBarUI
*/
@Override
protected JButton createIncreaseButton(int orientation) {
@SuppressWarnings("serial") // anonymous class
SynthArrowButton synthArrowButton = new SynthArrowButton(orientation) {
@Override
public boolean contains(int x, int y) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2024, 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
@ -277,7 +277,6 @@ public class SynthSplitPaneUI extends BasicSplitPaneUI
* {@inheritDoc}
*/
@Override
@SuppressWarnings("serial") // anonymous class
protected Component createDefaultNonContinuousLayoutDivider() {
return new Canvas() {
public void paint(Graphics g) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2024, 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
@ -51,7 +51,6 @@ import java.beans.PropertyChangeEvent;
* @author Shannon Hickey
* @since 1.7
*/
@SuppressWarnings("serial") // Same-version serialization only
public class SynthTextAreaUI extends BasicTextAreaUI implements SynthUI {
private Handler handler = new Handler();
private SynthStyle style;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2024, 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
@ -50,7 +50,6 @@ import java.beans.PropertyChangeEvent;
* @author Shannon Hickey
* @since 1.7
*/
@SuppressWarnings("serial") // Same-version serialization only
public class SynthTextFieldUI extends BasicTextFieldUI implements SynthUI {
private Handler handler = new Handler();
private SynthStyle style;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2024, 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
@ -47,7 +47,6 @@ import java.awt.*;
* @author Shannon Hickey
* @since 1.7
*/
@SuppressWarnings("serial") // Same-version serialization only
public class SynthTextPaneUI extends SynthEditorPaneUI {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2024, 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
@ -771,7 +771,6 @@ public class SynthTreeUI extends BasicTreeUI
@Override
protected TreeCellEditor createTreeCellEditor() {
@SuppressWarnings("serial") // anonymous class
JTextField tf = new JTextField() {
@Override
public String getName() {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, 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
@ -1182,7 +1182,6 @@ public class DefaultStyledDocument extends AbstractDocument implements StyledDoc
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
@SuppressWarnings("serial") // Same-version serialization only
public static class ElementSpec {
/**

View File

@ -1127,7 +1127,6 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*/
@SuppressWarnings("serial") // Same-version serialization only
public static class KeyBinding {
/**
@ -3951,7 +3950,6 @@ public abstract class JTextComponent extends JComponent implements Scrollable, A
* Maps from class name to Boolean indicating if
* <code>processInputMethodEvent</code> has been overridden.
*/
@SuppressWarnings("removal")
private static Cache<Class<?>,Boolean> METHOD_OVERRIDDEN
= new Cache<Class<?>,Boolean>(Cache.Kind.WEAK, Cache.Kind.STRONG) {
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, 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
@ -48,7 +48,6 @@ import java.util.LinkedHashMap;
*
* @author Tim Prinzing
*/
@SuppressWarnings("serial") // Same-version serialization only
public class SimpleAttributeSet implements MutableAttributeSet, Serializable, Cloneable
{
/**

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2024, 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
@ -171,7 +171,6 @@ public class StyledEditorKit extends DefaultEditorKit {
/**
* Creates the AttributeSet used for the selection.
*/
@SuppressWarnings("serial") // anonymous class
private void createInputAttributes() {
inputAttributes = new SimpleAttributeSet() {
public AttributeSet getResolveParent() {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, 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
@ -352,7 +352,6 @@ public class WrappedPlainView extends BoxView implements TabExpander {
* @param p1 the ending document location to use
* @return the break position
*/
@SuppressWarnings("deprecation")
protected int calculateBreakPosition(int p0, int p1) {
int p;
Segment segment = SegmentCache.getSharedSegment();
@ -798,7 +797,6 @@ public class WrappedPlainView extends BoxView implements TabExpander {
* given point in the view
* @see View#viewToModel
*/
@SuppressWarnings("deprecation")
public int viewToModel(float fx, float fy, Shape a, Position.Bias[] bias) {
// PENDING(prinz) implement bias properly
bias[0] = Position.Bias.Forward;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, 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
@ -382,7 +382,6 @@ public class FormView extends ComponentView implements ActionListener {
// BasicListUI$Handler.
// For JComboBox, there are 2 stale ListDataListeners, which are
// BasicListUI$Handler and BasicComboBoxUI$Handler.
@SuppressWarnings("unchecked")
AbstractListModel<?> listModel = (AbstractListModel) model;
String listenerClass1 =
"javax.swing.plaf.basic.BasicListUI$Handler";
@ -850,7 +849,6 @@ public class FormView extends ComponentView implements ActionListener {
}
}
} else if (m instanceof ComboBoxModel) {
@SuppressWarnings("unchecked")
ComboBoxModel<?> model = (ComboBoxModel)m;
Option option = (Option)model.getSelectedItem();
if (option != null) {
@ -962,7 +960,6 @@ public class FormView extends ComponentView implements ActionListener {
} catch (BadLocationException e) {
}
} else if (m instanceof OptionListModel) {
@SuppressWarnings("unchecked")
OptionListModel<?> model = (OptionListModel) m;
int size = model.getSize();
for (int i = 0; i < size; i++) {
@ -975,7 +972,6 @@ public class FormView extends ComponentView implements ActionListener {
}
}
} else if (m instanceof OptionComboBoxModel) {
@SuppressWarnings("unchecked")
OptionComboBoxModel<?> model = (OptionComboBoxModel) m;
Option option = model.getInitialSelection();
if (option != null) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, 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
@ -41,7 +41,6 @@ import java.util.Enumeration;
*
* @author Scott Violet
*/
@SuppressWarnings("serial") // Same-version serialization only
public abstract class AbstractLayoutCache implements RowMapper {
/** Object responsible for getting the size of a node. */
protected NodeDimensions nodeDimensions;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, 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
@ -537,7 +537,6 @@ public class DefaultTreeCellEditor implements ActionListener, TreeCellEditor,
*/
protected TreeCellEditor createTreeCellEditor() {
Border aBorder = UIManager.getBorder("Tree.editorBorder");
@SuppressWarnings("serial") // Safe: outer class is non-serializable
DefaultCellEditor editor = new DefaultCellEditor
(new DefaultTextField(aBorder)) {
public boolean shouldSelectCell(EventObject event) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2024, 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
@ -321,7 +321,6 @@ public final class AWTAutoShutdown implements Runnable {
}
}
@SuppressWarnings("serial")
static AWTEvent getShutdownEvent() {
return new AWTEvent(getInstance(), 0) {
};

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, 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
@ -362,7 +362,6 @@ public final class AppContext {
* contained within this AppContext
* @since 1.2
*/
@SuppressWarnings("deprecation")
public void dispose() throws IllegalThreadStateException {
System.err.println(
"""

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2024, 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
@ -59,7 +59,6 @@ class CausedFocusEvent extends FocusEvent {
RETARGETED
}
@SuppressWarnings("serial")
private static final Component dummy = new Component(){};
private final Cause cause;

Some files were not shown because too many files have changed in this diff Show More