| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
| |
* java/io/File.java (normalizePath): Fixed handling of "//" and "\\".
|
| |
|
|
|
|
|
|
| |
* java/io/InputStreamReader.java
(bytesCache): New field.
(cacheLock): New field.
(read(byte[],int,int): Avoid allocations of new byte
array on every call and reuse cached byte array if possible.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* java/io/ObjectInputStream.java
(objectLookupTable): Changed to be a Vector.
(ObjectInputStream): Initialize objectLookupTable as Vector.
(assignNewHandle): Store Object using handle index rather than
Hashtable, using the new rememberHandle() method.
(hierarchy): New method. This replaces inputGetObjectStreamClasses()
with a caching in ObjectStreamClass.
(inputGetObjectStreamClass): Replaced by hierarchy().
(lookupHandle): New method. Looks up an object by it's handle
index.
(parseContent): Avoid creating of Integer objects. Use
hierarchy() method for looking up the class hierarchy.
(processResolution): Use rememberHandle() to store
handle per index, rather than Hashtabling the object.
(readFields):
(rememberHandle): New method.
* java/io/ObjectOutputStream.java
(OIDLookupTable): Use ObjectIdentityMap2Int instead of
Hashtable for improved lookup performance.
(ObjectOutputStream): Initialize OIDLookupTable as
ObjectIdentityMap2Int.
(assignNewHandle): Change to use ObjectIdentityMap2Int.
(findHandle): Change to use ObjectIdentityMap2Int.
(getBooleanField): Removed.
(getByteField): Removed.
(getCharField): Removed.
(getDoubleField): Removed.
(getField): Removed.
(getFloatField): Removed.
(getIntField): Removed.
(getLongField): Removed.
(getObjectField): Removed.
(writeFields(Object,ObjectStreamClass)): Use new helper method.
(writeFields(Object,ObjectStreamField)): New helper method.
Use switch rather then if-else cascade.
(writeObject): Use int handle, rather then Integer.
* java/io/ObjectStreamClass.java
(hierarchy): New field. Caches the class hierarchy.
(methodCache): New field. Caches methods.
(readObjectSignature): New field. Stores the read signature.
(uidCache): New field. Caches UIDs.
(writeObjectSignature): New field. Stores the write signature.
(cacheMethods): Cache methods in methodCache.
(calculateClassID): Outsourced from getClassUID()
for computing the UIDs.
(getClassUIDFromField): Outsourced from getClassUID() for
fetching the UID from the class field.
(getClassUID): Use cached uid if possible. Use new helper
methods for fetching the UID from the field or computing
from scratch.
(getObjectStreamClasses): Removed. Replaced by more
efficient hierarchy() method, that also caches the result.
(hierarchy): Replaces getObjectStreamClasses() for caching
the result.
(loadedByBootOrApplicationClassLoader): New helper method.
(setClass): Invalidate hierarchy cache.
(setSuperclass): Invalidate hierarchy cache.
* java/io/ObjectStreamField.java
(field): Made field package private for access from other
classes.
* gnu/java/io/ObjectIdentityWrapper.java: Removed.
* gnu/java/io/ObjectIdentityMap2Int.java: Efficient
hashtable for mapping objects to ints.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* java/io/File.java
(getAbsolutePath): Fetch absolute path from
VMFile.getAbsolutePath(). Moved actual impl to there.
(isAbsolute): Let VMFile determine the absoluteness.
(toURL): Let VMFile convert the filename.
* vm/reference/java/io/VMFile.java
(getAbsolutePath): New method.
(isAbsolute): New method.
(toURL): New method.
|
| |
|
|
|
| |
* java/lang/management/ManagementFactory.java:
Updated documentation.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes bug #28412
* gnu/java/util/regex/CharIndexed.java(move1, setHitEnd, hitEnd):
New methods.
* gnu/java/util/regex/CharIndexedCharSequence.java,
gnu/java/util/regex/CharIndexedInputStream.java: Implemented the
new methods above.
* gnu/java/util/regex/RE.java(REG_FIX_STARTING_POSITION): New flag,
(match): call the new method setHitEnd of the input,
(getMatchImpl): Handle the new flag REG_FIX_STARTING_POSITION,
Some optimization commented out, Use CharIndexed#move1 instead of move.
* gnu/java/util/regex/REMatch.java: Made some debugging methods public.
* gnu/java/util/regex/REToken.java(match): The method body has been
moved to an internal private method, (matchFake): New method,
(setHitEnd): New method.
* gnu/java/util/regex/RETokenChar.java(matchThis): Call setHitEnd
if the match is not complete, (matchOneString): Count the number of
characters which matched the pattern.
* gnu/java/util/regex/RETokenEnd.java(fake): New field,
(setFake): New method, (match): Call super.match or super.matchFake.
* gnu/java/util/regex/RETokenEndSub.java(setHitEnd): New method.
* gnu/java/util/regex/RETokenOneOf.java(match): call the new method
setHitEnd of the input,
* gnu/java/util/regex/RETokenRepeated.java(match): Likewise.
* java/util/regex/Matcher.java(lookingAt, match): Use the new flag
RE.REG_FIX_STARTING_POSITION, (hitEnd, toString): New methods.
|
| |
|
|
| |
* java/util/Calendar.java: API doc additions.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gnu/java/rmi/server/RMIClassLoaderImpl.java
(loadClass): Rewritten to use getClassLoader.
(loadProxyClass): Implemented.
(getClassLoader): Fixed support for null or empty codebase.
* gnu/java/rmi/server/RMIObjectInputStream.java
(resolveClass): Use user class loader as default class loader.
(resolveProxyClass): Delegate to RMIClassLoader.loadProxyClass.
* gnu/javax/rmi/CORBA/UtilDelegateImpl.java
(loadClass): Simplified and use user class loader instead of
context class loader as default.
* java/io/ObjectInputStream.java
(currentLoader): Use VMStackWalker.firstNonNullClassLoader().
* vm/reference/gnu/classpath/VMStackWalker.java
(firstNonNullClassLoader): New method.
* vm/reference/java/io/VMObjectInputStream.java
(loaderAction, currentClassLoader): Removed.
|
| |
|
|
|
|
| |
componentOrientation.
(setComponentOrientation): Use new field name.
(getComponentOrientation): Likewise.
|
| |
|
|
|
| |
* java/awt/dnd/DropTargetDragEvent.java
(getTransferable): Implemented.
|
| |
|
|
|
|
| |
* java/util/Vector.java
(removeAll): Added comment about NPE.
(retainAll): Added comment about NPE.
|
| |
|
|
|
|
|
|
|
| |
* java/util/zip/ZipFile.java
(UTF8DECODER): Removed.
(UTF8CHARSET): New constant field. Stores the UTF8 charset.
(utf8Decoder): New instance field.
(decodeChars): Lazily create UTF8 decoder. Use instance
field rather than a static field to avoid corruption.
|
| |
|
|
|
|
|
|
| |
* java/io/PrintStream.java
(line_separator): Provide default for system property.
* java/io/FileDescriptor.java
(valid): Create local copy of channel field for better
threading safetly.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* java/util/zip/ZipFile.java
(PartialInputStream.UTF8DECODER): New constant field, used
for decoding UTF8 strings.
(readLeShort): Access buffer directly if it has enough bytes
available.
(readLeInt): Access buffer directly if it has enough bytes
available.
(decodeChars): New helper method for decoding UTF8 strings.
(readString): Avoid NIO charset decoder if possible.
|
| |
|
|
|
|
|
|
|
|
| |
* java/util/Vector.java
(removeAll): Don't explicitly null-check here. The RI allows
null arguments when Vector is empty. In other cases we
implicitly throw an NPE.
(retainAll): Don't explicitly null-check here. The RI allows
null arguments when Vector is empty. In other cases we
implicitly throw an NPE.
|
| |
|
|
|
|
| |
PR 28694
* java/awt/image/ColorModel.java
(coerceData): Added check for non-transparent images.
|
| |
|
|
|
|
|
|
|
| |
* java/awt/image/BandCombineOp.java
(BandCombineOp): Perform checks on validity of matrix.
(createCompatibleDestRaster): Add checks and choose raster type dynamically.
(filter): Updated to work with new matrix storage.
(getMatrix): Updated javadoc.
(getPoint2D): Formatting change.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* java/awt/image/AffineTransformOp.java
(AffineTransformOp): Updated javadoc.
(createCompatibleDestImage): Match behaviour of reference implementation.
(createCompatibleDestRaster): Formatting changes.
(filter(BufferedImage, BufferedImage)): Create compatible destination image.
(filter(Raster, WritableRaster)): Re-implemented.
(filterBicubic): New private method.
(filterBilinear): New private method.
(filterNearest): New private method.
(getBounds2D): No longer fixed around one point for rotations.
(getInterpolationType): Add support for bicubic interpolation.
|
| |
|
|
|
|
|
|
|
| |
* java/util/Locale.java
(hashcodeCache): New field.
(hashCode): use the above field instead of the serialized one
(writeObject): Removed method.
(readObject): Intern strings.
(equals): Revert to previous method.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
PR Classpath/23952
* java/util/ResourceBundle.java (CACHE_SIZE): New constant.
(bundleCache): Replaced with an LRU of CACHE_SIZE elements.
(lastDefaultLocale): Removed.
(emptyLocale): Likewise.
(BundleKey.defaultLocale): New field.
(BundleKey.BundleKey): Add a Locale (as a 1st positional) argument.
(BundleKey.set): Likewise.
(BundleKey.equals): Take defaultLocal field into consideration.
(getBundle(String, Locale, ClassLoader)): Use updated BundleKey and LRU.
|
| |
|
|
|
|
|
|
|
| |
PR Classpath/27372
* java/math/BigInteger.java: Updated copyright year.
(init): Consume as little bytes as possible.
(BigInteger(int, int, Random)): Ensure bitLength bits are used.
(valueOf(String, int)): Throw NumberFormatException for malformed strings
as per RI's documentation.
|
| |
|
|
|
|
|
|
| |
* java/util/Locale.java
(hashcode): Is a serialized field, not transient.
(equals): Should NOT compare strings by reference.
(readObject/writeObject): Use the default methods and handle the hash
seperately.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR Classpath/28678
* gnu/java/security/Engine.java (getInstance(String, String, Provider)):
Updated documentation.
Formatting.
(getInstance(String, String, Provider, Object[])): Likewise.
Separate checks for null and empty string arguments.
Include as much information as possible in the exception's message.
Do not swallow original exception; instead use it as the cause of the
resulting exception.
* gnu/javax/security/auth/callback/AbstractCallbackHandler.java
(getInstance(String)): Updated documentation.
Formatting.
Store last exception caught when iterating through all providers.
If no implementation found, raise last exception if one was caught.
(getInstance(String, String)): Updated documentation.
Formatting.
Check for null or empty provider as per RI-5's documentation.
(getInstance(String, Provider)): Updated documentation.
Formatting.
Use as much information as possible in the exception message.
Do not swallow original exception; instead use it as the cause for the
ultimate raised exception(s).
* java/security/cert/CertificateFactory.java: Likewise.
* java/security/cert/CertPathBuilder.java: Likewise.
* java/security/cert/CertPathValidator.java: Likewise.
* java/security/cert/CertStore.java: Likewise.
* java/security/AlgorithmParameterGenerator.java: Likewise.
* java/security/AlgorithmParameters.java: Likewise.
* java/security/KeyFactory.java: Likewise.
* java/security/KeyPairGenerator.java: Likewise.
* java/security/KeyStore.java: Likewise.
* java/security/MessageDigest.java: Likewise.
* java/security/SecureRandom.java: Likewise.
* java/security/Signature.java: Likewise.
* javax/crypto/Cipher.java: Likewise.
* javax/crypto/ExemptionMechanism.java: Likewise.
* javax/crypto/KeyAgreement.java: Likewise.
* javax/crypto/KeyGenerator.java: Likewise.
* javax/crypto/Mac.java: Likewise.
* javax/crypto/SecretKeyFactory.java: Likewise.
* javax/net/ssl/KeyManagerFactory.java: Likewise.
* javax/net/ssl/SSLContext.java: Likewise.
* javax/net/ssl/TrustManagerFactory.java: Likewise.
|
| |
|
|
|
|
|
|
|
| |
* java/io/ObjectInputStream.java (readClassDescriptor):
Use class's class loader to resolve field types.
* java/io/ObjectStreamField.java
(ObjectStreamField(String,String,ClassLoader)): Removed.
(ObjectStreamField(String,String)): Don't try to resolve typename.
(resolveType): New method.
|
| |
|
|
|
| |
* java/security/AccessControlContext.java (<init>):
Avoid a duplicated AccessController.getContext() call.
|
| |
|
|
|
| |
* java/text/SimpleDateFormat.java (parse): Let an unquoted space in
the pattern match any number of spaces in the text.
|
| |
|
|
|
|
|
| |
* java/awt/image/BufferedImage.java
(BufferedImage): Reimplement predefined-type constructor.
(observers/tileObservers): Field renamed to tileObservers.
(createDefaultIndexedColorModel): New method.
|
| |
|
|
|
|
|
| |
* java/awt/image/BufferedImage.java
(BufferedImage): Reimplement predefined-type constructor.
(observers/tileObservers): Field renamed to tileObservers.
(createDefaultIndexedColorModel): New method.
|
| |
|
|
|
| |
* java/awt/Component.java
(setDropTarget): Added check.
|
| |
|
|
|
|
|
|
|
|
| |
* gnu/java/awt/dnd/peer/gtk/GtkDragSourceContextPeer.java
(GtkDragSourceContextPeer): Added FIXME. Changed call
to setTarget.
* gnu/java/awt/dnd/peer/gtk/GtkDropTargetContextPeer.java
(GtkDropTargetContextPeer): Removed target initialization.
* java/awt/Component.java
(setTarget): Removed commented out code.
|
| |
|
|
|
|
|
|
|
| |
Fixes PR 28608.
* java/nio/DirectByteBufferImpl.java (duplicate): only reset if
the mark has been set.
* native/jni/java-nio/java_nio_VMDirectByteBuffer.c
(Java_java_nio_VMDirectByteBuffer_allocate): zero out the
allocated data.
|
| |
|
|
|
| |
* java/awt/Component.java (setDropTarget): Commented out GTK specific
code.
|
| |
|
|
|
| |
* java/awt/BasicStroke.java (dashedStroke): Cast coords.clone to
double[].
|
| |
|
|
|
| |
* java/awt/BasicStroke.java
(dashedStroke): Implemented.
|
| |
|
|
|
|
|
| |
* StrictMath.java (cbrt): Return argument if it is a NaN.
(cosh): Likewise.
(expm1): Likewise.
(sinh): Likewise.
|
| |
|
|
| |
* java/lang/StrictMath.java (tanh): New method.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
PR 28571
* gnu/java/awt/peer/gtk/GtkCanvasPeer.java
(getPreferredSize): Renamed method to preferredSize(). That's
the one that gets called from java.awt.*.
* java/awt/peer/ComponentPeer.java
(getPreferredSize): Added specnote about this method never
beeing called in the RI.
(getMinimumSize): Added specnote about this method never
beeing called in the RI.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* gnu/java/awt/peer/gtk/ComponentGraphics.java
(grab, nativeGrab): New methods.
* include/gnu_java_awt_peer_gtk_ComponentGraphics.h
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c
(nativeGrab): New method.
* gnu/java/awt/peer/gtk/GtkComponentPeer.java
(print): Implement.
* java/awt/Component.java
(printAll): Should call peer print method.
|
| |
|
|
|
|
|
|
| |
* gnu/java/awt/peer/gtk/GtkChoicePeer.java
(remove): Force event on removing item 0 when it's selected.
(handleEvent): Always call Choice.selected().
* java/awt/Choice.java:
(remove): Simplify and correct.
|
| |
|
|
| |
* java/net/URL.java (getContent(Class[])): Implement.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* java/awt/dnd/DragSource.java
(isDragImageSupported): Implemented.
(getDragThreshold): Changed default value.
* java/awt/dnd/DropTarget.java
(DropTarget): Default action is changed to ACTION_COPY_OR_MOVE.
(DropTarget): Likewise.
(DropTarget): If FlavorMap passed in is null, we should use the system default.
(addDropTargetListener): Added check to determine if new DropTargetListener
is this class. If so, an IllegalArgumentException is thrown. If the
new listener is null, nothing happens.
|
| |
|
|
|
|
|
| |
* java/awt/geom/AffineTransform.java
(hashCode): Tweak impl.
* java/awt/font/FontRenderContext.java
(hashCode): Implement.
|
| |
|
|
| |
* java/lang/StrictMath.java (sinh): New method.
|
| |
|
|
|
| |
PR Classpath/23899
* java/security/SecureRandom.java (next): Call nextBytes as per specs.
|
| |
|
|
|
|
| |
* java/awt/Choice.java
(remove(int)): An IllegalArgumentException should not be thrown
if int is invalid. Update selectedIndex and peer selection.
|
| |
|
|
|
|
| |
* java/awt/CardLayout.java
(toString): Changed format of string outputted.
(goToComponent): Changed the order of the if-clause.
|
| |
|
|
|
|
|
| |
* java/awt/List.java
(select): Check if selected is null before execution of
for-loop. If it is null, selected is instantiated and
the index is added to it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* java/nio/channels/SelectionKey.java (attach): Now synchronized.
(attachment): Likewise.
* java/nio/channels/spi/AbstractSelectionKey.java (cancel): Now
synchronized.
(isValid): Likewise.
* gnu/java/nio/SelectionKeyImpl.java (impl): Now final
(ch): Likewise.
(interestOps): Synchronize.
(readyOps): Likewise.
* gnu/java/nio/SelectorImpl.java (register): Synchronize around
interestOps call.
|
| |
|
|
|
|
|
|
|
| |
* StrictMath.java (getLowDWord): Return long instead of int.
(getHighDWord): Likewise.
(buildDouble): Take two long arguments.
(cbrt): Adapted to int -> long change.
(expm1): Likewise.
(cosh): Likewise.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* java/security/Provider.java: Updated copyright year.
Updated documentation.
Formatting.
(put): Updated documentation.
Added security manager check.
Canonicalize the key before adding its mapping.
(get): Override superclass implementation to use canonicalized keys.
(remove): Updated documentation.
Added security manager check.
Canonicalize the key before removing its mapping.
(clear): Updated documentation.
Added security manager check.
(toCanonicalKey): New method.
|