Skip to content

Commit ab2e0f7

Browse files
author
zhourenjian
committed
Remove Java 5.0 Syntax warnings
1 parent c0c5c2b commit ab2e0f7

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

sources/net.sf.j2s.ajax/ajaxcore/net/sf/j2s/ajax/AClass.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public static void load(final String clazzName, final Runnable afterLoaded) {
6565
(new Thread() {
6666
public void run() {
6767
try {
68-
Class clz = Class.forName(clazzName);
68+
Class<?> clz = Class.forName(clazzName);
6969
if (afterLoaded != null && afterLoaded instanceof ARunnable) {
7070
ARunnable runnable = (ARunnable) afterLoaded;
7171
runnable.setClazz(clz);

sources/net.sf.j2s.ajax/ajaxcore/net/sf/j2s/ajax/ARunnable.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,21 @@
2121
* 2006-8-4
2222
*/
2323
public abstract class ARunnable implements Runnable {
24-
private Class clazz;
24+
private Class<?> clazz;
2525

2626
/**
2727
* Return the loaded class.
2828
* @return Class loaded class.
2929
*/
30-
public Class getClazz() {
30+
public Class<?> getClazz() {
3131
return clazz;
3232
}
3333

3434
/**
3535
* Set the loaded class
3636
* @param clazz Class class that is already loaded.
3737
*/
38-
public void setClazz(Class clazz) {
38+
public void setClazz(Class<?> clazz) {
3939
this.clazz = clazz;
4040
}
4141
}

sources/net.sf.j2s.ajax/ajaxcore/net/sf/j2s/ajax/HttpRequest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ protected static interface IXHRReceiving {
151151
private String user;
152152
private String password;
153153

154-
private Map headers = new HashMap();
154+
private Map<String, String> headers = new HashMap<String, String>();
155155
private String content;
156156

157157
private boolean toAbort = false;
@@ -410,7 +410,7 @@ private void request() {
410410
connection.setDoInput(true);
411411
connection.setRequestMethod(method);
412412
connection.setRequestProperty("User-Agent",
413-
"Mozilla/5.0 (compatible; Java2Script-Pacemaker/1.0; +http://j2s.sourceforge.net)");
413+
"Mozilla/5.0 (compatible; Java2Script/2.0.0)");
414414
if ("post".equalsIgnoreCase(method)) {
415415
connection.setDoOutput(true);
416416
connection.setRequestProperty("Content-Type",
@@ -421,7 +421,7 @@ private void request() {
421421
String base64Auth = HttpRequest.Base64.byteArrayToBase64(auth.getBytes());
422422
connection.setRequestProperty("Authorization", "Basic " + base64Auth);
423423
}
424-
for (Iterator iter = headers.keySet().iterator(); iter.hasNext();) {
424+
for (Iterator<String> iter = headers.keySet().iterator(); iter.hasNext();) {
425425
String key = (String) iter.next();
426426
connection.setRequestProperty(key, (String) headers.get(key));
427427
}

0 commit comments

Comments
 (0)