Skip to content

Commit e7c7892

Browse files
committed
8370197: Add missing @OverRide annotations in com.sun.beans package
Reviewed-by: prr
1 parent c3449de commit e7c7892

17 files changed

+97
-17
lines changed

src/java.desktop/share/classes/com/sun/beans/WildcardTypeImpl.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -73,6 +73,7 @@ final class WildcardTypeImpl implements WildcardType {
7373
* @return an array of types representing
7474
* the upper bound(s) of this type variable
7575
*/
76+
@Override
7677
public Type[] getUpperBounds() {
7778
return this.upperBounds.clone();
7879
}
@@ -87,6 +88,7 @@ public Type[] getUpperBounds() {
8788
* @return an array of types representing
8889
* the lower bound(s) of this type variable
8990
*/
91+
@Override
9092
public Type[] getLowerBounds() {
9193
return this.lowerBounds.clone();
9294
}

src/java.desktop/share/classes/com/sun/beans/decoder/NullElementHandler.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2008, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -61,6 +61,7 @@ protected final ValueObject getValueObject() {
6161
*
6262
* @return {@code null} by default
6363
*/
64+
@Override
6465
public Object getValue() {
6566
return null;
6667
}
@@ -70,6 +71,7 @@ public Object getValue() {
7071
*
7172
* @return {@code false} always
7273
*/
74+
@Override
7375
public final boolean isVoid() {
7476
return false;
7577
}

src/java.desktop/share/classes/com/sun/beans/decoder/ValueObjectImpl.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2008, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -72,6 +72,7 @@ private ValueObjectImpl(Object value) {
7272
*
7373
* @return the result of method execution
7474
*/
75+
@Override
7576
public Object getValue() {
7677
return this.value;
7778
}
@@ -82,6 +83,7 @@ public Object getValue() {
8283
* @return {@code true} if value should be ignored,
8384
* {@code false} otherwise
8485
*/
86+
@Override
8587
public boolean isVoid() {
8688
return this.isVoid;
8789
}

src/java.desktop/share/classes/com/sun/beans/editors/BooleanEditor.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2006, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -34,20 +34,23 @@
3434
public class BooleanEditor extends PropertyEditorSupport {
3535

3636

37+
@Override
3738
public String getJavaInitializationString() {
3839
Object value = getValue();
3940
return (value != null)
4041
? value.toString()
4142
: "null";
4243
}
4344

45+
@Override
4446
public String getAsText() {
4547
Object value = getValue();
4648
return (value instanceof Boolean)
4749
? getValidName((Boolean) value)
4850
: null;
4951
}
5052

53+
@Override
5154
public void setAsText(String text) throws java.lang.IllegalArgumentException {
5255
if (text == null) {
5356
setValue(null);
@@ -60,6 +63,7 @@ public void setAsText(String text) throws java.lang.IllegalArgumentException {
6063
}
6164
}
6265

66+
@Override
6367
public String[] getTags() {
6468
return new String[] {getValidName(true), getValidName(false)};
6569
}

src/java.desktop/share/classes/com/sun/beans/editors/ByteEditor.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -34,13 +34,15 @@
3434

3535
public class ByteEditor extends NumberEditor {
3636

37+
@Override
3738
public String getJavaInitializationString() {
3839
Object value = getValue();
3940
return (value != null)
4041
? "((byte)" + value + ")"
4142
: "null";
4243
}
4344

45+
@Override
4446
public void setAsText(String text) throws IllegalArgumentException {
4547
setValue((text == null) ? null : Byte.decode(text));
4648
}

src/java.desktop/share/classes/com/sun/beans/editors/ColorEditor.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -79,16 +79,19 @@ public ColorEditor() {
7979
resize(ourWidth,40);
8080
}
8181

82+
@Override
8283
public void setValue(Object o) {
8384
Color c = (Color)o;
8485
changeColor(c);
8586
}
8687

88+
@Override
8789
@SuppressWarnings("deprecation")
8890
public Dimension preferredSize() {
8991
return new Dimension(ourWidth, 40);
9092
}
9193

94+
@Override
9295
@SuppressWarnings("deprecation")
9396
public boolean keyUp(Event e, int key) {
9497
if (e.target == text) {
@@ -101,6 +104,7 @@ public boolean keyUp(Event e, int key) {
101104
return (false);
102105
}
103106

107+
@Override
104108
public void setAsText(String s) throws java.lang.IllegalArgumentException {
105109
if (s == null) {
106110
changeColor(null);
@@ -124,6 +128,7 @@ public void setAsText(String s) throws java.lang.IllegalArgumentException {
124128

125129
}
126130

131+
@Override
127132
@SuppressWarnings("deprecation")
128133
public boolean action(Event e, Object arg) {
129134
if (e.target == chooser) {
@@ -132,6 +137,7 @@ public boolean action(Event e, Object arg) {
132137
return false;
133138
}
134139

140+
@Override
135141
public String getJavaInitializationString() {
136142
return (this.color != null)
137143
? "new java.awt.Color(" + this.color.getRGB() + ",true)"
@@ -165,14 +171,17 @@ private void changeColor(Color c) {
165171
support.firePropertyChange("", null, null);
166172
}
167173

174+
@Override
168175
public Object getValue() {
169176
return color;
170177
}
171178

179+
@Override
172180
public boolean isPaintable() {
173181
return true;
174182
}
175183

184+
@Override
176185
public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) {
177186
Color oldColor = gfx.getColor();
178187
gfx.setColor(Color.black);
@@ -182,28 +191,34 @@ public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box) {
182191
gfx.setColor(oldColor);
183192
}
184193

194+
@Override
185195
public String getAsText() {
186196
return (this.color != null)
187197
? this.color.getRed() + "," + this.color.getGreen() + "," + this.color.getBlue()
188198
: null;
189199
}
190200

201+
@Override
191202
public String[] getTags() {
192203
return null;
193204
}
194205

206+
@Override
195207
public java.awt.Component getCustomEditor() {
196208
return this;
197209
}
198210

211+
@Override
199212
public boolean supportsCustomEditor() {
200213
return true;
201214
}
202215

216+
@Override
203217
public void addPropertyChangeListener(PropertyChangeListener l) {
204218
support.addPropertyChangeListener(l);
205219
}
206220

221+
@Override
207222
public void removePropertyChangeListener(PropertyChangeListener l) {
208223
support.removePropertyChangeListener(l);
209224
}

src/java.desktop/share/classes/com/sun/beans/editors/DoubleEditor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -34,6 +34,7 @@
3434

3535
public class DoubleEditor extends NumberEditor {
3636

37+
@Override
3738
public void setAsText(String text) throws IllegalArgumentException {
3839
setValue((text == null) ? null : Double.valueOf(text));
3940
}

src/java.desktop/share/classes/com/sun/beans/editors/EnumEditor.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2006, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -63,10 +63,12 @@ public EnumEditor(Class<?> type) {
6363
}
6464
}
6565

66+
@Override
6667
public Object getValue() {
6768
return this.value;
6869
}
6970

71+
@Override
7072
public void setValue( Object value ) {
7173
if ( ( value != null ) && !this.type.isInstance( value ) ) {
7274
throw new IllegalArgumentException( "Unsupported value: " + value );
@@ -92,12 +94,14 @@ public void setValue( Object value ) {
9294
}
9395
}
9496

97+
@Override
9598
public String getAsText() {
9699
return ( this.value != null )
97100
? ( ( Enum )this.value ).name()
98101
: null;
99102
}
100103

104+
@Override
101105
public void setAsText( String text ) {
102106
@SuppressWarnings("unchecked")
103107
Object tmp = ( text != null )
@@ -106,38 +110,46 @@ public void setAsText( String text ) {
106110
setValue(tmp);
107111
}
108112

113+
@Override
109114
public String[] getTags() {
110115
return this.tags.clone();
111116
}
112117

118+
@Override
113119
public String getJavaInitializationString() {
114120
String name = getAsText();
115121
return ( name != null )
116122
? this.type.getName() + '.' + name
117123
: "null";
118124
}
119125

126+
@Override
120127
public boolean isPaintable() {
121128
return false;
122129
}
123130

131+
@Override
124132
public void paintValue( Graphics gfx, Rectangle box ) {
125133
}
126134

135+
@Override
127136
public boolean supportsCustomEditor() {
128137
return false;
129138
}
130139

140+
@Override
131141
public Component getCustomEditor() {
132142
return null;
133143
}
134144

145+
@Override
135146
public void addPropertyChangeListener( PropertyChangeListener listener ) {
136147
synchronized ( this.listeners ) {
137148
this.listeners.add( listener );
138149
}
139150
}
140151

152+
@Override
141153
public void removePropertyChangeListener( PropertyChangeListener listener ) {
142154
synchronized ( this.listeners ) {
143155
this.listeners.remove( listener );

src/java.desktop/share/classes/com/sun/beans/editors/FloatEditor.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -34,13 +34,15 @@
3434

3535
public class FloatEditor extends NumberEditor {
3636

37+
@Override
3738
public String getJavaInitializationString() {
3839
Object value = getValue();
3940
return (value != null)
4041
? value + "F"
4142
: "null";
4243
}
4344

45+
@Override
4446
public void setAsText(String text) throws IllegalArgumentException {
4547
setValue((text == null) ? null : Float.valueOf(text));
4648
}

0 commit comments

Comments
 (0)