Skip to content

Commit c19570a

Browse files
mickaelistriarobstryker
authored andcommitted
Fix/Update JCL
* Adds requires valueOf/compareTo to Enums * Add missing IllegalAccessException/NoSuchMethodError required for compilation of MethodHandles * Add SuppressWarnings/Void required by execution of Javac's doclint (javadoc) * Added Byte/Character/Integer/Short/Long/Boolean requested to resolve varargs (eg case of testBug84100 or testVarargs03) with Javac
1 parent d3d4dc9 commit c19570a

File tree

274 files changed

+7007
-61
lines changed

Some content is hidden

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

274 files changed

+7007
-61
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2000, 2004 IBM Corporation and others.
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License v1.0
5+
* which accompanies this distribution, and is available at
6+
* http://www.eclipse.org/legal/epl-v10.html
7+
*
8+
* Contributors:
9+
* IBM Corporation - initial API and implementation
10+
*******************************************************************************/
11+
package java.lang;
12+
13+
14+
public class Boolean {
15+
public static final Boolean TRUE = new Boolean(true);
16+
public static final Boolean FALSE = new Boolean(false);
17+
public Boolean(boolean b) {
18+
}
19+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2000, 2004 IBM Corporation and others.
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License v1.0
5+
* which accompanies this distribution, and is available at
6+
* http://www.eclipse.org/legal/epl-v10.html
7+
*
8+
* Contributors:
9+
* IBM Corporation - initial API and implementation
10+
*******************************************************************************/
11+
package java.lang;
12+
13+
14+
public class Byte extends Number implements Comparable<Byte> {
15+
private static final long serialVersionUID = 8750891329089001085L;
16+
public Byte(byte b) {
17+
}
18+
/* (non-Javadoc)
19+
* @see java.lang.Number#doubleValue()
20+
*/
21+
public double doubleValue() {
22+
return 0;
23+
}
24+
/* (non-Javadoc)
25+
* @see java.lang.Number#floatValue()
26+
*/
27+
public float floatValue() {
28+
return 0;
29+
}
30+
/* (non-Javadoc)
31+
* @see java.lang.Number#intValue()
32+
*/
33+
public int intValue() {
34+
return 0;
35+
}
36+
/* (non-Javadoc)
37+
* @see java.lang.Number#longValue()
38+
*/
39+
public long longValue() {
40+
return 0;
41+
}
42+
public int compareTo(Byte b) {
43+
return 0;
44+
}
45+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2000, 2004 IBM Corporation and others.
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License v1.0
5+
* which accompanies this distribution, and is available at
6+
* http://www.eclipse.org/legal/epl-v10.html
7+
*
8+
* Contributors:
9+
* IBM Corporation - initial API and implementation
10+
*******************************************************************************/
11+
package java.lang;
12+
13+
public class Character {
14+
public Character(char c) {
15+
}
16+
public static char toLowerCase(char c) {
17+
return ' ';
18+
}
19+
20+
public static int getNumericValue(char c) {
21+
return 0;
22+
}
23+
24+
public static int digit(char ch, int radix) {
25+
return 0;
26+
}
27+
public static boolean isWhitespace(char c) {
28+
return false;
29+
}
30+
public static boolean isJavaIdentifierStart(char c) {
31+
return false;
32+
}
33+
public static boolean isJavaIdentifierPart(char c) {
34+
return false;
35+
}
36+
public static boolean isDigit(char c) {
37+
return false;
38+
}
39+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2000, 2004 IBM Corporation and others.
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License v1.0
5+
* which accompanies this distribution, and is available at
6+
* http://www.eclipse.org/legal/epl-v10.html
7+
*
8+
* Contributors:
9+
* IBM Corporation - initial API and implementation
10+
*******************************************************************************/
11+
package java.lang;
12+
13+
public class Integer extends Number implements Comparable<Integer> {
14+
private static final long serialVersionUID = 6462609062775655000L;
15+
16+
public Integer(int i) {
17+
}
18+
public Integer(String s) {
19+
}
20+
public static final int MAX_VALUE= 2147483647;
21+
public static final int MIN_VALUE= -2147483647;
22+
23+
public static int parseInt(String s) throws NumberFormatException {
24+
return 0;
25+
}
26+
public static String toHexString(int i) {
27+
return null;
28+
}
29+
public static String toString(int i) {
30+
return null;
31+
}
32+
/* (non-Javadoc)
33+
* @see java.lang.Number#doubleValue()
34+
*/
35+
public double doubleValue() {
36+
return 0;
37+
}
38+
/* (non-Javadoc)
39+
* @see java.lang.Number#floatValue()
40+
*/
41+
public float floatValue() {
42+
return 0;
43+
}
44+
/* (non-Javadoc)
45+
* @see java.lang.Number#intValue()
46+
*/
47+
public int intValue() {
48+
return 0;
49+
}
50+
/* (non-Javadoc)
51+
* @see java.lang.Number#longValue()
52+
*/
53+
public long longValue() {
54+
return 0;
55+
}
56+
public int compareTo(Integer i) {
57+
return 0;
58+
}
59+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2005 IBM Corporation and others.
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License v1.0
5+
* which accompanies this distribution, and is available at
6+
* http://www.eclipse.org/legal/epl-v10.html
7+
*
8+
* Contributors:
9+
* IBM Corporation - initial API and implementation
10+
*******************************************************************************/
11+
package java.lang;
12+
13+
public class Long extends Number implements Comparable<Long> {
14+
private static final long serialVersionUID = 7046418566711138668L;
15+
public static final long MIN_VALUE = 0x8000000000000000L;
16+
public static final long MAX_VALUE = 0x7fffffffffffffffL;
17+
public Long(long l) {
18+
}
19+
/* (non-Javadoc)
20+
* @see java.lang.Number#doubleValue()
21+
*/
22+
public double doubleValue() {
23+
return 0;
24+
}
25+
/* (non-Javadoc)
26+
* @see java.lang.Number#floatValue()
27+
*/
28+
public float floatValue() {
29+
return 0;
30+
}
31+
/* (non-Javadoc)
32+
* @see java.lang.Number#intValue()
33+
*/
34+
public int intValue() {
35+
return 0;
36+
}
37+
/* (non-Javadoc)
38+
* @see java.lang.Number#longValue()
39+
*/
40+
public long longValue() {
41+
return 0;
42+
}
43+
public int compareTo(Long l) {
44+
return 0;
45+
}
46+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2000, 2004 IBM Corporation and others.
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License v1.0
5+
* which accompanies this distribution, and is available at
6+
* http://www.eclipse.org/legal/epl-v10.html
7+
*
8+
* Contributors:
9+
* IBM Corporation - initial API and implementation
10+
*******************************************************************************/
11+
package java.lang;
12+
13+
14+
public abstract class Number implements java.io.Serializable {
15+
private static final long serialVersionUID = 3166984097235214156L;
16+
public abstract int intValue();
17+
public abstract long longValue();
18+
public abstract float floatValue();
19+
public abstract double doubleValue();
20+
public byte byteValue() {
21+
return (byte) intValue();
22+
}
23+
public short shortValue() {
24+
return (short) intValue();
25+
}
26+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2000, 2004 IBM Corporation and others.
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License v1.0
5+
* which accompanies this distribution, and is available at
6+
* http://www.eclipse.org/legal/epl-v10.html
7+
*
8+
* Contributors:
9+
* IBM Corporation - initial API and implementation
10+
*******************************************************************************/
11+
package java.lang;
12+
13+
14+
public class NumberFormatException extends RuntimeException {
15+
private static final long serialVersionUID = 9070730590112500498L;
16+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2000, 2004 IBM Corporation and others.
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License v1.0
5+
* which accompanies this distribution, and is available at
6+
* http://www.eclipse.org/legal/epl-v10.html
7+
*
8+
* Contributors:
9+
* IBM Corporation - initial API and implementation
10+
*******************************************************************************/
11+
package java.lang;
12+
13+
14+
public class Short extends Number implements Comparable<Short> {
15+
private static final long serialVersionUID = -8044450932684282285L;
16+
public Short(short s) {
17+
}
18+
/* (non-Javadoc)
19+
* @see java.lang.Number#doubleValue()
20+
*/
21+
public double doubleValue() {
22+
return 0;
23+
}
24+
/* (non-Javadoc)
25+
* @see java.lang.Number#floatValue()
26+
*/
27+
public float floatValue() {
28+
return 0;
29+
}
30+
/* (non-Javadoc)
31+
* @see java.lang.Number#intValue()
32+
*/
33+
public int intValue() {
34+
return 0;
35+
}
36+
/* (non-Javadoc)
37+
* @see java.lang.Number#longValue()
38+
*/
39+
public long longValue() {
40+
return 0;
41+
}
42+
public int compareTo(Short s) {
43+
return 0;
44+
}
45+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package java.lang;
2+
3+
import static java.lang.annotation.ElementType.*;
4+
5+
import java.lang.annotation.*;
6+
7+
@Target({TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE})
8+
@Retention(RetentionPolicy.SOURCE)
9+
public @interface SuppressWarnings {
10+
String[] value();
11+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2005 IBM Corporation and others.
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License v1.0
5+
* which accompanies this distribution, and is available at
6+
* http://www.eclipse.org/legal/epl-v10.html
7+
*
8+
* Contributors:
9+
* IBM Corporation - initial API and implementation
10+
*******************************************************************************/
11+
package java.lang;
12+
13+
public class Void {}

0 commit comments

Comments
 (0)