Skip to content

Commit 9ca09ed

Browse files
committed
warnings removed
1 parent 583bf3a commit 9ca09ed

File tree

310 files changed

+718
-797
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

310 files changed

+718
-797
lines changed

sources/net.sf.j2s.java.core/src/java/applet/Applet.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ public void setVisible(boolean b) {
200200
* @param width the new requested width for the applet.
201201
* @param height the new requested height for the applet.
202202
*/
203-
@Override
203+
@SuppressWarnings("deprecation")
204+
@Override
204205
public void resize(int width, int height) {
205206
Dimension d = size();
206207
if ((d.width != width) || (d.height != height)) {

sources/net.sf.j2s.java.core/src/java/awt/AWTError.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
*
3434
* @author Arthur van Hoff
3535
*/
36+
@SuppressWarnings("serial")
3637
public class AWTError extends Error {
3738

3839
/*

sources/net.sf.j2s.java.core/src/java/awt/AWTEvent.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
* @author Amy Fowler
8686
* @since 1.1
8787
*/
88+
@SuppressWarnings("serial")
8889
public abstract class AWTEvent extends EventObject {
8990

9091
private static int idnum; // SwingJS for testing

sources/net.sf.j2s.java.core/src/java/awt/AWTEventMulticaster.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
* @since 1.1
133133
*/
134134

135+
@SuppressWarnings({"rawtypes", "unchecked"})
135136
public class AWTEventMulticaster implements
136137
ComponentListener, ContainerListener, FocusListener, KeyListener,
137138
MouseListener, MouseMotionListener, WindowListener, WindowFocusListener,

sources/net.sf.j2s.java.core/src/java/awt/AWTException.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
*
3434
* @author Arthur van Hoff
3535
*/
36+
@SuppressWarnings("serial")
3637
public class AWTException extends Exception {
3738

3839
/*

sources/net.sf.j2s.java.core/src/java/awt/AWTKeyStroke.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,15 @@
2727
*/
2828
package java.awt;
2929

30+
import java.awt.event.InputEvent;
31+
import java.awt.event.KeyEvent;
3032
import java.lang.reflect.Constructor;
3133
import java.lang.reflect.InvocationTargetException;
3234
import java.util.Collections;
3335
import java.util.HashMap;
3436
import java.util.Map;
3537
import java.util.StringTokenizer;
3638

37-
import swingjs.api.Interface;
38-
39-
import java.awt.event.InputEvent;
40-
import java.awt.event.KeyEvent;
4139
import sun.awt.AppContext;
4240

4341
/**
@@ -63,6 +61,7 @@
6361
* @author David Mendenhall
6462
* @since 1.4
6563
*/
64+
@SuppressWarnings({"rawtypes", "unchecked"})
6665
public class AWTKeyStroke {
6766

6867
private static Map modifierKeywords;
@@ -597,6 +596,7 @@ public static AWTKeyStroke getAWTKeyStroke(String s) {
597596
throw new IllegalArgumentException(errmsg);
598597
}
599598

599+
@SuppressWarnings("unused")
600600
private static VKCollection getVKCollection() {
601601
if (vks == null) {
602602
vks = new VKCollection();
@@ -863,6 +863,7 @@ private static int mapNewModifiers(int modifiers) {
863863

864864
}
865865

866+
@SuppressWarnings({"rawtypes", "unchecked"})
866867
class VKCollection {
867868
Map code2name;
868869
Map name2code;

sources/net.sf.j2s.java.core/src/java/awt/BorderLayout.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@
123123
* @see java.awt.ComponentOrientation
124124
* @since JDK1.0
125125
*/
126+
@SuppressWarnings("serial")
126127
public class BorderLayout implements LayoutManager2,
127128
java.io.Serializable {
128129
/**

sources/net.sf.j2s.java.core/src/java/awt/CardLayout.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
* @since JDK1.0
5757
*/
5858

59+
@SuppressWarnings({"rawtypes", "unchecked"})
5960
public class CardLayout implements LayoutManager2,
6061
Serializable {
6162

@@ -71,7 +72,8 @@ public class CardLayout implements LayoutManager2,
7172
/*
7273
* A pair of Component and String that represents its name.
7374
*/
74-
class Card implements Serializable {
75+
@SuppressWarnings("serial")
76+
class Card implements Serializable {
7577
// static final long serialVersionUID = 6640330810709497518L;
7678
public String name;
7779
public Component comp;

sources/net.sf.j2s.java.core/src/java/awt/Component.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
* @author Arthur van Hoff
154154
* @author Sami Shaio
155155
*/
156-
@SuppressWarnings("rawtypes")
156+
@SuppressWarnings({"rawtypes", "unchecked"})
157157
public abstract class Component
158158
implements ImageObserver/*
159159
* , MenuContainer, Serializable
@@ -2156,6 +2156,7 @@ private void reshapeNativePeer(int x, int y, int width, int height, int op) {
21562156
peer.setBounds(nativeX, nativeY, width, height, op);
21572157
}
21582158

2159+
@SuppressWarnings("deprecation")
21592160
private void notifyNewBounds(boolean resized, boolean moved) {
21602161
if (componentListener != null || (eventMask & AWTEvent.COMPONENT_EVENT_MASK) != 0
21612162
|| Toolkit.enabledOnToolkit(AWTEvent.COMPONENT_EVENT_MASK)) {

sources/net.sf.j2s.java.core/src/java/awt/Container.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,8 @@ public void setComponentZOrder(Component comp, int index) {
723723
* to new heavyweight parent.
724724
* @since 1.5
725725
*/
726-
private void reparentTraverse(ContainerPeer parentPeer, Container child) {
726+
@SuppressWarnings("deprecation")
727+
private void reparentTraverse(ContainerPeer parentPeer, Container child) {
727728
checkTreeLock();
728729

729730
for (int i = 0; i < child.getComponentCount(); i++) {
@@ -746,7 +747,8 @@ private void reparentTraverse(ContainerPeer parentPeer, Container child) {
746747
* Container must be heavyweight.
747748
* @since 1.5
748749
*/
749-
private void reparentChild(Component comp) {
750+
@SuppressWarnings("deprecation")
751+
private void reparentChild(Component comp) {
750752
// checkTreeLock();
751753
if (comp == null) {
752754
return;

0 commit comments

Comments
 (0)