Joshua Warner
dd460ab55e
Merge pull request #99 from dscho/fix-get-annotation
...
Fix NPE in Field#getAnnotation
2013-11-06 09:03:45 -08:00
Joshua Warner
4cf3d9de88
Merge pull request #95 from dscho/compatible-serialization
...
Java-compatible (de)serialization of TreeMap, ArrayList and Number
2013-11-06 09:02:12 -08:00
Joshua Warner
d0d4f600dc
Merge pull request #94 from dscho/serialization
...
Implement Java-compatible serialization
2013-11-06 08:49:14 -08:00
Johannes Schindelin
ff50034206
Fix NPE in Field#getAnnotation
...
When the class whose field is to be inspected has no annotations at all,
at least my javac here (1.6.0_51 on MacOSX) does not produce any class
addendum.
Therefore, let's verify that the addendum is not null before proceeding.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-11-06 09:46:56 -06:00
Johannes Schindelin
6ea017eb86
Mark java.lang.Number as serializable
...
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-11-06 09:12:18 -06:00
Johannes Schindelin
3dccd68fe7
Implement the Field#set<PrimitiveType> method family
...
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-11-06 09:10:50 -06:00
Johannes Schindelin
2904dd738e
Fix java.lang.reflect.Field.getLong()
...
The bug was that the long was cast to an int, cutting off the most
significant bytes.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-11-06 09:10:50 -06:00
Johannes Schindelin
6a7c03aef9
Implement the Math#signum method
...
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-11-06 09:07:58 -06:00
Johannes Schindelin
dba8d39e63
Implement Class#getDeclaredClasses
...
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-11-06 09:07:58 -06:00
Johannes Schindelin
526dd574d9
Add the Method#isVarArgs method
...
Required by bleeding-edge Beanshell...
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-10-25 15:32:33 -05:00
Johannes Schindelin
0e3e719dd6
Add the Boolean#getBoolean method
...
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-10-25 15:32:33 -05:00
Johannes Schindelin
d04cda30ca
Add the Integer#decode method
...
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-10-25 15:32:33 -05:00
Johannes Schindelin
2ff0178da4
Adjust fromIndex in String#lastIndexOf if necessary
...
If fromIndex 'is greater than or equal to the length of this string,
it has the same effect as if it were equal to one less than the length
of the string':
http://docs.oracle.com/javase/6/docs/api/java/lang/String.html#lastIndexOf%28int,%20int%29
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-10-25 15:32:33 -05:00
Johannes Schindelin
6f9a9fd15d
Add java.lang.Double#doubleToLongBits
...
It is different than #doubleToRawLongBits only when the input value
is not a number.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-10-18 15:01:36 -05:00
Johannes Schindelin
396c0822cd
Add java.lang.Character#isISOControl(char)
...
... as per the public JavaDoc at
http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#isISOControl%28char%29
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-10-18 15:01:36 -05:00
Johannes Schindelin
7aca1b1307
Add java.lang.Boolean#parse(String)
...
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2013-10-18 15:01:36 -05:00
Joel Dice
87b02eb949
update copyright years
...
Previously, I used a shell script to extract modification date ranges
from the Git history, but that was complicated and unreliable, so now
every file just gets the same year range in its copyright header. If
someone needs to know when a specific file was modified and by whom,
they can look at the Git history themselves; no need to include it
redundantly in the header.
2013-07-02 20:52:38 -06:00
Joel Dice
4e12847858
code rearrangment to improve state of Android libcore tests
...
This mainly moves several sun.misc.Unsafe method implementations from
classpath-openjdk.cpp to builtin.cpp so that the Avian and Android
builds can use them.
It also replaces FinalizerReference.finalizeAllEnqueued with a no-op,
since the real implementations assumes too much about how the VM
handles (or delegates) finalization.
2013-04-23 13:47:15 -06:00
Joel Dice
b4c3eea0f1
set InvocationTargetException target
...
When using the OpenJDK classpath, the target exception and the
Throwable cause are two different fields; we must set them both.
2013-04-18 11:23:59 -06:00
Joel Dice
8546ca5670
fix Avian classpath build
2013-02-22 11:55:01 -07:00
Joel Dice
42d39b1af1
more Android class library work
2013-02-21 15:37:17 -07:00
Victor Shcherb
d6aff87ef9
Add java lang math methods
2013-02-09 09:42:11 +02:00
Simon Ochsenreither
57a67fb312
Fix field names, add getters to j.l.Package
2013-02-04 14:14:45 +01:00
Simon Ochsenreither
1db67e463f
Add Class#isEnum and improve error handling in Enum.valueOf
2013-02-03 16:03:15 +01:00
Simon Ochsenreither
b1eb4b9718
Adds code to get the Scala REPL working
2013-01-30 04:31:38 +01:00
Mike Keesey
5061d7fe4d
Making Thread's isInterrupted() non-static and make it use the current instance's interrupted variable.
2012-12-25 18:12:03 -07:00
Pierre Carrier
f8ea506021
classpath: j.l.{Integer,Long}.to{Octal,Binary}String
...
Offer support for toOctalString and toBinaryString in Integer and Long.
2012-11-05 00:10:02 +01:00
Joel Dice
b98abe3f94
fix float to integer conversion
...
Java requires that NaNs be converted to zero and that numbers at or
beyond the limits of integer representation be clamped to the largest
or smallest value that can be represented, respectively.
2012-08-12 14:31:58 -06:00
Joel Dice
47503854d5
Thread.sleep(0) should not sleep indefinitely
...
Our implementation uses Object.wait(long) to implement Thread.sleep,
which had the side effect of interpreting zero as infinity. However,
for Thread.sleep, zero just means zero. I assume that doesn't mean
"don't sleep at all", though, or else the app wouldn't have called
Thread.sleep in the first place, so this patch sleeps for one
millisecond when zero is passed -- just enough to yield the processor
for a bit. Thread.yield might be a better choice in this case, but I
assume the app would have called that directly if that's what it
wanted.
2012-08-12 11:17:59 -06:00
Joel Dice
6aba7bef5a
add java.lang.Deprecated
2012-08-06 16:55:49 -06:00
Mike Keesey
be869932d0
Adding @Target and the associated ElementType enum for specifying the type an annotation is.
2012-05-22 15:18:42 -06:00
Mike Keesey
a5c9dd6f24
Fixing some issues with runtime annotations within avian.
...
We were not properly converting dots to slashes internally for package names
and we did not properly handle Method.getAnnotations and
Method.getAnnotation(Class<T>) on methods without any annotations.
Added some tests to cover these cases.
2012-05-22 14:02:51 -06:00
Joel Dice
0addd8c814
update copyright years
2012-05-11 17:43:27 -06:00
Joel Dice
f0152f1d33
Merge branch 'jdk7'
2012-05-11 16:41:18 -06:00
Joel Dice
d0eda37a90
make Thread.interrupted static to match Java API
2012-05-11 13:23:19 -06:00
Joel Dice
616c08fee9
Merge remote branch 'oss/master' into jdk7
...
Conflicts:
makefile
2012-04-10 07:53:00 -06:00
JET
2f225795fc
added RuntimePermission and System.getenv()
2012-04-02 22:15:02 -06:00
Joel Dice
bc5661d6f3
start work on OpenJDK 7 class library port
2012-02-18 15:17:10 -07:00
Joel Dice
9ba7c504da
Merge remote branch 'origin/SWT3.7_UrlUpdates' into oss-master
2011-12-29 11:00:59 -07:00
Ben Limmer
b3850ac76d
Initial attempt at resolving SWT3.7 missing operatons in Avian. Everything seems to be working except floatToIntBits, hence the test case failing.
2011-12-28 15:52:53 -07:00
Joel Dice
b29db7fece
fix OpenJDK 7 build error
...
OpenJDK 7's javac doesn't seem to like that we're accessing
Enum.ordinal in compareTo when it's private.
2011-11-19 19:22:34 -07:00
Ben Limmer
89cdd9d0d2
Fixed bug where calling Process.destroy() on a PID that no longer exist kills all processes in Pgroup.
2011-11-09 13:26:36 -07:00
Ben Limmer
f1b0d995a8
Fixed bug where calling Process.destroy() on a PID that no longer exist kills all processes in Pgroup.
2011-11-09 13:18:04 -07:00
Joshua Warner
90dc552463
implement Process.destroy
2011-11-03 12:30:51 -06:00
Anonymous
16aa5c3d59
improve IOException message in the case of a Runtime.exec() failure
...
We now properly forward the errno value from the child when execvp()
fails, which the parent then uses to for the errno message as well as
including the failed command's name in the message.
2011-08-15 07:12:52 -06:00
Topher Lamey
10183a9870
Added AbstractMap for protobuf, and String getByte encoding for Latin-1
2011-08-12 13:30:51 -06:00
Joel Dice
c3824c6844
fix crash when encountering invokespecial call to abstract method
...
We must throw an AbstractMethodError when such a call is executed (not
when the call is compiled), so we compile this case as a call to a
thunk which throws such an error.
2011-07-17 19:54:55 -06:00
Joel Dice
c3fa08c430
fix Thread.interrupt and Thread.interrupted
...
These were both totally broken; the latter wasn't even implemented.
This commit fixes/implements them and adds a simple test to exercise
them.
2011-07-12 14:15:43 -06:00
Anonymous
794a45cb79
fix various ObjectOutputStream/ObjectInputStream bugs
2011-07-01 08:43:43 -06:00
Joel Dice
c0f39fbe0c
implement System.nanoTime
...
This is a quick and coarse, but servicable, implementation.
2011-04-08 20:32:33 -06:00