Skip to content

Commit de237fb

Browse files
committed
8323554: The typos in Javadoc: "@return if "
Reviewed-by: prr
1 parent 51dbd36 commit de237fb

File tree

14 files changed

+107
-100
lines changed

14 files changed

+107
-100
lines changed

src/java.desktop/macosx/classes/com/apple/eawt/event/GestureEvent.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2024, 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
@@ -58,7 +58,8 @@ public void consume() {
5858
}
5959

6060
/**
61-
* @return if the event has been consumed
61+
* @return {@code true} if the event has been consumed, otherwise
62+
* {@code false}
6263
*/
6364
protected boolean isConsumed() {
6465
return consumed;

src/java.desktop/share/classes/java/awt/dnd/DragSource.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2024, 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
@@ -230,14 +230,12 @@ public static DragSource getDefaultDragSource() {
230230
}
231231

232232
/**
233-
* Reports
234-
* whether or not drag
235-
* {@code Image} support
236-
* is available on the underlying platform.
233+
* Reports whether or not drag {@code Image} support is available on the
234+
* underlying platform.
237235
*
238-
* @return if the Drag Image support is available on this platform
236+
* @return {@code true} if the Drag Image support is available on this
237+
* platform, otherwise {@code false}
239238
*/
240-
241239
public static boolean isDragImageSupported() {
242240
Toolkit t = Toolkit.getDefaultToolkit();
243241

src/java.desktop/share/classes/java/awt/dnd/DropTargetContext.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2024, 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
@@ -242,15 +242,13 @@ protected List<DataFlavor> getCurrentDataFlavorsAsList() {
242242
}
243243

244244
/**
245-
* This method returns a {@code boolean}
246-
* indicating if the given {@code DataFlavor} is
247-
* supported by this {@code DropTargetContext}.
245+
* This method returns a {@code boolean} indicating if the given
246+
* {@code DataFlavor} is supported by this {@code DropTargetContext}.
248247
*
249-
* @param df the {@code DataFlavor}
250-
*
251-
* @return if the {@code DataFlavor} specified is supported
248+
* @param df the {@code DataFlavor} to test
249+
* @return {@code true} if the {@code DataFlavor} specified is supported,
250+
* otherwise {@code false}
252251
*/
253-
254252
protected boolean isDataFlavorSupported(DataFlavor df) {
255253
return getCurrentDataFlavorsAsList().contains(df);
256254
}

src/java.desktop/share/classes/java/awt/dnd/DropTargetDragEvent.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2024, 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
@@ -154,14 +154,13 @@ public List<DataFlavor> getCurrentDataFlavorsAsList() {
154154
}
155155

156156
/**
157-
* This method returns a {@code boolean} indicating
158-
* if the specified {@code DataFlavor} is supported.
157+
* This method returns a {@code boolean} indicating if the specified
158+
* {@code DataFlavor} is supported.
159159
*
160-
* @param df the {@code DataFlavor} to test
161-
*
162-
* @return if a particular DataFlavor is supported
160+
* @param df the {@code DataFlavor} to test
161+
* @return {@code true} if a particular {@code DataFlavor} is supported,
162+
* otherwise {@code false}
163163
*/
164-
165164
public boolean isDataFlavorSupported(DataFlavor df) {
166165
return getDropTargetContext().isDataFlavorSupported(df);
167166
}

src/java.desktop/share/classes/java/awt/dnd/DropTargetDropEvent.java

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2024, 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
@@ -188,15 +188,13 @@ public List<DataFlavor> getCurrentDataFlavorsAsList() {
188188
}
189189

190190
/**
191-
* This method returns a {@code boolean} indicating if the
192-
* specified {@code DataFlavor} is available
193-
* from the source.
191+
* This method returns a {@code boolean} indicating if the specified
192+
* {@code DataFlavor} is available from the source.
194193
*
195-
* @param df the {@code DataFlavor} to test
196-
*
197-
* @return if the DataFlavor specified is available from the source
194+
* @param df the {@code DataFlavor} to test
195+
* @return {@code true} if the {@code DataFlavor} specified is available
196+
* from the source, otherwise {@code false}
198197
*/
199-
200198
public boolean isDataFlavorSupported(DataFlavor df) {
201199
return getDropTargetContext().isDataFlavorSupported(df);
202200
}
@@ -256,12 +254,12 @@ public void dropComplete(boolean success) {
256254
}
257255

258256
/**
259-
* This method returns an {@code int} indicating if
260-
* the source is in the same JVM as the target.
257+
* This method returns a {@code boolean} indicating if the source is in the
258+
* same JVM as the target.
261259
*
262-
* @return if the Source is in the same JVM
260+
* @return {@code true} if the Source is in the same JVM, otherwise
261+
* {@code false}
263262
*/
264-
265263
public boolean isLocalTransfer() {
266264
return isLocalTx;
267265
}

src/java.desktop/share/classes/java/awt/dnd/peer/DropTargetContextPeer.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2024, 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
@@ -78,11 +78,12 @@ public interface DropTargetContextPeer {
7878
Transferable getTransferable() throws InvalidDnDOperationException;
7979

8080
/**
81-
* Return whether or not the DragSource Transferable is in the
82-
* same JVM as the Target.
83-
* @return if the DragSource Transferable is in the same JVM as the Target
81+
* Return whether or not the DragSource Transferable is in the same JVM as
82+
* the Target.
83+
*
84+
* @return {@code true} if the DragSource Transferable is in the same JVM as
85+
* the Target, otherwise {@code false}
8486
*/
85-
8687
boolean isTransferableJVMLocal();
8788

8889
/**

src/java.desktop/share/classes/java/awt/peer/ComponentPeer.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1995, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1995, 2024, 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
@@ -497,8 +497,10 @@ void createBuffers(int numBuffers, BufferCapabilities caps)
497497

498498
/**
499499
* Updates internal data structures related to the component's GC.
500-
* @param gc the reference graphics configuration
501-
* @return if the peer needs to be recreated for the changes to take effect
500+
*
501+
* @param gc the reference graphics configuration
502+
* @return {@code true} if the peer needs to be recreated for the changes to
503+
* take effect, otherwise {@code false}
502504
* @since 1.7
503505
*/
504506
boolean updateGraphicsData(GraphicsConfiguration gc);

src/java.desktop/share/classes/java/beans/beancontext/BeanContextSupport.java

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2024, 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
@@ -203,12 +203,11 @@ public int size() {
203203
}
204204

205205
/**
206-
* Reports whether or not this
207-
* {@code BeanContext} is empty.
208-
* A {@code BeanContext} is considered
209-
* empty when it contains zero
210-
* nested children.
211-
* @return if there are not children
206+
* Reports whether or not this {@code BeanContext} is empty. A
207+
* {@code BeanContext} is considered empty when it contains zero nested
208+
* children.
209+
*
210+
* @return {@code true} if there are no children, otherwise {@code false}
212211
*/
213212
public boolean isEmpty() {
214213
synchronized(children) {
@@ -217,10 +216,11 @@ public boolean isEmpty() {
217216
}
218217

219218
/**
220-
* Determines whether or not the specified object
221-
* is currently a child of this {@code BeanContext}.
222-
* @param o the Object in question
223-
* @return if this object is a child
219+
* Determines whether or not the specified object is currently a child of
220+
* this {@code BeanContext}.
221+
*
222+
* @param o the Object in question
223+
* @return {@code true} if this object is a child, otherwise {@code false}
224224
*/
225225
public boolean contains(Object o) {
226226
synchronized(children) {
@@ -229,10 +229,11 @@ public boolean contains(Object o) {
229229
}
230230

231231
/**
232-
* Determines whether or not the specified object
233-
* is currently a child of this {@code BeanContext}.
234-
* @param o the Object in question
235-
* @return if this object is a child
232+
* Determines whether or not the specified object is currently a child of
233+
* this {@code BeanContext}.
234+
*
235+
* @param o the Object in question
236+
* @return {@code true} if this object is a child, otherwise {@code false}
236237
*/
237238
public boolean containsKey(Object o) {
238239
synchronized(children) {
@@ -839,10 +840,10 @@ public boolean avoidingGui() {
839840
}
840841

841842
/**
842-
* Is this {@code BeanContext} in the
843-
* process of being serialized?
844-
* @return if this {@code BeanContext} is
845-
* currently being serialized
843+
* Is this {@code BeanContext} in the process of being serialized?
844+
*
845+
* @return {@code true} if this {@code BeanContext} is currently being
846+
* serialized, otherwise {@code false}
846847
*/
847848
public boolean isSerializing() { return serializing; }
848849

src/java.desktop/share/classes/javax/swing/JTextArea.java

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2024, 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
@@ -318,12 +318,12 @@ public void setLineWrap(boolean wrap) {
318318
}
319319

320320
/**
321-
* Gets the line-wrapping policy of the text area. If set
322-
* to true the lines will be wrapped if they are too long
323-
* to fit within the allocated width. If set to false,
324-
* the lines will always be unwrapped.
321+
* Gets the line-wrapping policy of the text area. If set to {@code true}
322+
* the lines will be wrapped if they are too long to fit within the
323+
* allocated width. If set to {@code false}, the lines will always be
324+
* unwrapped.
325325
*
326-
* @return if lines will be wrapped
326+
* @return {@code true} if lines will be wrapped, otherwise {@code false}
327327
*/
328328
public boolean getLineWrap() {
329329
return wrap;
@@ -350,14 +350,13 @@ public void setWrapStyleWord(boolean word) {
350350
}
351351

352352
/**
353-
* Gets the style of wrapping used if the text area is wrapping
354-
* lines. If set to true the lines will be wrapped at word
355-
* boundaries (ie whitespace) if they are too long
356-
* to fit within the allocated width. If set to false,
357-
* the lines will be wrapped at character boundaries.
353+
* Gets the style of wrapping used if the text area is wrapping lines. If
354+
* set to {@code true} the lines will be wrapped at word boundaries (ie
355+
* whitespace) if they are too long to fit within the allocated width. If
356+
* set to {@code false}, the lines will be wrapped at character boundaries.
358357
*
359-
* @return if the wrap style should be word boundaries
360-
* instead of character boundaries
358+
* @return {@code true} if the wrap style should be word boundaries instead
359+
* of character boundaries, otherwise {@code false}
361360
* @see #setWrapStyleWord
362361
*/
363362
public boolean getWrapStyleWord() {

src/java.desktop/share/classes/javax/swing/plaf/basic/BasicOptionPaneUI.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2024, 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
@@ -1101,7 +1101,8 @@ public void setSyncAllWidths(boolean newValue) {
11011101
/**
11021102
* Returns if the width of children should be synchronized.
11031103
*
1104-
* @return if the width of children should be synchronized
1104+
* @return {@code true} if the width of children should be synchronized,
1105+
* otherwise {@code false}
11051106
*/
11061107
public boolean getSyncAllWidths() {
11071108
return syncAllWidths;

0 commit comments

Comments
 (0)