Joel Dice
18a6393ecf
fix ClassCastException in ZipFile.getInputStream
...
This was being thrown when the parameter passed was a
JarFile.MyJarEntry, not a ZipFile.MyZipEntry, yet we cast it to the
latter.
2011-05-16 10:30:56 -06:00
Joel Dice
f617c5c9ef
Merge remote branch 'origin/localization' into oss-master
2011-04-09 21:43:44 -06:00
Joel Dice
3dd091c67a
implement jar and file URL stream handlers
2011-03-25 19:14:21 -06:00
JET
5b830343ba
Properties.java UTF-16 support refactoring.
2011-03-23 17:06:33 -06:00
JET
f6e2f4af21
Merge branch 'master' into localization
2011-02-21 17:58:50 -07:00
Joel Dice
3aff7dc861
add TreeSet(Collection) constructor
2011-01-20 09:39:16 -07:00
JET
98166dcc61
ASCII escapes in property files are now parsed, albeit crudely.
2010-12-21 11:39:26 -07:00
JET
7270eb7879
Fixed behavior of Locale and implemented its toString().
2010-12-15 15:18:43 -07:00
Joel Dice
a5742f5985
update copyright years
2010-12-05 20:21:09 -07:00
Joel Dice
84520cde51
Merge remote branch 'origin/master' into openjdk
2010-12-01 14:40:58 -07:00
Joel Dice
f9197cb076
fix a few HashMap bugs
...
1. HashMap.containsValue only checked one hash bucket, which was
pretty much useless :)
2. HashMap.MyIterator.remove was broken in that it failed to
decrement the size field and it did not update the previousCell field
properly, which sometimes led to more than one cell being removed.
2010-11-21 17:26:17 -07:00
Joel Dice
aac85ff278
remove @Overload annotation since Java 1.5.0_19 chokes on it
2010-11-17 10:42:28 -07:00
Joel Dice
580e7e1b3f
remove @Overload annotation since Java 1.5.0_19 chokes on it
2010-11-07 12:57:42 -07:00
Joel Dice
cb69ac23bd
Merge remote branch 'origin/master' into openjdk
...
Conflicts:
classpath/java/lang/String.java
src/posix.cpp
2010-11-03 11:54:41 -06:00
jet
0713f8d5cb
Locale system changes to better mimic Sun's VM.
2010-10-14 16:20:41 -06:00
Joel Dice
c1c9d2111b
remove GNU Classpath and Apache Harmony compatibility code
...
Rather than try to support mixing Avian's core classes with those of
an external class library -- which necessitates adding a lot of stub
methods which throw UnsupportedOperationExceptions, among other
comprimises -- we're looking to support such external class libraries
in their unmodified forms. The latter strategy has already proven
successful with OpenJDK's class library. Thus, this commit removes
the stub methods, etc., which not only cleans up the code but avoids
misleading application developers as to what classes and methods
Avian's built-in class library supports.
2010-09-27 15:58:02 -06:00
Zsombor Gegesy
6985e81503
add Properties.load(Reader) implementation
2010-09-11 21:23:46 +02:00
Zsombor Gegesy
5dadac2cb8
API additions for compatibility with harmony's java.util package
2010-09-11 21:23:46 +02:00
Joel Dice
64100d17c7
Merge branch 'master' of oss.readytalk.com:/var/local/git/avian into openjdk
2010-09-10 15:58:43 -06:00
Joel Dice
250a77dc13
handle empty strings properly in Pattern.split
...
We were incorrectly returning an empty array when the input was empty,
whereas we ought to return an array containing a single empty string.
When the pattern to match was empty, we went into a loop to create an
infinite list of empty strings, only to crash once we've run out of
memory. This commit addresses both problems.
2010-09-06 11:16:27 -06:00
Joel Dice
17c1a552d5
break each Class, Field, and Method into separate classes
...
In order to facilitate making the VM compatible with multiple class
libraries, it's useful to separate the VM-specific representation of
these classes from the library implementations. This commit
introduces VMClass, VMField, and VMMethod for that purpose.
2010-09-01 10:13:52 -06:00
Zsombor Gegesy
03b66375f4
add Collections.enumeration(Collection<T> c)
2010-08-16 09:23:48 -06:00
Zsombor Gegesy
4dc05844df
add java.util.Properties.propertyNames() method
2010-08-16 09:23:48 -06:00
Joel Dice
f0f35a920f
return a useful value from InflaterInputStream.available
...
Note the following excerpt from PNGFileFormat.java in SWT:
/*
* InflaterInputStream does not consume all bytes in the stream
* when it is closed. This may leave unread IDAT chunks. The fix
* is to read all available bytes before closing it.
*/
while (stream.available() > 0) stream.read();
stream.close();
This code relies on the documented behavior of
InflaterInputStream.available, which must return "0 after EOF has been
reached, otherwise always return 1". This is unlike
InputStream.available, which is documented to return "the number of
bytes that can be read (or skipped over) from this input stream
without blocking by the next caller of a method for this input
stream", and says nothing about how many bytes are left until the end
of stream.
This commit modifies InflaterInputStream.available to behave according
to Sun's documentation.
2010-08-04 18:54:47 -06:00
Joel Dice
112e2a71d5
update copyright years
2009-12-05 15:50:23 -07:00
jent
99a1c12682
Files to add Deflater and DeflaterOutputStream to java.util.zip for
...
avian
2009-12-04 12:01:31 -07:00
Joel Dice
6118792ffd
update copyright years
2009-12-02 19:08:29 -07:00
Joel Dice
6475beda83
don't null out array in HashMap when size drops to zero
...
As in ArrayList, we want to avoid thrashing in cases where the map is frequently emptied and refilled.
2009-11-19 12:55:53 -07:00
Joel Dice
adcac443e4
don't null out array in ArrayList when size goes to zero
...
This avoids thrashing in the case of a list which is frequently
emptied and refilled with a small number of elements.
2009-11-19 11:43:11 -07:00
Joel Dice
6fa25f992c
Properties.setProperty should return an Object
2009-09-18 17:51:05 -06:00
Joel Dice
0a96f4c552
ensure WeakHashMap.MyCell objects are registered with the ReferenceQueue
2009-09-01 17:22:31 -06:00
Joel Dice
4c14a9ab66
implement enough of java.util.regex to ensure String methods work for trivial regular expressions
2009-08-20 11:14:05 -06:00
Joel Dice
6d54b6cec8
add classes which I meant to add in earlier commits
2009-08-14 08:51:10 -06:00
Joel Dice
590238bbfc
add indexOf and lastIndexOf methods to java.util.List
2009-08-04 17:58:31 -06:00
Joel Dice
0a7f94abfe
add java.util.Collection.toArray()
2009-08-04 17:36:25 -06:00
Joel Dice
7911989055
add AbstractList and AbstractSequentialList classes to java.util and listIterator methods to java.util.List
2009-08-04 17:24:29 -06:00
Joel Dice
93597a4d1d
implement ArrayList.listIterator()
2009-08-04 11:34:46 -06:00
Joel Dice
08dd7d0a5a
Merge branch 'gnu'
2009-08-03 09:01:16 -06:00
Joel Dice
30be3945ae
update copyright year in TreeMap.java
2009-07-27 07:55:28 -06:00
Joel Dice
f869e5be21
Merge branch 'master' into gnu
...
Conflicts:
classpath/java/util/TreeSet.java
2009-07-25 18:38:57 -06:00
Joel Dice
d3a249a3fa
Merge branch 'master' of oss.readytalk.com:/var/local/git/avian
2009-07-25 18:36:27 -06:00
Joel Dice
d327f6ba5a
implement java.util.TreeMap
2009-07-25 15:41:43 -06:00
Joel Dice
e72ff8db0b
Merge branch 'master' into gnu
...
Conflicts:
src/compile.cpp
2009-07-11 12:11:59 -06:00
Joel Dice
ab5ba9c954
Merge branch 'master' of oss.readytalk.com:/var/local/git/avian
2009-07-10 09:57:29 -06:00
Eric Scharff
c3c06e4e0e
Fix mac build
...
Remove a compiler error by removing an unnecessary method
2009-06-19 13:43:57 -06:00
Joel Dice
d0f11cd2e5
move non-standard classes to avian package
2009-06-04 17:59:34 -06:00
Joel Dice
98be5c509e
more progress towards GNU Classpath compatibility
2009-06-03 16:17:55 -06:00
Joel Dice
9d6a3021ca
make Hashtable.toString synchronized
2009-05-31 14:16:08 -06:00
Joel Dice
66c4867f18
more work on continuation support
2009-05-05 18:29:05 -06:00
Joel Dice
abc9da9b31
Merge branch 'master' of oss.readytalk.com:/var/local/git/avian
2009-04-27 14:19:53 +00:00
Joel Dice
4091e871a7
tolerate null caller in Logger.log
2009-04-25 20:14:29 -06:00
Eric Scharff
ed4c24c7f6
Removed temp files
2009-04-22 16:27:58 -06:00
mweaver
6b89ecd0ee
Like a noob, I missed some things... broke the compilation.
2009-04-22 15:24:26 -06:00
mweaver
f68f1e5888
should be fixed
2009-04-22 11:43:22 -06:00
mweaver
d6fb1e0c7c
Adding changes to fix Map/Collections
...
Merge branch 'master' of ssh://oss.readytalk.com/var/local/git/avian
Conflicts:
classpath/java/util/HashMap.java
classpath/java/util/Map.java
2009-04-22 11:34:32 -06:00
mweaver
34da6da3db
brought in line with Sun's SDK, should no longer break on values call
2009-04-22 10:04:38 -06:00
mweaver
c5dd57f74c
Brought more in line with Sun's SDK
2009-04-22 10:04:23 -06:00
mweaver
9023899c81
Brought interface in line with Sun
2009-04-22 10:03:53 -06:00
Eric Scharff
af784f4cbc
"Fix" Map.containsKey() and Map.containsValue()
...
java.util.Map.containsKey() and java.util.Map.containsValue() take
Object parameters, not K and V. Changed to improve classpath
compatibility.
2009-04-17 08:57:49 -06:00
Joel Dice
d1018bf078
update copyright years
2009-03-15 12:02:36 -06:00
Joel Dice
1d04fed6de
implement Collections.shuffle
2009-03-04 08:18:18 -07:00
Eric Scharff
bf8c856a3c
Partially handle cascading logging levels.
...
We now maintain a virtual root loger, on which you can set the log
level. When any logger logs, it finds the effective log level by going
up the parent chain, and finding a meaningful log lvel. Thus, one can
now do Logger.getLogger("").setLevel(Level.FINER) and set the log level
for all other loggers (that do not specify their own default) to the
level specified.
2009-02-19 15:53:10 -07:00
Zsombor
8c68bc0e1b
add logp methods to Logger
2009-02-16 18:11:05 -07:00
Zsombor
7c1a5fe57d
add level handling to Logger
2009-02-16 18:10:31 -07:00
Zsombor
d682ccaceb
add synchronized map
2009-02-16 17:52:27 -07:00
Zsombor
9ba62e25b9
fix and-ing, or-ing, etc BitSet with variant size
2009-02-16 17:51:37 -07:00
Ryan Forbes
46e19f9c80
Fixed bug where seconds were always zero because % was misspelled as /
2009-02-03 15:30:03 -07:00
Joel Dice
63c78d9d84
implement ResourceBundle.getKeys
2008-11-03 15:18:44 -07:00
Joel Dice
96d7bf571d
implement a few methods to make SWT 3.4 happy
2008-10-10 11:49:28 -06:00
dain
7dbd4903f0
set default locale to en, us
2008-10-09 18:30:24 -06:00
Joel Dice
aeafb52bcb
add ZipFile(File) constructor and ZipFile.close
2008-10-06 17:30:48 -06:00
Joel Dice
ae75be5683
add copyright headers
2008-10-03 14:57:40 -06:00
Joel Dice
2684b7c024
remove debug logging
2008-10-03 14:26:23 -06:00
Joel Dice
4c307ae8c6
implement minimal, read-only versions of RandomAccessFile and ZipFile
2008-10-03 14:15:47 -06:00
Joel Dice
025cf59bb6
Vector.setElementAt should return void
2008-09-26 18:16:35 -06:00
Joel Dice
066714933c
implement Random.nextBytes and Random.nextLong
2008-09-26 15:30:08 -06:00
Joel Dice
93a96f3833
fix backwards logic in Stack.empty
2008-09-26 08:10:16 -06:00
Joel Dice
9017b5996a
implement HashSet.toString
2008-08-22 14:02:38 -06:00
Joel Dice
a677a2da17
fix class cast exception in TreeSet ctor
2008-07-17 15:46:54 -06:00
Matt Weaver
244393430d
Merge branch 'master' of git://oss.readytalk.com/avian
2008-07-16 11:26:29 -06:00
Matt Weaver
2d1ec11edc
Added no arg constructor to support Comparable types.
2008-07-14 08:45:51 -06:00
Zsombor
4fed24270b
add skeleton java.util.regex classes
2008-07-13 20:33:51 -06:00
Zsombor
d28a860138
add Arrays.fill
2008-07-13 18:28:27 -06:00
Zsombor
6409747f17
add Properties.getProperty(String,String)
2008-07-13 18:27:42 -06:00
Joel Dice
975c2c12a8
add license header to BitSet.java
2008-07-13 18:25:26 -06:00
Zsombor
e1d712ef71
java.util.BitSet implementation
2008-07-13 18:16:55 -06:00
Eric Scharff
bba4f75c2f
Tweaked code indentation and formatting to match existing style
2008-07-03 10:49:08 -06:00
Zsombor
e3fd0d9c7d
add a few classes and methods to the classpath
...
Add java.lang.CharSequence, java.util.AbstractSet,
java.util.AbstractCollection, Collections.unmodifiableSet,
System.getProperty(String,String), etc.
2008-07-03 09:16:32 -06:00
Joel Dice
af794d9be0
implement Date.toString, which just defers to ctime for now (part 2)
2008-06-16 11:45:23 -06:00
Joel Dice
14e2513590
fix some API compatibility issues in the class library
2008-05-07 17:44:43 -06:00
Joel Dice
7dd9b96717
add additional methods and fields to class library
2008-03-20 18:40:18 -06:00
Joel Dice
8e1ec5794f
implement java.util.Random and java.lang.Math.random in Java
2008-03-20 18:39:25 -06:00
Joel Dice
3e7acd7861
fix backwards logic in Collections.toArray
2008-03-05 14:21:53 -07:00
Joel Dice
51a731847a
java.util code cleanup
2008-02-28 15:18:46 -07:00
Joel Dice
35d4d19c07
Merge branch 'master' of oss:/var/local/git/avian
2008-02-28 11:37:14 -07:00
Joel Dice
9d76d6a04e
implement a few more classpath methods, including Collection.addAll and Collection.toArray
2008-02-28 11:37:10 -07:00
Eric Scharff
e23f2bafd5
Implemented trivial impolementation of java.util.Random.nextDouble()
2008-02-28 11:02:58 -07:00
Eric Scharff
73e7bfc1dc
Added constructor for java.util.HashMap
2008-02-28 08:33:52 -07:00
Eric Scharff
eaa8d5c64b
Trivial implementation of java.util.Random.nextInt(int n)
2008-02-26 09:37:46 -07:00
Joel Dice
2edaa82801
prepend copyright notice and license to all source files; add license.txt and readme.txt
2008-02-19 11:06:52 -07:00