summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2005-08-02 20:12:05 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2005-08-02 20:12:05 +0000
commit33bace404a240c1335ab1f6e95bd6616e22c0ecd (patch)
tree004ab1587e14d3df272c6944ce325d3584b95aa5 /gnu
parentd30622846e00f908cb5d4beac7de4e5e78dcd630 (diff)
downloadclasspath-33bace404a240c1335ab1f6e95bd6616e22c0ecd.tar.gz
2005-08-02 Andrew John Hughes <gnu_andrew@member.fsf.org>
* Merge of HEAD --> generics-branch for 2005/06/05 - 2005/07/31. See patch on classpath-patches@gnu.org for a full ChangeLog.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/CORBA/Asynchron.java4
-rw-r--r--gnu/CORBA/BigDecimalHelper.java4
-rw-r--r--gnu/CORBA/ByteArrayComparator.java4
-rw-r--r--gnu/CORBA/CDR/BigEndianInputStream.java4
-rw-r--r--gnu/CORBA/CDR/BigEndianOutputStream.java4
-rw-r--r--gnu/CORBA/CDR/LittleEndianInputStream.java4
-rw-r--r--gnu/CORBA/CDR/LittleEndianOutputStream.java4
-rw-r--r--gnu/CORBA/CDR/Vio.java638
-rw-r--r--gnu/CORBA/CDR/abstractDataInputStream.java4
-rw-r--r--gnu/CORBA/CDR/abstractDataOutputStream.java4
-rw-r--r--gnu/CORBA/CDR/aligningInputStream.java4
-rw-r--r--gnu/CORBA/CDR/aligningOutputStream.java4
-rw-r--r--gnu/CORBA/CDR/cdrBufInput.java4
-rw-r--r--gnu/CORBA/CDR/cdrBufOutput.java4
-rw-r--r--gnu/CORBA/CDR/cdrInput.java469
-rw-r--r--gnu/CORBA/CDR/cdrOutput.java54
-rw-r--r--gnu/CORBA/CDR/encapsulatedOutput.java4
-rw-r--r--gnu/CORBA/Connected_objects.java67
-rw-r--r--gnu/CORBA/DefinitionKindHolder.java4
-rw-r--r--gnu/CORBA/DuplicateNameHolder.java106
-rw-r--r--gnu/CORBA/DynAn/NameValuePairHolder.java4
-rw-r--r--gnu/CORBA/EmptyExceptionHolder.java132
-rw-r--r--gnu/CORBA/ExceptionCreator.java4
-rw-r--r--gnu/CORBA/ForwardRequestHelper.java160
-rw-r--r--gnu/CORBA/Functional_ORB.java311
-rw-r--r--gnu/CORBA/GIOP/CancelHeader.java4
-rw-r--r--gnu/CORBA/GIOP/CharSets_OSF.java4
-rw-r--r--gnu/CORBA/GIOP/CloseMessage.java102
-rw-r--r--gnu/CORBA/GIOP/ErrorMessage.java4
-rw-r--r--gnu/CORBA/GIOP/MessageHeader.java4
-rw-r--r--gnu/CORBA/GIOP/ReplyHeader.java4
-rw-r--r--gnu/CORBA/GIOP/RequestHeader.java4
-rw-r--r--gnu/CORBA/GIOP/ServiceContext.java4
-rw-r--r--gnu/CORBA/GIOP/cxCodeSet.java4
-rw-r--r--gnu/CORBA/GIOP/v1_0/CancelHeader.java4
-rw-r--r--gnu/CORBA/GIOP/v1_0/ReplyHeader.java4
-rw-r--r--gnu/CORBA/GIOP/v1_0/RequestHeader.java4
-rw-r--r--gnu/CORBA/GIOP/v1_2/ReplyHeader.java4
-rw-r--r--gnu/CORBA/GIOP/v1_2/RequestHeader.java4
-rw-r--r--gnu/CORBA/IOR.java33
-rw-r--r--gnu/CORBA/IOR_Delegate.java142
-rw-r--r--gnu/CORBA/IOR_contructed_object.java15
-rw-r--r--gnu/CORBA/NamingService/Binding_iterator_impl.java4
-rw-r--r--gnu/CORBA/NamingService/Ext.java4
-rw-r--r--gnu/CORBA/NamingService/NameValidator.java4
-rw-r--r--gnu/CORBA/NamingService/NamingMap.java4
-rw-r--r--gnu/CORBA/NamingService/NamingServiceTransient.java21
-rw-r--r--gnu/CORBA/NamingService/TransientContext.java4
-rw-r--r--gnu/CORBA/NamingService/cmpNameComponent.java4
-rw-r--r--gnu/CORBA/NamingService/snConverter.java4
-rw-r--r--gnu/CORBA/ObjectCreator.java88
-rw-r--r--gnu/CORBA/OctetHolder.java4
-rw-r--r--gnu/CORBA/Poa/ForwardRequestHolder.java107
-rw-r--r--gnu/CORBA/Poa/ForwardedServant.java207
-rw-r--r--gnu/CORBA/Poa/InvalidPolicyHolder.java106
-rw-r--r--gnu/CORBA/Poa/LocalDelegate.java362
-rw-r--r--gnu/CORBA/Poa/LocalRequest.java426
-rw-r--r--gnu/CORBA/Poa/LocalServerRequest.java199
-rw-r--r--gnu/CORBA/Poa/ORB_1_4.java136
-rw-r--r--gnu/CORBA/Poa/activeObjectMap.java394
-rw-r--r--gnu/CORBA/Poa/dynImpHandler.java85
-rw-r--r--gnu/CORBA/Poa/gnuAdapterActivator.java81
-rw-r--r--gnu/CORBA/Poa/gnuForwardRequest.java90
-rw-r--r--gnu/CORBA/Poa/gnuIdAssignmentPolicy.java80
-rw-r--r--gnu/CORBA/Poa/gnuIdUniquenessPolicy.java80
-rw-r--r--gnu/CORBA/Poa/gnuImplicitActivationPolicy.java80
-rw-r--r--gnu/CORBA/Poa/gnuLifespanPolicy.java80
-rw-r--r--gnu/CORBA/Poa/gnuPOA.java1615
-rw-r--r--gnu/CORBA/Poa/gnuPOAManager.java225
-rw-r--r--gnu/CORBA/Poa/gnuPoaCurrent.java179
-rw-r--r--gnu/CORBA/Poa/gnuRequestProcessingPolicy.java80
-rw-r--r--gnu/CORBA/Poa/gnuServantObject.java594
-rw-r--r--gnu/CORBA/Poa/gnuServantRetentionPolicy.java80
-rw-r--r--gnu/CORBA/Poa/gnuThreadPolicy.java80
-rw-r--r--gnu/CORBA/Poa/policySets.java128
-rw-r--r--gnu/CORBA/Poa/servantDelegate.java235
-rw-r--r--gnu/CORBA/Poa/vPolicy.java (renamed from gnu/CORBA/CDR/uncObjectInputStream.java)38
-rw-r--r--gnu/CORBA/Restricted_ORB.java64
-rw-r--r--gnu/CORBA/ServiceDetailHolder.java4
-rw-r--r--gnu/CORBA/ServiceRequestAdapter.java41
-rw-r--r--gnu/CORBA/SetOverrideTypeHolder.java4
-rw-r--r--gnu/CORBA/Simple_delegate.java37
-rw-r--r--gnu/CORBA/SocketRepository.java93
-rw-r--r--gnu/CORBA/TypeCodeHelper.java4
-rw-r--r--gnu/CORBA/Unexpected.java4
-rw-r--r--gnu/CORBA/Version.java4
-rw-r--r--gnu/CORBA/WCharHolder.java4
-rw-r--r--gnu/CORBA/WStringHolder.java4
-rw-r--r--gnu/CORBA/_PolicyImplBase.java231
-rw-r--r--gnu/CORBA/aliasTypeCode.java4
-rw-r--r--gnu/CORBA/binaryReply.java4
-rw-r--r--gnu/CORBA/bufferedResponseHandler.java4
-rw-r--r--gnu/CORBA/cdrEncapsCodec.java356
-rw-r--r--gnu/CORBA/corbaArrayList.java4
-rw-r--r--gnu/CORBA/fixedTypeCode.java4
-rw-r--r--gnu/CORBA/generalTypeCode.java6
-rw-r--r--gnu/CORBA/gnuAny.java20
-rw-r--r--gnu/CORBA/gnuCodecFactory.java95
-rw-r--r--gnu/CORBA/gnuContext.java4
-rw-r--r--gnu/CORBA/gnuContextList.java4
-rw-r--r--gnu/CORBA/gnuEnvironment.java4
-rw-r--r--gnu/CORBA/gnuExceptionList.java4
-rw-r--r--gnu/CORBA/gnuNVList.java4
-rw-r--r--gnu/CORBA/gnuNamedValue.java4
-rw-r--r--gnu/CORBA/gnuRequest.java140
-rw-r--r--gnu/CORBA/holderFactory.java5
-rw-r--r--gnu/CORBA/primitiveArrayTypeCode.java4
-rw-r--r--gnu/CORBA/primitiveTypeCode.java4
-rw-r--r--gnu/CORBA/recordTypeCode.java4
-rw-r--r--gnu/CORBA/recursiveTypeCode.java4
-rw-r--r--gnu/CORBA/streamReadyHolder.java4
-rw-r--r--gnu/CORBA/streamRequest.java4
-rw-r--r--gnu/CORBA/stringTypeCode.java4
-rw-r--r--gnu/CORBA/stubFinder.java4
-rw-r--r--gnu/CORBA/typeNamer.java4
-rw-r--r--gnu/CORBA/universalHolder.java4
-rw-r--r--gnu/classpath/Configuration.java.in31
-rw-r--r--gnu/classpath/ObjectPool.java250
-rw-r--r--gnu/classpath/RawData.java4
-rw-r--r--gnu/classpath/RawData32.java4
-rw-r--r--gnu/classpath/RawData64.java4
-rw-r--r--gnu/classpath/ServiceFactory.java4
-rw-r--r--gnu/classpath/ServiceProviderLoadingAction.java4
-rw-r--r--gnu/classpath/SystemProperties.java10
-rw-r--r--gnu/classpath/debug/Component.java159
-rw-r--r--gnu/classpath/debug/PreciseFilter.java105
-rw-r--r--gnu/classpath/debug/SystemLogger.java71
-rw-r--r--gnu/classpath/jdwp/exception/InvalidClassException.java63
-rw-r--r--gnu/classpath/jdwp/exception/InvalidCountException.java61
-rw-r--r--gnu/classpath/jdwp/exception/InvalidEventTypeException.java63
-rw-r--r--gnu/classpath/jdwp/exception/InvalidObjectException.java63
-rw-r--r--gnu/classpath/jdwp/exception/InvalidStringException.java68
-rw-r--r--gnu/classpath/jdwp/exception/InvalidThreadException.java (renamed from gnu/java/awt/EmbeddedWindowSupport.java)46
-rw-r--r--gnu/classpath/jdwp/exception/InvalidThreadGroupException.java63
-rw-r--r--gnu/classpath/jdwp/exception/JdwpException.java86
-rw-r--r--gnu/classpath/jdwp/exception/JdwpInternalErrorException.java57
-rw-r--r--gnu/classpath/jdwp/exception/NotImplementedException.java58
-rw-r--r--gnu/classpath/jdwp/exception/VmDeadException.java55
-rw-r--r--gnu/classpath/jdwp/id/ArrayId.java (renamed from gnu/javax/swing/plaf/gtk/GtkCheckBoxUI.java)51
-rw-r--r--gnu/classpath/jdwp/id/ArrayReferenceTypeId.java59
-rw-r--r--gnu/classpath/jdwp/id/ClassLoaderId.java64
-rw-r--r--gnu/classpath/jdwp/id/ClassObjectId.java64
-rw-r--r--gnu/classpath/jdwp/id/ClassReferenceTypeId.java59
-rw-r--r--gnu/classpath/jdwp/id/InterfaceReferenceTypeId.java (renamed from gnu/javax/swing/plaf/gtk/GtkRadioButtonUI.java)48
-rw-r--r--gnu/classpath/jdwp/id/JdwpId.java127
-rw-r--r--gnu/classpath/jdwp/id/JdwpIdFactory.java165
-rw-r--r--gnu/classpath/jdwp/id/ObjectId.java (renamed from gnu/java/awt/peer/gtk/GtkTextComponentPeer.java)88
-rw-r--r--gnu/classpath/jdwp/id/ReferenceTypeId.java81
-rw-r--r--gnu/classpath/jdwp/id/StringId.java64
-rw-r--r--gnu/classpath/jdwp/id/ThreadGroupId.java64
-rw-r--r--gnu/classpath/jdwp/id/ThreadId.java64
-rw-r--r--gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java178
-rw-r--r--gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java108
-rw-r--r--gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java100
-rw-r--r--gnu/classpath/jdwp/processor/CommandSet.java68
-rw-r--r--gnu/classpath/jdwp/processor/FieldCommandSet.java66
-rw-r--r--gnu/classpath/jdwp/processor/InterfaceTypeCommandSet.java67
-rw-r--r--gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java266
-rw-r--r--gnu/classpath/jdwp/processor/PacketProcessor.java217
-rw-r--r--gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java339
-rw-r--r--gnu/classpath/jdwp/processor/StringReferenceCommandSet.java98
-rw-r--r--gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java178
-rw-r--r--gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java474
-rw-r--r--gnu/classpath/jdwp/transport/ITransport.java84
-rw-r--r--gnu/classpath/jdwp/transport/JdwpCommandPacket.java149
-rw-r--r--gnu/classpath/jdwp/transport/JdwpConnection.java298
-rw-r--r--gnu/classpath/jdwp/transport/JdwpPacket.java278
-rw-r--r--gnu/classpath/jdwp/transport/JdwpReplyPacket.java137
-rw-r--r--gnu/classpath/jdwp/transport/SocketTransport.java171
-rw-r--r--gnu/classpath/jdwp/transport/TransportException.java75
-rw-r--r--gnu/classpath/jdwp/transport/TransportFactory.java115
-rw-r--r--gnu/classpath/jdwp/util/JdwpString.java95
-rw-r--r--gnu/classpath/jdwp/util/Signature.java149
-rw-r--r--gnu/classpath/jdwp/util/Value.java297
-rw-r--r--gnu/java/awt/AWTUtilities.java694
-rw-r--r--gnu/java/awt/BitMaskExtent.java4
-rw-r--r--gnu/java/awt/BitwiseXORComposite.java4
-rw-r--r--gnu/java/awt/Buffers.java4
-rw-r--r--gnu/java/awt/ClasspathToolkit.java14
-rw-r--r--gnu/java/awt/ComponentDataBlitOp.java4
-rw-r--r--gnu/java/awt/EmbeddedWindow.java14
-rw-r--r--gnu/java/awt/EventModifier.java4
-rw-r--r--gnu/java/awt/FocusManager.java (renamed from gnu/CORBA/CDR/uncObjectOutputStream.java)47
-rw-r--r--gnu/java/awt/GradientPaintContext.java4
-rw-r--r--gnu/java/awt/color/CieXyzConverter.java4
-rw-r--r--gnu/java/awt/color/ClutProfileConverter.java4
-rw-r--r--gnu/java/awt/color/ColorLookUpTable.java4
-rw-r--r--gnu/java/awt/color/ColorSpaceConverter.java4
-rw-r--r--gnu/java/awt/color/GrayProfileConverter.java4
-rw-r--r--gnu/java/awt/color/GrayScaleConverter.java4
-rw-r--r--gnu/java/awt/color/LinearRGBConverter.java4
-rw-r--r--gnu/java/awt/color/ProfileHeader.java4
-rw-r--r--gnu/java/awt/color/PyccConverter.java4
-rw-r--r--gnu/java/awt/color/RgbProfileConverter.java4
-rw-r--r--gnu/java/awt/color/SrgbConverter.java4
-rw-r--r--gnu/java/awt/color/TagEntry.java4
-rw-r--r--gnu/java/awt/color/ToneReproductionCurve.java4
-rw-r--r--gnu/java/awt/color/package.html4
-rw-r--r--gnu/java/awt/image/ImageDecoder.java4
-rw-r--r--gnu/java/awt/image/XBMDecoder.java4
-rw-r--r--gnu/java/awt/image/package.html4
-rw-r--r--gnu/java/awt/package.html4
-rw-r--r--gnu/java/awt/peer/ClasspathFontPeer.java4
-rw-r--r--gnu/java/awt/peer/ClasspathTextLayoutPeer.java4
-rw-r--r--gnu/java/awt/peer/EmbeddedWindowPeer.java4
-rw-r--r--gnu/java/awt/peer/GLightweightPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GThreadMutex.java4
-rw-r--r--gnu/java/awt/peer/gtk/GThreadNativeMethodRunner.java4
-rw-r--r--gnu/java/awt/peer/gtk/GdkFontMetrics.java4
-rw-r--r--gnu/java/awt/peer/gtk/GdkFontPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GdkGlyphVector.java4
-rw-r--r--gnu/java/awt/peer/gtk/GdkGraphics.java18
-rw-r--r--gnu/java/awt/peer/gtk/GdkGraphics2D.java27
-rw-r--r--gnu/java/awt/peer/gtk/GdkGraphicsConfiguration.java4
-rw-r--r--gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java4
-rw-r--r--gnu/java/awt/peer/gtk/GdkPixbufDecoder.java18
-rw-r--r--gnu/java/awt/peer/gtk/GdkRobotPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GdkScreenGraphicsDevice.java4
-rw-r--r--gnu/java/awt/peer/gtk/GdkTextLayout.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkButtonPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkCanvasPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkCheckboxGroupPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkCheckboxPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkChoicePeer.java8
-rw-r--r--gnu/java/awt/peer/gtk/GtkClipboard.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkComponentPeer.java58
-rw-r--r--gnu/java/awt/peer/gtk/GtkContainerPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkDialogPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkFileDialogPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkFontPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkFramePeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkGenericPeer.java9
-rw-r--r--gnu/java/awt/peer/gtk/GtkImage.java48
-rw-r--r--gnu/java/awt/peer/gtk/GtkImageConsumer.java10
-rw-r--r--gnu/java/awt/peer/gtk/GtkLabelPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkListPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkMenuBarPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkMenuItemPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkMenuPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkPanelPeer.java6
-rw-r--r--gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkScrollPanePeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkScrollbarPeer.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkTextAreaPeer.java42
-rw-r--r--gnu/java/awt/peer/gtk/GtkTextFieldPeer.java42
-rw-r--r--gnu/java/awt/peer/gtk/GtkToolkit.java6
-rw-r--r--gnu/java/awt/peer/gtk/GtkVolatileImage.java4
-rw-r--r--gnu/java/awt/peer/gtk/GtkWindowPeer.java6
-rw-r--r--gnu/java/awt/peer/gtk/package.html4
-rw-r--r--gnu/java/awt/peer/package.html4
-rw-r--r--gnu/java/beans/BeanInfoEmbryo.java4
-rw-r--r--gnu/java/beans/DummyAppletContext.java4
-rw-r--r--gnu/java/beans/DummyAppletStub.java4
-rw-r--r--gnu/java/beans/ExplicitBeanInfo.java4
-rw-r--r--gnu/java/beans/IntrospectionIncubator.java4
-rw-r--r--gnu/java/beans/decoder/AbstractContext.java4
-rw-r--r--gnu/java/beans/decoder/AbstractCreatableObjectContext.java4
-rw-r--r--gnu/java/beans/decoder/AbstractElementHandler.java4
-rw-r--r--gnu/java/beans/decoder/AbstractObjectContext.java4
-rw-r--r--gnu/java/beans/decoder/ArrayContext.java4
-rw-r--r--gnu/java/beans/decoder/ArrayHandler.java4
-rw-r--r--gnu/java/beans/decoder/AssemblyException.java4
-rw-r--r--gnu/java/beans/decoder/BooleanHandler.java4
-rw-r--r--gnu/java/beans/decoder/ByteHandler.java4
-rw-r--r--gnu/java/beans/decoder/CharHandler.java4
-rw-r--r--gnu/java/beans/decoder/ClassHandler.java4
-rw-r--r--gnu/java/beans/decoder/ConstructorContext.java4
-rw-r--r--gnu/java/beans/decoder/Context.java4
-rw-r--r--gnu/java/beans/decoder/DecoderContext.java4
-rw-r--r--gnu/java/beans/decoder/DefaultExceptionListener.java4
-rw-r--r--gnu/java/beans/decoder/DoubleHandler.java4
-rw-r--r--gnu/java/beans/decoder/DummyContext.java4
-rw-r--r--gnu/java/beans/decoder/DummyHandler.java4
-rw-r--r--gnu/java/beans/decoder/ElementHandler.java4
-rw-r--r--gnu/java/beans/decoder/FloatHandler.java4
-rw-r--r--gnu/java/beans/decoder/GrowableArrayContext.java4
-rw-r--r--gnu/java/beans/decoder/IndexContext.java4
-rw-r--r--gnu/java/beans/decoder/IntHandler.java4
-rw-r--r--gnu/java/beans/decoder/JavaHandler.java4
-rw-r--r--gnu/java/beans/decoder/LongHandler.java4
-rw-r--r--gnu/java/beans/decoder/MethodContext.java4
-rw-r--r--gnu/java/beans/decoder/MethodFinder.java4
-rw-r--r--gnu/java/beans/decoder/NullHandler.java4
-rw-r--r--gnu/java/beans/decoder/ObjectContext.java4
-rw-r--r--gnu/java/beans/decoder/ObjectHandler.java4
-rw-r--r--gnu/java/beans/decoder/PersistenceParser.java4
-rw-r--r--gnu/java/beans/decoder/PropertyContext.java4
-rw-r--r--gnu/java/beans/decoder/ShortHandler.java4
-rw-r--r--gnu/java/beans/decoder/SimpleHandler.java4
-rw-r--r--gnu/java/beans/decoder/StaticMethodContext.java4
-rw-r--r--gnu/java/beans/decoder/StringHandler.java4
-rw-r--r--gnu/java/beans/decoder/VoidHandler.java4
-rw-r--r--gnu/java/beans/decoder/package.html4
-rw-r--r--gnu/java/beans/editors/ColorEditor.java4
-rw-r--r--gnu/java/beans/editors/FontEditor.java4
-rw-r--r--gnu/java/beans/editors/NativeBooleanEditor.java4
-rw-r--r--gnu/java/beans/editors/NativeByteEditor.java4
-rw-r--r--gnu/java/beans/editors/NativeDoubleEditor.java4
-rw-r--r--gnu/java/beans/editors/NativeFloatEditor.java4
-rw-r--r--gnu/java/beans/editors/NativeIntEditor.java4
-rw-r--r--gnu/java/beans/editors/NativeLongEditor.java4
-rw-r--r--gnu/java/beans/editors/NativeShortEditor.java4
-rw-r--r--gnu/java/beans/editors/StringEditor.java4
-rw-r--r--gnu/java/beans/editors/package.html4
-rw-r--r--gnu/java/beans/package.html4
-rw-r--r--gnu/java/io/ASN1ParsingException.java4
-rw-r--r--gnu/java/io/Base64InputStream.java4
-rw-r--r--gnu/java/io/ClassLoaderObjectInputStream.java4
-rw-r--r--gnu/java/io/NullOutputStream.java4
-rw-r--r--gnu/java/io/ObjectIdentityWrapper.java4
-rw-r--r--gnu/java/io/PlatformHelper.java4
-rw-r--r--gnu/java/io/package.html4
-rw-r--r--gnu/java/lang/ArrayHelper.java4
-rw-r--r--gnu/java/lang/CharData.java4
-rw-r--r--gnu/java/lang/ClassHelper.java4
-rw-r--r--gnu/java/lang/MainThread.java4
-rw-r--r--gnu/java/lang/package.html4
-rw-r--r--gnu/java/lang/reflect/TypeSignature.java4
-rw-r--r--gnu/java/lang/reflect/package.html4
-rw-r--r--gnu/java/locale/LocaleHelper.java29
-rw-r--r--gnu/java/locale/package.html4
-rw-r--r--gnu/java/math/MPN.java4
-rw-r--r--gnu/java/math/package.html4
-rw-r--r--gnu/java/net/BASE64.java4
-rw-r--r--gnu/java/net/CRLFInputStream.java4
-rw-r--r--gnu/java/net/CRLFOutputStream.java4
-rw-r--r--gnu/java/net/EmptyX509TrustManager.java4
-rw-r--r--gnu/java/net/GetLocalHostAction.java4
-rw-r--r--gnu/java/net/HeaderFieldHelper.java4
-rw-r--r--gnu/java/net/LineInputStream.java4
-rw-r--r--gnu/java/net/PlainDatagramSocketImpl.java4
-rw-r--r--gnu/java/net/PlainSocketImpl.java4
-rw-r--r--gnu/java/net/URLParseError.java4
-rw-r--r--gnu/java/net/package.html4
-rw-r--r--gnu/java/net/protocol/file/Connection.java4
-rw-r--r--gnu/java/net/protocol/file/Handler.java4
-rw-r--r--gnu/java/net/protocol/file/package.html4
-rw-r--r--gnu/java/net/protocol/ftp/ActiveModeDTP.java4
-rw-r--r--gnu/java/net/protocol/ftp/BlockInputStream.java4
-rw-r--r--gnu/java/net/protocol/ftp/BlockOutputStream.java4
-rw-r--r--gnu/java/net/protocol/ftp/CompressedInputStream.java4
-rw-r--r--gnu/java/net/protocol/ftp/CompressedOutputStream.java4
-rw-r--r--gnu/java/net/protocol/ftp/DTP.java4
-rw-r--r--gnu/java/net/protocol/ftp/DTPInputStream.java4
-rw-r--r--gnu/java/net/protocol/ftp/DTPOutputStream.java4
-rw-r--r--gnu/java/net/protocol/ftp/FTPConnection.java4
-rw-r--r--gnu/java/net/protocol/ftp/FTPException.java4
-rw-r--r--gnu/java/net/protocol/ftp/FTPResponse.java4
-rw-r--r--gnu/java/net/protocol/ftp/FTPURLConnection.java4
-rw-r--r--gnu/java/net/protocol/ftp/Handler.java4
-rw-r--r--gnu/java/net/protocol/ftp/PassiveModeDTP.java4
-rw-r--r--gnu/java/net/protocol/ftp/StreamInputStream.java4
-rw-r--r--gnu/java/net/protocol/ftp/StreamOutputStream.java4
-rw-r--r--gnu/java/net/protocol/ftp/package.html4
-rw-r--r--gnu/java/net/protocol/http/Authenticator.java4
-rw-r--r--gnu/java/net/protocol/http/ByteArrayRequestBodyWriter.java4
-rw-r--r--gnu/java/net/protocol/http/ByteArrayResponseBodyReader.java4
-rw-r--r--gnu/java/net/protocol/http/ChunkedInputStream.java4
-rw-r--r--gnu/java/net/protocol/http/Cookie.java4
-rw-r--r--gnu/java/net/protocol/http/CookieManager.java4
-rw-r--r--gnu/java/net/protocol/http/Credentials.java4
-rw-r--r--gnu/java/net/protocol/http/HTTPConnection.java12
-rw-r--r--gnu/java/net/protocol/http/HTTPDateFormat.java4
-rw-r--r--gnu/java/net/protocol/http/HTTPURLConnection.java23
-rw-r--r--gnu/java/net/protocol/http/Handler.java4
-rw-r--r--gnu/java/net/protocol/http/Headers.java4
-rw-r--r--gnu/java/net/protocol/http/Request.java4
-rw-r--r--gnu/java/net/protocol/http/RequestBodyWriter.java4
-rw-r--r--gnu/java/net/protocol/http/Response.java4
-rw-r--r--gnu/java/net/protocol/http/ResponseBodyReader.java4
-rw-r--r--gnu/java/net/protocol/http/ResponseHeaderHandler.java4
-rw-r--r--gnu/java/net/protocol/http/SimpleCookieManager.java4
-rw-r--r--gnu/java/net/protocol/http/event/ConnectionEvent.java4
-rw-r--r--gnu/java/net/protocol/http/event/ConnectionListener.java4
-rw-r--r--gnu/java/net/protocol/http/event/RequestEvent.java4
-rw-r--r--gnu/java/net/protocol/http/event/RequestListener.java4
-rw-r--r--gnu/java/net/protocol/http/event/package.html4
-rw-r--r--gnu/java/net/protocol/http/package.html4
-rw-r--r--gnu/java/net/protocol/https/Handler.java4
-rw-r--r--gnu/java/net/protocol/jar/Connection.java4
-rw-r--r--gnu/java/net/protocol/jar/Handler.java14
-rw-r--r--gnu/java/net/protocol/jar/package.html4
-rw-r--r--gnu/java/nio/ChannelInputStream.java4
-rw-r--r--gnu/java/nio/ChannelOutputStream.java4
-rw-r--r--gnu/java/nio/ChannelReader.java4
-rw-r--r--gnu/java/nio/DatagramChannelImpl.java9
-rw-r--r--gnu/java/nio/DatagramChannelSelectionKey.java10
-rw-r--r--gnu/java/nio/FileLockImpl.java4
-rw-r--r--gnu/java/nio/InputStreamChannel.java4
-rw-r--r--gnu/java/nio/NIOConstants.java4
-rw-r--r--gnu/java/nio/NIODatagramSocket.java4
-rw-r--r--gnu/java/nio/NIOServerSocket.java4
-rw-r--r--gnu/java/nio/NIOSocket.java4
-rw-r--r--gnu/java/nio/OutputStreamChannel.java4
-rw-r--r--gnu/java/nio/PipeImpl.java4
-rw-r--r--gnu/java/nio/SelectionKeyImpl.java4
-rw-r--r--gnu/java/nio/SelectorImpl.java4
-rw-r--r--gnu/java/nio/SelectorProviderImpl.java4
-rw-r--r--gnu/java/nio/ServerSocketChannelImpl.java9
-rw-r--r--gnu/java/nio/ServerSocketChannelSelectionKey.java8
-rw-r--r--gnu/java/nio/SocketChannelImpl.java9
-rw-r--r--gnu/java/nio/SocketChannelSelectionKey.java8
-rw-r--r--gnu/java/nio/channels/FileChannelImpl.java98
-rw-r--r--gnu/java/nio/channels/package.html4
-rw-r--r--gnu/java/nio/charset/ByteCharset.java4
-rw-r--r--gnu/java/nio/charset/Cp424.java4
-rw-r--r--gnu/java/nio/charset/Cp437.java4
-rw-r--r--gnu/java/nio/charset/Cp737.java4
-rw-r--r--gnu/java/nio/charset/Cp775.java4
-rw-r--r--gnu/java/nio/charset/Cp850.java4
-rw-r--r--gnu/java/nio/charset/Cp852.java4
-rw-r--r--gnu/java/nio/charset/Cp855.java4
-rw-r--r--gnu/java/nio/charset/Cp857.java4
-rw-r--r--gnu/java/nio/charset/Cp860.java4
-rw-r--r--gnu/java/nio/charset/Cp861.java4
-rw-r--r--gnu/java/nio/charset/Cp862.java4
-rw-r--r--gnu/java/nio/charset/Cp863.java4
-rw-r--r--gnu/java/nio/charset/Cp864.java4
-rw-r--r--gnu/java/nio/charset/Cp865.java4
-rw-r--r--gnu/java/nio/charset/Cp866.java4
-rw-r--r--gnu/java/nio/charset/Cp869.java4
-rw-r--r--gnu/java/nio/charset/Cp874.java4
-rw-r--r--gnu/java/nio/charset/EncodingHelper.java4
-rw-r--r--gnu/java/nio/charset/ISO_8859_1.java4
-rw-r--r--gnu/java/nio/charset/ISO_8859_13.java4
-rw-r--r--gnu/java/nio/charset/ISO_8859_15.java4
-rw-r--r--gnu/java/nio/charset/ISO_8859_2.java4
-rw-r--r--gnu/java/nio/charset/ISO_8859_3.java4
-rw-r--r--gnu/java/nio/charset/ISO_8859_4.java4
-rw-r--r--gnu/java/nio/charset/ISO_8859_5.java4
-rw-r--r--gnu/java/nio/charset/ISO_8859_6.java4
-rw-r--r--gnu/java/nio/charset/ISO_8859_7.java4
-rw-r--r--gnu/java/nio/charset/ISO_8859_8.java4
-rw-r--r--gnu/java/nio/charset/ISO_8859_9.java4
-rw-r--r--gnu/java/nio/charset/KOI_8.java4
-rw-r--r--gnu/java/nio/charset/MS874.java4
-rw-r--r--gnu/java/nio/charset/MacCentralEurope.java4
-rw-r--r--gnu/java/nio/charset/MacCroatian.java4
-rw-r--r--gnu/java/nio/charset/MacCyrillic.java4
-rw-r--r--gnu/java/nio/charset/MacDingbat.java4
-rw-r--r--gnu/java/nio/charset/MacGreek.java4
-rw-r--r--gnu/java/nio/charset/MacIceland.java4
-rw-r--r--gnu/java/nio/charset/MacRoman.java4
-rw-r--r--gnu/java/nio/charset/MacRomania.java4
-rw-r--r--gnu/java/nio/charset/MacSymbol.java4
-rw-r--r--gnu/java/nio/charset/MacThai.java4
-rw-r--r--gnu/java/nio/charset/MacTurkish.java4
-rw-r--r--gnu/java/nio/charset/Provider.java4
-rw-r--r--gnu/java/nio/charset/US_ASCII.java4
-rw-r--r--gnu/java/nio/charset/UTF_16.java4
-rw-r--r--gnu/java/nio/charset/UTF_16BE.java4
-rw-r--r--gnu/java/nio/charset/UTF_16Decoder.java4
-rw-r--r--gnu/java/nio/charset/UTF_16Encoder.java4
-rw-r--r--gnu/java/nio/charset/UTF_16LE.java4
-rw-r--r--gnu/java/nio/charset/UTF_8.java4
-rw-r--r--gnu/java/nio/charset/UnicodeLittle.java4
-rw-r--r--gnu/java/nio/charset/Windows1250.java6
-rw-r--r--gnu/java/nio/charset/Windows1251.java6
-rw-r--r--gnu/java/nio/charset/Windows1252.java6
-rw-r--r--gnu/java/nio/charset/Windows1253.java6
-rw-r--r--gnu/java/nio/charset/Windows1254.java6
-rw-r--r--gnu/java/nio/charset/Windows1255.java6
-rw-r--r--gnu/java/nio/charset/Windows1256.java6
-rw-r--r--gnu/java/nio/charset/Windows1257.java6
-rw-r--r--gnu/java/nio/charset/Windows1258.java6
-rw-r--r--gnu/java/nio/charset/iconv/IconvCharset.java4
-rw-r--r--gnu/java/nio/charset/iconv/IconvDecoder.java4
-rw-r--r--gnu/java/nio/charset/iconv/IconvEncoder.java4
-rw-r--r--gnu/java/nio/charset/iconv/IconvMetaData.java4
-rw-r--r--gnu/java/nio/charset/iconv/IconvProvider.java4
-rw-r--r--gnu/java/nio/charset/package.html4
-rw-r--r--gnu/java/nio/package.html4
-rw-r--r--gnu/java/rmi/RMIMarshalledObjectInputStream.java4
-rw-r--r--gnu/java/rmi/RMIMarshalledObjectOutputStream.java4
-rw-r--r--gnu/java/rmi/dgc/DGCImpl.java4
-rw-r--r--gnu/java/rmi/dgc/DGCImpl_Skel.java4
-rw-r--r--gnu/java/rmi/dgc/DGCImpl_Stub.java4
-rw-r--r--gnu/java/rmi/dgc/package.html4
-rw-r--r--gnu/java/rmi/package.html4
-rw-r--r--gnu/java/rmi/registry/RegistryImpl.java4
-rw-r--r--gnu/java/rmi/registry/RegistryImpl_Skel.java4
-rw-r--r--gnu/java/rmi/registry/RegistryImpl_Stub.java4
-rw-r--r--gnu/java/rmi/registry/package.html4
-rw-r--r--gnu/java/rmi/server/ConnectionRunnerPool.java4
-rw-r--r--gnu/java/rmi/server/ProtocolConstants.java4
-rw-r--r--gnu/java/rmi/server/RMIDefaultSocketFactory.java4
-rw-r--r--gnu/java/rmi/server/RMIHashes.java4
-rw-r--r--gnu/java/rmi/server/RMIIncomingThread.java4
-rw-r--r--gnu/java/rmi/server/RMIObjectInputStream.java4
-rw-r--r--gnu/java/rmi/server/RMIObjectOutputStream.java4
-rw-r--r--gnu/java/rmi/server/RMIVoidValue.java4
-rw-r--r--gnu/java/rmi/server/UnicastConnection.java4
-rw-r--r--gnu/java/rmi/server/UnicastConnectionManager.java4
-rw-r--r--gnu/java/rmi/server/UnicastRef.java4
-rw-r--r--gnu/java/rmi/server/UnicastRemoteCall.java4
-rw-r--r--gnu/java/rmi/server/UnicastRemoteStub.java4
-rw-r--r--gnu/java/rmi/server/UnicastServer.java4
-rw-r--r--gnu/java/rmi/server/UnicastServerRef.java4
-rw-r--r--gnu/java/rmi/server/package.html4
-rw-r--r--gnu/java/security/Engine.java4
-rw-r--r--gnu/java/security/OID.java8
-rw-r--r--gnu/java/security/PolicyFile.java4
-rw-r--r--gnu/java/security/action/GetPropertyAction.java4
-rw-r--r--gnu/java/security/action/GetSecurityPropertyAction.java4
-rw-r--r--gnu/java/security/action/SetAccessibleAction.java4
-rw-r--r--gnu/java/security/action/package.html4
-rw-r--r--gnu/java/security/ber/BER.java4
-rw-r--r--gnu/java/security/ber/BEREncodingException.java4
-rw-r--r--gnu/java/security/ber/BERReader.java4
-rw-r--r--gnu/java/security/ber/BERValue.java4
-rw-r--r--gnu/java/security/ber/package.html4
-rw-r--r--gnu/java/security/der/BitString.java4
-rw-r--r--gnu/java/security/der/DER.java4
-rw-r--r--gnu/java/security/der/DEREncodingException.java4
-rw-r--r--gnu/java/security/der/DERReader.java4
-rw-r--r--gnu/java/security/der/DERValue.java4
-rw-r--r--gnu/java/security/der/DERWriter.java4
-rw-r--r--gnu/java/security/der/package.html4
-rw-r--r--gnu/java/security/package.html4
-rw-r--r--gnu/java/security/pkcs/PKCS7SignedData.java4
-rw-r--r--gnu/java/security/pkcs/SignerInfo.java4
-rw-r--r--gnu/java/security/pkcs/package.html4
-rw-r--r--gnu/java/security/provider/CollectionCertStoreImpl.java4
-rw-r--r--gnu/java/security/provider/DSAKeyFactory.java4
-rw-r--r--gnu/java/security/provider/DSAKeyPairGenerator.java4
-rw-r--r--gnu/java/security/provider/DSAParameterGenerator.java4
-rw-r--r--gnu/java/security/provider/DSAParameters.java4
-rw-r--r--gnu/java/security/provider/DSASignature.java4
-rw-r--r--gnu/java/security/provider/DefaultPolicy.java4
-rw-r--r--gnu/java/security/provider/EncodedKeyFactory.java4
-rw-r--r--gnu/java/security/provider/Gnu.java4
-rw-r--r--gnu/java/security/provider/GnuDHPublicKey.java4
-rw-r--r--gnu/java/security/provider/GnuDSAPrivateKey.java4
-rw-r--r--gnu/java/security/provider/GnuDSAPublicKey.java4
-rw-r--r--gnu/java/security/provider/GnuRSAPrivateKey.java4
-rw-r--r--gnu/java/security/provider/GnuRSAPublicKey.java4
-rw-r--r--gnu/java/security/provider/MD2withRSA.java4
-rw-r--r--gnu/java/security/provider/MD4withRSA.java4
-rw-r--r--gnu/java/security/provider/MD5.java4
-rw-r--r--gnu/java/security/provider/MD5withRSA.java4
-rw-r--r--gnu/java/security/provider/PKIXCertPathValidatorImpl.java8
-rw-r--r--gnu/java/security/provider/RSA.java4
-rw-r--r--gnu/java/security/provider/RSAKeyFactory.java4
-rw-r--r--gnu/java/security/provider/SHA.java4
-rw-r--r--gnu/java/security/provider/SHA1PRNG.java4
-rw-r--r--gnu/java/security/provider/SHA1withRSA.java4
-rw-r--r--gnu/java/security/provider/X509CertificateFactory.java4
-rw-r--r--gnu/java/security/provider/package.html4
-rw-r--r--gnu/java/security/util/Prime.java4
-rw-r--r--gnu/java/security/util/package.html4
-rw-r--r--gnu/java/security/x509/GnuPKIExtension.java4
-rw-r--r--gnu/java/security/x509/PolicyNodeImpl.java4
-rw-r--r--gnu/java/security/x509/Util.java4
-rw-r--r--gnu/java/security/x509/X500DistinguishedName.java4
-rw-r--r--gnu/java/security/x509/X509CRL.java4
-rw-r--r--gnu/java/security/x509/X509CRLEntry.java4
-rw-r--r--gnu/java/security/x509/X509CRLSelectorImpl.java4
-rw-r--r--gnu/java/security/x509/X509CertPath.java4
-rw-r--r--gnu/java/security/x509/X509CertSelectorImpl.java4
-rw-r--r--gnu/java/security/x509/X509Certificate.java98
-rw-r--r--gnu/java/security/x509/ext/AuthorityKeyIdentifier.java4
-rw-r--r--gnu/java/security/x509/ext/BasicConstraints.java4
-rw-r--r--gnu/java/security/x509/ext/CRLNumber.java4
-rw-r--r--gnu/java/security/x509/ext/CertificatePolicies.java4
-rw-r--r--gnu/java/security/x509/ext/ExtendedKeyUsage.java4
-rw-r--r--gnu/java/security/x509/ext/Extension.java4
-rw-r--r--gnu/java/security/x509/ext/GeneralNames.java4
-rw-r--r--gnu/java/security/x509/ext/IssuerAlternativeNames.java4
-rw-r--r--gnu/java/security/x509/ext/KeyUsage.java4
-rw-r--r--gnu/java/security/x509/ext/PolicyConstraint.java4
-rw-r--r--gnu/java/security/x509/ext/PolicyMappings.java4
-rw-r--r--gnu/java/security/x509/ext/PrivateKeyUsagePeriod.java4
-rw-r--r--gnu/java/security/x509/ext/ReasonCode.java4
-rw-r--r--gnu/java/security/x509/ext/SubjectAlternativeNames.java4
-rw-r--r--gnu/java/security/x509/ext/SubjectKeyIdentifier.java4
-rw-r--r--gnu/java/security/x509/ext/package.html4
-rw-r--r--gnu/java/security/x509/package.html4
-rw-r--r--gnu/java/text/AttributedFormatBuffer.java4
-rw-r--r--gnu/java/text/BaseBreakIterator.java4
-rw-r--r--gnu/java/text/CharacterBreakIterator.java4
-rw-r--r--gnu/java/text/FormatBuffer.java4
-rw-r--r--gnu/java/text/FormatCharacterIterator.java13
-rw-r--r--gnu/java/text/LineBreakIterator.java4
-rw-r--r--gnu/java/text/SentenceBreakIterator.java4
-rw-r--r--gnu/java/text/StringFormatBuffer.java4
-rw-r--r--gnu/java/text/WordBreakIterator.java4
-rw-r--r--gnu/java/text/package.html4
-rw-r--r--gnu/java/util/DoubleEnumeration.java4
-rw-r--r--gnu/java/util/EmptyEnumeration.java4
-rw-r--r--gnu/java/util/package.html4
-rw-r--r--gnu/java/util/prefs/FileBasedFactory.java4
-rw-r--r--gnu/java/util/prefs/MemoryBasedFactory.java4
-rw-r--r--gnu/java/util/prefs/MemoryBasedPreferences.java4
-rw-r--r--gnu/java/util/prefs/NodeReader.java4
-rw-r--r--gnu/java/util/prefs/NodeWriter.java4
-rw-r--r--gnu/java/util/prefs/package.html4
-rw-r--r--gnu/javax/rmi/CORBA/DelegateFactory.java4
-rw-r--r--gnu/javax/rmi/CORBA/GetDelegateInstanceException.java4
-rw-r--r--gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java4
-rw-r--r--gnu/javax/rmi/CORBA/StubDelegateImpl.java4
-rw-r--r--gnu/javax/rmi/CORBA/UtilDelegateImpl.java4
-rw-r--r--gnu/javax/rmi/CORBA/ValueHandlerImpl.java4
-rw-r--r--gnu/javax/rmi/PortableServer.java4
-rw-r--r--gnu/javax/swing/plaf/gtk/GtkBorders.java83
-rw-r--r--gnu/javax/swing/plaf/gtk/GtkIconFactory.java99
-rw-r--r--gnu/javax/swing/plaf/gtk/GtkLookAndFeel.java241
-rw-r--r--gnu/javax/swing/plaf/gtk/GtkSliderUI.java230
-rw-r--r--gnu/javax/swing/plaf/gtk/README37
-rw-r--r--gnu/javax/swing/plaf/gtk/SliderTest.java82
-rw-r--r--gnu/javax/swing/text/html/package.html4
-rw-r--r--gnu/javax/swing/text/html/parser/HTML_401F.java4
-rw-r--r--gnu/javax/swing/text/html/parser/gnuDTD.java4
-rw-r--r--gnu/javax/swing/text/html/parser/htmlAttributeSet.java4
-rw-r--r--gnu/javax/swing/text/html/parser/htmlValidator.java4
-rw-r--r--gnu/javax/swing/text/html/parser/models/PCDATAonly_model.java4
-rw-r--r--gnu/javax/swing/text/html/parser/models/TableRowContentModel.java4
-rw-r--r--gnu/javax/swing/text/html/parser/models/list.java4
-rw-r--r--gnu/javax/swing/text/html/parser/models/noTagModel.java4
-rw-r--r--gnu/javax/swing/text/html/parser/models/node.java4
-rw-r--r--gnu/javax/swing/text/html/parser/models/package.html4
-rw-r--r--gnu/javax/swing/text/html/parser/models/transformer.java4
-rw-r--r--gnu/javax/swing/text/html/parser/package.html4
-rw-r--r--gnu/javax/swing/text/html/parser/support/Parser.java4
-rw-r--r--gnu/javax/swing/text/html/parser/support/gnuStringIntMapper.java4
-rw-r--r--gnu/javax/swing/text/html/parser/support/low/Buffer.java4
-rw-r--r--gnu/javax/swing/text/html/parser/support/low/Constants.java4
-rw-r--r--gnu/javax/swing/text/html/parser/support/low/Location.java4
-rw-r--r--gnu/javax/swing/text/html/parser/support/low/ParseException.java4
-rw-r--r--gnu/javax/swing/text/html/parser/support/low/Queue.java4
-rw-r--r--gnu/javax/swing/text/html/parser/support/low/ReaderTokenizer.java4
-rw-r--r--gnu/javax/swing/text/html/parser/support/low/Token.java4
-rw-r--r--gnu/javax/swing/text/html/parser/support/low/node.java4
-rw-r--r--gnu/javax/swing/text/html/parser/support/low/package.html4
-rw-r--r--gnu/javax/swing/text/html/parser/support/low/pattern.java4
-rw-r--r--gnu/javax/swing/text/html/parser/support/package.html4
-rw-r--r--gnu/javax/swing/text/html/parser/support/parameterDefaulter.java4
-rw-r--r--gnu/javax/swing/text/html/parser/support/textPreProcessor.java4
-rw-r--r--gnu/regexp/CharIndexed.java4
-rw-r--r--gnu/regexp/CharIndexedCharArray.java4
-rw-r--r--gnu/regexp/CharIndexedInputStream.java4
-rw-r--r--gnu/regexp/CharIndexedString.java4
-rw-r--r--gnu/regexp/CharIndexedStringBuffer.java4
-rw-r--r--gnu/regexp/RE.java40
-rw-r--r--gnu/regexp/REException.java4
-rw-r--r--gnu/regexp/REFilterInputStream.java4
-rw-r--r--gnu/regexp/REMatch.java4
-rw-r--r--gnu/regexp/REMatchEnumeration.java4
-rw-r--r--gnu/regexp/RESyntax.java12
-rw-r--r--gnu/regexp/REToken.java4
-rw-r--r--gnu/regexp/RETokenAny.java4
-rw-r--r--gnu/regexp/RETokenBackRef.java4
-rw-r--r--gnu/regexp/RETokenChar.java4
-rw-r--r--gnu/regexp/RETokenEnd.java4
-rw-r--r--gnu/regexp/RETokenEndSub.java4
-rw-r--r--gnu/regexp/RETokenLookAhead.java4
-rw-r--r--gnu/regexp/RETokenOneOf.java4
-rw-r--r--gnu/regexp/RETokenPOSIX.java4
-rw-r--r--gnu/regexp/RETokenRange.java4
-rw-r--r--gnu/regexp/RETokenRepeated.java17
-rw-r--r--gnu/regexp/RETokenStart.java4
-rw-r--r--gnu/regexp/RETokenWordBoundary.java4
-rw-r--r--gnu/regexp/UncheckedRE.java4
-rw-r--r--gnu/test/Fail.java4
-rw-r--r--gnu/test/Pass.java4
-rw-r--r--gnu/test/Result.java4
-rw-r--r--gnu/test/Test.java4
-rw-r--r--gnu/test/Unresolved.java4
-rw-r--r--gnu/test/Unsupported.java4
-rw-r--r--gnu/test/Untested.java4
-rw-r--r--gnu/test/XFail.java4
-rw-r--r--gnu/test/XPass.java4
-rw-r--r--gnu/xml/aelfred2/ContentHandler2.java4
-rw-r--r--gnu/xml/aelfred2/JAXPFactory.java4
-rw-r--r--gnu/xml/aelfred2/SAXDriver.java4
-rw-r--r--gnu/xml/aelfred2/XmlParser.java8
-rw-r--r--gnu/xml/aelfred2/XmlReader.java4
-rw-r--r--gnu/xml/dom/Consumer.java4
-rw-r--r--gnu/xml/dom/DTDAttributeTypeInfo.java4
-rw-r--r--gnu/xml/dom/DTDElementTypeInfo.java4
-rw-r--r--gnu/xml/dom/DomAttr.java4
-rw-r--r--gnu/xml/dom/DomCDATASection.java4
-rw-r--r--gnu/xml/dom/DomCharacterData.java4
-rw-r--r--gnu/xml/dom/DomComment.java4
-rw-r--r--gnu/xml/dom/DomDOMException.java4
-rw-r--r--gnu/xml/dom/DomDoctype.java4
-rw-r--r--gnu/xml/dom/DomDocument.java121
-rw-r--r--gnu/xml/dom/DomDocumentBuilder.java4
-rw-r--r--gnu/xml/dom/DomDocumentBuilderFactory.java4
-rw-r--r--gnu/xml/dom/DomDocumentConfiguration.java4
-rw-r--r--gnu/xml/dom/DomDocumentFragment.java4
-rw-r--r--gnu/xml/dom/DomElement.java4
-rw-r--r--gnu/xml/dom/DomEntity.java4
-rw-r--r--gnu/xml/dom/DomEntityReference.java4
-rw-r--r--gnu/xml/dom/DomEvent.java4
-rw-r--r--gnu/xml/dom/DomExtern.java4
-rw-r--r--gnu/xml/dom/DomImpl.java4
-rw-r--r--gnu/xml/dom/DomIterator.java4
-rw-r--r--gnu/xml/dom/DomNSResolverContext.java4
-rw-r--r--gnu/xml/dom/DomNamedNodeMap.java8
-rw-r--r--gnu/xml/dom/DomNode.java6
-rw-r--r--gnu/xml/dom/DomNodeIterator.java4
-rw-r--r--gnu/xml/dom/DomNotation.java4
-rw-r--r--gnu/xml/dom/DomNsNode.java6
-rw-r--r--gnu/xml/dom/DomProcessingInstruction.java4
-rw-r--r--gnu/xml/dom/DomText.java4
-rw-r--r--gnu/xml/dom/DomXPathExpression.java4
-rw-r--r--gnu/xml/dom/DomXPathNSResolver.java4
-rw-r--r--gnu/xml/dom/DomXPathResult.java4
-rw-r--r--gnu/xml/dom/ImplementationList.java4
-rw-r--r--gnu/xml/dom/ImplementationSource.java4
-rw-r--r--gnu/xml/dom/JAXPFactory.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLAnchorElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLAppletElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLAreaElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLBRElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLBaseElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLBaseFontElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLBodyElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLButtonElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLCollection.java15
-rw-r--r--gnu/xml/dom/html2/DomHTMLDListElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLDirectoryElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLDivElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLDocument.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLElement.java26
-rw-r--r--gnu/xml/dom/html2/DomHTMLFieldSetElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLFontElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLFormElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLFrameElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLFrameSetElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLHRElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLHeadElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLHeadingElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLHtmlElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLIFrameElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLImageElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLImpl.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLInputElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLIsIndexElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLLIElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLLabelElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLLegendElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLLinkElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLMapElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLMenuElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLMetaElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLModElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLOListElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLObjectElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLOptGroupElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLOptionElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLParagraphElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLParamElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLParser.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLPreElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLQuoteElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLScriptElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLSelectElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLStyleElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLTableCaptionElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLTableCellElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLTableColElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLTableElement.java25
-rw-r--r--gnu/xml/dom/html2/DomHTMLTableRowElement.java8
-rw-r--r--gnu/xml/dom/html2/DomHTMLTableSectionElement.java11
-rw-r--r--gnu/xml/dom/html2/DomHTMLTextAreaElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLTitleElement.java4
-rw-r--r--gnu/xml/dom/html2/DomHTMLUListElement.java4
-rw-r--r--gnu/xml/dom/ls/DomLSException.java4
-rw-r--r--gnu/xml/dom/ls/DomLSInput.java4
-rw-r--r--gnu/xml/dom/ls/DomLSOutput.java4
-rw-r--r--gnu/xml/dom/ls/DomLSParser.java4
-rw-r--r--gnu/xml/dom/ls/DomLSSerializer.java4
-rw-r--r--gnu/xml/dom/ls/FilteredSAXEventSink.java4
-rw-r--r--gnu/xml/dom/ls/ReaderInputStream.java4
-rw-r--r--gnu/xml/dom/ls/SAXEventSink.java4
-rw-r--r--gnu/xml/dom/ls/WriterOutputStream.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeAttr.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeCDATASection.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeCharacterData.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeComment.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeDOMException.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeDOMStringList.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeDocument.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeDocumentBuilder.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeDocumentFragment.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeDocumentType.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeElement.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeEntity.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeEntityReference.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeNamedNodeMap.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeNode.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeNodeList.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeNotation.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeProcessingInstruction.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeText.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeTypeInfo.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeXPathExpression.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeXPathNSResolver.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeXPathNodeList.java4
-rw-r--r--gnu/xml/libxmlj/dom/GnomeXPathResult.java4
-rw-r--r--gnu/xml/libxmlj/sax/GnomeLocator.java4
-rw-r--r--gnu/xml/libxmlj/sax/GnomeSAXParser.java4
-rw-r--r--gnu/xml/libxmlj/sax/GnomeSAXParserFactory.java4
-rw-r--r--gnu/xml/libxmlj/sax/GnomeXMLReader.java4
-rw-r--r--gnu/xml/libxmlj/sax/Namespaces.java4
-rw-r--r--gnu/xml/libxmlj/sax/StringArrayAttributes.java4
-rw-r--r--gnu/xml/libxmlj/sax/XMLName.java4
-rw-r--r--gnu/xml/libxmlj/transform/ErrorListenerErrorHandler.java4
-rwxr-xr-xgnu/xml/libxmlj/transform/GnomeTransformer.java4
-rwxr-xr-xgnu/xml/libxmlj/transform/GnomeTransformerFactory.java4
-rw-r--r--gnu/xml/libxmlj/transform/URIResolverEntityResolver.java4
-rw-r--r--gnu/xml/libxmlj/util/EmptyNodeList.java4
-rw-r--r--gnu/xml/libxmlj/util/NamedInputStream.java4
-rw-r--r--gnu/xml/libxmlj/util/StandaloneDocumentType.java4
-rw-r--r--gnu/xml/libxmlj/util/StandaloneLocator.java4
-rw-r--r--gnu/xml/libxmlj/util/XMLJ.java4
-rw-r--r--gnu/xml/pipeline/CallFilter.java4
-rw-r--r--gnu/xml/pipeline/DomConsumer.java4
-rw-r--r--gnu/xml/pipeline/EventConsumer.java4
-rw-r--r--gnu/xml/pipeline/EventFilter.java4
-rw-r--r--gnu/xml/pipeline/LinkFilter.java4
-rw-r--r--gnu/xml/pipeline/NSFilter.java4
-rw-r--r--gnu/xml/pipeline/PipelineFactory.java4
-rw-r--r--gnu/xml/pipeline/TeeConsumer.java4
-rw-r--r--gnu/xml/pipeline/TextConsumer.java4
-rw-r--r--gnu/xml/pipeline/ValidationConsumer.java4
-rw-r--r--gnu/xml/pipeline/WellFormednessFilter.java4
-rw-r--r--gnu/xml/pipeline/XIncludeFilter.java4
-rw-r--r--gnu/xml/pipeline/XsltFilter.java4
-rw-r--r--gnu/xml/transform/AbstractNumberNode.java17
-rw-r--r--gnu/xml/transform/ApplyImportsNode.java25
-rw-r--r--gnu/xml/transform/ApplyTemplatesNode.java82
-rw-r--r--gnu/xml/transform/AttributeNode.java40
-rw-r--r--gnu/xml/transform/AttributeSet.java4
-rw-r--r--gnu/xml/transform/Bindings.java153
-rw-r--r--gnu/xml/transform/CallTemplateNode.java65
-rw-r--r--gnu/xml/transform/ChooseNode.java23
-rw-r--r--gnu/xml/transform/CommentNode.java23
-rw-r--r--gnu/xml/transform/CopyNode.java22
-rw-r--r--gnu/xml/transform/CopyOfNode.java31
-rw-r--r--gnu/xml/transform/CurrentFunction.java10
-rw-r--r--gnu/xml/transform/DOMSourceLocator.java4
-rw-r--r--gnu/xml/transform/DocumentFunction.java17
-rw-r--r--gnu/xml/transform/ElementAvailableFunction.java18
-rw-r--r--gnu/xml/transform/ElementNode.java41
-rw-r--r--gnu/xml/transform/ErrorListenerErrorHandler.java4
-rw-r--r--gnu/xml/transform/ForEachNode.java44
-rw-r--r--gnu/xml/transform/FormatNumberFunction.java18
-rw-r--r--gnu/xml/transform/FunctionAvailableFunction.java18
-rw-r--r--gnu/xml/transform/GenerateIdFunction.java18
-rw-r--r--gnu/xml/transform/IfNode.java31
-rw-r--r--gnu/xml/transform/Key.java4
-rw-r--r--gnu/xml/transform/KeyFunction.java16
-rw-r--r--gnu/xml/transform/LiteralNode.java30
-rw-r--r--gnu/xml/transform/MessageNode.java22
-rw-r--r--gnu/xml/transform/NodeNumberNode.java47
-rw-r--r--gnu/xml/transform/NumberNode.java29
-rw-r--r--gnu/xml/transform/OtherwiseNode.java23
-rw-r--r--gnu/xml/transform/ParameterNode.java106
-rw-r--r--gnu/xml/transform/ProcessingInstructionNode.java23
-rw-r--r--gnu/xml/transform/SAXSerializer.java4
-rw-r--r--gnu/xml/transform/SortKey.java29
-rw-r--r--gnu/xml/transform/StreamSerializer.java197
-rw-r--r--gnu/xml/transform/Stylesheet.java344
-rw-r--r--gnu/xml/transform/SystemPropertyFunction.java17
-rw-r--r--gnu/xml/transform/Template.java6
-rw-r--r--gnu/xml/transform/TemplateNode.java29
-rw-r--r--gnu/xml/transform/TemplatesImpl.java4
-rw-r--r--gnu/xml/transform/TextNode.java23
-rw-r--r--gnu/xml/transform/TransformerFactoryImpl.java4
-rw-r--r--gnu/xml/transform/TransformerImpl.java209
-rw-r--r--gnu/xml/transform/TransformerOutputProperties.java4
-rw-r--r--gnu/xml/transform/URIResolverEntityResolver.java4
-rw-r--r--gnu/xml/transform/UnparsedEntityUriFunction.java18
-rw-r--r--gnu/xml/transform/ValueOfNode.java61
-rw-r--r--gnu/xml/transform/WhenNode.java31
-rw-r--r--gnu/xml/transform/WithParam.java23
-rw-r--r--gnu/xml/transform/XSLComparator.java4
-rw-r--r--gnu/xml/transform/XSLURIResolver.java4
-rw-r--r--gnu/xml/util/DoParse.java4
-rw-r--r--gnu/xml/util/DomParser.java4
-rw-r--r--gnu/xml/util/Resolver.java4
-rw-r--r--gnu/xml/util/SAXNullTransformerFactory.java4
-rw-r--r--gnu/xml/util/XCat.java4
-rw-r--r--gnu/xml/util/XHTMLWriter.java4
-rw-r--r--gnu/xml/util/XMLWriter.java4
-rw-r--r--gnu/xml/xpath/AndExpr.java10
-rw-r--r--gnu/xml/xpath/ArithmeticExpr.java10
-rw-r--r--gnu/xml/xpath/BooleanFunction.java10
-rw-r--r--gnu/xml/xpath/CeilingFunction.java10
-rw-r--r--gnu/xml/xpath/ConcatFunction.java17
-rw-r--r--gnu/xml/xpath/Constant.java10
-rw-r--r--gnu/xml/xpath/ContainsFunction.java10
-rw-r--r--gnu/xml/xpath/CountFunction.java10
-rw-r--r--gnu/xml/xpath/DocumentOrderComparator.java4
-rw-r--r--gnu/xml/xpath/EqualityExpr.java16
-rw-r--r--gnu/xml/xpath/Expr.java6
-rw-r--r--gnu/xml/xpath/FalseFunction.java10
-rw-r--r--gnu/xml/xpath/FloorFunction.java10
-rw-r--r--gnu/xml/xpath/Function.java4
-rw-r--r--gnu/xml/xpath/FunctionCall.java17
-rw-r--r--gnu/xml/xpath/IdFunction.java10
-rw-r--r--gnu/xml/xpath/LangFunction.java10
-rw-r--r--gnu/xml/xpath/LastFunction.java10
-rw-r--r--gnu/xml/xpath/LocalNameFunction.java10
-rw-r--r--gnu/xml/xpath/NameFunction.java10
-rw-r--r--gnu/xml/xpath/NameTest.java19
-rw-r--r--gnu/xml/xpath/NamespaceTest.java16
-rw-r--r--gnu/xml/xpath/NamespaceUriFunction.java10
-rw-r--r--gnu/xml/xpath/NegativeExpr.java10
-rw-r--r--gnu/xml/xpath/NodeTypeTest.java10
-rw-r--r--gnu/xml/xpath/NormalizeSpaceFunction.java10
-rw-r--r--gnu/xml/xpath/NotFunction.java10
-rw-r--r--gnu/xml/xpath/NumberFunction.java10
-rw-r--r--gnu/xml/xpath/OrExpr.java10
-rw-r--r--gnu/xml/xpath/ParenthesizedExpr.java10
-rw-r--r--gnu/xml/xpath/Path.java4
-rw-r--r--gnu/xml/xpath/Pattern.java6
-rw-r--r--gnu/xml/xpath/PositionFunction.java10
-rw-r--r--gnu/xml/xpath/Predicate.java10
-rw-r--r--gnu/xml/xpath/RelationalExpr.java10
-rw-r--r--gnu/xml/xpath/Root.java10
-rw-r--r--gnu/xml/xpath/RoundFunction.java10
-rw-r--r--gnu/xml/xpath/Selector.java27
-rw-r--r--gnu/xml/xpath/StartsWithFunction.java10
-rw-r--r--gnu/xml/xpath/Steps.java17
-rw-r--r--gnu/xml/xpath/StringFunction.java10
-rw-r--r--gnu/xml/xpath/StringLengthFunction.java10
-rw-r--r--gnu/xml/xpath/SubstringAfterFunction.java10
-rw-r--r--gnu/xml/xpath/SubstringBeforeFunction.java10
-rw-r--r--gnu/xml/xpath/SubstringFunction.java11
-rw-r--r--gnu/xml/xpath/SumFunction.java10
-rw-r--r--gnu/xml/xpath/Test.java7
-rw-r--r--gnu/xml/xpath/TranslateFunction.java11
-rw-r--r--gnu/xml/xpath/TrueFunction.java10
-rw-r--r--gnu/xml/xpath/UnionExpr.java10
-rw-r--r--gnu/xml/xpath/VariableReference.java26
-rw-r--r--gnu/xml/xpath/XPathFactoryImpl.java4
-rw-r--r--gnu/xml/xpath/XPathImpl.java4
-rw-r--r--gnu/xml/xpath/XPathParser.java217
-rw-r--r--gnu/xml/xpath/XPathParser.y76
-rw-r--r--gnu/xml/xpath/XPathTokenizer.java4
947 files changed, 20005 insertions, 3652 deletions
diff --git a/gnu/CORBA/Asynchron.java b/gnu/CORBA/Asynchron.java
index 4ea222543..275b57091 100644
--- a/gnu/CORBA/Asynchron.java
+++ b/gnu/CORBA/Asynchron.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/BigDecimalHelper.java b/gnu/CORBA/BigDecimalHelper.java
index 9ef7ad151..f1e1dd6b4 100644
--- a/gnu/CORBA/BigDecimalHelper.java
+++ b/gnu/CORBA/BigDecimalHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/ByteArrayComparator.java b/gnu/CORBA/ByteArrayComparator.java
index 3dedc7f96..849115463 100644
--- a/gnu/CORBA/ByteArrayComparator.java
+++ b/gnu/CORBA/ByteArrayComparator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/CDR/BigEndianInputStream.java b/gnu/CORBA/CDR/BigEndianInputStream.java
index 8218b0347..bc019396a 100644
--- a/gnu/CORBA/CDR/BigEndianInputStream.java
+++ b/gnu/CORBA/CDR/BigEndianInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/CDR/BigEndianOutputStream.java b/gnu/CORBA/CDR/BigEndianOutputStream.java
index fe80bbc4f..e0aa7da77 100644
--- a/gnu/CORBA/CDR/BigEndianOutputStream.java
+++ b/gnu/CORBA/CDR/BigEndianOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/CDR/LittleEndianInputStream.java b/gnu/CORBA/CDR/LittleEndianInputStream.java
index 412608b0b..b71a9a4f6 100644
--- a/gnu/CORBA/CDR/LittleEndianInputStream.java
+++ b/gnu/CORBA/CDR/LittleEndianInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/CDR/LittleEndianOutputStream.java b/gnu/CORBA/CDR/LittleEndianOutputStream.java
index 7ff8263db..a6d56cfa6 100644
--- a/gnu/CORBA/CDR/LittleEndianOutputStream.java
+++ b/gnu/CORBA/CDR/LittleEndianOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/CDR/Vio.java b/gnu/CORBA/CDR/Vio.java
new file mode 100644
index 000000000..8f17bd2f5
--- /dev/null
+++ b/gnu/CORBA/CDR/Vio.java
@@ -0,0 +1,638 @@
+/* gnuValueBaseHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.CDR;
+
+import gnu.CORBA.ObjectCreator;
+
+import org.omg.CORBA.CustomMarshal;
+import org.omg.CORBA.DataInputStream;
+import org.omg.CORBA.DataOutputStream;
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.StringSeqHelper;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+import org.omg.CORBA.portable.ValueFactory;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.Serializable;
+
+/**
+ * A specialised class for reading and writing the value types.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class Vio
+{
+ /**
+ * If true, wrap value type data into chunks. This decrease the
+ * performance, but is required for the interoperability with
+ * Sun's CORBA implementation. Chunking may increase the security,
+ * as there is more control on the number of bytes being transferred.
+ *
+ * The current implementation would accept both single chunk or multiple
+ * chunks, but will always send a single chunk.
+ */
+ public static boolean USE_CHUNKING = true;
+
+ /**
+ * The first field in the value record. The last octet may contain
+ * additional flags (vf_CODEBASE, vf_ID and vf_MULTIPLE_IDS). The tag
+ * value is different for the indirections (vt_INDIRECTION) and
+ * nulls (vt_NULL).
+ */
+ public static final int vt_VALUE_TAG = 0x7fffff00;
+
+ /**
+ * The value tag flag, indicating that the codebase URL is present
+ * in the value tag record.
+ */
+ public static final int vf_CODEBASE = 0x1;
+
+ /**
+ * The value tag flag, indicating that a single repository id is present
+ * in the value tag record.
+ */
+ public static final int vf_ID = 0x2;
+
+ /**
+ * The value tag flag, indicating, that there are multiple repository
+ * ids present in the record. If this flag is set, the flag vf_ID must
+ * also be set, resulting the value of the least significant byte 0x6.
+ */
+ public static final int vf_MULTIPLE_IDS = 0x4;
+
+ /**
+ * The value tag flag, indicating the presence of chunking. Each chunk is
+ * preceeded by a positive int, indicating the number of bytes in the chunk.
+ * A sequence of chunks is terminated by a non positive int.
+ */
+ public static final int vf_CHUNKING = 0x8;
+
+ /**
+ * The indirection tag value. Such tag must be followed by the CORBA long,
+ * indicating the offset in the CORBA message, where the indirected
+ * information is present. This offset is assumed zero at the position
+ * where the mentioned CORBA long starts and can refer both forward
+ * (positive values) and backward (negative values).
+ */
+ public static final int vt_INDIRECTION = 0xffffffff;
+
+ /**
+ * This tag value means that the value object being transferred is equal
+ * to null.
+ */
+ public static final int vt_NULL = 0x0;
+
+ /**
+ * Read the value base from the given input stream. Determines the
+ * required class from the repository id. This includes operations
+ * that are not required when an unitialised instance or at least
+ * class of the value type is known. Hence it may be faster to use
+ * the alternative methods, read(InputStream, Class) or
+ * read(InputStream, Serializable).
+ *
+ * @param input a stream to read from.
+ *
+ * @return the loaded value.
+ *
+ * @throws MARSHAL if the reading has failed due any reason.
+ */
+ public static Serializable read(InputStream input)
+ {
+ // Explicitly prevent the stream from closing as we may need
+ // to read the subsequent bytes as well. Stream may be auto-closed
+ // in its finalizer.
+ try
+ {
+ // We may need to jump back if the value is read via value factory.
+ input.mark(512);
+
+ int value_tag = input.read_long();
+ checkTag(value_tag);
+
+ String codebase = null;
+ String[] ids = null;
+ String id = null;
+
+ // The existing implementing object.
+ java.lang.Object ox = null;
+
+ // Check for the agreed null value.
+ if (value_tag == vt_NULL)
+ return null;
+ else if (value_tag == vt_INDIRECTION)
+
+ // TODO FIXME Implement support for indirections.
+ throw new NO_IMPLEMENT("Indirections unsupported");
+ else
+ {
+ // Read the value.
+ if ((value_tag & vf_CODEBASE) != 0)
+ {
+ // The codebase is present. The codebase is a space
+ // separated list of URLs from where the implementing
+ // code can be downloaded.
+ codebase = input.read_string();
+ }
+
+ if ((value_tag & vf_MULTIPLE_IDS) != 0)
+ {
+ // Multiple supported repository ids are present.
+ ids = StringSeqHelper.read(input);
+ for (int i = 0; (i < ids.length) && (ox == null); i++)
+ {
+ ox = ObjectCreator.Idl2Object(ids [ i ]);
+
+ if (ox == null)
+ {
+ // Try to find the value factory.
+ ValueFactory f =
+ ((org.omg.CORBA_2_3.ORB) input.orb()).lookup_value_factory(ids [ i ]);
+
+ if (f != null)
+ {
+ // Reset, as the value factory reads from beginning.
+ input.reset();
+ return f.read_value((org.omg.CORBA_2_3.portable.InputStream) input);
+ }
+ }
+ }
+ }
+ else if ((value_tag & vf_ID) != 0)
+ {
+ // Single supported repository id is present.
+ id = input.read_string();
+ ox = ObjectCreator.Idl2Object(id);
+
+ if (ox == null)
+ {
+ // Try to find the value factory.
+ ValueFactory f =
+ ((org.omg.CORBA_2_3.ORB) input.orb()).lookup_value_factory(id);
+
+ if (f != null)
+ {
+ input.reset();
+ return f.read_value((org.omg.CORBA_2_3.portable.InputStream) input);
+ }
+ }
+ }
+ }
+
+ if (ox == null)
+ throw new MARSHAL("Unable to instantiate the value type");
+ else
+ {
+ read_instance(input, ox, value_tag);
+ return (Serializable) ox;
+ }
+ }
+ catch (Exception ex)
+ {
+ throw new MARSHAL(ex + ":" + ex.getMessage());
+ }
+ }
+
+ /**
+ * Read the value base from the given input stream when
+ * the value base class is available. Hence there is no need
+ * to guess it from the repository id.
+ *
+ * @param input a stream to read from.
+ * @param value_class the class of the value being read.
+ *
+ * @return the loaded value.
+ *
+ * @throws MARSHAL if the reading has failed due any reason.
+ */
+ public static Serializable read(InputStream input, Class value_class)
+ {
+ // Explicitly prevent the stream from closing as we may need
+ // to read the subsequent bytes as well. Stream may be auto-closed
+ // in its finalizer.
+ try
+ {
+ int value_tag = input.read_long();
+ checkTag(value_tag);
+
+ // The existing implementing object.
+ java.lang.Object ox = value_class.newInstance();
+
+ // Check for the agreed null value.
+ if (value_tag == vt_NULL)
+ return null;
+ else if (value_tag == vt_INDIRECTION)
+
+ // TODO FIXME Implement support for indirections.
+ throw new NO_IMPLEMENT("Indirections unsupported");
+ else
+ {
+ // Read the value.
+ if ((value_tag & vf_CODEBASE) != 0)
+ {
+ // The codebase is present, but skip it.
+ input.read_string();
+ }
+
+ if ((value_tag & vf_MULTIPLE_IDS) != 0)
+ {
+ // Multiple supported repository ids are present, but skip them.
+ StringSeqHelper.read(input);
+ }
+ else if ((value_tag & vf_ID) != 0)
+ {
+ // Single supported repository id is present, but skip it.
+ input.read_string();
+ }
+ }
+
+ read_instance(input, ox, value_tag);
+ return (Serializable) ox;
+ }
+ catch (Exception ex)
+ {
+ throw new MARSHAL(ex + ":" + ex.getMessage());
+ }
+ }
+
+ /**
+ * Read the value base from the given input stream when
+ * the unitialised instance is available. Hence there is no need
+ * to guess the class from the repository id and then to instantiate
+ * an instance.
+ *
+ * @param input a stream to read from.
+ * @param value_instance an instance of the value.
+ *
+ * @return the loaded value.
+ *
+ * @throws MARSHAL if the reading has failed due any reason.
+ */
+ public static Serializable read(InputStream input, Serializable value_instance)
+ {
+ // Explicitly prevent the stream from closing as we may need
+ // to read the subsequent bytes as well. Stream may be auto-closed
+ // in its finalizer.
+ try
+ {
+ int value_tag = input.read_long();
+ checkTag(value_tag);
+
+ // Check for the agreed null value.
+ if (value_tag == vt_NULL)
+ return null;
+ else if (value_tag == vt_INDIRECTION)
+
+ // TODO FIXME Implement support for indirections.
+ throw new NO_IMPLEMENT("Indirections unsupported");
+ else
+ {
+ // Read the value.
+ if ((value_tag & vf_CODEBASE) != 0)
+ {
+ // The codebase is present, but skip it.
+ input.read_string();
+ }
+
+ if ((value_tag & vf_MULTIPLE_IDS) != 0)
+ {
+ // Multiple supported repository ids are present, but skip them.
+ StringSeqHelper.read(input);
+ }
+ else if ((value_tag & vf_ID) != 0)
+ {
+ // Single supported repository id is present, but skip it.
+ input.read_string();
+ }
+ }
+
+ read_instance(input, value_instance, value_tag);
+ return (Serializable) value_instance;
+ }
+ catch (Exception ex)
+ {
+ throw new MARSHAL(ex + ":" + ex.getMessage());
+ }
+ }
+
+ /**
+ * Fill in the instance fields by the data from the input stream.
+ * The method assumes that the value header, if any, is already
+ * behind. The information from the stream is stored into the
+ * passed ox parameter.
+ *
+ * @param input an input stream to read from.
+ * @param value a value type object, must be either Streamable or
+ * CustomMarshal.
+ */
+ public static void read_instance(InputStream input, Object value,
+ int value_tag
+ )
+ {
+ try
+ {
+ if ((value_tag & vf_CHUNKING) != 0)
+ {
+ ByteArrayOutputStream bout = null;
+ int n = -1;
+
+ // Read all chunks.
+ int chunk_size = input.read_long();
+ if (chunk_size <= 0)
+ throw new MARSHAL("Invalid first chunk size " + chunk_size);
+
+ byte[] r = new byte[ chunk_size ];
+
+ while (chunk_size > 0)
+ {
+ if (r.length < chunk_size)
+ r = new byte[ chunk_size + 256 ];
+
+ n = 0;
+ reading:
+ while (n < chunk_size)
+ n += input.read(r, n, r.length - n);
+
+ // Read the size of the next chunk.
+ chunk_size = input.read_long();
+
+ // If the value is non negative, there is more than one chunk.
+ // Accumulate chunks in the buffer.
+ // The last chunk (or the only chunk, if only one chunk is
+ // present) is not written in the buffer. It is stored in the
+ // array r, avoiding unnecessary buffer operations.
+ if (chunk_size > 0)
+ {
+ bout = new ByteArrayOutputStream(2 * chunk_size);
+ bout.write(r, 0, chunk_size);
+ }
+ }
+
+ if (bout != null)
+ {
+ // More than one chunk was present.
+ // Add the last chunk.
+ bout.write(r, 0, n);
+ input = new cdrBufInput(bout.toByteArray());
+ }
+ else
+ {
+ // Only one chunk was present.
+ input = new cdrBufInput(r);
+ }
+ }
+ }
+ catch (IOException ex)
+ {
+ MARSHAL m = new MARSHAL("Unable to read chunks");
+ m.initCause(ex);
+ throw m;
+ }
+
+ // The user-defines io operations are implemented.
+ if (value instanceof CustomMarshal)
+ {
+ CustomMarshal marsh = (CustomMarshal) value;
+ try
+ {
+ marsh.unmarshal((DataInputStream) input);
+ }
+ catch (ClassCastException ex)
+ {
+ incorrect_plug_in(ex);
+ }
+ }
+ else
+ // The IDL-generated io operations are implemented.
+ if (value instanceof Streamable)
+ {
+ ((Streamable) value)._read(input);
+ }
+ else
+
+ // Stating the interfaces that the USER should use.
+ throw new MARSHAL("The " + value.getClass().getName() +
+ " must implement either StreamableValue or CustomValue."
+ );
+
+ // The negative end of state marker is expected from OMG standard.
+ // If the chunking is used, this marker is already extracted.
+ if ((value_tag & vf_CHUNKING) == 0)
+ {
+ int eor = input.read_long();
+ if (eor >= 0)
+ throw new MARSHAL("End of state marker has an invalid value " + eor);
+ }
+ }
+
+ /**
+ * Write the value base into the given stream.
+ *
+ * @param output a stream to write to.
+ *
+ * @param value a value type object, must be either Streamable or
+ * CustomMarshal.
+ *
+ * @throws MARSHAL if the writing failed due any reason.
+ */
+ public static void write(OutputStream output, Serializable value)
+ {
+ // Write null if this is a null value.
+ if (value == null)
+ output.write_long(vt_NULL);
+ else
+ write(output, value, ObjectCreator.toIDL(value.getClass().getName()));
+ }
+
+ /**
+ * Write the value base into the given stream, stating that it is an
+ * instance of the given class. The written record has no repository
+ * id and requires to supply a class or initialised instance for reading
+ * rather than an actual class it is.
+ *
+ * This results writing a different repository id.
+ *
+ * If the passed value implements the {@link CustomMarshal},
+ * the helper uses {@link CustomMarshal#marshal}
+ * to write the content in a user defined way. Otherwise,
+ * this implementation initialises the {@link ObjectOutputStream}
+ * and writes through it.
+ *
+ * @param output a stream to write to.
+ *
+ * @param value a value to write.
+ *
+ * @throws MARSHAL if the writing failed due any reason.
+ */
+ public static void write(OutputStream output, Serializable value,
+ Class substitute
+ )
+ {
+ // Write null if this is a null value.
+ if (value == null)
+ output.write_long(vt_NULL);
+
+ else
+ write(output, value, ObjectCreator.toIDL(substitute.getName()));
+ }
+
+ /**
+ * Write value when its repository Id is explicitly given.
+ *
+ * @param output an output stream to write into.
+ * @param value a value to write.
+ * @param id a value repository id.
+ */
+ public static void write(OutputStream output, Serializable value, String id)
+ {
+ if (value == null)
+ output.write_long(vt_NULL);
+ else
+ write_instance(output, value, id);
+ }
+
+ /**
+ * Write value when its repository Id is explicitly given.
+ * Does not handle null.
+ *
+ * @param output an output stream to write into.
+ * @param value a value to write.
+ * @param id a value repository id.
+ */
+ private static void write_instance(OutputStream output, Serializable value,
+ String id
+ )
+ {
+ // This implementation always writes a single repository id.
+ // It never writes multiple repository ids and currently does not use
+ // a codebase.
+ int value_tag = vt_VALUE_TAG | vf_ID;
+
+ OutputStream outObj;
+ cdrBufOutput out = null;
+
+ if (USE_CHUNKING)
+ {
+ out = new cdrBufOutput();
+ out.setOrb(output.orb());
+ outObj = out;
+ value_tag |= vf_CHUNKING;
+ }
+ else
+ outObj = output;
+
+ output.write_long(value_tag);
+ output.write_string(id);
+
+ // User defince write method is present.
+ if (value instanceof CustomMarshal)
+ {
+ try
+ {
+ ((CustomMarshal) value).marshal((DataOutputStream) outObj);
+ }
+ catch (ClassCastException ex)
+ {
+ incorrect_plug_in(ex);
+ }
+ }
+ else if (value instanceof Streamable)
+ {
+ ((Streamable) value)._write(outObj);
+ }
+ else
+
+ // Stating the interfaces that the USER should use.
+ throw new MARSHAL("The " + value.getClass().getName() +
+ " must implement either StreamableValue or CustomValue."
+ );
+
+ if (USE_CHUNKING)
+ {
+ output.write_long(out.buffer.size());
+ try
+ {
+ out.buffer.writeTo(output);
+ }
+ catch (IOException ex)
+ {
+ MARSHAL m = new MARSHAL();
+ m.initCause(ex);
+ throw m;
+ }
+ }
+
+ // The end of record marker, required by OMG standard.
+ output.write_long(-1);
+ }
+
+ /**
+ * This can be called if the alternative CORBA implementation
+ * is incorrectly plugged in.
+ *
+ * @throws NO_IMPLEMENT, always.
+ */
+ private static void incorrect_plug_in(Throwable ex)
+ throws NO_IMPLEMENT
+ {
+ NO_IMPLEMENT no = new NO_IMPLEMENT("Incorrect CORBA plug-in");
+ no.initCause(ex);
+ throw no;
+ }
+
+ /**
+ * Check the passed value tag for correctness.
+ *
+ * @param value_tag a tag to check, must be between 0x7fffff00 and 0x7fffffff
+ *
+ * @throws MARSHAL if the tag is outside this interval.
+ */
+ private static final void checkTag(int value_tag)
+ {
+ if ((value_tag < 0x7fffff00 || value_tag > 0x7fffffff) &&
+ value_tag != vt_NULL && value_tag != vt_INDIRECTION
+ )
+ throw new MARSHAL("Invalid value record, unsupported header tag: " +
+ value_tag
+ );
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/CDR/abstractDataInputStream.java b/gnu/CORBA/CDR/abstractDataInputStream.java
index 4da48bb27..be926254d 100644
--- a/gnu/CORBA/CDR/abstractDataInputStream.java
+++ b/gnu/CORBA/CDR/abstractDataInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/CDR/abstractDataOutputStream.java b/gnu/CORBA/CDR/abstractDataOutputStream.java
index b54dc0f7f..2f9b8c419 100644
--- a/gnu/CORBA/CDR/abstractDataOutputStream.java
+++ b/gnu/CORBA/CDR/abstractDataOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/CDR/aligningInputStream.java b/gnu/CORBA/CDR/aligningInputStream.java
index c29a52cfa..a719b32ee 100644
--- a/gnu/CORBA/CDR/aligningInputStream.java
+++ b/gnu/CORBA/CDR/aligningInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/CDR/aligningOutputStream.java b/gnu/CORBA/CDR/aligningOutputStream.java
index f4009c47c..8a682c1fd 100644
--- a/gnu/CORBA/CDR/aligningOutputStream.java
+++ b/gnu/CORBA/CDR/aligningOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/CDR/cdrBufInput.java b/gnu/CORBA/CDR/cdrBufInput.java
index 58715c64a..3cab7216c 100644
--- a/gnu/CORBA/CDR/cdrBufInput.java
+++ b/gnu/CORBA/CDR/cdrBufInput.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/CDR/cdrBufOutput.java b/gnu/CORBA/CDR/cdrBufOutput.java
index d8d34f7d4..47f5f176b 100644
--- a/gnu/CORBA/CDR/cdrBufOutput.java
+++ b/gnu/CORBA/CDR/cdrBufOutput.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/CDR/cdrInput.java b/gnu/CORBA/CDR/cdrInput.java
index 644e01930..859f93ae5 100644
--- a/gnu/CORBA/CDR/cdrInput.java
+++ b/gnu/CORBA/CDR/cdrInput.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -51,22 +51,32 @@ import gnu.CORBA.gnuAny;
import gnu.CORBA.stubFinder;
import org.omg.CORBA.Any;
+import org.omg.CORBA.AnySeqHolder;
import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.BooleanSeqHolder;
+import org.omg.CORBA.CharSeqHolder;
+import org.omg.CORBA.DoubleSeqHolder;
+import org.omg.CORBA.FloatSeqHolder;
+import org.omg.CORBA.LongLongSeqHolder;
+import org.omg.CORBA.LongSeqHolder;
import org.omg.CORBA.MARSHAL;
-import org.omg.CORBA.NO_IMPLEMENT;
import org.omg.CORBA.ORB;
-import org.omg.CORBA.Object;
+import org.omg.CORBA.OctetSeqHolder;
+import org.omg.CORBA.ShortSeqHolder;
import org.omg.CORBA.TypeCode;
import org.omg.CORBA.TypeCodePackage.BadKind;
import org.omg.CORBA.TypeCodePackage.Bounds;
+import org.omg.CORBA.ULongLongSeqHolder;
+import org.omg.CORBA.ULongSeqHolder;
+import org.omg.CORBA.UShortSeqHolder;
+import org.omg.CORBA.WCharSeqHolder;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.ObjectImpl;
-import java.io.DataInput;
-import java.io.DataInputStream;
import java.io.EOFException;
import java.io.IOException;
import java.io.InputStreamReader;
+import java.io.Serializable;
import java.math.BigDecimal;
@@ -74,13 +84,17 @@ import java.math.BigDecimal;
* A simple CORBA CDR (common data representation)
* input stream, reading data from the
* given {@link java.io.InputStream}. The primitive types
- * are aligned on they natural boundaries by implamenting the
+ * are aligned on they natural boundaries by implementing the
* abstract method {@link #align(int boundary)}.
*
+ * The same class also implements {@link org.omg.CORBA.DataInputStream} to
+ * read the object content in a user defined way.
+ *
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public abstract class cdrInput
- extends org.omg.CORBA.portable.InputStream
+ extends org.omg.CORBA_2_3.portable.InputStream
+ implements org.omg.CORBA.DataInputStream
{
/**
* The message, explaining that the exception has been thrown due
@@ -110,7 +124,7 @@ public abstract class cdrInput
/**
* The GIOP version.
*/
- protected Version giop = new Version(1, 0);
+ protected Version giop = new Version(1, 2);
/**
* The code set information.
@@ -352,22 +366,28 @@ public abstract class cdrInput
* the .narrow method of its helper, despite in some cases the direct
* cast would also work.
*
+ * The null objects are recognised from the empty profile set.
+ * For such objects, null is returned.
+ *
* @return the loaded and constructed object.
*/
- public Object read_Object()
+ public org.omg.CORBA.Object read_Object()
{
try
{
IOR ior = new IOR();
ior._read_no_endian(this);
+ if (ior.Id == null)
+ return null;
+
// Check maybe this is a remote reference to the local object.
// This is only possible if we access the repository of the
// connected object.
if (orb instanceof Functional_ORB)
{
Functional_ORB forb = (Functional_ORB) orb;
- Object local = forb.find_local_object(ior);
+ org.omg.CORBA.Object local = forb.find_local_object(ior);
if (local != null)
return local;
}
@@ -1219,8 +1239,433 @@ public abstract class cdrInput
*
* @return the returned object.
*/
- public Object read_Object(Class klass)
+ public org.omg.CORBA.Object read_Object(Class klass)
{
return read_Object();
}
+
+ /**
+ * Read a value type structure from the stream.
+ *
+ * OMG specification states the writing format is outside the scope
+ * of GIOP definition. This implementation uses java serialization
+ * mechanism, calling {@link ObjectInputStream#readObject}
+ *
+ * @return an value type structure, unmarshaled from the stream
+ */
+ public Serializable read_Value()
+ {
+ return read_value();
+ }
+
+ /**
+ * Read the abstract interface. An abstract interface can be either
+ * CORBA value type or CORBA object and is returned as an abstract
+ * java.lang.Object.
+ *
+ * As specified in OMG specification, this reads a single
+ * boolean and then delegates either to {@link #read_Object()} (for false)
+ * or to {@link #read_Value()} (for true).
+ *
+ * @return an abstract interface, unmarshaled from the stream
+ */
+ public java.lang.Object read_Abstract()
+ {
+ return read_abstract_interface();
+ }
+
+ /**
+ * Read an array. In OMG specification is written that if the data does
+ * not fit into the holder value field, that array must be resized.
+ * The implementation follows this rule. If the holder value field
+ * contains null, it is newly instantiated.
+ */
+ public void read_char_array(CharSeqHolder holder, int offset, int length)
+ {
+ holder.value = ensureArray(holder.value, offset, length);
+ read_char_array(holder.value, offset, length);
+ }
+
+ /**
+ * Read an array. In OMG specification is written that if the data does
+ * not fit into the holder value field, that array must be resized.
+ * The implementation follows this rule. If the holder value field
+ * contains null, it is newly instantiated.
+ */
+ public void read_wchar_array(WCharSeqHolder holder, int offset, int length)
+ {
+ holder.value = ensureArray(holder.value, offset, length);
+ read_wchar_array(holder.value, offset, length);
+ }
+
+ /**
+ * If required, allocate or resize the char array to fit the newly
+ * read values.
+ *
+ * @param holder_value the existing char array, may be null.
+ * @param offset the required offset to read.
+ * @param length the length of the new sequence.
+ *
+ * @return the allocated or resized array, same array if no such operations
+ * are required.
+ */
+ private char[] ensureArray(char[] holder_value, int offset, int length)
+ {
+ if (holder_value == null)
+ return new char[ offset + length ];
+ else if (holder_value.length < offset + length)
+ {
+ char[] value = new char[ offset + length ];
+ System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+ return value;
+ }
+ else
+ return holder_value;
+ }
+
+ /**
+ * Read an array. In OMG specification is written that if the data does
+ * not fit into the holder value field, that array must be resized.
+ * The implementation follows this rule. If the holder value field
+ * contains null, it is newly instantiated.
+ */
+ public void read_ulong_array(ULongSeqHolder holder, int offset, int length)
+ {
+ holder.value = ensureArray(holder.value, offset, length);
+ read_ulong_array(holder.value, offset, length);
+ }
+
+ /**
+ * Read an array. In OMG specification is written that if the data does
+ * not fit into the holder value field, that array must be resized.
+ * The implementation follows this rule. If the holder value field
+ * contains null, it is newly instantiated.
+ */
+ public void read_long_array(LongSeqHolder holder, int offset, int length)
+ {
+ holder.value = ensureArray(holder.value, offset, length);
+ read_ulong_array(holder.value, offset, length);
+ }
+
+ /**
+ * If required, allocate or resize the int array to fit the newly
+ * read values.
+ *
+ * @param holder_value the existing int array, may be null.
+ * @param offset the required offset to read.
+ * @param length the length of the new sequence.
+ *
+ * @return the allocated or resized array, same array if no such operations
+ * are required.
+ */
+ private int[] ensureArray(int[] holder_value, int offset, int length)
+ {
+ if (holder_value == null)
+ return new int[ offset + length ];
+ else if (holder_value.length < offset + length)
+ {
+ int[] value = new int[ offset + length ];
+ System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+ return value;
+ }
+ else
+ return holder_value;
+ }
+
+ /**
+ * Read an array. In OMG specification is written that if the data does
+ * not fit into the holder value field, that array must be resized.
+ * The implementation follows this rule. If the holder value field
+ * contains null, it is newly instantiated.
+ */
+ public void read_float_array(FloatSeqHolder holder, int offset, int length)
+ {
+ holder.value = ensureArray(holder.value, offset, length);
+ read_float_array(holder.value, offset, length);
+ }
+
+ /**
+ * If required, allocate or resize the float array to fit the newly
+ * read values.
+ *
+ * @param holder_value the existing float array, may be null.
+ * @param offset the required offset to read.
+ * @param length the length of the new sequence.
+ *
+ * @return the allocated or resized array, same array if no such operations
+ * are required.
+ */
+ private float[] ensureArray(float[] holder_value, int offset, int length)
+ {
+ if (holder_value == null)
+ return new float[ offset + length ];
+ else if (holder_value.length < offset + length)
+ {
+ float[] value = new float[ offset + length ];
+ System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+ return value;
+ }
+ else
+ return holder_value;
+ }
+
+ /**
+ * Read an array. In OMG specification is written that if the data does
+ * not fit into the holder value field, that array must be resized.
+ * The implementation follows this rule. If the holder value field
+ * contains null, it is newly instantiated.
+ */
+ public void read_double_array(DoubleSeqHolder holder, int offset, int length)
+ {
+ holder.value = ensureArray(holder.value, offset, length);
+ read_double_array(holder.value, offset, length);
+ }
+
+ /**
+ * If required, allocate or resize the double array to fit the newly
+ * read values.
+ *
+ * @param holder_value the existing double array, may be null.
+ * @param offset the required offset to read.
+ * @param length the length of the new sequence.
+ *
+ * @return the allocated or resized array, same array if no such operations
+ * are required.
+ */
+ private double[] ensureArray(double[] holder_value, int offset, int length)
+ {
+ if (holder_value == null)
+ return new double[ offset + length ];
+ else if (holder_value.length < offset + length)
+ {
+ double[] value = new double[ offset + length ];
+ System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+ return value;
+ }
+ else
+ return holder_value;
+ }
+
+ /**
+ * Read an array. In OMG specification is written that if the data does
+ * not fit into the holder value field, that array must be resized.
+ * The implementation follows this rule. If the holder value field
+ * contains null, it is newly instantiated.
+ */
+ public void read_short_array(ShortSeqHolder holder, int offset, int length)
+ {
+ holder.value = ensureArray(holder.value, offset, length);
+ read_short_array(holder.value, offset, length);
+ }
+
+ /** {@inheritDoc} */
+ public void read_ushort_array(UShortSeqHolder holder, int offset, int length)
+ {
+ holder.value = ensureArray(holder.value, offset, length);
+ read_ushort_array(holder.value, offset, length);
+ }
+
+ /**
+ * If required, allocate or resize the short array to fit the newly
+ * read values.
+ *
+ * @param holder_value the existing short array, may be null.
+ * @param offset the required offset to read.
+ * @param length the length of the new sequence.
+ *
+ * @return the allocated or resized array, same array if no such operations
+ * are required.
+ */
+ private short[] ensureArray(short[] holder_value, int offset, int length)
+ {
+ if (holder_value == null)
+ return new short[ offset + length ];
+ else if (holder_value.length < offset + length)
+ {
+ short[] value = new short[ offset + length ];
+ System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+ return value;
+ }
+ else
+ return holder_value;
+ }
+
+ /**
+ * Read an array. In OMG specification is written that if the data does
+ * not fit into the holder value field, that array must be resized.
+ * The implementation follows this rule. If the holder value field
+ * contains null, it is newly instantiated.
+ */
+ public void read_octet_array(OctetSeqHolder holder, int offset, int length)
+ {
+ holder.value = ensureArray(holder.value, offset, length);
+ read_octet_array(holder.value, offset, length);
+ }
+
+ /**
+ * If required, allocate or resize the byte array to fit the newly
+ * read values.
+ *
+ * @param holder_value the existing byte array, may be null.
+ * @param offset the required offset to read.
+ * @param length the length of the new sequence.
+ *
+ * @return the allocated or resized array, same array if no such operations
+ * are required.
+ */
+ private byte[] ensureArray(byte[] holder_value, int offset, int length)
+ {
+ if (holder_value == null)
+ return new byte[ offset + length ];
+ else if (holder_value.length < offset + length)
+ {
+ byte[] value = new byte[ offset + length ];
+ System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+ return value;
+ }
+ else
+ return holder_value;
+ }
+
+ /**
+ * Read an array. In OMG specification is written that if the data does
+ * not fit into the holder value field, that array must be resized.
+ * The implementation follows this rule. If the holder value field
+ * contains null, it is newly instantiated.
+ */
+ public void read_longlong_array(LongLongSeqHolder holder, int offset,
+ int length
+ )
+ {
+ holder.value = ensureArray(holder.value, offset, length);
+ read_longlong_array(holder.value, offset, length);
+ }
+
+ /**
+ * Read an array. In OMG specification is written that if the data does
+ * not fit into the holder value field, that array must be resized.
+ * The implementation follows this rule. If the holder value field
+ * contains null, it is newly instantiated.
+ */
+ public void read_ulonglong_array(ULongLongSeqHolder holder, int offset,
+ int length
+ )
+ {
+ holder.value = ensureArray(holder.value, offset, length);
+ read_ulonglong_array(holder.value, offset, length);
+ }
+
+ /**
+ * If required, allocate or resize the array of longs to fit the newly
+ * read values.
+ *
+ * @param holder_value the existing array, may be null.
+ * @param offset the required offset to read.
+ * @param length the length of the new sequence.
+ *
+ * @return the allocated or resized array, same array if no such operations
+ * are required.
+ */
+ private long[] ensureArray(long[] holder_value, int offset, int length)
+ {
+ if (holder_value == null)
+ return new long[ offset + length ];
+ else if (holder_value.length < offset + length)
+ {
+ long[] value = new long[ offset + length ];
+ System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+ return value;
+ }
+ else
+ return holder_value;
+ }
+
+ /**
+ * Read an array. In OMG specification is written that if the data does
+ * not fit into the holder value field, that array must be resized.
+ * The implementation follows this rule. If the holder value field
+ * contains null, it is newly instantiated.
+ */
+ public void read_boolean_array(BooleanSeqHolder holder, int offset, int length)
+ {
+ holder.value = ensureArray(holder.value, offset, length);
+ read_boolean_array(holder.value, offset, length);
+ }
+
+ /**
+ * If required, allocate or resize the array of booleans to fit the newly
+ * read values.
+ *
+ * @param holder_value the existing array of booleans, may be null.
+ * @param offset the required offset to read.
+ * @param length the length of the new sequence.
+ *
+ * @return the allocated or resized array, same array if no such operations
+ * are required.
+ */
+ private boolean[] ensureArray(boolean[] holder_value, int offset, int length)
+ {
+ if (holder_value == null)
+ return new boolean[ offset + length ];
+ else if (holder_value.length < offset + length)
+ {
+ boolean[] value = new boolean[ offset + length ];
+ System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+ return value;
+ }
+ else
+ return holder_value;
+ }
+
+ /**
+ * Read an array. In OMG specification is written that if the data does
+ * not fit into the holder value field, that array must be resized.
+ * The implementation follows this rule. If the holder value field
+ * contains null, it is newly instantiated.
+ */
+ public void read_any_array(AnySeqHolder holder, int offset, int length)
+ {
+ holder.value = ensureArray(holder.value, offset, length);
+ for (int i = offset; i < offset + length; i++)
+ {
+ holder.value [ i ] = read_any();
+ }
+ }
+
+ /**
+ * If required, allocate or resize the array of Anys to fit the newly
+ * read values.
+ *
+ * @param holder_value the existing array of Anys, may be null.
+ * @param offset the required offset to read.
+ * @param length the length of the new sequence.
+ *
+ * @return the allocated or resized array, same array if no such operations
+ * are required.
+ */
+ private Any[] ensureArray(Any[] holder_value, int offset, int length)
+ {
+ if (holder_value == null)
+ return new Any[ offset + length ];
+ else if (holder_value.length < offset + length)
+ {
+ Any[] value = new Any[ offset + length ];
+ System.arraycopy(holder_value, 0, value, 0, holder_value.length);
+ return value;
+ }
+ else
+ return holder_value;
+ }
+
+ /**
+ * This method is required to represent the DataInputStream as a value
+ * type object.
+ *
+ * @return a single entity "IDL:omg.org/CORBA/DataInputStream:1.0",
+ * always.
+ */
+ public String[] _truncatable_ids()
+ {
+ return new String[] { "IDL:omg.org/CORBA/DataInputStream:1.0" };
+ }
} \ No newline at end of file
diff --git a/gnu/CORBA/CDR/cdrOutput.java b/gnu/CORBA/CDR/cdrOutput.java
index 30efaa854..86ca3b1cb 100644
--- a/gnu/CORBA/CDR/cdrOutput.java
+++ b/gnu/CORBA/CDR/cdrOutput.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -64,9 +64,9 @@ import org.omg.CORBA.portable.ObjectImpl;
import org.omg.CORBA.portable.OutputStream;
import org.omg.CORBA.portable.Streamable;
-import java.io.DataOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
+import java.io.Serializable;
import java.math.BigDecimal;
@@ -75,14 +75,15 @@ import java.math.BigDecimal;
* output stream, writing data into the
* given {@link java.io.OutputStream}.
*
- * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ * The same class also implements the {@link DataInputStream},
+ * providing support for writing the value type objects
+ * in a user defined way.
*
- * TODO the standalone chars and char arrays are still written using
- * the native encoding, as the size under arbitrary encoding is not
- * evident.
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public abstract class cdrOutput
- extends org.omg.CORBA.portable.OutputStream
+ extends org.omg.CORBA_2_3.portable.OutputStream
+ implements org.omg.CORBA.DataOutputStream
{
/**
* This instance is used to convert primitive data types into the
@@ -315,10 +316,18 @@ public abstract class cdrOutput
* form of the plain (not a string-encoded) IOR profile without the
* heading endian indicator. The responsible method for reading such
* data is {@link IOR.write_no_endian}.
+ *
+ * The null value is written as defined in OMG specification
+ * (zero length string, followed by an empty set of profiles).
*/
public void write_Object(org.omg.CORBA.Object x)
{
- if (x instanceof ObjectImpl)
+ if (x == null)
+ {
+ IOR.write_null(this);
+ return;
+ }
+ else if (x instanceof ObjectImpl)
{
Delegate d = ((ObjectImpl) x)._get_delegate();
@@ -960,4 +969,31 @@ public abstract class cdrOutput
Unexpected.error(ex);
}
}
+
+ /** {@inheritDoc} */
+ public void write_any_array(Any[] anys, int offset, int length)
+ {
+ for (int i = offset; i < offset + length; i++)
+ {
+ write_any(anys [ i ]);
+ }
+ }
+
+ public String[] _truncatable_ids()
+ {
+ /**@todo Implement this org.omg.CORBA.portable.ValueBase abstract method*/
+ throw new java.lang.UnsupportedOperationException("Method _truncatable_ids() not yet implemented.");
+ }
+
+ /** {@inheritDoc} */
+ public void write_Abstract(java.lang.Object value)
+ {
+ write_Abstract(value);
+ }
+
+ /** {@inheritDoc} */
+ public void write_Value(Serializable value)
+ {
+ write_Value(value);
+ }
} \ No newline at end of file
diff --git a/gnu/CORBA/CDR/encapsulatedOutput.java b/gnu/CORBA/CDR/encapsulatedOutput.java
index e4673b099..3350291bc 100644
--- a/gnu/CORBA/CDR/encapsulatedOutput.java
+++ b/gnu/CORBA/CDR/encapsulatedOutput.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/Connected_objects.java b/gnu/CORBA/Connected_objects.java
index 298d49757..b7eefb133 100644
--- a/gnu/CORBA/Connected_objects.java
+++ b/gnu/CORBA/Connected_objects.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -60,11 +60,14 @@ public class Connected_objects
/**
* Create an initialised instance.
*/
- cObject(org.omg.CORBA.Object _object, int _port, byte[] _key)
+ cObject(org.omg.CORBA.Object _object, int _port, byte[] _key,
+ java.lang.Object an_identity
+ )
{
object = _object;
port = _port;
key = _key;
+ identity = an_identity;
}
/**
@@ -82,6 +85,12 @@ public class Connected_objects
*/
public final byte[] key;
+ /**
+ * The shared serving identity (usually POA) or null if no such
+ * applicable.
+ */
+ public final java.lang.Object identity;
+
public boolean equals(java.lang.Object other)
{
if (other instanceof cObject)
@@ -118,17 +127,23 @@ public class Connected_objects
*/
public cObject getKey(org.omg.CORBA.Object stored_object)
{
- Map.Entry item;
- Iterator iter = objects.entrySet().iterator();
- cObject ref;
-
- while (iter.hasNext())
+ synchronized (objects)
{
- item = (Map.Entry) iter.next();
- ref = (cObject) item.getValue();
- if (stored_object.equals(ref.object))
- return ref;
+ Map.Entry item;
+ Iterator iter = objects.entrySet().iterator();
+ cObject ref;
+
+ while (iter.hasNext())
+ {
+ item = (Map.Entry) iter.next();
+ ref = (cObject) item.getValue();
+ if (stored_object.equals(ref.object) ||
+ stored_object._is_equivalent(ref.object)
+ )
+ return ref;
+ }
}
+
return null;
}
@@ -144,7 +159,7 @@ public class Connected_objects
*/
public cObject add(org.omg.CORBA.Object object, int port)
{
- return add(generateObjectKey(object), object, port);
+ return add(generateObjectKey(object), object, port, null);
}
/**
@@ -155,10 +170,15 @@ public class Connected_objects
* @param port the port, on that the ORB will be listening on the
* remote invocations.
*/
- public cObject add(byte[] key, org.omg.CORBA.Object object, int port)
+ public cObject add(byte[] key, org.omg.CORBA.Object object, int port,
+ java.lang.Object identity
+ )
{
- cObject rec = new cObject(object, port, key);
- objects.put(key, rec);
+ cObject rec = new cObject(object, port, key, identity);
+ synchronized (objects)
+ {
+ objects.put(key, rec);
+ }
return rec;
}
@@ -171,12 +191,14 @@ public class Connected_objects
*/
public cObject get(byte[] key)
{
- return (cObject) objects.get(key);
+ synchronized (objects)
+ {
+ return (cObject) objects.get(key);
+ }
}
/**
* Get the map entry set.
- * @return
*/
public Set entrySet()
{
@@ -190,9 +212,12 @@ public class Connected_objects
*/
public void remove(org.omg.CORBA.Object object)
{
- cObject ref = getKey(object);
- if (ref != null)
- objects.remove(ref.key);
+ synchronized (objects)
+ {
+ cObject ref = getKey(object);
+ if (ref != null)
+ objects.remove(ref.key);
+ }
}
/**
diff --git a/gnu/CORBA/DefinitionKindHolder.java b/gnu/CORBA/DefinitionKindHolder.java
index dc6dcc0be..1ef7350dd 100644
--- a/gnu/CORBA/DefinitionKindHolder.java
+++ b/gnu/CORBA/DefinitionKindHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/DuplicateNameHolder.java b/gnu/CORBA/DuplicateNameHolder.java
new file mode 100644
index 000000000..ad004bc41
--- /dev/null
+++ b/gnu/CORBA/DuplicateNameHolder.java
@@ -0,0 +1,106 @@
+/* DuplicateNameHolder.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA;
+
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+import org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName;
+import org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateNameHelper;
+
+/**
+* A holder for the exception {@link DuplicateName}.
+
+* @author Audrius Meskauskas, Lithiania (AudriusA@Bioinformatics.org)
+*/
+public class DuplicateNameHolder
+ implements Streamable
+{
+ /**
+ * The stored DuplicateName value.
+ */
+ public DuplicateName value;
+
+ /**
+ * Create the unitialised instance, leaving the value field
+ * with default <code>null</code> value.
+ */
+ public DuplicateNameHolder()
+ {
+ }
+
+ /**
+ * Create the initialised instance.
+ * @param initialValue the value that will be assigned to
+ * the <code>value</code> field.
+ */
+ public DuplicateNameHolder(DuplicateName initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the {@link value} by data from the CDR stream.
+ *
+ * @param input the org.omg.CORBA.portable stream to read.
+ */
+ public void _read(InputStream input)
+ {
+ value = DuplicateNameHelper.read(input);
+ }
+
+ /**
+ * Write the stored value into the CDR stream.
+ *
+ * @param output the org.omg.CORBA.portable stream to write.
+ */
+ public void _write(OutputStream output)
+ {
+ DuplicateNameHelper.write(output, value);
+ }
+
+ /**
+ * Get the typecode of the DuplicateName.
+ */
+ public TypeCode _type()
+ {
+ return DuplicateNameHelper.type();
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/DynAn/NameValuePairHolder.java b/gnu/CORBA/DynAn/NameValuePairHolder.java
index 13ea8cf70..7afc81cd4 100644
--- a/gnu/CORBA/DynAn/NameValuePairHolder.java
+++ b/gnu/CORBA/DynAn/NameValuePairHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/EmptyExceptionHolder.java b/gnu/CORBA/EmptyExceptionHolder.java
new file mode 100644
index 000000000..890ca5fe5
--- /dev/null
+++ b/gnu/CORBA/EmptyExceptionHolder.java
@@ -0,0 +1,132 @@
+/* EmptyStructHolder.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.UNKNOWN;
+import org.omg.CORBA.UnknownUserException;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+
+/**
+ * This holder can store any CORBA exception that has no user defined fields.
+ * Only the repository ID is written when the method {@link #_write} is called.
+ * The _read method is not supported for this holder.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class EmptyExceptionHolder
+ implements Streamable
+{
+ /**
+ * The wrapped exception.
+ */
+ public Throwable value;
+
+ /**
+ * The typecode of the wrapped exception.
+ */
+ public TypeCode typecode;
+
+ /**
+ * Create the exception holder, initialised to the given values.
+ *
+ * @param an_exception the wrapped exception.
+ * @param an_id the exception repository id.
+ */
+ public EmptyExceptionHolder(Throwable an_exception, TypeCode a_typecode)
+ {
+ value = an_exception;
+ typecode = a_typecode;
+ }
+
+ /**
+ * Reads the exception from the input stream.
+ *
+ * The value field obtains the value of either the read exception or
+ * the UNKNOWN if the repository ID does not match
+ * the exception from the reachable code.
+ */
+ public void _read(InputStream input)
+ {
+ String id = input.read_string();
+ Object ex = ObjectCreator.Idl2Object(id);
+ if (ex == null)
+ value = new UNKNOWN(id);
+ else
+ value = (Throwable) ex;
+ }
+
+ /**
+ * Return the typecode of the stored exception.
+ *
+ * @return the value, passed as a_typecode in constructor.
+ */
+ public TypeCode _type()
+ {
+ return typecode;
+ }
+
+ /**
+ * Write the exception into the give output stream. Writes the
+ * repository id that is taken from the typecode. This method also
+ * works when no helper class is available.
+ *
+ * @param output a stream to write into.
+ *
+ * @throws BAD_OPERATION if the value for the holder is not set or
+ * the typecode cannot provide repository id.
+ */
+ public void _write(OutputStream output)
+ {
+ try
+ {
+ output.write_string(typecode.id());
+ }
+ catch (Exception ex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION();
+ bad.initCause(ex);
+ throw bad;
+ }
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/ExceptionCreator.java b/gnu/CORBA/ExceptionCreator.java
index 724eb86d4..536053cef 100644
--- a/gnu/CORBA/ExceptionCreator.java
+++ b/gnu/CORBA/ExceptionCreator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/ForwardRequestHelper.java b/gnu/CORBA/ForwardRequestHelper.java
new file mode 100644
index 000000000..74666aaf6
--- /dev/null
+++ b/gnu/CORBA/ForwardRequestHelper.java
@@ -0,0 +1,160 @@
+/* ForwardRequestHelper.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA;
+
+import gnu.CORBA.Poa.ForwardRequestHolder;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.ObjectHelper;
+import org.omg.CORBA.StructMember;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.PortableServer.ForwardRequest;
+
+/**
+ * The helper operations for the exception {@link ForwardRequest}.
+ *
+ * @specnote The helper must be here and not in POA subpackage as it must
+ * be discovered by the {@link ObjectCreator} when reading this remote
+ * exception.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class ForwardRequestHelper
+{
+ /**
+ * The cached typecode value, computed only once.
+ */
+ private static TypeCode typeCode;
+
+ /**
+ * Extract the ForwardRequest from given Any.
+ * This method uses the ForwardRequestHolder.
+ *
+ * @throws BAD_OPERATION if the passed Any does not contain ForwardRequest.
+ */
+ public static ForwardRequest extract(Any any)
+ {
+ try
+ {
+ return ((ForwardRequestHolder) any.extract_Streamable()).value;
+ }
+ catch (ClassCastException cex)
+ {
+ BAD_OPERATION bad = new BAD_OPERATION("ForwardRequest expected");
+ bad.initCause(cex);
+ throw bad;
+ }
+ }
+
+ /**
+ * Get the ForwardRequest repository id.
+ *
+ * @return "ForwardRequest", always.
+ */
+ public static String id()
+ {
+ return "ForwardRequest";
+ }
+
+ /**
+ * Insert the ForwardRequest into the given Any.
+ * This method uses the ForwardRequestHolder.
+ *
+ * @param any the Any to insert into.
+ * @param that the ForwardRequest to insert.
+ */
+ public static void insert(Any any, ForwardRequest that)
+ {
+ any.insert_Streamable(new ForwardRequestHolder(that));
+ }
+
+ /**
+ * Read the exception from the CDR intput stream.
+ *
+ * @param input a org.omg.CORBA.portable stream to read from.
+ */
+ public static ForwardRequest read(InputStream input)
+ {
+ // Read the exception repository id.
+ String id = input.read_string();
+ ForwardRequest value = new ForwardRequest();
+
+ value.forward_reference = input.read_Object();
+ return value;
+ }
+
+ /**
+ * Create the ForwardRequest typecode (structure,
+ * named "ForwardRequest").
+ * The typecode states that the structure contains the
+ * following fields: forward_reference.
+ */
+ public static TypeCode type()
+ {
+ if (typeCode == null)
+ {
+ ORB orb = ORB.init();
+ StructMember[] members = new StructMember[ 1 ];
+
+ TypeCode field;
+
+ field = ObjectHelper.type();
+ members [ 0 ] = new StructMember("forward_reference", field, null);
+ typeCode = orb.create_exception_tc(id(), "ForwardRequest", members);
+ }
+ return typeCode;
+ }
+
+ /**
+ * Write the exception to the CDR output stream.
+ *
+ * @param output a org.omg.CORBA.portable stream stream to write into.
+ * @param value a value to write.
+ */
+ public static void write(OutputStream output, ForwardRequest value)
+ {
+ // Write the exception repository id.
+ output.write_string(id());
+ output.write_Object(value.forward_reference);
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Functional_ORB.java b/gnu/CORBA/Functional_ORB.java
index 437f420c4..c8d6a4c93 100644
--- a/gnu/CORBA/Functional_ORB.java
+++ b/gnu/CORBA/Functional_ORB.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,13 +40,14 @@ package gnu.CORBA;
import gnu.CORBA.CDR.cdrBufInput;
import gnu.CORBA.CDR.cdrBufOutput;
+import gnu.CORBA.GIOP.CloseMessage;
import gnu.CORBA.GIOP.ErrorMessage;
import gnu.CORBA.GIOP.MessageHeader;
import gnu.CORBA.GIOP.ReplyHeader;
import gnu.CORBA.GIOP.RequestHeader;
import gnu.CORBA.NamingService.NamingServiceTransient;
+import gnu.CORBA.Poa.gnuForwardRequest;
-import org.omg.CORBA.BAD_INV_ORDER;
import org.omg.CORBA.BAD_OPERATION;
import org.omg.CORBA.BAD_PARAM;
import org.omg.CORBA.CompletionStatus;
@@ -77,6 +78,7 @@ import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Enumeration;
+import java.util.Hashtable;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Map;
@@ -86,7 +88,9 @@ import java.util.TreeMap;
/**
* The ORB implementation, capable to handle remote invocations on the
- * registered object.
+ * registered object. This class implements all features, required till
+ * the jdk 1.3 inclusive, but does not support the POA that appears since
+ * 1.4. The POA is supported by {@link gnu.CORBA.Poa.ORB_1_4}.
*
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
@@ -154,7 +158,7 @@ public class Functional_ORB
{
try
{
- serve(this, service);
+ tick();
}
catch (SocketException ex)
{
@@ -179,6 +183,16 @@ public class Functional_ORB
}
/**
+ * Perform a single serving step.
+ * @throws java.lang.Exception
+ */
+ void tick()
+ throws Exception
+ {
+ serve(this, service);
+ }
+
+ /**
* Forcibly close the server socket and mark this port as free.
*/
public void close_now()
@@ -205,6 +219,40 @@ public class Functional_ORB
}
/**
+ * A server, responsible for listening on requests on some
+ * local port and serving multiple requests (probably to the
+ * different objects) on the same thread.
+ */
+ class sharedPortServer
+ extends portServer
+ {
+ /**
+ * Create a new portServer, serving on specific port.
+ */
+ sharedPortServer(int _port)
+ {
+ super(_port);
+ }
+
+ /**
+ * Perform a single serving step.
+ * @throws java.lang.Exception
+ */
+ void tick()
+ throws Exception
+ {
+ Socket request = service.accept();
+ serveStep(request, false);
+ }
+ }
+
+ /**
+ * The default value where the first instance of this ORB will start
+ * looking for a free port.
+ */
+ public static int DEFAULT_INITIAL_PORT = 1126;
+
+ /**
* The property of port, on that this ORB is listening for requests from clients.
* This class supports one port per ORB only.
*/
@@ -266,7 +314,7 @@ public class Functional_ORB
*/
private int TOUT_START_READING_MESSAGE = 20 * 1000;
- // (Here and below, we use * to make meaning of the constant clearler).
+ // (Here and below, we use * to make the meaning of the constant clearler).
/**
* If the client has started to send the request message, the socket time
@@ -285,17 +333,11 @@ public class Functional_ORB
* Some clients tend to submit multiple requests over the
* same socket. The server waits for the next request on
* the same socket for the duration, specified
- * below. The default time is seven seconds.
- */
- public int TANDEM_REQUESTS = 7000;
-
- /**
- * If the maximal number of threads per object is reached,
- * the server waits for the given time interval before checking
- * again maybe some threads are already complete.
- * Thr default time is 0.5 second.
+ * below. In additions, the request of this implementation also
+ * waits for the same duration before closing the socket.
+ * The default time is seven seconds.
*/
- public int PAUSE_ON_THREAD_OVERLOAD = 500;
+ public static int TANDEM_REQUESTS = 7000;
/**
* The map of the already conncted objects.
@@ -318,7 +360,7 @@ public class Functional_ORB
/**
* The map of the initial references.
*/
- private Map initial_references = new TreeMap();
+ protected Map initial_references = new TreeMap();
/**
* The currently active portServers.
@@ -331,13 +373,14 @@ public class Functional_ORB
private String ns_host;
/**
- * The port, under that the ORB is listening for remote requests.
- * Then the new object is connected, this port is used first, then
- * it is incremented by 1, etc. If the given port is not available,
- * up to 20 subsequent values are tried and then the parameterless
- * server socket contructor is called.
+ * Probably free port, under that the ORB will try listening for
+ * remote requests first. When the new object is connected, this
+ * port is used first, then it is incremented by 1, etc. If the given
+ * port is not available, up to 20 subsequent values are tried and then
+ * the parameterless server socket contructor is called. The constant is
+ * shared between multiple instances of this ORB.
*/
- private static int Port = 1126;
+ private static int Port = DEFAULT_INITIAL_PORT;
/**
* The port, on that the name service is expected to be running.
@@ -356,6 +399,11 @@ public class Functional_ORB
protected LinkedList freed_ports = new LinkedList();
/**
+ * Maps a single-threaded POAs to they sharedPortServants.
+ */
+ protected Hashtable identities = new Hashtable();
+
+ /**
* The maximal allowed number of the currently running parallel
* threads per object. For security reasons, this is made private and
* unchangeable. After exceeding this limit, the NO_RESOURCES
@@ -371,6 +419,7 @@ public class Functional_ORB
try
{
LOCAL_HOST = ns_host = InetAddress.getLocalHost().getHostAddress();
+ initial_references.put("CodecFactory", new gnuCodecFactory(this));
}
catch (UnknownHostException ex)
{
@@ -471,31 +520,17 @@ public class Functional_ORB
/**
* Set the port, on that the server is listening for the client requests.
- * In this implementation, the server is listening at only one port,
- * the default value being 1126.
+ * If only one object is connected to the orb, the server will be
+ * try listening on this port first. It the port is busy, or if more
+ * objects are connected, the subsequent object will receive a larger
+ * port values, skipping unavailable ports, if required. The change
+ * applies globally.
*
* @param a_Port a port, on that the server is listening for requests.
- *
- * @throws BAD_INV_ORDER if the server has already been started. The port
- * can only be changed when the server is not yet started.
- */
- public void setPort(int a_Port)
- {
- if (running)
- throw new BAD_INV_ORDER("The server is running");
- this.Port = a_Port;
- }
-
- /**
- * Get the port, on that the server is listening for the client requests.
- * In this implementation, the server is listening at only one port,
- * the default value being 1126.
- *
- * @return the port.
*/
- public int getPort()
+ public static void setPort(int a_Port)
{
- return Port;
+ Port = a_Port;
}
/**
@@ -547,7 +582,8 @@ public class Functional_ORB
{
int a_port = getFreePort();
- Connected_objects.cObject ref = connected_objects.add(key, object, a_port);
+ Connected_objects.cObject ref =
+ connected_objects.add(key, object, a_port, null);
IOR ior = createIOR(ref);
prepareObject(object, ior);
if (running)
@@ -555,11 +591,57 @@ public class Functional_ORB
}
/**
+ * Connect the given CORBA object to this ORB, explicitly specifying
+ * the object key and the identity of the thread (and port), where the
+ * object must be served. The identity is normally the POA.
+ *
+ * The new port server will be started only if there is no one
+ * already running for the same identity. Otherwise, the task of
+ * the existing port server will be widened, including duty to serve
+ * the given object. All objects, connected to a single identity by
+ * this method, will process they requests subsequently in the same
+ * thread. The method is used when the expected number of the
+ * objects is too large to have a single port and thread per object.
+ * This method is used by POAs, having a single thread policy.
+ *
+ * @param object the object, must implement the {@link InvokeHandler})
+ * interface.
+ * @param key the object key, usually used to identify the object from
+ * remote side.
+ * @param port the port, where the object must be connected.
+ *
+ * @throws BAD_PARAM if the object does not implement the
+ * {@link InvokeHandler}).
+ */
+ public void connect_1_thread(org.omg.CORBA.Object object, byte[] key,
+ java.lang.Object identity
+ )
+ {
+ sharedPortServer shared = (sharedPortServer) identities.get(identity);
+ if (shared == null)
+ {
+ int a_port = getFreePort();
+ shared = new sharedPortServer(a_port);
+ identities.put(identity, shared);
+ if (running)
+ {
+ portServers.add(shared);
+ shared.start();
+ }
+ }
+
+ Connected_objects.cObject ref =
+ connected_objects.add(key, object, shared.s_port, identity);
+ IOR ior = createIOR(ref);
+ prepareObject(object, ior);
+ }
+
+ /**
* Start the service on the given port of this IOR.
*
* @param ior the ior (only Internet.port is used).
*/
- private void startService(IOR ior)
+ public void startService(IOR ior)
{
portServer p = new portServer(ior.Internet.port);
portServers.add(p);
@@ -620,7 +702,7 @@ public class Functional_ORB
for (int i = 0; i < portServers.size(); i++)
{
p = (portServer) portServers.get(i);
- if (p.s_port == rmKey.port)
+ if (p.s_port == rmKey.port && !(p instanceof sharedPortServer))
{
p.close_now();
freed_ports.addFirst(new Integer(rmKey.port));
@@ -632,6 +714,41 @@ public class Functional_ORB
}
/**
+ * Notifies ORB that the shared service indentity (usually POA)
+ * is destroyed. The matching shared port server is terminated
+ * and the identity table entry is deleted. If this identity
+ * is not known for this ORB, the method returns without action.
+ *
+ * @param identity the identity that has been destroyed.
+ */
+ public void identityDestroyed(java.lang.Object identity)
+ {
+ if (identity == null)
+ return;
+
+ sharedPortServer ise = (sharedPortServer) identities.get(identity);
+ if (ise != null)
+ synchronized (connected_objects)
+ {
+ ise.close_now();
+ identities.remove(identity);
+
+ Connected_objects.cObject obj;
+ Map.Entry m;
+ Iterator iter = connected_objects.entrySet().iterator();
+ while (iter.hasNext())
+ {
+ m = (Map.Entry) iter.next();
+ obj = (Connected_objects.cObject) m.getValue();
+ if (obj.identity == identity)
+ {
+ iter.remove();
+ }
+ }
+ }
+ }
+
+ /**
* Find the local object, connected to this ORB.
*
* @param ior the ior of the potentially local object.
@@ -769,19 +886,31 @@ public class Functional_ORB
m = (Map.Entry) iter.next();
obj = (Connected_objects.cObject) m.getValue();
- portServer subserver = new portServer(obj.port);
- portServers.add(subserver);
+ portServer subserver;
- // Reuse the current thread for the last portServer.
- if (!iter.hasNext())
+ if (obj.identity == null)
{
- // Discard the iterator, eliminating lock checks.
- iter = null;
- subserver.run();
- return;
+ subserver = new portServer(obj.port);
+ portServers.add(subserver);
}
else
- subserver.start();
+ {
+ subserver = (portServer) identities.get(obj.identity);
+ }
+
+ if (!subserver.isAlive())
+ {
+ // Reuse the current thread for the last portServer.
+ if (!iter.hasNext())
+ {
+ // Discard the iterator, eliminating lock checks.
+ iter = null;
+ subserver.run();
+ return;
+ }
+ else
+ subserver.start();
+ }
}
}
@@ -839,7 +968,7 @@ public class Functional_ORB
}
object = impl;
- connected_objects.add(ior.key, impl, ior.Internet.port);
+ connected_objects.add(ior.key, impl, ior.Internet.port, null);
}
return object;
}
@@ -1029,10 +1158,12 @@ public class Functional_ORB
private void prepareObject(org.omg.CORBA.Object object, IOR ior)
throws BAD_PARAM
{
+ /*
if (!(object instanceof InvokeHandler))
throw new BAD_PARAM(object.getClass().getName() +
" does not implement InvokeHandler. "
);
+ */
// If no delegate is set, set the default delegate.
if (object instanceof ObjectImpl)
@@ -1109,6 +1240,43 @@ public class Functional_ORB
}
/**
+ * Forward request to another target, as indicated by the passed
+ * exception.
+ */
+ private void forward_request(OutputStream net_out, MessageHeader msh_request,
+ RequestHeader rh_request, gnuForwardRequest info
+ )
+ throws IOException
+ {
+ MessageHeader msh_forward = new MessageHeader();
+ msh_forward.version = msh_request.version;
+
+ ReplyHeader rh_forward = msh_forward.create_reply_header();
+ msh_forward.message_type = MessageHeader.REPLY;
+ rh_forward.reply_status = info.forwarding_code;
+ rh_forward.request_id = rh_request.request_id;
+
+ // The forwarding code is either LOCATION_FORWARD or LOCATION_FORWARD_PERM.
+ cdrBufOutput out = new cdrBufOutput();
+ out.setOrb(this);
+ out.setOffset(msh_forward.getHeaderSize());
+
+ rh_forward.write(out);
+
+ if (msh_forward.version.since_inclusive(1, 2))
+ out.align(8);
+
+ out.write_Object(info.forward_reference);
+
+ msh_forward.message_size = out.buffer.size();
+
+ // Write the forwarding instruction.
+ msh_forward.write(net_out);
+ out.buffer.writeTo(net_out);
+ net_out.flush();
+ }
+
+ /**
* Contains a single servicing task.
*
* Normally, each task matches a single remote invocation.
@@ -1127,9 +1295,10 @@ public class Functional_ORB
service = serverSocket.accept();
// Tell the server there are no more resources.
- while (p.running_threads >= MAX_RUNNING_THREADS)
+ if (p.running_threads >= MAX_RUNNING_THREADS)
{
serveStep(service, true);
+ return;
}
new Thread()
@@ -1256,6 +1425,18 @@ public class Functional_ORB
throw new OBJECT_NOT_EXIST();
target._invoke(rh_request.operation, cin, handler);
}
+ catch (gnuForwardRequest forwarded)
+ {
+ OutputStream sou = service.getOutputStream();
+ forward_request(sou, msh_request, rh_request, forwarded);
+ if (service != null && !service.isClosed())
+ {
+ // Wait for the subsequent invocations on the
+ // same socket for the TANDEM_REQUEST duration.
+ service.setSoTimeout(TANDEM_REQUESTS);
+ continue Serving;
+ }
+ }
catch (SystemException ex)
{
sysEx = ex;
@@ -1266,6 +1447,7 @@ public class Functional_ORB
}
catch (Exception except)
{
+ except.printStackTrace();
sysEx =
new UNKNOWN("Unknown", 2, CompletionStatus.COMPLETED_MAYBE);
@@ -1284,14 +1466,21 @@ public class Functional_ORB
);
}
}
- else
- ;
+ else if (msh_request.message_type == MessageHeader.CLOSE_CONNECTION ||
+ msh_request.message_type == MessageHeader.MESSAGE_ERROR
+ )
+ {
+ CloseMessage.close(service.getOutputStream());
+ service.close();
+ return;
+ }
+ ;
// TODO log error: "Not a request message."
if (service != null && !service.isClosed())
{
// Wait for the subsequent invocations on the
- // same socket for 2 minutes.
+ // same socket for the TANDEM_REQUEST duration.
service.setSoTimeout(TANDEM_REQUESTS);
}
else
diff --git a/gnu/CORBA/GIOP/CancelHeader.java b/gnu/CORBA/GIOP/CancelHeader.java
index d40a32fe6..9f4de0d87 100644
--- a/gnu/CORBA/GIOP/CancelHeader.java
+++ b/gnu/CORBA/GIOP/CancelHeader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/GIOP/CharSets_OSF.java b/gnu/CORBA/GIOP/CharSets_OSF.java
index 7690f3a00..f3f35dbaa 100644
--- a/gnu/CORBA/GIOP/CharSets_OSF.java
+++ b/gnu/CORBA/GIOP/CharSets_OSF.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/GIOP/CloseMessage.java b/gnu/CORBA/GIOP/CloseMessage.java
new file mode 100644
index 000000000..d884329c4
--- /dev/null
+++ b/gnu/CORBA/GIOP/CloseMessage.java
@@ -0,0 +1,102 @@
+/* CloseMessage.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.GIOP;
+
+import gnu.CORBA.IOR;
+
+import org.omg.CORBA.MARSHAL;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import java.net.Socket;
+
+/**
+ * The explicit command to close the connection.
+ *
+ *
+ * The close message consists from the message header only and
+ * is the same for GIOP 1.0, 1.1, 1.2 and 1.3. The CloseMessage
+ * uses the default value from the {@link MessageHeader}.
+ *
+ * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ */
+public class CloseMessage
+ extends MessageHeader
+{
+ /**
+ * The singleton close message is typically enough, despite new
+ * instances may be instantiated if the specific version field
+ * value is mandatory.
+ */
+ private static final CloseMessage Singleton = new CloseMessage();
+
+ /**
+ * Create a new error message, setting the message field
+ * to the {@link MESSAGE_CLOSE} and the version number to
+ * the given major and minor values.
+ */
+ public CloseMessage()
+ {
+ message_type = CLOSE_CONNECTION;
+ }
+
+ /**
+ * Send the close message to the given output stream. The method,
+ * however, does not close the socket itself, this must be done
+ * explicitly in the calling code.
+ *
+ * @param socketStream a stream, where the close message is
+ * written.
+ */
+ public static void close(OutputStream socketStream)
+ {
+ try
+ {
+ Singleton.write(socketStream);
+ socketStream.flush();
+ }
+ catch (IOException ex)
+ {
+ MARSHAL m = new MARSHAL("Unable to flush the stream");
+ m.initCause(ex);
+ throw m;
+ }
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/GIOP/ErrorMessage.java b/gnu/CORBA/GIOP/ErrorMessage.java
index 0da5f649c..8d3b3539b 100644
--- a/gnu/CORBA/GIOP/ErrorMessage.java
+++ b/gnu/CORBA/GIOP/ErrorMessage.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/GIOP/MessageHeader.java b/gnu/CORBA/GIOP/MessageHeader.java
index 7640b6bfd..61c46e11e 100644
--- a/gnu/CORBA/GIOP/MessageHeader.java
+++ b/gnu/CORBA/GIOP/MessageHeader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/GIOP/ReplyHeader.java b/gnu/CORBA/GIOP/ReplyHeader.java
index 76c6df944..1e0e154f8 100644
--- a/gnu/CORBA/GIOP/ReplyHeader.java
+++ b/gnu/CORBA/GIOP/ReplyHeader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/GIOP/RequestHeader.java b/gnu/CORBA/GIOP/RequestHeader.java
index 77ef6dd97..f2de4e271 100644
--- a/gnu/CORBA/GIOP/RequestHeader.java
+++ b/gnu/CORBA/GIOP/RequestHeader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/GIOP/ServiceContext.java b/gnu/CORBA/GIOP/ServiceContext.java
index d14eabbc9..7e44bdcea 100644
--- a/gnu/CORBA/GIOP/ServiceContext.java
+++ b/gnu/CORBA/GIOP/ServiceContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/GIOP/cxCodeSet.java b/gnu/CORBA/GIOP/cxCodeSet.java
index 0fbf00bfe..7f42c07f2 100644
--- a/gnu/CORBA/GIOP/cxCodeSet.java
+++ b/gnu/CORBA/GIOP/cxCodeSet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/GIOP/v1_0/CancelHeader.java b/gnu/CORBA/GIOP/v1_0/CancelHeader.java
index 5b07e89ad..6e3650c4b 100644
--- a/gnu/CORBA/GIOP/v1_0/CancelHeader.java
+++ b/gnu/CORBA/GIOP/v1_0/CancelHeader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/GIOP/v1_0/ReplyHeader.java b/gnu/CORBA/GIOP/v1_0/ReplyHeader.java
index 74512d617..27181ca63 100644
--- a/gnu/CORBA/GIOP/v1_0/ReplyHeader.java
+++ b/gnu/CORBA/GIOP/v1_0/ReplyHeader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/GIOP/v1_0/RequestHeader.java b/gnu/CORBA/GIOP/v1_0/RequestHeader.java
index dd3e20349..ffa45c37b 100644
--- a/gnu/CORBA/GIOP/v1_0/RequestHeader.java
+++ b/gnu/CORBA/GIOP/v1_0/RequestHeader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/GIOP/v1_2/ReplyHeader.java b/gnu/CORBA/GIOP/v1_2/ReplyHeader.java
index 87c97b3ec..c3f51a37b 100644
--- a/gnu/CORBA/GIOP/v1_2/ReplyHeader.java
+++ b/gnu/CORBA/GIOP/v1_2/ReplyHeader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/GIOP/v1_2/RequestHeader.java b/gnu/CORBA/GIOP/v1_2/RequestHeader.java
index 184893bb3..d294d0067 100644
--- a/gnu/CORBA/GIOP/v1_2/RequestHeader.java
+++ b/gnu/CORBA/GIOP/v1_2/RequestHeader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/IOR.java b/gnu/CORBA/IOR.java
index 056009f06..cedbce461 100644
--- a/gnu/CORBA/IOR.java
+++ b/gnu/CORBA/IOR.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -371,6 +371,13 @@ public class IOR
* thansferred in this form in
* {@link write_Object(org.omg.CORBA.Object)}.
*
+ * If the stream contains a null value, the Id and Internet fields become
+ * equal to null. Otherwise Id contains some string (possibly
+ * empty).
+ *
+ * Id is checked for null in cdrInput that then returns
+ * null instead of object.
+ *
* @param c a stream to read from.
* @throws IOException if the stream throws it.
*/
@@ -381,6 +388,13 @@ public class IOR
int n_profiles = c.read_long();
+ if (n_profiles == 0)
+ {
+ Id = null;
+ Internet = null;
+ return;
+ }
+
for (int i = 0; i < n_profiles; i++)
{
int tag = c.read_long();
@@ -435,6 +449,21 @@ public class IOR
}
/**
+ * Write a null value to the CDR output stream.
+ *
+ * The null value is written as defined in OMG specification
+ * (zero length string, followed by an empty set of profiles).
+ */
+ public static void write_null(cdrOutput out)
+ {
+ // Empty Id string.
+ out.write_string("");
+
+ // Empty set of profiles.
+ out.write_long(0);
+ }
+
+ /**
* Write this IOR record to the provided CDR stream. The procedure
* writed data in Big Endian, but does NOT add any endian marker
* to the beginning.
diff --git a/gnu/CORBA/IOR_Delegate.java b/gnu/CORBA/IOR_Delegate.java
index 5b02fc2db..e3fde60ee 100644
--- a/gnu/CORBA/IOR_Delegate.java
+++ b/gnu/CORBA/IOR_Delegate.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,7 +40,9 @@ package gnu.CORBA;
import gnu.CORBA.CDR.cdrBufInput;
import gnu.CORBA.GIOP.ReplyHeader;
+import gnu.CORBA.Poa.activeObjectMap;
+import org.omg.CORBA.CompletionStatus;
import org.omg.CORBA.Context;
import org.omg.CORBA.ContextList;
import org.omg.CORBA.ExceptionList;
@@ -56,6 +58,8 @@ import org.omg.CORBA.portable.RemarshalException;
import java.io.IOException;
+import java.net.Socket;
+
/**
* The Classpath implementation of the {@link Delegate} functionality in the
* case, when the object was constructed from an IOR object. The IOR can be
@@ -69,6 +73,17 @@ public class IOR_Delegate
extends Simple_delegate
{
/**
+ * True if the current IOR does not map into the local servant.
+ * If false, the IOR is either local or should be checked.
+ */
+ boolean remote_ior;
+
+ /**
+ * If not null, this field contains data about the local servant.
+ */
+ activeObjectMap.Obj local_ior;
+
+ /**
* Contructs an instance of object using the given IOR.
*/
public IOR_Delegate(ORB an_orb, IOR an_ior)
@@ -94,7 +109,7 @@ public class IOR_Delegate
NamedValue returns
)
{
- gnuRequest request = new gnuRequest();
+ gnuRequest request = getRequestInstance(target);
request.setIor(getIor());
request.set_target(target);
@@ -125,7 +140,7 @@ public class IOR_Delegate
ContextList ctx_list
)
{
- gnuRequest request = new gnuRequest();
+ gnuRequest request = getRequestInstance(target);
request.setIor(ior);
request.set_target(target);
@@ -142,8 +157,19 @@ public class IOR_Delegate
}
/**
- * Invoke operation on the given object, writing parameters to the given
- * output stream.
+ * Get the instance of request.
+ */
+ protected gnuRequest getRequestInstance(org.omg.CORBA.Object target)
+ {
+ return new gnuRequest();
+ }
+
+ /**
+ * Invoke operation on the given object, als handling temproray and permanent
+ * redirections. The ReplyHeader.LOCATION_FORWARD will cause to resend
+ * the request to the new direction. The ReplyHeader.LOCATION_FORWARD_PERM
+ * will cause additionally to remember the new location by this delegate,
+ * so subsequent calls will be immediately delivered to the new target.
*
* @param target the target object.
* @param output the output stream, previously returned by
@@ -211,21 +237,56 @@ public class IOR_Delegate
}
catch (IOException ex)
{
- MARSHAL t = new MARSHAL("Cant read forwarding info");
+ MARSHAL t =
+ new MARSHAL("Cant read forwarding info", 5102,
+ CompletionStatus.COMPLETED_NO
+ );
t.initCause(ex);
throw t;
}
- request.request.setIor(forwarded);
+ gnuRequest prev = request.request;
+ gnuRequest r = getRequestInstance(target);
- // If the object has moved permanently, its IOR is replaced.
- if (moved_permanently)
- setIor(forwarded);
+ r.m_args = prev.m_args;
+ r.m_context = prev.m_context;
+ r.m_context_list = prev.m_context_list;
+ r.m_environment = prev.m_environment;
+ r.m_exceptions = prev.m_exceptions;
+ r.m_operation = prev.m_operation;
+ r.m_parameter_buffer = prev.m_parameter_buffer;
+ r.m_parameter_buffer.request = r;
+ r.m_result = prev.m_result;
+ r.m_target = prev.m_target;
+ r.oneWay = prev.oneWay;
+ r.setIor(forwarded);
- return invoke(target, request);
+ IOR_contructed_object it =
+ new IOR_contructed_object(orb, forwarded);
+
+ r.m_target = it;
+
+ request.request = r;
+
+ IOR prev_ior = getIor();
+
+ setIor(forwarded);
+
+ try
+ {
+ return invoke(it, request);
+ }
+ finally
+ {
+ if (!moved_permanently)
+ setIor(prev_ior);
+ }
default :
- throw new MARSHAL("Unknow reply status: " + rh.reply_status);
+ throw new MARSHAL("Unknow reply status: " + rh.reply_status,
+ 8000 + rh.reply_status,
+ CompletionStatus.COMPLETED_NO
+ );
}
}
else
@@ -245,7 +306,7 @@ public class IOR_Delegate
*/
public Request request(org.omg.CORBA.Object target, String operation)
{
- gnuRequest request = new gnuRequest();
+ gnuRequest request = getRequestInstance(target);
request.setIor(ior);
request.set_target(target);
@@ -270,7 +331,7 @@ public class IOR_Delegate
boolean response_expected
)
{
- gnuRequest request = new gnuRequest();
+ gnuRequest request = getRequestInstance(target);
request.setIor(ior);
request.set_target(target);
@@ -281,4 +342,53 @@ public class IOR_Delegate
return request.getParameterStream();
}
-}
+
+ /**
+ * If there is an opened cache socket to access this object, close
+ * that socket.
+ *
+ * @param target The target is not used, this delegate requires a
+ * single instance per object.
+ */
+ public void release(org.omg.CORBA.Object target)
+ {
+ String key = ior.Internet.host + ":" + ior.Internet.port;
+
+ Socket socket = SocketRepository.get_socket(key);
+ try
+ {
+ if (socket != null)
+ {
+ socket.close();
+ }
+ }
+ catch (IOException ex)
+ {
+ // do nothing, then.
+ }
+ }
+
+ /**
+ * Reset the remote_ior flag, forcing to check if the object is local
+ * on the next getRequestInstance call.
+ */
+ public void setIor(IOR an_ior)
+ {
+ super.setIor(an_ior);
+ remote_ior = false;
+ local_ior = null;
+ }
+
+ /**
+ * Checks if the ior is local so far it is easy.
+ */
+ public boolean is_local(org.omg.CORBA.Object self)
+ {
+ if (remote_ior)
+ return false;
+ else if (local_ior != null)
+ return true;
+ else
+ return super.is_local(self);
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/IOR_contructed_object.java b/gnu/CORBA/IOR_contructed_object.java
index 5c8ba7350..2fab70799 100644
--- a/gnu/CORBA/IOR_contructed_object.java
+++ b/gnu/CORBA/IOR_contructed_object.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -97,4 +97,13 @@ public class IOR_contructed_object
{
return getClass().getName() + ":IOR:" + ior;
}
-}
+
+ /**
+ * Calls realease on the delegate.
+ */
+ protected void finalize()
+ throws java.lang.Throwable
+ {
+ _get_delegate().release(this);
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/NamingService/Binding_iterator_impl.java b/gnu/CORBA/NamingService/Binding_iterator_impl.java
index 6d00c8529..79d787083 100644
--- a/gnu/CORBA/NamingService/Binding_iterator_impl.java
+++ b/gnu/CORBA/NamingService/Binding_iterator_impl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/NamingService/Ext.java b/gnu/CORBA/NamingService/Ext.java
index 69e11e275..fb7406c46 100644
--- a/gnu/CORBA/NamingService/Ext.java
+++ b/gnu/CORBA/NamingService/Ext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/NamingService/NameValidator.java b/gnu/CORBA/NamingService/NameValidator.java
index 797202fd6..d7d5a14bb 100644
--- a/gnu/CORBA/NamingService/NameValidator.java
+++ b/gnu/CORBA/NamingService/NameValidator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/NamingService/NamingMap.java b/gnu/CORBA/NamingService/NamingMap.java
index d9bbf6a8c..a69b06172 100644
--- a/gnu/CORBA/NamingService/NamingMap.java
+++ b/gnu/CORBA/NamingService/NamingMap.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/NamingService/NamingServiceTransient.java b/gnu/CORBA/NamingService/NamingServiceTransient.java
index 295c0e488..fda46adbb 100644
--- a/gnu/CORBA/NamingService/NamingServiceTransient.java
+++ b/gnu/CORBA/NamingService/NamingServiceTransient.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -104,12 +104,6 @@ public class NamingServiceTransient
{
// Create and initialize the ORB
final Functional_ORB orb = new Functional_ORB();
- orb.setPort(PORT);
- orb.init(args, null);
-
- // Create the servant and register it with the ORB
- NamingContextExt namer = new Ext(new TransientContext());
- orb.connect(namer, getDefaultKey());
if (args.length > 1)
for (int i = 0; i < args.length - 1; i++)
@@ -121,7 +115,11 @@ public class NamingServiceTransient
iorf = args [ i + 1 ];
}
- orb.setPort(port);
+ Functional_ORB.setPort(port);
+
+ // Create the servant and register it with the ORB
+ NamingContextExt namer = new Ext(new TransientContext());
+ orb.connect(namer, getDefaultKey());
// Storing the IOR reference.
String ior = orb.object_to_string(namer);
@@ -145,7 +143,7 @@ public class NamingServiceTransient
{
public void run()
{
- // wait for invocations from clients
+ // Wait for invocations from clients.
orb.run();
}
}.start();
@@ -155,5 +153,8 @@ public class NamingServiceTransient
System.err.println("ERROR: " + e);
e.printStackTrace(System.out);
}
+
+ // Restore the default value for allocating ports for the subsequent objects.
+ Functional_ORB.setPort(Functional_ORB.DEFAULT_INITIAL_PORT);
}
}
diff --git a/gnu/CORBA/NamingService/TransientContext.java b/gnu/CORBA/NamingService/TransientContext.java
index 70deec28a..4b7c1938f 100644
--- a/gnu/CORBA/NamingService/TransientContext.java
+++ b/gnu/CORBA/NamingService/TransientContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/NamingService/cmpNameComponent.java b/gnu/CORBA/NamingService/cmpNameComponent.java
index c8cc03ad7..1e06fb8ee 100644
--- a/gnu/CORBA/NamingService/cmpNameComponent.java
+++ b/gnu/CORBA/NamingService/cmpNameComponent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/NamingService/snConverter.java b/gnu/CORBA/NamingService/snConverter.java
index dc46b7ab3..a9b9219d7 100644
--- a/gnu/CORBA/NamingService/snConverter.java
+++ b/gnu/CORBA/NamingService/snConverter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/ObjectCreator.java b/gnu/CORBA/ObjectCreator.java
index 4b17dbab3..b99c46ba6 100644
--- a/gnu/CORBA/ObjectCreator.java
+++ b/gnu/CORBA/ObjectCreator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -73,7 +73,7 @@ public class ObjectCreator
* The prefix for classes that are placed instide the
* gnu.CORBA namespace.
*/
- public static final String CLASSPATH_PREFIX = "gnu.CORBA";
+ public static final String CLASSPATH_PREFIX = "gnu.CORBA.";
/**
* Try to instantiate an object with the given IDL name.
@@ -184,11 +184,11 @@ public class ObjectCreator
{
try
{
- String holder = toHelperName(idl);
- Class holderClass = Class.forName(holder);
+ String helper = toHelperName(idl);
+ Class helperClass = Class.forName(helper);
Method read =
- holderClass.getMethod("read",
+ helperClass.getMethod("read",
new Class[]
{
org.omg.CORBA.portable.InputStream.class
@@ -266,19 +266,83 @@ public class ObjectCreator
}
/**
+ * Converts the given IDL name to class name and tries to load the
+ * matching class. The OMG prefix (omg.org) is replaced by
+ * the java prefix org.omg. No other prefixes are added.
+ *
+ * @param IDL the idl name.
+ *
+ * TODO Cache the returned classes, avoiding these string manipulations
+ * each time the conversion is required.
+ *
+ * @return the matching class or null if no such is available.
+ */
+ public static Class Idl2class(String IDL)
+ {
+ String s = IDL;
+ int a = s.indexOf(':') + 1;
+ int b = s.lastIndexOf(':');
+
+ s = IDL.substring(a, b);
+
+ if (s.startsWith(OMG_PREFIX))
+ s = JAVA_PREFIX + s.substring(OMG_PREFIX.length());
+
+ String cn = s.replace('/', '.');
+
+ try
+ {
+ return Class.forName(cn);
+ }
+ catch (ClassNotFoundException ex)
+ {
+ return null;
+ }
+ }
+
+ /**
+ * Converts the given IDL name to class name, tries to load the
+ * matching class and create an object instance with parameterless
+ * constructor. The OMG prefix (omg.org) is replaced by
+ * the java prefix org.omg. No other prefixes are added.
+ *
+ * @param IDL the idl name.
+ *
+ * @return instantiated object instance or null if such attempt was not
+ * successful.
+ */
+ public static java.lang.Object Idl2Object(String IDL)
+ {
+ Class cx = Idl2class(IDL);
+
+ try
+ {
+ if (cx != null)
+ return cx.newInstance();
+ else
+ return null;
+ }
+ catch (Exception ex)
+ {
+ return null;
+ }
+ }
+
+ /**
* Convert the class name to IDL name.
*
* @param cn the class name.
*
* @return the idl name.
*/
- protected static String toIDL(String cn)
+ public static String toIDL(String cn)
{
if (cn.startsWith(JAVA_PREFIX))
- cn = cn.substring(JAVA_PREFIX.length());
-
- cn = cn.replace('.', '/');
+ cn = OMG_PREFIX + cn.substring(JAVA_PREFIX.length()).replace('.', '/');
+ else if (cn.startsWith(CLASSPATH_PREFIX))
+ cn =
+ OMG_PREFIX + cn.substring(CLASSPATH_PREFIX.length()).replace('.', '/');
- return "IDL:" + OMG_PREFIX + cn + ":1.0";
+ return "IDL:" + cn + ":1.0";
}
-}
+} \ No newline at end of file
diff --git a/gnu/CORBA/OctetHolder.java b/gnu/CORBA/OctetHolder.java
index 9b0184c16..02fd9a432 100644
--- a/gnu/CORBA/OctetHolder.java
+++ b/gnu/CORBA/OctetHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/Poa/ForwardRequestHolder.java b/gnu/CORBA/Poa/ForwardRequestHolder.java
new file mode 100644
index 000000000..5e2455952
--- /dev/null
+++ b/gnu/CORBA/Poa/ForwardRequestHolder.java
@@ -0,0 +1,107 @@
+/* ForwardRequestHolder.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA.ForwardRequestHelper;
+
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+import org.omg.PortableServer.ForwardRequest;
+
+/**
+* A holder for the exception {@link ForwardRequest}.
+
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class ForwardRequestHolder
+ implements Streamable
+{
+ /**
+ * The stored ForwardRequest value.
+ */
+ public ForwardRequest value;
+
+ /**
+ * Create the unitialised instance, leaving the value field
+ * with default <code>null</code> value.
+ */
+ public ForwardRequestHolder()
+ {
+ }
+
+ /**
+ * Create the initialised instance.
+ * @param initialValue the value that will be assigned to
+ * the <code>value</code> field.
+ */
+ public ForwardRequestHolder(ForwardRequest initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the {@link value} by data from the CDR stream.
+ *
+ * @param input the org.omg.CORBA.portable stream to read.
+ */
+ public void _read(InputStream input)
+ {
+ value = ForwardRequestHelper.read(input);
+ }
+
+ /**
+ * Get the typecode of the ForwardRequest.
+ */
+ public TypeCode _type()
+ {
+ return ForwardRequestHelper.type();
+ }
+
+ /**
+ * Write the stored value into the CDR stream.
+ *
+ * @param output the org.omg.CORBA.portable stream to write.
+ */
+ public void _write(OutputStream output)
+ {
+ ForwardRequestHelper.write(output, value);
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/ForwardedServant.java b/gnu/CORBA/Poa/ForwardedServant.java
new file mode 100644
index 000000000..2df378df6
--- /dev/null
+++ b/gnu/CORBA/Poa/ForwardedServant.java
@@ -0,0 +1,207 @@
+/* ForwardedServant.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA.IOR;
+import gnu.CORBA.IOR_Delegate;
+import gnu.CORBA.IOR_contructed_object;
+
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.CompletionStatus;
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.SystemException;
+import org.omg.CORBA.portable.ApplicationException;
+import org.omg.CORBA.portable.Delegate;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.InvokeHandler;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.RemarshalException;
+import org.omg.CORBA.portable.ResponseHandler;
+import org.omg.PortableServer.POA;
+import org.omg.PortableServer.Servant;
+
+import java.io.IOException;
+
+/**
+ * A "virtual servant", delegating all invocation to the wrapped
+ * object (usually remote). Used in cases when it is necessary to
+ * handle the request forwarding.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class ForwardedServant
+ extends Servant
+ implements InvokeHandler
+{
+ /**
+ * The reference object, handling requests.
+ */
+ public final ObjectImpl ref;
+
+ /**
+ * Create an instance, forwarding requests to the given object.
+ */
+ ForwardedServant(ObjectImpl a_ref)
+ {
+ ref = a_ref;
+ }
+
+ /**
+ * Create an instance of the forwarded servant.
+ *
+ * @param a_ref a reference where request should be forwarded.
+ *
+ * @return a created forwarded servant or null if the parameter
+ * forwards request to itself. Returning null will force to find
+ * a right servant in one of many possible ways, depending on
+ * policies.
+ */
+ public static Servant create(org.omg.CORBA.Object a_ref)
+ {
+ try
+ {
+ ObjectImpl fto = (ObjectImpl) a_ref;
+
+ // Check maybe the remote side forwarded back to our local object.
+ if (fto instanceof IOR_contructed_object)
+ {
+ IOR_contructed_object iref = (IOR_contructed_object) fto;
+
+ // Check maybe the IOR is local.
+ ORB t_orb = iref._orb();
+ if (t_orb instanceof ORB_1_4)
+ {
+ ORB_1_4 orb = (ORB_1_4) t_orb;
+ Delegate d = iref._get_delegate();
+ if (d instanceof IOR_Delegate)
+ {
+ IOR_Delegate ird = (IOR_Delegate) iref._get_delegate();
+ IOR ior = ird.getIor();
+ if (orb.LOCAL_HOST.equalsIgnoreCase(ior.Internet.host))
+ {
+ activeObjectMap.Obj rx = orb.rootPOA.findIorKey(ior.key);
+ if (rx != null)
+ {
+ if (rx.object == fto ||
+ rx.object._is_equivalent(fto)
+ )
+ return rx.primary_servant;
+ else
+ fto = (ObjectImpl) rx.object;
+ }
+ }
+ }
+ }
+ }
+ return new ForwardedServant(fto);
+ }
+ catch (ClassCastException ex)
+ {
+ throw new BAD_PARAM("ObjectImpl required but " + a_ref + " passed ",
+ 0x5005, CompletionStatus.COMPLETED_NO
+ );
+ }
+ }
+
+ /**
+ * Forward the call to the wrapped object.
+ */
+ public OutputStream _invoke(String method, InputStream input,
+ ResponseHandler handler
+ )
+ throws SystemException
+ {
+ org.omg.CORBA.portable.InputStream in = null;
+ org.omg.CORBA.portable.OutputStream out = null;
+ try
+ {
+ try
+ {
+ out = ref._request(method, true);
+
+ // Transfer request information.
+ int b;
+ while ((b = input.read()) >= 0)
+ {
+ out.write(b);
+ }
+ in = ref._invoke(out);
+
+ // Read the returned data.
+ out = handler.createReply();
+ while ((b = in.read()) >= 0)
+ {
+ out.write(b);
+ }
+ }
+ catch (IOException io_ex)
+ {
+ MARSHAL m = new MARSHAL();
+ m.initCause(io_ex);
+ throw m;
+ }
+ }
+ catch (ApplicationException ex)
+ {
+ in = ex.getInputStream();
+
+ String _id = ex.getId();
+ throw new MARSHAL(_id, 5101, CompletionStatus.COMPLETED_NO);
+ }
+ catch (RemarshalException remarsh)
+ {
+ _invoke(method, input, handler);
+ }
+ finally
+ {
+ ref._releaseReply(in);
+ }
+ return out;
+ }
+
+ /**
+ * Delegates to the wrapped object.
+ */
+ public String[] _all_interfaces(POA poa, byte[] key)
+ {
+ return ref._ids();
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/InvalidPolicyHolder.java b/gnu/CORBA/Poa/InvalidPolicyHolder.java
new file mode 100644
index 000000000..154762acf
--- /dev/null
+++ b/gnu/CORBA/Poa/InvalidPolicyHolder.java
@@ -0,0 +1,106 @@
+/* InvalidPolicyHolder.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.Streamable;
+import org.omg.PortableServer.POAPackage.InvalidPolicy;
+import org.omg.PortableServer.POAPackage.InvalidPolicyHelper;
+
+/**
+* A holder for the exception {@link InvalidPolicy}.
+
+* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+*/
+public class InvalidPolicyHolder
+ implements Streamable
+{
+ /**
+ * The stored InvalidPolicy value.
+ */
+ public InvalidPolicy value;
+
+ /**
+ * Create the unitialised instance, leaving the value field
+ * with default <code>null</code> value.
+ */
+ public InvalidPolicyHolder()
+ {
+ }
+
+ /**
+ * Create the initialised instance.
+ * @param initialValue the value that will be assigned to
+ * the <code>value</code> field.
+ */
+ public InvalidPolicyHolder(InvalidPolicy initialValue)
+ {
+ value = initialValue;
+ }
+
+ /**
+ * Fill in the {@link value} by data from the CDR stream.
+ *
+ * @param input the org.omg.CORBA.portable stream to read.
+ */
+ public void _read(InputStream input)
+ {
+ value = InvalidPolicyHelper.read(input);
+ }
+
+ /**
+ * Write the stored value into the CDR stream.
+ *
+ * @param output the org.omg.CORBA.portable stream to write.
+ */
+ public void _write(OutputStream output)
+ {
+ InvalidPolicyHelper.write(output, value);
+ }
+
+ /**
+ * Get the typecode of the InvalidPolicy.
+ */
+ public TypeCode _type()
+ {
+ return InvalidPolicyHelper.type();
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/LocalDelegate.java b/gnu/CORBA/Poa/LocalDelegate.java
new file mode 100644
index 000000000..950e6e2ff
--- /dev/null
+++ b/gnu/CORBA/Poa/LocalDelegate.java
@@ -0,0 +1,362 @@
+/* LocalDelegate.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA.CDR.cdrOutput;
+import gnu.CORBA.streamRequest;
+
+import org.omg.CORBA.ARG_INOUT;
+import org.omg.CORBA.Bounds;
+import org.omg.CORBA.Context;
+import org.omg.CORBA.ContextList;
+import org.omg.CORBA.ExceptionList;
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.NVList;
+import org.omg.CORBA.NamedValue;
+import org.omg.CORBA.OBJECT_NOT_EXIST;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.Request;
+import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.UnknownUserException;
+import org.omg.CORBA.portable.ApplicationException;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.InvokeHandler;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA_2_3.portable.Delegate;
+import org.omg.PortableServer.ServantLocatorPackage.CookieHolder;
+
+import java.util.Arrays;
+
+/**
+ * A local delegate, transferring all object requests to the locally
+ * available servant. This class is involved in handling the method
+ * invocations on the local object, obtained by
+ * POA.create_reference_with_id.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class LocalDelegate
+ extends org.omg.CORBA_2_3.portable.Delegate
+{
+ /**
+ * The same servant as an invocation handler.
+ */
+ gnuServantObject object;
+ String operation;
+ final gnuPOA poa;
+ final byte[] Id;
+
+ /**
+ * Create a local delegate, forwarding requests to the
+ * servant that must also be an invocation handler.
+ */
+ public LocalDelegate(gnuServantObject an_object, gnuPOA a_poa, byte[] an_id)
+ {
+ object = an_object;
+ poa = a_poa;
+ Id = an_id;
+ }
+
+ public Request request(org.omg.CORBA.Object target, String method)
+ {
+ operation = method;
+
+ LocalRequest rq = new LocalRequest(object, poa, Id);
+ rq.setOperation(method);
+ rq.setORB(orb(target));
+ return rq;
+ }
+
+ public void release(org.omg.CORBA.Object target)
+ {
+ }
+
+ public boolean is_equivalent(org.omg.CORBA.Object target,
+ org.omg.CORBA.Object other
+ )
+ {
+ if (target == other)
+ return true;
+ else if (target instanceof ObjectImpl && other instanceof ObjectImpl)
+ {
+ org.omg.CORBA.portable.Delegate a = null;
+ org.omg.CORBA.portable.Delegate b = null;
+ try
+ {
+ a = ((ObjectImpl) target)._get_delegate();
+ b = ((ObjectImpl) other)._get_delegate();
+ }
+ catch (Exception ex)
+ {
+ // Unable to get one of the delegates.
+ return false;
+ }
+ if (a instanceof LocalDelegate && b instanceof LocalDelegate)
+ {
+ byte[] k1 = ((LocalDelegate) a).Id;
+ byte[] k2 = ((LocalDelegate) b).Id;
+ return Arrays.equals(k1, k2);
+ }
+ else
+ return false;
+ }
+ else
+ return false;
+ }
+
+ /**
+ * Always return false.
+ */
+ public boolean non_existent(org.omg.CORBA.Object target)
+ {
+ return false;
+ }
+
+ /**
+ * Get hash code.
+ */
+ public int hash(org.omg.CORBA.Object target, int maximum)
+ {
+ return hashCode() % maximum;
+ }
+
+ /**
+ * Check if this object could be named by the given repository id.
+ * @param idl_id the repository id to check.
+ *
+ * @return true if it is one of the possible repository ids of this
+ * object.
+ */
+ public boolean is_a(org.omg.CORBA.Object a_servant, String idl_id)
+ {
+ String[] maybe = object._ids();
+ for (int i = 0; i < maybe.length; i++)
+ {
+ if (maybe [ i ].equals(idl_id))
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Return <code>this</code>.
+ */
+ public org.omg.CORBA.Object duplicate(org.omg.CORBA.Object target)
+ {
+ return target;
+ }
+
+ /**
+ * Create request for using with DII.
+ */
+ public Request create_request(org.omg.CORBA.Object target, Context context,
+ String method, NVList parameters,
+ NamedValue returns, ExceptionList exceptions,
+ ContextList ctx_list
+ )
+ {
+ operation = method;
+
+ LocalRequest rq = new LocalRequest(object, poa, Id);
+ rq.setOperation(method);
+ rq.set_args(parameters);
+ rq.set_result(returns);
+ rq.set_exceptions(exceptions);
+ rq.set_context_list(ctx_list);
+ return rq;
+ }
+
+ /**
+ * Create request for using with DII.
+ */
+ public Request create_request(org.omg.CORBA.Object target, Context context,
+ String method, NVList parameters,
+ NamedValue returns
+ )
+ {
+ operation = method;
+
+ LocalRequest rq = new LocalRequest(object, poa, Id);
+ rq.setOperation(method);
+ rq.set_args(parameters);
+ rq.set_result(returns);
+ return rq;
+ }
+
+ /**
+ * Not in use.
+ */
+ public org.omg.CORBA.Object get_interface_def(org.omg.CORBA.Object target)
+ {
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Create a request to invoke the method of this CORBA object.
+ *
+ * @param operation the name of the method to invoke.
+ * @param response_expected specifies if this is one way message or the
+ * response to the message is expected.
+ *
+ * @return the stream where the method arguments should be written.
+ */
+ public org.omg.CORBA.portable.OutputStream request(org.omg.CORBA.Object target,
+ String method,
+ boolean response_expected
+ )
+ {
+ operation = method;
+
+ // Check if the object is not explicitly deactivated.
+ activeObjectMap.Obj e = poa.aom.get(Id);
+ if (e != null && e.isDeactiveted())
+ {
+ if (poa.servant_activator != null || poa.servant_locator != null)
+ {
+ // This will force the subsequent activation.
+ object.setServant(null);
+ e.setServant(null);
+ e.setDeactivated(false);
+ }
+ else
+ throw new OBJECT_NOT_EXIST("Deactivated");
+ }
+
+ LocalRequest rq = new LocalRequest(object, poa, Id);
+ rq.setOperation(method);
+ rq.setORB(orb(target));
+ return rq.getParameterStream();
+ }
+
+ /**
+ * Return the associated invocation handler.
+ */
+ public InvokeHandler getHandler(String method, CookieHolder cookie)
+ {
+ return object.getHandler(method, cookie, false);
+ }
+
+ /**
+ * Return the ORB of the associated POA. The parameter is not in use.
+ */
+ public ORB orb(org.omg.CORBA.Object target)
+ {
+ return poa.orb();
+ }
+
+ /**
+ * Make an invocation.
+ *
+ * @param target not in use.
+ * @param output the stream request that should be returned by {@link #request}
+ * in this method.
+ * @throws ApplicationException if the use exception is thrown by
+ * the servant method.
+ */
+ public InputStream invoke(org.omg.CORBA.Object target, OutputStream output)
+ throws ApplicationException
+ {
+ streamRequest sr = (streamRequest) output;
+
+ LocalRequest lr = (LocalRequest) sr.request;
+ InvokeHandler handler = lr.object.getHandler(lr.operation(), lr.cookie, false);
+
+ if (handler instanceof dynImpHandler)
+ {
+ // The local request known how to handle it, but the different
+ // method must be called.
+ lr.invoke();
+
+ // The encapsulation will inherit orb, endian, charsets, etc.
+ cdrOutput buf = sr.createEncapsulation();
+
+ // Write all request parameters to the buffer stream.
+ if (lr.env().exception() != null)
+ {
+ try
+ {
+ UnknownUserException uex =
+ (UnknownUserException) lr.env().exception();
+ throw new ApplicationException(uex.except.type().id(),
+ uex.except.create_input_stream()
+ );
+ }
+ catch (BadKind ex)
+ {
+ InternalError ierr = new InternalError();
+ ierr.initCause(ex);
+ throw ierr;
+ }
+ }
+ if (lr.return_value() != null)
+ lr.return_value().write_value(buf);
+
+ NamedValue a;
+ try
+ {
+ for (int i = 0; i < lr.arguments().count(); i++)
+ {
+ a = lr.arguments().item(i);
+ if (a.flags() == ARG_INOUT.value ||
+ a.flags() == ARG_INOUT.value
+ )
+ {
+ a.value().write_value(buf);
+ }
+ }
+ }
+ catch (Bounds ex)
+ {
+ InternalError ierr = new InternalError();
+ ierr.initCause(ex);
+ throw ierr;
+ }
+
+ return buf.create_input_stream();
+ }
+ else
+ return ((LocalRequest) sr.request).s_invoke(handler);
+ }
+
+ public void releaseReply(org.omg.CORBA.Object target, InputStream input)
+ {
+ release(target);
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/LocalRequest.java b/gnu/CORBA/Poa/LocalRequest.java
new file mode 100644
index 000000000..3c2816d70
--- /dev/null
+++ b/gnu/CORBA/Poa/LocalRequest.java
@@ -0,0 +1,426 @@
+/* LocalRequest.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA.CDR.cdrBufOutput;
+import gnu.CORBA.GIOP.MessageHeader;
+import gnu.CORBA.Unexpected;
+import gnu.CORBA.gnuAny;
+import gnu.CORBA.gnuRequest;
+import gnu.CORBA.streamReadyHolder;
+import gnu.CORBA.streamRequest;
+
+import org.omg.CORBA.ARG_OUT;
+import org.omg.CORBA.BAD_INV_ORDER;
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.Bounds;
+import org.omg.CORBA.NamedValue;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.UnknownUserException;
+import org.omg.CORBA.portable.ApplicationException;
+import org.omg.CORBA.portable.InvokeHandler;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.ResponseHandler;
+import org.omg.PortableServer.CurrentOperations;
+import org.omg.PortableServer.CurrentPackage.NoContext;
+import org.omg.PortableServer.DynamicImplementation;
+import org.omg.PortableServer.POA;
+import org.omg.PortableServer.Servant;
+import org.omg.PortableServer.ServantLocatorPackage.CookieHolder;
+import org.omg.PortableServer.portable.Delegate;
+
+import java.io.IOException;
+
+/**
+ * Directs the invocation to the locally available servant.
+ * The POA servant does not longer implement the CORBA object and
+ * cannot be substituted directly.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class LocalRequest
+ extends gnuRequest
+ implements ResponseHandler, CurrentOperations
+{
+ /**
+ * Used by servant locator, if involved.
+ */
+ CookieHolder cookie;
+
+ /**
+ * The object Id.
+ */
+ final byte[] Id;
+
+ /**
+ * The message header (singleton is sufficient).
+ */
+ private static final MessageHeader header = new MessageHeader();
+
+ /**
+ * True if the stream was obtained by invoking {@link #createExceptionReply()},
+ * false otherwise.
+ */
+ boolean exceptionReply;
+
+ /**
+ * The buffer to write into.
+ */
+ cdrBufOutput buffer;
+
+ /**
+ * The responsible POA.
+ */
+ final gnuPOA poa;
+
+ /**
+ * The servant delegate to obtain the handler.
+ */
+ gnuServantObject object;
+
+ /**
+ * Used (reused) with dynamic implementation.
+ */
+ LocalServerRequest serverRequest;
+
+ /**
+ * Create an instance of the local request.
+ */
+ public LocalRequest(gnuServantObject local_object, gnuPOA a_poa, byte[] an_id)
+ {
+ Id = an_id;
+ poa = a_poa;
+
+ // Instantiate the cookie holder only if required.
+ if (poa.servant_locator != null)
+ cookie = new CookieHolder();
+ object = local_object;
+ prepareStream();
+ }
+
+ /**
+ * Make an invocation and return a stream from where the results
+ * can be read and throw ApplicationException, where applicable.
+ */
+ org.omg.CORBA.portable.InputStream s_invoke(InvokeHandler handler)
+ throws ApplicationException
+ {
+ try
+ {
+ poa.m_orb.currents.put(Thread.currentThread(), this);
+
+ org.omg.CORBA.portable.InputStream input = v_invoke(handler);
+
+ if (!exceptionReply)
+ return input;
+ else
+ {
+ input.mark(500);
+
+ String id = input.read_string();
+ try
+ {
+ input.reset();
+ }
+ catch (IOException ex)
+ {
+ InternalError ierr = new InternalError();
+ ierr.initCause(ex);
+ throw ierr;
+ }
+ throw new ApplicationException(id, input);
+ }
+ }
+ finally
+ {
+ poa.m_orb.currents.remove(Thread.currentThread());
+ }
+ }
+
+ /**
+ * Make an invocation and return a stream from where the results
+ * can be read.
+ *
+ * @param the invoke handler (can be null, then it is obtained self
+ * dependently).
+ */
+ public org.omg.CORBA.portable.InputStream v_invoke(InvokeHandler handler)
+ {
+ if (handler == null)
+ handler = object.getHandler(operation(), cookie, false);
+
+ cdrBufOutput request_part = new cdrBufOutput();
+
+ request_part.setOrb(orb());
+
+ if (m_args != null && m_args.count() > 0)
+ {
+ write_parameters(header, request_part);
+
+ if (m_parameter_buffer != null)
+ throw new BAD_INV_ORDER("Please either add parameters or " +
+ "write them into stream, but not both " +
+ "at once."
+ );
+ }
+
+ if (m_parameter_buffer != null)
+ {
+ write_parameter_buffer(header, request_part);
+ }
+
+ Servant servant;
+
+ if (handler instanceof Servant)
+ servant = (Servant) handler;
+ else
+ throw new BAD_OPERATION("Unexpected handler type " + handler);
+
+ org.omg.CORBA.portable.InputStream input =
+ request_part.create_input_stream();
+
+ // Ensure the servant (handler) has a delegate set.
+ servantDelegate sd = null;
+
+ Delegate d = null;
+
+ try
+ {
+ d = servant._get_delegate();
+ }
+ catch (Exception ex)
+ {
+ // In some cases exception is thrown if the delegate is not set.
+ }
+ if (d instanceof servantDelegate)
+ {
+ // If the delegate is already set, try to reuse the existing
+ // instance.
+ sd = (servantDelegate) d;
+ if (sd.object != object)
+ sd = new servantDelegate(servant, poa, Id);
+ }
+ else
+ sd = new servantDelegate(servant, poa, Id);
+ servant._set_delegate(sd);
+
+ try
+ {
+ ORB o = orb();
+ if (o instanceof ORB_1_4)
+ {
+ ((ORB_1_4) o).currents.put(Thread.currentThread(), this);
+ }
+
+ handler._invoke(m_operation, input, this);
+ }
+ finally
+ {
+ ORB o = orb();
+ if (o instanceof ORB_1_4)
+ ((ORB_1_4) o).currents.remove(Thread.currentThread());
+ }
+
+ if (poa.servant_locator != null)
+ poa.servant_locator.postinvoke(object.Id, poa, operation(), cookie.value,
+ object.getServant()
+ );
+
+ return buffer.create_input_stream();
+ }
+
+ /**
+ * Make an invocation and store the result in the fields of this
+ * Request. Used with DII only.
+ */
+ public void invoke()
+ {
+ InvokeHandler handler = object.getHandler(operation(), cookie, false);
+
+ if (handler instanceof dynImpHandler)
+ {
+ DynamicImplementation dyn = ((dynImpHandler) handler).servant;
+ if (serverRequest == null)
+ serverRequest = new LocalServerRequest(this);
+ try
+ {
+ poa.m_orb.currents.put(Thread.currentThread(), this);
+ dyn.invoke(serverRequest);
+ }
+ finally
+ {
+ poa.m_orb.currents.remove(Thread.currentThread());
+ }
+ }
+ else
+ {
+ org.omg.CORBA.portable.InputStream input = v_invoke(handler);
+
+ if (!exceptionReply)
+ {
+ NamedValue arg;
+
+ // Read return value, if set.
+ if (m_result != null)
+ {
+ m_result.value().read_value(input, m_result.value().type());
+ }
+
+ // Read returned parameters, if set.
+ if (m_args != null)
+ for (int i = 0; i < m_args.count(); i++)
+ {
+ try
+ {
+ arg = m_args.item(i);
+
+ // Both ARG_INOUT and ARG_OUT have this binary flag set.
+ if ((arg.flags() & ARG_OUT.value) != 0)
+ {
+ arg.value().read_value(input, arg.value().type());
+ }
+ }
+ catch (Bounds ex)
+ {
+ Unexpected.error(ex);
+ }
+ }
+ }
+ else // User exception reply
+ {
+ // Prepare an Any that will hold the exception.
+ gnuAny exc = new gnuAny();
+
+ exc.insert_Streamable(new streamReadyHolder(input));
+
+ UnknownUserException unuex = new UnknownUserException(exc);
+ m_environment.exception(unuex);
+ }
+ }
+ }
+
+ /**
+ * Get an output stream for providing details about the exception.
+ * Before returning the stream, the handler automatically writes
+ * the message header and the reply about exception header,
+ * but not the message header.
+ *
+ * @return the stream to write exception details into.
+ */
+ public OutputStream createExceptionReply()
+ {
+ exceptionReply = true;
+ prepareStream();
+ return buffer;
+ }
+
+ /**
+ * Get an output stream for writing a regular reply (not an exception).
+ *
+ * Before returning the stream, the handler automatically writes
+ * the regular reply header, but not the message header.
+ *
+ * @return the output stream for writing a regular reply.
+ */
+ public OutputStream createReply()
+ {
+ exceptionReply = false;
+ prepareStream();
+ return buffer;
+ }
+
+ /**
+ * Get the buffer, normally containing the written reply.
+ * The reply includes the reply header (or the exception header)
+ * but does not include the message header.
+ *
+ * The stream buffer can also be empty if no data have been written
+ * into streams, returned by {@link #createReply()} or
+ * {@link #createExceptionReply()}.
+ *
+ * @return the CDR output stream, containing the written output.
+ */
+ cdrBufOutput getBuffer()
+ {
+ return buffer;
+ }
+
+ /**
+ * True if the stream was obtained by invoking
+ * {@link #createExceptionReply()}, false otherwise
+ * (usually no-exception reply).
+ */
+ boolean isExceptionReply()
+ {
+ return exceptionReply;
+ }
+
+ /**
+ * Compute the header offset, set the correct version number and codeset.
+ */
+ private void prepareStream()
+ {
+ buffer = new cdrBufOutput();
+ buffer.setOrb(orb());
+ }
+
+ /**
+ * Get the parameter stream, where the invocation arguments should
+ * be written if they are written into the stream directly.
+ */
+ public streamRequest getParameterStream()
+ {
+ m_parameter_buffer = new streamRequest();
+ m_parameter_buffer.request = this;
+ m_parameter_buffer.setOrb(poa.orb());
+ return m_parameter_buffer;
+ }
+
+ public byte[] get_object_id()
+ throws NoContext
+ {
+ return Id;
+ }
+
+ public POA get_POA()
+ throws NoContext
+ {
+ return poa;
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/LocalServerRequest.java b/gnu/CORBA/Poa/LocalServerRequest.java
new file mode 100644
index 000000000..6d0b39650
--- /dev/null
+++ b/gnu/CORBA/Poa/LocalServerRequest.java
@@ -0,0 +1,199 @@
+/* LocalServerRequest.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA.gnuNamedValue;
+
+import org.omg.CORBA.ARG_INOUT;
+import org.omg.CORBA.ARG_OUT;
+import org.omg.CORBA.Any;
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.Bounds;
+import org.omg.CORBA.Context;
+import org.omg.CORBA.NVList;
+import org.omg.CORBA.NamedValue;
+import org.omg.CORBA.ServerRequest;
+import org.omg.CORBA.UnknownUserException;
+
+/**
+ * Used to make local invocations via LocalRequest.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class LocalServerRequest
+ extends ServerRequest
+{
+ /**
+ * The local request, on the base of that this instance is created.
+ */
+ final LocalRequest request;
+
+ /**
+ * Create a new instance.
+ */
+ public LocalServerRequest(LocalRequest _request)
+ {
+ request = _request;
+ }
+
+ /**
+ * Get the argument list that can be modified.
+ */
+ public void params(NVList args)
+ {
+ arguments(args);
+ }
+
+ /**
+ * Get contexts.
+ */
+ public Context ctx()
+ {
+ return request.ctx();
+ }
+
+ /**
+ * Get the operatin being performed.
+ */
+ public String operation()
+ {
+ return request.operation();
+ }
+
+ /**
+ * Get the argument list that can be modified.
+ * The direction depends on the size of the passed list.
+ * The empty list is filled with the request arguments.
+ * The non-empty list is used to set the request arguments.
+ */
+ public void arguments(NVList args)
+ {
+ NVList l = request.arguments();
+ NamedValue a;
+
+ try
+ {
+ if (args.count() == 0)
+ {
+ // Transfer to the passed parameter.
+ for (int i = 0; i < l.count(); i++)
+ {
+ a = l.item(i);
+ args.add_value(a.name(), a.value(), a.flags());
+ }
+ }
+ else
+ {
+ // Transfer from the passed parameter.
+ if (l.count() != args.count())
+ throw new BAD_PARAM("Argument number mismatch, current " +
+ l.count() + ", passed " + args.count()
+ );
+ try
+ {
+ for (int i = 0; i < l.count(); i++)
+ {
+ a = l.item(i);
+ if (a.flags() == ARG_INOUT.value ||
+ a.flags() == ARG_OUT.value
+ )
+ {
+ ((gnuNamedValue) a).setValue(args.item(i).value());
+ }
+ }
+ }
+ catch (ClassCastException cex)
+ {
+ InternalError ierr = new InternalError();
+ ierr.initCause(cex);
+ throw ierr;
+ }
+ }
+ }
+ catch (Bounds ex)
+ {
+ InternalError ierr = new InternalError();
+ ierr.initCause(ex);
+ throw ierr;
+ }
+ }
+
+ /**
+ * Set the result.
+ */
+ public void set_result(Any result)
+ {
+ gnuNamedValue g = new gnuNamedValue();
+ g.setValue(result);
+ g.setFlags(ARG_OUT.value);
+ request.set_result(g);
+ }
+
+ /**
+ * Get the name of the method being called.
+ */
+ public String op_name()
+ {
+ return request.operation();
+ }
+
+ /**
+ * Set the exception that has been thrown.
+ */
+ public void set_exception(Any exc)
+ {
+ request.env().exception(new UnknownUserException(exc));
+ }
+
+ /**
+ * Set the result.
+ */
+ public void result(Any r)
+ {
+ set_result(r);
+ }
+
+ /**
+ * Set the exception.
+ */
+ public void except(Any exc)
+ {
+ set_exception(exc);
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/ORB_1_4.java b/gnu/CORBA/Poa/ORB_1_4.java
new file mode 100644
index 000000000..6302ddf12
--- /dev/null
+++ b/gnu/CORBA/Poa/ORB_1_4.java
@@ -0,0 +1,136 @@
+/* poaORB.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA.Functional_ORB;
+
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.OBJECT_NOT_EXIST;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.PortableServer.POAPackage.InvalidPolicy;
+
+/**
+ * The ORB, supporting POAs that are the feature of jdk 1.4.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class ORB_1_4
+ extends Functional_ORB
+{
+ /**
+ * The root POA.
+ */
+ public final gnuPOA rootPOA;
+
+ /**
+ * Maps the active threads to the invocation data ("Current's").
+ */
+ public gnuPoaCurrent currents = new gnuPoaCurrent();
+
+ /**
+ * Calls the parent constructor and additionally puts the "RootPOA" and
+ * "RootPOAManager" into initial references.
+ */
+ public ORB_1_4()
+ {
+ super();
+ try
+ {
+ rootPOA = new gnuPOA(null, "RootPOA", null, policySets.rootPoa(), this);
+ }
+ catch (InvalidPolicy ex)
+ {
+ // Invalid default policy set.
+ InternalError ierr = new InternalError();
+ ierr.initCause(ex);
+ throw ierr;
+ }
+ initial_references.put("RootPOA", rootPOA);
+ initial_references.put("RootPOAManager", rootPOA.the_POAManager());
+ initial_references.put("POACurrent", currents);
+ }
+
+ /**
+ * If the super method detects that the object is not connected to
+ * this ORB, try to find and activate the object.
+ */
+ public String object_to_string(org.omg.CORBA.Object forObject)
+ {
+ try
+ {
+ return super.object_to_string(forObject);
+ }
+ catch (Exception ex)
+ {
+ try
+ {
+ activeObjectMap.Obj exists = rootPOA.findObject(forObject);
+ if (exists == null)
+ throw new OBJECT_NOT_EXIST(forObject == null ? "null"
+ : forObject.toString()
+ );
+ else if (exists.poa instanceof gnuPOA)
+ ((gnuPOA) exists.poa).connect_to_orb(exists.key, forObject);
+ else
+ exists.poa.create_reference_with_id(exists.key,
+ ((ObjectImpl) exists.object)._ids() [ 0 ]
+ );
+ }
+ catch (Exception bex)
+ {
+ BAD_PARAM bad = new BAD_PARAM("Unable to activate " + forObject);
+ bad.initCause(bex);
+ throw bad;
+ }
+
+ return super.object_to_string(forObject);
+ }
+ }
+
+ /**
+ * Destroy all poas and then call the superclass method.
+ */
+ public void destroy()
+ {
+ // This will propagate through the whole POA tree.
+ rootPOA.destroy(true, false);
+
+ super.destroy();
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/activeObjectMap.java b/gnu/CORBA/Poa/activeObjectMap.java
new file mode 100644
index 000000000..1354ba9c5
--- /dev/null
+++ b/gnu/CORBA/Poa/activeObjectMap.java
@@ -0,0 +1,394 @@
+/* activeObjectMap.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA.ByteArrayComparator;
+
+import org.omg.PortableServer.POA;
+import org.omg.PortableServer.Servant;
+
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+
+/**
+ * Implements the conception of the Active Object Map.
+ * If the POA supports the RETAIN policy, it maintains an Active
+ * Object Map, that associates Object Ids with active servants.
+ * Each association constitutes an active object. We use a single map
+ * for all POAs on the given orb.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class activeObjectMap
+{
+ /**
+ * The reference data about the object, placed on the AOM.
+ */
+ public class Obj
+ {
+ /**
+ * Create an initialised instance.
+ */
+ Obj(org.omg.CORBA.Object _object, byte[] _key, Servant _servant, POA _poa)
+ {
+ object = _object;
+ key = _key;
+ servant = _servant;
+ poa = _poa;
+ }
+
+ /**
+ * The object.
+ */
+ public final org.omg.CORBA.Object object;
+
+ /**
+ * The servant, serving the given object.
+ */
+ public Servant servant;
+
+ /**
+ * The local servant that once served this object.
+ * This field is used by {@link ForwardedServant} when it discovers that
+ * the forwarding chaing returns back to the original location.
+ * It should not be used anywhere else.
+ */
+ Servant primary_servant;
+
+ /**
+ * The POA, where the object is connected.
+ */
+ public final POA poa;
+
+ /**
+ * The object key.
+ */
+ public final byte[] key;
+
+ /**
+ * If true, this entry is deactivated.
+ */
+ public boolean deactivated;
+
+ /**
+ * Set the servant value, preserving any non null
+ * value as the primary servant.
+ */
+ public void setServant(Servant s)
+ {
+ if (primary_servant == null)
+ primary_servant = s;
+ servant = s;
+ }
+
+ /**
+ * Get the servant.
+ */
+ public Servant getServant()
+ {
+ return servant;
+ }
+
+ /**
+ * Get the deactivation state.
+ */
+ public boolean isDeactiveted()
+ {
+ return deactivated;
+ }
+
+ /**
+ * Set the deactivation state.
+ */
+ public void setDeactivated(boolean state)
+ {
+ deactivated = state;
+ }
+
+ public boolean equals(java.lang.Object other)
+ {
+ if (other instanceof Obj)
+ {
+ Obj o = (Obj) other;
+ return o.object.equals(object);
+ }
+ else
+ return false;
+ }
+ }
+
+ /**
+ * The free number to give for the next instance.
+ * This field is incremented each time the
+ * new collection of the connected objects is created.
+ * Each collection has its own unique instance number.
+ */
+ private static long free_id;
+
+ /**
+ * The map of the all connected objects, maps the object key to the
+ * object.
+ */
+ Map objects = new TreeMap(new ByteArrayComparator());
+
+ /**
+ * Get the record of the stored object. If the object is mapped
+ * several times under the different keys, one of the mappings
+ * is used.
+ *
+ * @param object the stored object
+ *
+ * @return the record about the stored object, null if
+ * this object is not stored here.
+ */
+ public Obj findObject(org.omg.CORBA.Object stored_object)
+ {
+ if (stored_object == null)
+ return null;
+
+ Map.Entry item;
+ Iterator iter = objects.entrySet().iterator();
+ Obj ref;
+
+ while (iter.hasNext())
+ {
+ item = (Map.Entry) iter.next();
+ ref = (Obj) item.getValue();
+ if (stored_object.equals(ref.object))
+ return ref;
+ }
+ return null;
+ }
+
+ /**
+ * Find the reference info for the given servant.
+ * If the servant is mapped to several objects, this
+ * returns the first found occurence.
+ *
+ * @param servant a servant to find.
+ *
+ * @return the servant/object/POA binding or null if no such found.
+ */
+ public Obj findServant(Servant servant)
+ {
+ if (servant == null)
+ return null;
+
+ Map.Entry item;
+ Iterator iter = objects.entrySet().iterator();
+ Obj ref;
+
+ while (iter.hasNext())
+ {
+ item = (Map.Entry) iter.next();
+ ref = (Obj) item.getValue();
+ if (servant.equals(ref.servant))
+ return ref;
+ }
+ return null;
+ }
+
+ /**
+ * Find the reference info for the given servant.
+ * If the servant is mapped to several objects, this
+ * returns the first found occurence.
+ *
+ * @param servant a servant to find.
+ * @param speficies if to search for the inactive (true) or active
+ * (false) servant. A servant with unmatching activity is ignored
+ * by this method.
+ *
+ * @return the servant/object/POA binding or null if no such found.
+ */
+ public Obj findServant(Servant servant, boolean inactive)
+ {
+ if (servant == null)
+ return null;
+
+ Map.Entry item;
+ Iterator iter = objects.entrySet().iterator();
+ Obj ref;
+
+ while (iter.hasNext())
+ {
+ item = (Map.Entry) iter.next();
+ ref = (Obj) item.getValue();
+ if (ref.deactivated == inactive)
+ if (ref.servant != null)
+ if (servant.equals(ref.servant))
+ return ref;
+ }
+ return null;
+ }
+
+ /**
+ * Add the new object to the repository. The object key is
+ * generated automatically.
+ *
+ * @param object the object to add.
+ * @param servant a servant, serving the given object.
+ * @param poa the poa, where the object is connected.
+ *
+ * @return the newly created object record.
+ */
+ public Obj add(org.omg.CORBA.Object object, Servant servant, POA poa)
+ {
+ return add(generateObjectKey(object), object, servant, poa);
+ }
+
+ /**
+ * Add the new object to the repository.
+ *
+ * @param key the object key.
+ * @param object the object to add.
+ * @param servant a servant, serving the given object.
+ * @param poa the POA, where the object is connected.
+ */
+ public Obj add(byte[] key, org.omg.CORBA.Object object, Servant servant,
+ POA poa
+ )
+ {
+ Obj rec = new Obj(object, key, servant, poa);
+ objects.put(key, rec);
+ return rec;
+ }
+
+ /**
+ * Add the new object to the repository.
+ *
+ * @param delegate the delegate, providing data about the servant, key, POA
+ * and object.
+ * @param port the port that this object would take.
+ */
+ public Obj add(servantDelegate delegate)
+ {
+ Obj rec =
+ new Obj(delegate.object, delegate.servant_id, delegate.servant,
+ delegate.poa
+ );
+ objects.put(delegate.servant_id, rec);
+ return rec;
+ }
+
+ /**
+ * Put back the definition structure that has probably been removed earlier.
+ */
+ public void put(Obj obj)
+ {
+ objects.put(obj.key, obj);
+ }
+
+ /**
+ * Get the stored object.
+ *
+ * @param key the key (in the byte array form).
+ *
+ * @return the matching object, null if none is matching.
+ */
+ public Obj get(byte[] key)
+ {
+ return (Obj) objects.get(key);
+ }
+
+ /**
+ * Get the map key set.
+ */
+ public Set keySet()
+ {
+ return objects.keySet();
+ }
+
+ /**
+ * Remove the given object, indiciating it by the key.
+ *
+ * @param object the object to remove.
+ */
+ public void remove(byte[] key)
+ {
+ objects.remove(key);
+ }
+
+ /**
+ * Generate the object key, unique in the currently
+ * running java virtual machine. The passed object
+ * parameter is currently not in use.
+ *
+ * @return the generated key.
+ */
+ protected byte[] generateObjectKey(org.omg.CORBA.Object object)
+ {
+ byte[] key;
+
+ // The repetetive keys cannot be generated, but theoretically
+ // the same keys can be passed when calling add(byte[]...).
+ // Hence we check if the key is not already in the map and,
+ // if it is, use the subsequent value.
+ do
+ {
+ key = getFreeId();
+ }
+ while (objects.containsKey(key));
+ return key;
+ }
+
+ /**
+ * Get the next free 8 byte id, surely unique between calls of this
+ * method for the currently running virtual machine.
+ */
+ public static synchronized byte[] getFreeId()
+ {
+ byte[] r = new byte[ 8 ];
+
+ // Start from the faster-changing.
+ r [ 0 ] = ((byte) (0xff & free_id));
+ r [ 1 ] = ((byte) (0xff & (free_id >> 8)));
+ r [ 2 ] = ((byte) (0xff & (free_id >> 16)));
+ r [ 3 ] = ((byte) (0xff & (free_id >> 24)));
+ r [ 4 ] = ((byte) (0xff & (free_id >> 32)));
+ r [ 5 ] = ((byte) (0xff & (free_id >> 40)));
+ r [ 6 ] = ((byte) (0xff & (free_id >> 48)));
+ r [ 7 ] = ((byte) (0xff & (free_id >> 56)));
+
+ free_id++;
+
+ return r;
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/dynImpHandler.java b/gnu/CORBA/Poa/dynImpHandler.java
new file mode 100644
index 000000000..1cc3e131c
--- /dev/null
+++ b/gnu/CORBA/Poa/dynImpHandler.java
@@ -0,0 +1,85 @@
+/* dynImpHandler.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.InvokeHandler;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.ResponseHandler;
+import org.omg.PortableServer.DynamicImplementation;
+
+/**
+ * The InvokeHandler, indicating, that the target is a dynamic
+ * implementation rather than an invoke handler. These two
+ * types are not substitutable, but in some methods have possibility
+ * just to handle them differently.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class dynImpHandler
+ implements InvokeHandler
+{
+ /**
+ * The servant that is a dynamic implementation rather than
+ * invoke handler.
+ */
+ public final DynamicImplementation servant;
+
+ /**
+ * Create a new instance, wrapping some dyn implementation.
+ * @param _servant
+ */
+ public dynImpHandler(DynamicImplementation _servant)
+ {
+ servant = _servant;
+ }
+
+ /**
+ * We cannot invoke properly without having parameter info.
+ *
+ * @throws BAD_OPERATION, always.
+ */
+ public OutputStream _invoke(String method, InputStream input,
+ ResponseHandler handler
+ )
+ {
+ throw new BAD_OPERATION(servant + " is not an InvokeHandler.");
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/gnuAdapterActivator.java b/gnu/CORBA/Poa/gnuAdapterActivator.java
new file mode 100644
index 000000000..3019a2ae9
--- /dev/null
+++ b/gnu/CORBA/Poa/gnuAdapterActivator.java
@@ -0,0 +1,81 @@
+/* gnuAdapterActivator.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import org.omg.CORBA.LocalObject;
+import org.omg.PortableServer.AdapterActivator;
+import org.omg.PortableServer.POA;
+
+/**
+ * Defines a simple adapter activator.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuAdapterActivator
+ extends LocalObject
+ implements AdapterActivator
+{
+ /**
+ * Create a new POA on the parent, using the parent policy set
+ * from the suitable parent of grandparend and with independent
+ * POA manager (passing null to the createPOA).
+ *
+ * @param parent a parent. Either this parent or one of its
+ * grandparents must be gnuAbstractPOA, able to provide a
+ * policy set.
+ *
+ * @param child_name the name of the child being created.
+ *
+ * @return true on success or false if no gnuAbstractPOA
+ * found till the root poa.
+ */
+ public boolean unknown_adapter(POA parent, String child_name)
+ {
+ try
+ {
+ POA n = parent.create_POA(child_name, null, policySets.rootPoa());
+ n.the_POAManager().activate();
+ }
+ catch (Exception ex)
+ {
+ return false;
+ }
+ return true;
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/gnuForwardRequest.java b/gnu/CORBA/Poa/gnuForwardRequest.java
new file mode 100644
index 000000000..02fc42470
--- /dev/null
+++ b/gnu/CORBA/Poa/gnuForwardRequest.java
@@ -0,0 +1,90 @@
+/* gnuForwardRequest.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA.GIOP.ReplyHeader;
+
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.portable.ObjectImpl;
+
+/**
+ * The class, indicating that the request should be forwarded to another
+ * target. We cannot use ForwardRequest because the exception is throws
+ * from methods that does not declare throwing it. Hence must be
+ * RuntimeException.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuForwardRequest
+ extends RuntimeException
+{
+ /**
+ * Use serialVersionUID (v1.4) for interoperability.
+ */
+ private static final long serialVersionUID = -1L;
+
+ /**
+ * The object reference, indicating the new location of the invocation target.
+ */
+ public ObjectImpl forward_reference;
+
+ /**
+ * This information shows if we use LOCATION_FORWARD or
+ * LOCATION_FORWARD_PERM in request. By defalult, LOCATION_FORWARD
+ * is always used. To use LOCATION_FORWARD_PERM, this exception should
+ * be thrown from the servant manager instead of ForwardRequest,
+ * with this field set to ReplyHeader.LOCATION_FORWARD_PERM.
+ */
+ public byte forwarding_code = ReplyHeader.LOCATION_FORWARD;
+
+ /**
+ * Create the ForwardRequest with explaining message and
+ * initialising the object reference to the given value.
+ *
+ * @param why a string, explaining, why this exception has been thrown.
+ * @param a_forward_reference a value for forward_reference.
+ */
+ public gnuForwardRequest(org.omg.CORBA.Object a_forward_reference)
+ {
+ if (a_forward_reference instanceof ObjectImpl)
+ this.forward_reference = (ObjectImpl) a_forward_reference;
+ else
+ throw new BAD_PARAM("ObjectImpl expected");
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/gnuIdAssignmentPolicy.java b/gnu/CORBA/Poa/gnuIdAssignmentPolicy.java
new file mode 100644
index 000000000..a404486ce
--- /dev/null
+++ b/gnu/CORBA/Poa/gnuIdAssignmentPolicy.java
@@ -0,0 +1,80 @@
+/* gnuIdAssignmentPolicy.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA._PolicyImplBase;
+
+import org.omg.PortableServer.ID_ASSIGNMENT_POLICY_ID;
+import org.omg.PortableServer.IdAssignmentPolicy;
+import org.omg.PortableServer.IdAssignmentPolicyValue;
+
+/**
+ * Implementation of the id assignment policy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuIdAssignmentPolicy
+ extends _PolicyImplBase
+ implements IdAssignmentPolicy, vPolicy
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Create the policy.
+ *
+ * @param v a value for the policy.
+ */
+ public gnuIdAssignmentPolicy(IdAssignmentPolicyValue v)
+ {
+ super(ID_ASSIGNMENT_POLICY_ID.value, v, v.value(),
+ "IDL:org.omg/PortableServer/IdAssignmentPolicy:1.0"
+ );
+ }
+
+ /**
+ * Get the value for the policy that was passed in a constructor.
+ */
+ public IdAssignmentPolicyValue value()
+ {
+ return (IdAssignmentPolicyValue) getValue();
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/gnuIdUniquenessPolicy.java b/gnu/CORBA/Poa/gnuIdUniquenessPolicy.java
new file mode 100644
index 000000000..2abd1f484
--- /dev/null
+++ b/gnu/CORBA/Poa/gnuIdUniquenessPolicy.java
@@ -0,0 +1,80 @@
+/* gnuIdUniquenessPolicy.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA._PolicyImplBase;
+
+import org.omg.PortableServer.ID_UNIQUENESS_POLICY_ID;
+import org.omg.PortableServer.IdUniquenessPolicy;
+import org.omg.PortableServer.IdUniquenessPolicyValue;
+
+/**
+ * Implementation of the id uniqueness policy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuIdUniquenessPolicy
+ extends _PolicyImplBase
+ implements IdUniquenessPolicy, vPolicy
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Create the policy.
+ *
+ * @param v a value for the policy.
+ */
+ public gnuIdUniquenessPolicy(IdUniquenessPolicyValue v)
+ {
+ super(ID_UNIQUENESS_POLICY_ID.value, v, v.value(),
+ "IDL:org.omg/PortableServer/IdUniquenessPolicy:1.0"
+ );
+ }
+
+ /**
+ * Get the value for the policy that was passed in a constructor.
+ */
+ public IdUniquenessPolicyValue value()
+ {
+ return (IdUniquenessPolicyValue) getValue();
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/gnuImplicitActivationPolicy.java b/gnu/CORBA/Poa/gnuImplicitActivationPolicy.java
new file mode 100644
index 000000000..1e539a2c4
--- /dev/null
+++ b/gnu/CORBA/Poa/gnuImplicitActivationPolicy.java
@@ -0,0 +1,80 @@
+/* gnuImplicitActivationPolicy.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA._PolicyImplBase;
+
+import org.omg.PortableServer.IMPLICIT_ACTIVATION_POLICY_ID;
+import org.omg.PortableServer.ImplicitActivationPolicy;
+import org.omg.PortableServer.ImplicitActivationPolicyValue;
+
+/**
+ * Implementation of the implicit activation policy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuImplicitActivationPolicy
+ extends _PolicyImplBase
+ implements ImplicitActivationPolicy, vPolicy
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Create the policy.
+ *
+ * @param v a value for the policy.
+ */
+ public gnuImplicitActivationPolicy(ImplicitActivationPolicyValue v)
+ {
+ super(IMPLICIT_ACTIVATION_POLICY_ID.value, v, v.value(),
+ "IDL:org.omg/PortableServer/ImplicitActivationPolicy:1.0"
+ );
+ }
+
+ /**
+ * Get the value for the policy that was passed in a constructor.
+ */
+ public ImplicitActivationPolicyValue value()
+ {
+ return (ImplicitActivationPolicyValue) getValue();
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/gnuLifespanPolicy.java b/gnu/CORBA/Poa/gnuLifespanPolicy.java
new file mode 100644
index 000000000..97b3f2d7a
--- /dev/null
+++ b/gnu/CORBA/Poa/gnuLifespanPolicy.java
@@ -0,0 +1,80 @@
+/* gnuLifespanPolicy.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA._PolicyImplBase;
+
+import org.omg.PortableServer.LIFESPAN_POLICY_ID;
+import org.omg.PortableServer.LifespanPolicy;
+import org.omg.PortableServer.LifespanPolicyValue;
+
+/**
+ * The implementation of the life span policy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuLifespanPolicy
+ extends _PolicyImplBase
+ implements LifespanPolicy, vPolicy
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Create the policy.
+ *
+ * @param v a value for the policy.
+ */
+ public gnuLifespanPolicy(LifespanPolicyValue v)
+ {
+ super(LIFESPAN_POLICY_ID.value, v, v.value(),
+ "IDL:org.omg/PortableServer/LifespanPolicy:1.0"
+ );
+ }
+
+ /**
+ * Get the value for the policy that was passed in a constructor.
+ */
+ public LifespanPolicyValue value()
+ {
+ return (LifespanPolicyValue) getValue();
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/gnuPOA.java b/gnu/CORBA/Poa/gnuPOA.java
new file mode 100644
index 000000000..1d9e83853
--- /dev/null
+++ b/gnu/CORBA/Poa/gnuPOA.java
@@ -0,0 +1,1615 @@
+/* gnuAbstractPOA.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+
+import org.omg.CORBA.BAD_INV_ORDER;
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.CompletionStatus;
+import org.omg.CORBA.LocalObject;
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.OBJ_ADAPTER;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.Policy;
+import org.omg.CORBA.SetOverrideType;
+import org.omg.CORBA.TRANSIENT;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.PortableServer.AdapterActivator;
+import org.omg.PortableServer.ForwardRequest;
+import org.omg.PortableServer.IdAssignmentPolicy;
+import org.omg.PortableServer.IdAssignmentPolicyValue;
+import org.omg.PortableServer.IdUniquenessPolicy;
+import org.omg.PortableServer.IdUniquenessPolicyValue;
+import org.omg.PortableServer.ImplicitActivationPolicy;
+import org.omg.PortableServer.ImplicitActivationPolicyValue;
+import org.omg.PortableServer.LifespanPolicy;
+import org.omg.PortableServer.LifespanPolicyValue;
+import org.omg.PortableServer.POA;
+import org.omg.PortableServer.POAManager;
+import org.omg.PortableServer.RequestProcessingPolicy;
+import org.omg.PortableServer.RequestProcessingPolicyValue;
+import org.omg.PortableServer.SERVANT_RETENTION_POLICY_ID;
+import org.omg.PortableServer.Servant;
+import org.omg.PortableServer.ServantActivator;
+import org.omg.PortableServer.ServantLocator;
+import org.omg.PortableServer.ServantManager;
+import org.omg.PortableServer.ServantRetentionPolicy;
+import org.omg.PortableServer.ServantRetentionPolicyValue;
+import org.omg.PortableServer.ThreadPolicy;
+import org.omg.PortableServer.ThreadPolicyValue;
+import org.omg.PortableServer.POAManagerPackage.State;
+import org.omg.PortableServer.POAPackage.AdapterAlreadyExists;
+import org.omg.PortableServer.POAPackage.AdapterNonExistent;
+import org.omg.PortableServer.POAPackage.InvalidPolicy;
+import org.omg.PortableServer.POAPackage.NoServant;
+import org.omg.PortableServer.POAPackage.ObjectAlreadyActive;
+import org.omg.PortableServer.POAPackage.ObjectNotActive;
+import org.omg.PortableServer.POAPackage.ServantAlreadyActive;
+import org.omg.PortableServer.POAPackage.ServantNotActive;
+import org.omg.PortableServer.POAPackage.WrongAdapter;
+import org.omg.PortableServer.POAPackage.WrongPolicy;
+import gnu.CORBA.CDR.cdrBufInput;
+import gnu.CORBA.CDR.cdrBufOutput;
+
+/**
+ * Our POA implementation.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuPOA
+ extends LocalObject
+ implements POA
+{
+ /**
+ * The active object map, mapping between object keys, objects and servants.
+ */
+ public final activeObjectMap aom = new activeObjectMap();
+
+ /**
+ * The children of this POA.
+ */
+ final ArrayList children = new ArrayList();
+
+ /**
+ * The name of this POA.
+ */
+ final String name;
+
+ /**
+ * The parent of this POA (null for the root POA).
+ */
+ final POA parent;
+
+ /**
+ * The ior key signature, indicating, that the ior key is encoded using
+ * internal agreements of this implementation (0x'free').
+ */
+ static final int SIGNATURE = 0x66726565;
+
+ /**
+ * The adapter activator for this POA, null if no activator is set.
+ */
+ AdapterActivator m_activator;
+
+ /**
+ * The POA manager for this POA.
+ */
+ POAManager m_manager;
+
+ /**
+ * The servant manager (servant activator) for this POA.
+ */
+ ServantActivator servant_activator;
+
+ /**
+ * The servant manager (servant locator) for this POA.
+ */
+ ServantLocator servant_locator;
+
+ /**
+ * The default servant, if on is in use.
+ */
+ Servant default_servant;
+
+ /**
+ * The cached poa id value, computed once.
+ */
+ private byte[] m_poa_id;
+
+ /**
+ * The all policy values that apply to this POA.
+ * The used policy values are singletons, unique between policies.
+ */
+ private final HashSet m_policies;
+
+ /**
+ * An array of the set policies.
+ */
+ Policy[] s_policies;
+
+ /**
+ * The ORB, where the POA is connected.
+ */
+ final ORB_1_4 m_orb;
+
+ /**
+ * When true, the POA is being destroyed or is destroyed.
+ */
+ boolean m_inDestruction;
+
+ /**
+ * True if the active object map is used by this POA.
+ * The value is moved into separate boolean value due
+ * necessity of the frequent checks.
+ */
+ public final boolean retain_servant;
+
+ /**
+ * Create a new abstract POA.
+ *
+ * @param a_parent the parent of this POA.
+ * @param a_name a name for this POA.
+ * @param a_manager a manager for this POA. If null, a new
+ * {@link gnuPOAManager} will be instantiated.
+ * @param a_policies an array of policies that apply to this POA.
+ * @param an_orb an ORB for this POA.
+ */
+ public gnuPOA(gnuPOA a_parent, String a_name, POAManager a_manager,
+ Policy[] a_policies, ORB_1_4 an_orb
+ )
+ throws InvalidPolicy
+ {
+ // Add default policies.
+ Policy[] all_policies = policySets.withDefault(a_policies);
+
+ name = a_name;
+ parent = a_parent;
+ m_orb = an_orb;
+
+ if (a_manager != null)
+ m_manager = a_manager;
+ else
+ m_manager = new gnuPOAManager();
+
+ if (m_manager instanceof gnuPOAManager)
+ {
+ gnuPOAManager g = (gnuPOAManager) m_manager;
+ g.addPoa(this);
+ }
+
+ m_policies = new HashSet(all_policies.length);
+
+ s_policies = new Policy[ all_policies.length ];
+ for (int i = 0; i < s_policies.length; i++)
+ {
+ s_policies [ i ] = all_policies [ i ].copy();
+ m_policies.add(((vPolicy) s_policies [ i ]).getValue());
+ }
+
+ retain_servant = applies(ServantRetentionPolicyValue.RETAIN);
+
+ validatePolicies(a_policies);
+ }
+
+ /**
+ * Wait while at least one of the threads in this POA is actively
+ * processing one of requests.
+ */
+ public void waitWhileRunning()
+ {
+ // First pause.
+ long time = 1;
+
+ // Maximal duration between checks.
+ long max = 500;
+
+ boolean runs;
+
+ do
+ {
+ runs = m_orb.currents.has(this);
+
+ if (runs)
+ {
+ // Avoid taking CPU resources
+ // from the thread that is running.
+ try
+ {
+ Thread.sleep(time);
+ time = time * 2;
+ if (time > max)
+ time = max;
+ }
+ catch (InterruptedException ex)
+ {
+ }
+ }
+ }
+ while (runs);
+ }
+
+ /**
+ * Etherealize all objects, associated with this POA. Invoked from the
+ * {@link gnuPOAManager} only if it is known that the servant_activator
+ * holds non-null value.
+ */
+ protected void etherealizeAll()
+ {
+ if (servant_activator == null)
+ return;
+
+ ArrayList keys = new ArrayList();
+ keys.addAll(aom.keySet());
+
+ byte[] key;
+ activeObjectMap.Obj obj;
+ boolean last;
+ for (int i = 0; i < keys.size(); i++)
+ {
+ key = (byte[]) keys.get(i);
+ obj = aom.get(key);
+
+ if (obj.poa == this)
+ {
+ aom.remove(key);
+
+ if (!obj.isDeactiveted())
+ {
+ // Check if the servant still stays under the other key.
+ last = aom.findServant(obj.servant) == null;
+ servant_activator.etherealize(obj.key, this, obj.servant, true,
+ last
+ );
+ }
+ }
+ }
+ }
+
+ /**
+ * Create an instance of the POA with the given features.
+ * This method is not responsible for duplicate checking
+ * or adding the returned instance to any possible table.
+ *
+ * @param child_name the name of the poa being created.
+ * @param manager the poa manager (never null).
+ * @param policies the array of policies.
+ * @param an_orb the ORB for this POA.
+ *
+ * @return the created POA.
+ *
+ * @throws InvalidPolicy for conflicting or otherwise invalid policies.|
+ */
+ protected POA createPoaInstance(String child_name, POAManager a_manager,
+ Policy[] policies, ORB_1_4 an_orb
+ )
+ throws InvalidPolicy
+ {
+ POAManager some_manager =
+ a_manager == null ? new gnuPOAManager() : a_manager;
+
+ if (some_manager instanceof gnuPOAManager)
+ {
+ ((gnuPOAManager) some_manager).addPoa(this);
+ }
+
+ return new gnuPOA(this, child_name, some_manager, policies, an_orb);
+ }
+
+ /**
+ * Check if the given policy value applies to this POA.
+ *
+ * @param policy_value a policy value to check. The policy values are
+ * singletons and unique between the different policies, so the policy
+ * type is not passed.
+ *
+ * @return true if the policy value applies, false otherwise.
+ */
+ public final boolean applies(java.lang.Object policy_value)
+ {
+ return m_policies.contains(policy_value);
+ }
+
+ /**
+ * Check for the presence of the required policy.
+ *
+ * @param policy_value a policy value to check.
+ *
+ * @throws WrongPolicy if the required policy value is not applicable.
+ */
+ public final void required(java.lang.Object policy_value)
+ throws WrongPolicy
+ {
+ if (!applies(policy_value))
+ throw new WrongPolicy(policy_value + " policy required.");
+ }
+
+ /**
+ * Check for the absence of the given policy.
+ *
+ * @param policy_value a policy value to check.
+ *
+ * @throws WrongPolicy if the passed policy value is applicable.
+ */
+ public final void excluding(java.lang.Object policy_value)
+ throws WrongPolicy
+ {
+ if (applies(policy_value))
+ throw new WrongPolicy(policy_value + " policy applies.");
+ }
+
+ /**
+ * Find and optionally activate the child POA with the given name.
+ *
+ * @param poa_name the name of the POA to find.
+ * @param activate_it if the child with the specified name is not found
+ * or inactive and this parameter is true, the target POA activator is
+ * invoked to activate that child. If this succeeds, that child POA
+ * is returned.
+ *
+ * @throws AdapterNonExistent if no active child with the given name
+ * is found and one of the following is true:
+ * a) the target POA has no associated
+ * {@link AdapterActivator}. b) that activator fails to activate the
+ * child POA. c) <code>activate_id</code> = false.
+ */
+ public POA find_POA(String poa_name, boolean activate_it)
+ throws AdapterNonExistent
+ {
+ POA child;
+ for (int i = 0; i < children.size(); i++)
+ {
+ child = (POA) children.get(i);
+ if (child.the_name().equals(poa_name))
+ return child;
+ }
+
+ if (activate_it && m_activator != null)
+ {
+ boolean activated = m_activator.unknown_adapter(this, poa_name);
+ if (!activated)
+ throw new AdapterNonExistent(poa_name + " activation failed.");
+
+ // Tha activator should add the child to the childrent table.
+ for (int i = 0; i < children.size(); i++)
+ {
+ child = (POA) children.get(i);
+ if (child.the_name().equals(poa_name))
+ return child;
+ }
+ throw new AdapterNonExistent(poa_name + " not created. ");
+ }
+ else
+ throw new AdapterNonExistent(poa_name);
+ }
+
+ /**
+ * Generate the Object Id for the given servant and add the servant to
+ * the Active Object Map using this Id a a key. If the servant
+ * activator is set, its incarnate method will be called.
+ *
+ * @param a_servant a servant that would serve the object with the
+ * returned Object Id. If null is passed, under apporoprate policies the
+ * servant activator is invoked.
+ *
+ * @return the generated objert Id for the given servant.
+ *
+ * @throws ServantAlreadyActive if this servant is already in the
+ * Active Object Map and the UNIQUE_ID policy applies.
+ *
+ * @throws WrongPolicy if the required policies SYSTEM_ID and RETAIN
+ * do not apply to this POA.
+ */
+ public byte[] activate_object(Servant a_servant)
+ throws ServantAlreadyActive, WrongPolicy
+ {
+ checkDiscarding();
+ required(ServantRetentionPolicyValue.RETAIN);
+ required(IdAssignmentPolicyValue.SYSTEM_ID);
+
+ activeObjectMap.Obj exists = aom.findServant(a_servant);
+
+ if (exists != null)
+ {
+ if (exists.isDeactiveted())
+ {
+ // If exists but deactivated, activate and return
+ // the existing key.
+ exists.setDeactivated(false);
+ incarnate(exists, exists.key, a_servant, false);
+ return exists.key;
+ }
+ else if (applies(IdUniquenessPolicyValue.UNIQUE_ID))
+ throw new ServantAlreadyActive();
+
+ // It multiple ids are allowed, exit block allowing repetetive
+ // activations.
+ }
+
+ byte[] object_key = activeObjectMap.getFreeId();
+ servantDelegate delegate = new servantDelegate(a_servant, this, object_key);
+ connectDelegate(object_key, delegate);
+ return object_key;
+ }
+
+ /**
+ * Add the given servant to the Active Object Map as a servant for the
+ * object with the provided Object Id. If the servant activator is
+ * set, its incarnate method will be called.
+ *
+ * @param an_Object_Id an object id for the given object.
+ * @param a_servant a servant that will serve the object with the given
+ * Object Id. If null is passed, under apporoprate policies the
+ * servant activator is invoked.
+ *
+ * @throws ObjectAlreadyActive if the given object id is already in the
+ * Active Object Map.
+ * @throws ServantAlreadyActive if the UNIQUE_ID policy applies and
+ * this servant is already in use.
+ * @throws WrongPolicy if the required RETAIN policy does not apply to
+ * this POA.
+ * @throws BAD_PARAM if the passed object id is invalid due any reason.
+ */
+ public void activate_object_with_id(byte[] an_Object_Id, Servant a_servant)
+ throws ServantAlreadyActive, ObjectAlreadyActive,
+ WrongPolicy
+ {
+ activate_object_with_id(an_Object_Id, a_servant, false);
+ }
+
+ /**
+ * Same as activate_object_with_id, but permits gnuForwardRequest
+ * forwarding exception. This is used when the activation is called
+ * from the remote invocation context and we have possibility
+ * to return the forwarding message.
+ */
+ public void activate_object_with_id(byte[] an_Object_Id, Servant a_servant,
+ boolean use_forwarding
+ )
+ throws ServantAlreadyActive, ObjectAlreadyActive,
+ WrongPolicy
+ {
+ checkDiscarding();
+ required(ServantRetentionPolicyValue.RETAIN);
+
+ // If the UNIQUE_ID applies, the servant being passed must not be
+ // already active.
+ if (applies(IdUniquenessPolicyValue.UNIQUE_ID))
+ {
+ activeObjectMap.Obj sx = aom.findServant(a_servant, false);
+ if (sx != null)
+ throw new ServantAlreadyActive();
+ }
+
+ activeObjectMap.Obj exists = aom.get(an_Object_Id);
+ if (exists != null)
+ {
+ if (exists.servant == null)
+ {
+ locateServant(an_Object_Id, a_servant, exists, use_forwarding);
+ exists.setDeactivated(false);
+ }
+ else if (exists.isDeactiveted())
+ {
+ exists.setDeactivated(false);
+ incarnate(exists, an_Object_Id, a_servant, use_forwarding);
+ }
+ else
+ throw new ObjectAlreadyActive();
+ }
+ else
+ {
+ servantDelegate delegate =
+ new servantDelegate(a_servant, this, an_Object_Id);
+ connectDelegate(an_Object_Id, delegate);
+ }
+ }
+
+ /**
+ * Locate the servant for this object Id and connect it to ORB.
+ *
+ * @param an_Object_Id the object id.
+ * @param a_servant the servant (may be null).
+ * @param exists an existing active object map entry.
+ * @param use_forwarding allow to throw the gnuForwardRequest
+ * if the activator throws ForwardRequest.
+ *
+ * @throws OBJ_ADAPTER minor 4 if the servant cannot be located
+ * (the required servant manager may be missing).
+ */
+ private void locateServant(byte[] an_Object_Id, Servant a_servant,
+ activeObjectMap.Obj exists, boolean use_forwarding
+ )
+ throws InternalError
+ {
+ // An object was created with create_reference.
+ gnuServantObject object = (gnuServantObject) exists.object;
+ if (servant_activator != null)
+ {
+ exists.setServant(incarnate(exists, an_Object_Id, a_servant,
+ use_forwarding
+ )
+ );
+ }
+ else if (default_servant != null)
+ {
+ exists.setServant(default_servant);
+ }
+ if (exists.servant == null)
+ {
+ exists.setServant(a_servant);
+ }
+ if (exists.servant == null)
+ {
+ throw new OBJ_ADAPTER("no servant", 4, CompletionStatus.COMPLETED_NO);
+ }
+
+ servantDelegate delegate =
+ new servantDelegate(exists.servant, this, an_Object_Id);
+ exists.servant._set_delegate(delegate);
+ object.setServant(exists.servant);
+ connect_to_orb(an_Object_Id, delegate.object);
+ }
+
+ /**
+ * Deactivate object with the given id.
+ *
+ * The deactivated object will continue to process requests that arrived
+ * before decativation. If this POA has the associated
+ * servant manager, a {@link ServantActivatorOperations#etherealize} is
+ * immediately invoked on the passed id.
+ *
+ * @throws WrongPolicy if the required RETAIN policy does not apply to
+ * this POA.
+ */
+ public void deactivate_object(byte[] the_Object_Id)
+ throws ObjectNotActive, WrongPolicy
+ {
+ required(ServantRetentionPolicyValue.RETAIN);
+
+ activeObjectMap.Obj exists = aom.get(the_Object_Id);
+
+ if (exists == null || exists.isDeactiveted())
+ throw new ObjectNotActive();
+
+ exists.setDeactivated(true);
+
+ // Check if this servant is serving something else.
+ aom.remove(the_Object_Id);
+
+ activeObjectMap.Obj other = aom.findServant(exists.servant, false);
+
+ boolean remaining = other != null;
+
+ aom.put(exists);
+
+ if (servant_activator != null)
+ servant_activator.etherealize(the_Object_Id, this, exists.servant, false,
+ remaining
+ );
+ }
+
+ /**
+ * Create the object reference, encapsulating the given repository Id and
+ * the Object Id, generated by this POA. The returned object will not be
+ * activated by default and may be activated on the first invocation by
+ * the servant manager (if it is set and if policies are applicable).
+ *
+ * @param a_repository_id the repository id for the given object, can
+ * be null if to be requested from the servant later.
+ *
+ * @throws WrongPolicy if the required SYSTEM_ID policy does not apply to
+ * this POA.
+ */
+ public org.omg.CORBA.Object create_reference(String a_repository_id)
+ throws WrongPolicy
+ {
+ required(IdAssignmentPolicyValue.SYSTEM_ID);
+ return create_reference_with_id(activeObjectMap.getFreeId(), a_repository_id);
+ }
+
+ /**
+ * <p>
+ * Create the object reference, encapsulating the given repository Id and
+ * the given Object Id. The returned object will <i>not</i> be
+ * activated by default and may be activated on the first invocation by
+ * the servant manager (if the IMPLICIT_ACTIVATION policy applies).
+ *
+ * @param an_object_id the object id for the object being created. If this
+ * POA uses the SYSTEM_ID policy, the portable application should only
+ * pass the ids, generated by this POA.
+ *
+ * @param a_repository_id the repository id for the object being created,
+ * can be null if this information should be later requested from the
+ * servant.
+ */
+ public org.omg.CORBA.Object create_reference_with_id(byte[] an_object_id,
+ String a_repository_id
+ )
+ {
+ String[] ids;
+ if (a_repository_id == null)
+ ids = null;
+ else
+ ids = new String[] { a_repository_id };
+
+ // Check maybe such object is already activated.
+ activeObjectMap.Obj e = aom.get(an_object_id);
+
+ Servant servant;
+ if (e == null)
+ {
+ servant = null;
+ }
+ else
+ {
+ servant = e.servant;
+ e.setDeactivated(false);
+ }
+
+ gnuServantObject object =
+ new gnuServantObject(ids, an_object_id, this, m_orb);
+ object._set_delegate(new LocalDelegate(object, this, an_object_id));
+ aom.add(object.Id, object, servant, this);
+ connect_to_orb(an_object_id, object);
+
+ return object;
+ }
+
+ /**
+ * Creates a new POA as a child of the target POA.
+ *
+ * @param child_name the name of the child POA being created.
+ * @param manager the manager that will control the new POA. If this parameter
+ * is null, a new POA manager is created and associated with the new POA.
+ *
+ * @param policies the policies, applicable for the parent POA. Policies
+ * are <i>not</i> inherited from the parent POA.
+ *
+ * @return an newly created POA. The POA will be intially in the holding
+ * state and must be activated to start processing requests.
+ *
+ * @throws AdapterAlreadyExists if the child with the given child_name
+ * already exists for the current POA.
+ * @throws InvalidPolicy if the policies conflict with each other or are
+ * otherwise inappropriate.
+ *
+ * @see #the_children()
+ */
+ public POA create_POA(String child_name, POAManager manager, Policy[] policies)
+ throws AdapterAlreadyExists, InvalidPolicy
+ {
+ POA child;
+ for (int i = 0; i < children.size(); i++)
+ {
+ child = (POA) children.get(i);
+ if (child.the_name().equals(child_name))
+ throw new AdapterAlreadyExists(name + "/" + child_name);
+ }
+
+ POA poa = createPoaInstance(child_name, manager, policies, m_orb);
+ children.add(poa);
+ return poa;
+ }
+
+ /**
+ * Returns a default servant for this POA.
+ *
+ * @return a servant that will be used for requests for
+ * which no servant is found in the Active Object Map.
+ *
+ * @throws NoServant if there is no default servant associated with this POA.
+ * @throws WrongPolicy if the USE_DEFAULT_SERVANT policy is not active.
+ */
+ public Servant get_servant()
+ throws NoServant, WrongPolicy
+ {
+ required(RequestProcessingPolicyValue.USE_DEFAULT_SERVANT);
+ if (default_servant == null)
+ throw new NoServant();
+ return default_servant;
+ }
+
+ /**
+ * Sets the default servant for this POA.
+ *
+ * @param a_servant a servant that will be used for requests for
+ * which no servant is found in the Active Object Map.
+ *
+ * @throws WrongPolicy if the USE_DEFAULT_SERVANT policy is not active.
+ */
+ public void set_servant(Servant a_servant)
+ throws WrongPolicy
+ {
+ required(RequestProcessingPolicyValue.USE_DEFAULT_SERVANT);
+ default_servant = a_servant;
+ }
+
+ /**
+ * Set a servant manager for this POA.
+ *
+ * @param a servant manager being set. If the RETAIN policy applies, the
+ * manager must implement a {@link ServantActivator}. If the NON_RETAIN
+ * policy applies, the manager must implement a {@link ServantLocator}.
+ *
+ * @throws WrongPolicy if the required USE_SERVANT_MANAGER policy does not
+ * apply to this POA.
+ *
+ * @throws OBJ_ADAPTER minor code 4 if the passed manager does not
+ * implement the required interface ({@link ServantActivator},
+ * {@link ServantLocator}). The POA, that has the RETAIN policy uses
+ * servant managers that are ServantActivators. When the POA has the
+ * NON_RETAIN policy it uses servant managers that are ServantLoacators.
+ *
+ * @throws BAD_INV_ORDER minor code 6 if the method is called more than once
+ * on the same POA. The manager can be set only once.
+ */
+ public void set_servant_manager(ServantManager a_manager)
+ throws WrongPolicy
+ {
+ required(RequestProcessingPolicyValue.USE_SERVANT_MANAGER);
+ if (servant_activator != null || servant_locator != null)
+ throw new BAD_INV_ORDER("Setting manager twice for " + name, 6,
+ CompletionStatus.COMPLETED_NO
+ );
+
+ if (applies(ServantRetentionPolicyValue.RETAIN))
+ {
+ if (a_manager instanceof ServantActivator)
+ servant_activator = (ServantActivator) a_manager;
+ else
+ throw new OBJ_ADAPTER("RETAIN requires ServantActivator", 4,
+ CompletionStatus.COMPLETED_NO
+ );
+ }
+ else if (applies(ServantRetentionPolicyValue.NON_RETAIN))
+ {
+ if (a_manager instanceof ServantLocator)
+ servant_locator = (ServantLocator) a_manager;
+ else
+ throw new OBJ_ADAPTER("NON_RETAIN requires ServantLocator", 4,
+ CompletionStatus.COMPLETED_NO
+ );
+ }
+ else
+ throw new WrongPolicy("No servant retention policy is specified.");
+ }
+
+ /**
+ * Get the servant manager, associated with this POA.
+ *
+ * @return the associated servant manager or null if it has
+ * been previously set.
+ *
+ * @throws WrongPolicy if the required USE_SERVANT_MANAGER policy does not
+ * apply to this POA.
+ */
+ public ServantManager get_servant_manager()
+ throws WrongPolicy
+ {
+ required(RequestProcessingPolicyValue.USE_SERVANT_MANAGER);
+
+ if (servant_activator != null)
+ return servant_activator;
+ else
+ return servant_locator;
+ }
+
+ /**
+ * Get the unique Id of the POA in the process in which it is created.
+ * This Id is needed by portable interceptors. The id is unique
+ * for the life span of the POA in the process. For persistent
+ * POAs, if a POA is created in the same path with the same name as
+ * another POA, these POAs are identical have the same id. All transient
+ * POAs are assumed unique.
+ */
+ public byte[] id()
+ {
+ if (m_poa_id != null)
+ return m_poa_id;
+ else
+ {
+ cdrBufOutput buffer = new cdrBufOutput();
+ POA p = this;
+ while (p != null)
+ {
+ buffer.write_string(p.the_name());
+ p = p.the_parent();
+ }
+ m_poa_id = buffer.buffer.toByteArray();
+ return m_poa_id;
+ }
+ }
+
+ /**
+ * Returns the reference to the active object with the given Id.
+ *
+ * @param the_Object_Id the object id.
+ *
+ * @throws ObjectNotActive if there is no active object with such Id
+ * in the scope of this POA.
+ * @throws WrongPolicy if the required RETAIN policy does not apply to
+ * this POA.
+ */
+ public org.omg.CORBA.Object id_to_reference(byte[] the_Object_Id)
+ throws ObjectNotActive, WrongPolicy
+ {
+ required(ServantRetentionPolicyValue.RETAIN);
+
+ activeObjectMap.Obj ref = aom.get(the_Object_Id);
+ if (ref == null)
+ throw new ObjectNotActive();
+ else
+ return ref.object;
+ }
+
+ /**
+ * Returns the servant that serves the active object with the given Id.
+ *
+ * @param the_Object_Id the object id.
+ *
+ * @throws ObjectNotActive if there is no active object with such Id or
+ * it is not currently active.
+ * @throws WrongPolicy. This method requires either RETAIN or
+ * USE_DEFAULT_SERVANT policies and reaises the WrongPolicy if none of them
+ * apply to this POA.
+ */
+ public Servant id_to_servant(byte[] the_Object_Id)
+ throws ObjectNotActive, WrongPolicy
+ {
+ if (applies(ServantRetentionPolicyValue.RETAIN))
+ {
+ activeObjectMap.Obj ref = aom.get(the_Object_Id);
+ if (ref == null || ref.isDeactiveted())
+ {
+ if (default_servant != null)
+ return default_servant;
+ else
+ throw new ObjectNotActive();
+ }
+ else if (ref.servant != null)
+ return ref.servant;
+ else if (default_servant != null)
+ return default_servant;
+ else
+ throw new ObjectNotActive();
+ }
+ else if (default_servant != null)
+ {
+ return default_servant;
+ }
+ else
+ throw new WrongPolicy("Either RETAIN or USE_DEFAULT_SERVANT required.");
+ }
+
+ /**
+ * Returns the Object Id, encapsulated in the given object reference.
+ *
+ * @param the_Object the object that has been previously created with this
+ * POA. It need not be active.
+ *
+ * @throws WrongAdapter if the passed object is not known for this POA.
+ * @throws WrongPolicy never (declared for the future extensions only).
+ */
+ public byte[] reference_to_id(org.omg.CORBA.Object the_Object)
+ throws WrongAdapter, WrongPolicy
+ {
+ activeObjectMap.Obj ref = aom.findObject(the_Object);
+ if (ref == null)
+ throw new WrongAdapter();
+ return ref.key;
+ }
+
+ /**
+ * Returns the servant that is serving this object.
+ *
+ * @return if the RETAIN policy applies and the object is in the Active
+ * Object Map, the method returns the servant, associated with this object.
+ * Otherwise, if the USE_DEFAULT_SERVANT policy applies, the method returns
+ * the default servant (if one was set).
+ *
+ * @throws ObjectNotActive if none of the conditions above are satisfied.
+ * @throws WrongAdapter if the object reference was not created with this POA.
+ * @throws WrongPolicy. This method requires either RETAIN or
+ * USE_DEFAULT_SERVANT policies and reaises the WrongPolicy if none of them
+ * apply to this POA.
+ */
+ public Servant reference_to_servant(org.omg.CORBA.Object the_Object)
+ throws ObjectNotActive, WrongPolicy,
+ WrongAdapter
+ {
+ if (applies(ServantRetentionPolicyValue.RETAIN))
+ {
+ activeObjectMap.Obj ref = aom.findObject(the_Object);
+ if (ref == null)
+ throw new WrongAdapter();
+ else if (ref.isDeactiveted() || ref.servant == null)
+ {
+ if (default_servant != null)
+ return default_servant;
+ else
+ throw new ObjectNotActive();
+ }
+ else
+ return ref.servant;
+ }
+ else if (default_servant != null)
+ {
+ return default_servant;
+ }
+ else
+ throw new WrongPolicy("Either RETAIN or USE_DEFAULT_SERVANT required.");
+ }
+
+ /**
+ * Returns the id of the object, served by the given servant
+ * (assuming that the servant serves only one object).
+ * The id is found in one of the following ways.
+ * <ul>
+ * <li>If the POA has both the RETAIN and the UNIQUE_ID policy and
+ * the specified servant is active, the method return the Object Id associated
+ * with that servant.
+ * </li><li>
+ * If the POA has both the RETAIN and the IMPLICIT_ACTIVATION policy and
+ * either the POA has the MULTIPLE_ID policy or the specified servant is
+ * inactive, the method activates the servant using a POA-generated Object Id
+ * and the Interface Id associated with the servant, and returns that
+ * Object Id.
+ * </li>
+ * <li>If the POA has the USE_DEFAULT_SERVANT policy, the servant specified
+ * is the default servant, and the method is being invoked in the context of
+ * executing a request on the default servant, the method returns the
+ * ObjectId associated with the current invocation.
+ * </li>
+ * </ul>
+ * @throws ServantNotActive in all cases, not listed in the list above.
+ * @throws WrongPolicy The method requres USE_DEFAULT_SERVANT policy or
+ * a combination of the RETAIN policy and either the UNIQUE_ID or
+ * IMPLICIT_ACTIVATION policies and throws the WrongPolicy if these conditions
+ * are not satisfied.
+ */
+ public byte[] servant_to_id(Servant the_Servant)
+ throws ServantNotActive, WrongPolicy
+ {
+ if (applies(RequestProcessingPolicyValue.USE_DEFAULT_SERVANT) ||
+ applies(ServantRetentionPolicyValue.RETAIN) &&
+ (
+ applies(IdUniquenessPolicyValue.UNIQUE_ID) ||
+ applies(ImplicitActivationPolicyValue.IMPLICIT_ACTIVATION)
+ )
+ )
+ {
+ activeObjectMap.Obj ref = null;
+ if (!applies(IdUniquenessPolicyValue.MULTIPLE_ID))
+ ref = aom.findServant(the_Servant);
+ if (ref == null &&
+ applies(ImplicitActivationPolicyValue.IMPLICIT_ACTIVATION)
+ )
+ {
+ // Try to activate.
+ try
+ {
+ return activate_object(the_Servant);
+ }
+ catch (ServantAlreadyActive ex)
+ {
+ // Either it shuld not be or the policy allows multiple ids.
+ throw new InternalError();
+ }
+ }
+ if (ref == null)
+ throw new ServantNotActive();
+ else
+ return ref.key;
+ }
+ else
+ throw new WrongPolicy("(RETAIN and UNIQUE ID) " +
+ "or USE_DEFAULT_SERVANT required."
+ );
+ }
+
+ /**
+ * <p>Converts the given servant to the object reference.
+ * The servant will serve all methods, invoked on the returned object.
+ * The returned object reference can be passed to the remote client,
+ * enabling remote invocations.
+ * </p><p>
+ * If the specified servant is active, it is returned. Otherwise,
+ * if the POA has the IMPLICIT_ACTIVATION policy the method activates
+ * the servant. In this case, if the servant activator is set,
+ * the {@link ServantActivatorOperations#incarnate} method will be called.
+ * </p>
+ *
+ * @throws ServantNotActive if the servant is inactive and no
+ * IMPLICIT_ACTIVATION policy applies.
+ * @throws WrongPolicy This method needs the RETAIN policy and either the
+ * UNIQUE_ID or IMPLICIT_ACTIVATION policies.
+ *
+ * @return the object, exposing the given servant in the context of this POA.
+ */
+ public org.omg.CORBA.Object servant_to_reference(Servant the_Servant)
+ throws ServantNotActive,
+ WrongPolicy
+ {
+ required(ServantRetentionPolicyValue.RETAIN);
+
+ activeObjectMap.Obj exists = null;
+
+ if (!applies(IdUniquenessPolicyValue.MULTIPLE_ID))
+ exists = aom.findServant(the_Servant);
+
+ if (exists != null)
+ {
+ if (exists.isDeactiveted())
+ {
+ if (applies(ImplicitActivationPolicyValue.IMPLICIT_ACTIVATION))
+ {
+ checkDiscarding();
+ exists.setDeactivated(false);
+ incarnate(exists, exists.key, the_Servant, false);
+ }
+ else
+ throw new ServantNotActive();
+ }
+ else
+ return exists.object;
+ }
+ if (exists == null &&
+ applies(ImplicitActivationPolicyValue.IMPLICIT_ACTIVATION)
+ )
+ {
+ checkDiscarding();
+
+ byte[] object_key = activeObjectMap.getFreeId();
+
+ servantDelegate delegate =
+ new servantDelegate(the_Servant, this, object_key);
+ connectDelegate(object_key, delegate);
+
+ return delegate.object;
+ }
+ else
+ throw new ServantNotActive();
+ }
+
+ /**
+ * Incarnate in cases when request forwarding is not expected
+ * because the servant must be provided by the servant activator.
+ *
+ * @param x the aom entry, where the object is replaced by
+ * value, returned by servant activator (if not null).
+ *
+ * @param key the object key.
+ *
+ * @param a_servant the servant that was passed as a parameter in the
+ * activation method.
+ *
+ * @param use_forwarding if true, the gnuForwardRequest is throw
+ * under the forwarding exception (for remote client). Otherwise, the
+ * request is internally redirected (for local invocation).
+ */
+ private Servant incarnate(activeObjectMap.Obj x, byte[] object_key,
+ Servant a_servant, boolean use_forwarding
+ )
+ {
+ if (servant_activator != null)
+ {
+ Servant servant;
+ try
+ {
+ servant = servant_activator.incarnate(object_key, this);
+ }
+ catch (ForwardRequest ex)
+ {
+ if (use_forwarding)
+ throw new gnuForwardRequest(ex.forward_reference);
+ else
+ servant =
+ ForwardedServant.create((ObjectImpl) ex.forward_reference);
+ }
+ if (servant != null && x != null)
+ x.setServant(servant);
+ if (servant == null && x != null)
+ servant = x.servant;
+ return servant;
+ }
+ else if (a_servant != null)
+ {
+ x.setServant(a_servant);
+ return a_servant;
+ }
+ else if (x.servant != null)
+ {
+ return x.servant;
+ }
+ else if (default_servant != null)
+ {
+ x.setServant(default_servant);
+ return x.servant;
+ }
+ else
+ throw new BAD_INV_ORDER("No servant given and the servant activator not set");
+ }
+
+ /**
+ * Return the POA manager, associated with this POA.
+ *
+ * @return the associated POA manager (always available).
+ */
+ public POAManager the_POAManager()
+ {
+ return m_manager;
+ }
+
+ /**
+ * Returns the adapter activator, associated with this POA.
+ * The newly created POA has no activator (null would be
+ * returned). The ORB root POA also initially has no activator.
+ *
+ * @return tha adapter activator or null if this POA has no
+ * associated adapter activator.
+ */
+ public AdapterActivator the_activator()
+ {
+ return m_activator;
+ }
+
+ /**
+ * Set the adapter activator for this POA.
+ *
+ * @param the activator being set.
+ */
+ public void the_activator(AdapterActivator an_activator)
+ {
+ m_activator = an_activator;
+ }
+
+ /**
+ * The children of this POA.
+ *
+ * @return the array of all childs for this POA.
+ */
+ public POA[] the_children()
+ {
+ POA[] poas = new POA[ children.size() ];
+ for (int i = 0; i < poas.length; i++)
+ {
+ poas [ i ] = (POA) children.get(i);
+ }
+ return poas;
+ }
+
+ /**
+ * Return the name of this POA.
+ *
+ * @return the name of POA, relative to its parent.
+ */
+ public String the_name()
+ {
+ return name;
+ }
+ ;
+
+ /**
+ * Return the parent of this POA.
+ *
+ * @return the parent POA or <code>null</code> if this is a root POA.
+ */
+ public POA the_parent()
+ {
+ return parent;
+ }
+
+ /** {@inheritDoc} */
+ public IdAssignmentPolicy create_id_assignment_policy(IdAssignmentPolicyValue a_value)
+ {
+ return new gnuIdAssignmentPolicy(a_value);
+ }
+
+ /** {@inheritDoc} */
+ public IdUniquenessPolicy create_id_uniqueness_policy(IdUniquenessPolicyValue a_value)
+ {
+ return new gnuIdUniquenessPolicy(a_value);
+ }
+
+ /** {@inheritDoc} */
+ public ImplicitActivationPolicy create_implicit_activation_policy(ImplicitActivationPolicyValue a_value)
+ {
+ return new gnuImplicitActivationPolicy(a_value);
+ }
+
+ /** {@inheritDoc} */
+ public LifespanPolicy create_lifespan_policy(LifespanPolicyValue a_value)
+ {
+ return new gnuLifespanPolicy(a_value);
+ }
+
+ /** {@inheritDoc} */
+ public RequestProcessingPolicy create_request_processing_policy(RequestProcessingPolicyValue a_value)
+ {
+ return new gnuRequestProcessingPolicy(a_value);
+ }
+
+ /** {@inheritDoc} */
+ public ServantRetentionPolicy create_servant_retention_policy(ServantRetentionPolicyValue a_value)
+ {
+ return new gnuServantRetentionPolicy(a_value);
+ }
+
+ /** {@inheritDoc} */
+ public ThreadPolicy create_thread_policy(ThreadPolicyValue a_value)
+ {
+ return new gnuThreadPolicy(a_value);
+ }
+
+ /**
+ * <p> Destroy this POA and all descendant POAs. The destroyed POAs can be
+ * later re-created via {@link AdapterActivator} or by invoking
+ * {@link #create_POA}.
+ * This differs from {@link PoaManagerOperations#deactivate} that does
+ * not allow recreation of the deactivated POAs. After deactivation,
+ * recreation is only possible if the POAs were later destroyed.
+ * </p><p>
+ * The remote invocation on the target, belonging to the POA that is
+ * currently destroyed return the remote exception ({@link TRANSIENT},
+ * minor code 4).
+ * </p>
+ * @param etherealize_objects if true, and POA has RETAIN policy, and the
+ * servant manager is available, the servant manager method
+ * {@link ServantActivatorOperations#etherealize} is called for each
+ * <i>active</i> object in the Active Object Map. This method should not
+ * try to access POA being destroyed. If <code>destroy</code> is called
+ * multiple times before the destruction completes,
+ * the etherialization should be invoked only once.
+ *
+ * @param wait_for_completion if true, the method waits till the POA being
+ * destroyed completes all current requests and etherialization. If false,
+ * the method returns immediately.
+ */
+ public void destroy(boolean etherealize_objects, boolean wait_for_completion)
+ {
+ if (wait_for_completion)
+ waitWhileRunning();
+
+ // Put the brake instead of manager, preventing the subsequent
+ // requests.
+ gnuPOAManager g = new gnuPOAManager();
+ g.state = State.INACTIVE;
+ m_manager = g;
+
+ // Disconnect from parent.
+ if (parent instanceof gnuPOA)
+ {
+ ((gnuPOA) parent).children.remove(this);
+ }
+
+ unregisterFromManager();
+
+ // Disconnect from the ORB all objects, registered with this POA.
+ ArrayList keys = new ArrayList();
+ keys.addAll(aom.keySet());
+
+ byte[] key;
+ activeObjectMap.Obj obj;
+ for (int i = 0; i < keys.size(); i++)
+ {
+ key = (byte[]) keys.get(i);
+ obj = aom.get(key);
+ if (obj.poa == this)
+ m_orb.disconnect(obj.object);
+ }
+
+ m_orb.identityDestroyed(this);
+
+ if (etherealize_objects && servant_activator != null && !m_inDestruction)
+ {
+ etherealizeAll();
+ }
+ m_inDestruction = true;
+
+ POA[] ch = the_children();
+ for (int i = 0; i < ch.length; i++)
+ {
+ ch [ i ].destroy(etherealize_objects, wait_for_completion);
+ }
+ }
+
+ /**
+ * Destroy this POA if it has not been destroyed, destroys it.
+ */
+ protected void finalize()
+ throws java.lang.Throwable
+ {
+ if (!m_inDestruction)
+ destroy(false, false);
+ }
+
+ /**
+ * Remove self from the manager list.
+ */
+ private void unregisterFromManager()
+ {
+ if (m_manager instanceof gnuPOAManager)
+ {
+ gnuPOAManager p = (gnuPOAManager) m_manager;
+ p.removePOA(this);
+ }
+ }
+
+ /**
+ * Get the policy of the given type, associated with this POA.
+ *
+ * @param a_policy_type a type of the requested policy.
+ * @return a policy of the given type, applyting to this POA.
+ *
+ * @throws org.omg.CORBA.BAD_PARAM if the policy of this type has not
+ * been specified for this POA.
+ */
+ public Policy _get_policy(int a_policy_type)
+ throws org.omg.CORBA.BAD_PARAM
+ {
+ for (int i = 0; i < s_policies.length; i++)
+ {
+ if (s_policies [ i ].policy_type() == a_policy_type)
+ return s_policies [ i ].copy();
+ }
+ throw new BAD_PARAM("No policy type " + a_policy_type);
+ }
+
+ /**
+ * Get the copy of the policy array.
+ */
+ public Policy[] getPolicyArray()
+ {
+ Policy[] r = new Policy[ s_policies.length ];
+ for (int i = 0; i < s_policies.length; i++)
+ {
+ r [ i ] = s_policies [ i ].copy();
+ }
+ return r;
+ }
+
+ /**
+ * The POAs cannot be created by this method.
+ *
+ * @specnote this is also not possible in Suns jdk at least till 1.4.
+ *
+ * @throws NO_IMPLEMENT always.
+ */
+ public org.omg.CORBA.Object _set_policy_override(Policy[] policies,
+ SetOverrideType how
+ )
+ {
+ throw new NO_IMPLEMENT("Use createPOA instead.");
+ }
+
+ /**
+ * Get the ORB, where this POA is connected.
+ */
+ public ORB orb()
+ {
+ return m_orb;
+ }
+
+ /**
+ * Connect the given delegate under the given key, also calling
+ * incarnate.
+ */
+ private void connectDelegate(byte[] object_key, servantDelegate delegate)
+ {
+ aom.add(delegate);
+ connect_to_orb(object_key, delegate.object);
+ if (servant_activator != null)
+ incarnate(null, object_key, delegate.servant, false);
+ }
+
+ /**
+ * Check if the POA is not in a discarding mode. The activation
+ * operations are forbidded in discarding mode.
+ *
+ * @throws TRANSIENT if the POA is in discarding mode.
+ */
+ private void checkDiscarding()
+ throws TRANSIENT
+ {
+ if (m_manager.get_state() == State.DISCARDING)
+ throw new TRANSIENT("Discarding mode", 1, CompletionStatus.COMPLETED_MAYBE);
+ }
+
+ /**
+ * Connect the given delegate object to orb.
+ */
+ protected void connect_to_orb(byte[] an_Object_Id, org.omg.CORBA.Object object)
+ {
+ if (applies(ThreadPolicyValue.SINGLE_THREAD_MODEL))
+ m_orb.connect_1_thread(object, toIORKey(an_Object_Id), this);
+ else
+ m_orb.connect(object, toIORKey(an_Object_Id));
+ }
+
+ /**
+ * Returns the representation of this POA tree.
+ */
+ public String toString()
+ {
+ StringBuffer b = new StringBuffer(name);
+
+ if (children.size() != 0)
+ {
+ b.append(" (");
+
+ for (int i = 0; i < children.size(); i++)
+ {
+ b.append(children.get(i));
+ if (i < children.size() - 2)
+ b.append(", ");
+ }
+ b.append(")");
+ }
+ return b.toString();
+ }
+
+ /**
+ * Check if the policy set is valid.
+ */
+ protected boolean validatePolicies(Policy[] a)
+ throws InvalidPolicy
+ {
+ if (applies(ServantRetentionPolicyValue.NON_RETAIN))
+ {
+ if (!applies(RequestProcessingPolicyValue.USE_DEFAULT_SERVANT) &&
+ !applies(RequestProcessingPolicyValue.USE_SERVANT_MANAGER)
+ )
+ {
+ short p = 0;
+ for (short i = 0; i < a.length; i++)
+ {
+ if (a [ i ].policy_type() == SERVANT_RETENTION_POLICY_ID.value)
+ p = i;
+ }
+ throw new InvalidPolicy("NON_RETAIN requires either " +
+ "USE_DEFAULT_SERVANT or USE_SERVANT_MANAGER",
+ p
+ );
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Recursively searches for the given object in the POA tree.
+ */
+ public activeObjectMap.Obj findObject(org.omg.CORBA.Object object)
+ {
+ activeObjectMap.Obj h = aom.findObject(object);
+ if (h != null)
+ return h;
+ else
+ {
+ for (int i = 0; i < children.size(); i++)
+ {
+ h = ((gnuPOA) children.get(i)).findObject(object);
+ if (h != null)
+ return h;
+ }
+ }
+ return h;
+ }
+
+ /**
+ * Recursively searches for the given key in the POA tree.
+ * @param ior_key the key, ecapsulating both object
+ * and poa ids.
+ * @return
+ */
+ public activeObjectMap.Obj findKey(byte[] object_id, byte[] poa_id)
+ {
+ activeObjectMap.Obj h = null;
+ if (Arrays.equals(poa_id, id()))
+ h = aom.get(object_id);
+ if (h != null)
+ return h;
+ else
+ {
+ for (int i = 0; i < children.size(); i++)
+ {
+ h = ((gnuPOA) children.get(i)).findKey(object_id, poa_id);
+ if (h != null)
+ return h;
+ }
+ }
+ return h;
+ }
+
+ /**
+ * Parses the given key, extracts poa and object id and searches
+ * for such reference.
+ */
+ public activeObjectMap.Obj findIorKey(byte[] ior_key)
+ {
+ cdrBufInput in = new cdrBufInput(ior_key);
+ int signature = in.read_long();
+ if (signature != SIGNATURE)
+ return null;
+
+ byte[] id = in.read_sequence();
+ byte[] poa = in.read_sequence();
+ return findKey(id, poa);
+ }
+
+ /**
+ * Converts the object Id into the IOR key. IOR key must be
+ * unique in the scope of the ORB, and Ids only in the scope of POA.
+ * Hence the IOR key includes the POA identifiers.
+ */
+ public byte[] toIORKey(byte[] object_id)
+ {
+ cdrBufOutput buffer = new cdrBufOutput();
+ buffer.write_long(SIGNATURE);
+ buffer.write_sequence(object_id);
+ buffer.write_sequence(id());
+ return buffer.buffer.toByteArray();
+ }
+
+ /**
+ * Extracts the object id from the ior key.
+ *
+ * @param ior_key
+ *
+ * @return the encapsulated object ior key or null if
+ * this ior key either refers a different POA or encoding signature
+ * mismatch.
+ */
+ public byte[] idFormIor(byte[] ior_key)
+ {
+ cdrBufInput in = new cdrBufInput(ior_key);
+ int signature = in.read_long();
+ if (signature != SIGNATURE)
+ return null;
+
+ byte[] object_id = in.read_sequence();
+ byte[] poa_id = in.read_sequence();
+ if (Arrays.equals(poa_id, id()))
+ return object_id;
+ else
+ return null;
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/gnuPOAManager.java b/gnu/CORBA/Poa/gnuPOAManager.java
new file mode 100644
index 000000000..6c1b5644f
--- /dev/null
+++ b/gnu/CORBA/Poa/gnuPOAManager.java
@@ -0,0 +1,225 @@
+/* gnuPOAManager.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import org.omg.CORBA.BAD_INV_ORDER;
+import org.omg.CORBA.LocalObject;
+import org.omg.PortableServer.POAManager;
+import org.omg.PortableServer.POAManagerPackage.AdapterInactive;
+import org.omg.PortableServer.POAManagerPackage.State;
+
+import java.util.HashSet;
+import java.util.Iterator;
+
+/**
+ * The implementation of the POA manager. The manager is a controlled
+ * switch that can change its states in response to the method calls
+ * and throw exceptions if the requested change is invalid. It is possible
+ * to check the state this switch. It does not do anything else.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuPOAManager
+ extends LocalObject
+ implements POAManager
+{
+ /**
+ * The POAs, controlled by this manager. The members must be instances of
+ * the gnuAbstractPOA.
+ */
+ HashSet POAs = new HashSet();
+
+ /**
+ * The state of the manager. The newly created manager is always
+ * in the holding state.
+ */
+ State state = State.HOLDING;
+
+ /**
+ * Get the state of the POA manager.
+ */
+ public State get_state()
+ {
+ return state;
+ }
+
+ /**
+ * Turns the associated POAs into active state, allowing them to receive
+ * and process requests.
+ *
+ * @throws if the POAs are in the inactive state. If once inactivated,
+ * the POA cannot be activated again. This method can only be called
+ * to leave the holding or discarding state.
+ */
+ public void activate()
+ throws AdapterInactive
+ {
+ if (state != State.INACTIVE)
+ state = State.ACTIVE;
+ else
+ throw new AdapterInactive();
+ }
+
+ /**
+ * Turns the associated POAs into holding state. In this state, the POAs
+ * queue incoming requests but do not process them.
+ *
+ * @param wait_for_completion if true, the method call suspends the current
+ * thread till POAs complete the requests they are currently processing. If
+ * false, the method returns immediately.
+
+ * @throws AdapterInactive if the POAs are in the inactive state.
+ */
+ public void hold_requests(boolean wait_for_completion)
+ throws AdapterInactive
+ {
+ if (state != State.INACTIVE)
+ state = State.HOLDING;
+ else
+ throw new AdapterInactive();
+ if (wait_for_completion)
+ waitForIdle();
+ }
+
+ /**
+ *
+ * Turns the asociated POAs into inactive state. The POAs in the incative
+ * state will reject new requests. If the POA is once inactivated, it
+ * cannot be activated again. The operation is used when
+ * the associated POAs are to be shut down.
+ *
+ * @param etherealize_objects if true, the servant managers of the
+ * associated POAs, having RETAIN and USE_SERVANT_MANAGER policies,
+ * will receive a call of {@link ServantActivatorOperations#etherealize}.
+ *
+ * @param wait_for_completion if true, the method call suspends the current
+ * thread till POAs complete the requests they are currently processing. If
+ * false, the method returns immediately.
+ *
+ * @throws AdapterInactive if the POAs are already in the inactive state.
+ *
+ * @see POAOperations#destroy
+ */
+ public void deactivate(boolean etherealize_objects,
+ boolean wait_for_completion
+ )
+ throws AdapterInactive
+ {
+ if (state == State.INACTIVE)
+ throw new AdapterInactive("Repetetive inactivation");
+ state = State.INACTIVE;
+ if (wait_for_completion)
+ waitForIdle();
+
+ Iterator iter = POAs.iterator();
+ while (iter.hasNext())
+ {
+ gnuPOA poa = (gnuPOA) iter.next();
+
+ // If the servant activator is non null, this means it has been
+ // set - hence the policies are appropriate.
+ if (poa.servant_activator != null)
+ poa.etherealizeAll();
+ }
+ }
+
+ /**
+ * Turns the associated POAs into discaring state. In this state, the POAs
+ * discard the incoming requests. This mode is used in situations when
+ * the server is flooded with requests. The client receives remote exception
+ * ({@link org.omg.CORBA.TRANSIENT}, minor code 1).
+ *
+ * @param wait_for_completion if true, the method call suspends the current
+ * thread till POAs complete the requests they are currently processing. If
+ * false, the method returns immediately.
+
+ * @throws AdapterInactive if the POAs are in the inactive state.
+ */
+ public void discard_requests(boolean wait_for_completion)
+ throws AdapterInactive
+ {
+ if (state != State.INACTIVE)
+ state = State.DISCARDING;
+ else
+ throw new AdapterInactive();
+ if (wait_for_completion)
+ waitForIdle();
+ }
+
+ /**
+ * Suspend the current thread while at least one of the associated POA is
+ * actively processing some requests. The method assumes that the POAs
+ * are not accepting the <i>new</i> requests due manager state.
+ *
+ * @throws BAD_INV_ORDER if the POAs are in the active state.
+ */
+ public void waitForIdle()
+ {
+ if (state == State.ACTIVE)
+ throw new BAD_INV_ORDER("The state is active");
+
+ Iterator iter = POAs.iterator();
+ while (iter.hasNext())
+ {
+ gnuPOA poa = (gnuPOA) iter.next();
+ poa.waitWhileRunning();
+ }
+ }
+
+ /**
+ * Add the POA that will be controlled by this manager.
+ *
+ * @param poa the POA.
+ */
+ public void addPoa(gnuPOA poa)
+ {
+ POAs.add(poa);
+ }
+
+ /**
+ * Remove the POA, releasing it from the control of this manager.
+ * Called in POA finaliser.
+ *
+ * @param poa the POA to remove.
+ */
+ public void removePOA(gnuPOA poa)
+ {
+ POAs.remove(poa);
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/gnuPoaCurrent.java b/gnu/CORBA/Poa/gnuPoaCurrent.java
new file mode 100644
index 000000000..927d02fe3
--- /dev/null
+++ b/gnu/CORBA/Poa/gnuPoaCurrent.java
@@ -0,0 +1,179 @@
+/* gnuPoaCurrent.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import org.omg.CORBA.CurrentHelper;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.PortableServer.Current;
+import org.omg.PortableServer.CurrentOperations;
+import org.omg.PortableServer.CurrentPackage.NoContext;
+import org.omg.PortableServer.POA;
+
+import java.util.Iterator;
+import java.util.Map;
+import java.util.TreeMap;
+
+/**
+ * Supports the "Poa current" concept, providing the id and poa of
+ * the object currently being served. There is only one instance
+ * of this class per ORB. It maintains a thread to information map.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuPoaCurrent
+ extends ObjectImpl
+ implements Current
+{
+ /**
+ * The table, mapping threads to records.
+ */
+ private TreeMap threads = new TreeMap();
+
+ /**
+ * Get the array of POA current repository ids.
+ *
+ * @return a single member array, containing value, returned
+ * by the {@link CurrentHelper#id}, normally
+ * "IDL:omg.org/PortableServer/Current:2.3".
+ */
+ public String[] _ids()
+ {
+ return new String[] { CurrentHelper.id() };
+ }
+
+ /**
+ * Get the object id, associated with the thread currently being served.
+ *
+ * @throws NoContext if the current thread is not associated with any
+ * object.
+ */
+ public byte[] get_object_id()
+ throws NoContext
+ {
+ CurrentOperations r;
+ synchronized (threads)
+ {
+ r = (CurrentOperations) threads.get(Thread.currentThread().getName());
+ }
+ if (r != null)
+ return r.get_object_id();
+ else
+ throw new NoContext(Thread.currentThread().getName());
+ }
+
+ /**
+ * Get the object POA, associated with the thread currently being served.
+ *
+ * @throws NoContext if the current thread is not associated with any
+ * object.
+ */
+ public POA get_POA()
+ throws NoContext
+ {
+ CurrentOperations r;
+ synchronized (threads)
+ {
+ r = (CurrentOperations) threads.get(Thread.currentThread().getName());
+ }
+ if (r != null)
+ return r.get_POA();
+ else
+ throw new NoContext(Thread.currentThread().getName());
+ }
+
+ /**
+ * Add the entry to the map.
+ */
+ public void put(Thread t, CurrentOperations record)
+ {
+ synchronized (threads)
+ {
+ threads.put(t.getName(), record);
+ }
+ }
+
+ /**
+ * Check if this Poa has some running threads.
+ */
+ public boolean has(POA poa)
+ {
+ synchronized (threads)
+ {
+ Iterator iter = threads.entrySet().iterator();
+ while (iter.hasNext())
+ {
+ Map.Entry item = (Map.Entry) iter.next();
+ try
+ {
+ if (((CurrentOperations) item.getValue()).get_POA() == poa)
+ {
+ return true;
+ }
+ }
+ catch (NoContext ex)
+ {
+ throw new InternalError();
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Check if this thread is registered.
+ */
+ public boolean has(Thread t)
+ {
+ synchronized (threads)
+ {
+ return threads.containsKey(t.getName());
+ }
+ }
+
+ /**
+ * Remove the entry from the map.
+ */
+ public void remove(Thread t)
+ {
+ synchronized (threads)
+ {
+ threads.remove(t.getName());
+ }
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/gnuRequestProcessingPolicy.java b/gnu/CORBA/Poa/gnuRequestProcessingPolicy.java
new file mode 100644
index 000000000..5bbcd1321
--- /dev/null
+++ b/gnu/CORBA/Poa/gnuRequestProcessingPolicy.java
@@ -0,0 +1,80 @@
+/* gnuRequestProcessingPolicy.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA._PolicyImplBase;
+
+import org.omg.PortableServer.REQUEST_PROCESSING_POLICY_ID;
+import org.omg.PortableServer.RequestProcessingPolicy;
+import org.omg.PortableServer.RequestProcessingPolicyValue;
+
+/**
+ * The implementation of the request processing policy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuRequestProcessingPolicy
+ extends _PolicyImplBase
+ implements RequestProcessingPolicy, vPolicy
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Create the policy.
+ *
+ * @param v a value for the policy.
+ */
+ public gnuRequestProcessingPolicy(RequestProcessingPolicyValue v)
+ {
+ super(REQUEST_PROCESSING_POLICY_ID.value, v, v.value(),
+ "IDL:org.omg/PortableServer/RequestProcessingPolicy:1.0"
+ );
+ }
+
+ /**
+ * Get the value for the policy that was passed in a constructor.
+ */
+ public RequestProcessingPolicyValue value()
+ {
+ return (RequestProcessingPolicyValue) getValue();
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/gnuServantObject.java b/gnu/CORBA/Poa/gnuServantObject.java
new file mode 100644
index 000000000..f096104f9
--- /dev/null
+++ b/gnu/CORBA/Poa/gnuServantObject.java
@@ -0,0 +1,594 @@
+/* gnuServantObject.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA.IOR_Delegate;
+import gnu.CORBA.IOR_contructed_object;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.BAD_PARAM;
+import org.omg.CORBA.CompletionStatus;
+import org.omg.CORBA.OBJECT_NOT_EXIST;
+import org.omg.CORBA.OBJ_ADAPTER;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.SystemException;
+import org.omg.CORBA.TRANSIENT;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.InvokeHandler;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.ResponseHandler;
+import org.omg.PortableServer.CurrentOperations;
+import org.omg.PortableServer.DynamicImplementation;
+import org.omg.PortableServer.ForwardRequest;
+import org.omg.PortableServer.ImplicitActivationPolicyValue;
+import org.omg.PortableServer.POA;
+import org.omg.PortableServer.POAManager;
+import org.omg.PortableServer.POAManagerPackage.State;
+import org.omg.PortableServer.Servant;
+import org.omg.PortableServer.ServantLocatorPackage.CookieHolder;
+import org.omg.PortableServer.ServantRetentionPolicyValue;
+import org.omg.PortableServer.portable.Delegate;
+
+import java.util.Arrays;
+
+/**
+ * Represents a CORBA object, being locally served by the associated
+ * servant. The calls to the object are forwarded to the calls to the
+ * servant.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuServantObject
+ extends ObjectImpl
+ implements org.omg.CORBA.Object, InvokeHandler, CurrentOperations
+{
+ /**
+ * The associated servant that must also implement the
+ * {@link InvokeHandler} interface. This value can be temporary
+ * null if the object was created using
+ * POA.create_reference or POA.create_reference_with_id, private to force
+ * always to use {@link setServant}.
+ */
+ private Servant servant;
+
+ /**
+ * The Id of this object.
+ */
+ public final byte[] Id;
+
+ /**
+ * The poa that takes care about this object.
+ */
+ public final gnuPOA poa;
+
+ /**
+ * The POA manager, used to control the work of this object.
+ */
+ public final POAManager manager;
+
+ /**
+ * The orb.
+ */
+ public final ORB_1_4 orb;
+
+ /**
+ * The object repository ids, if they were specified separately.
+ * Normally, the ids are requested from the servant.
+ */
+ public final String[] repository_ids;
+
+ /**
+ * Create an object with no connected servant. The servant must be
+ * set later.
+ *
+ * @param a_repository_ids an array of repository ids, can be null
+ * (then ids will be requested from the servant).
+ * @param an_id the object id.
+ * @param a_poa the POA.
+ */
+ public gnuServantObject(String[] a_repository_ids, byte[] an_id,
+ gnuPOA a_poa, ORB_1_4 an_orb
+ )
+ {
+ repository_ids = a_repository_ids;
+ Id = an_id;
+ manager = a_poa.the_POAManager();
+ poa = a_poa;
+ orb = an_orb;
+ }
+
+ /**
+ * Create a servant object, associated with the passed servant.
+ *
+ * @param a_servant a servant, serving this object.
+ * @param an_id an Object Id for this object.
+ *
+ * @throws BAD_PARAM if the passed servant is not an
+ * {@link InvokeHandler}.
+ */
+ public gnuServantObject(Servant a_servant, byte[] an_id, ORB_1_4 an_orb,
+ gnuPOA a_poa
+ )
+ {
+ Id = an_id;
+ setServant(a_servant);
+ poa = a_poa;
+ if (poa != null)
+ manager = poa.the_POAManager();
+ else
+ manager = null;
+ repository_ids = null;
+ orb = an_orb;
+ }
+
+ /**
+ * Set a servant, if it has not been previously set.
+ *
+ * @param a_servant a servant to set, can be null to indicate
+ * the necessity for the subsequent activation.
+ *
+ * @throws BAD_PARAM if the passed servant is not an
+ * {@link InvokeHandler} or {@link DynamicImplementation} and also
+ * not null.
+ */
+ public void setServant(Servant a_servant)
+ {
+ if (a_servant != null && !(a_servant instanceof InvokeHandler) &&
+ !(a_servant instanceof DynamicImplementation)
+ )
+
+ throw new BAD_PARAM("Must be either InvokeHandler or " +
+ "DynamicImplementation, but is " + a_servant
+ );
+ servant = a_servant;
+ }
+
+ /**
+ * Returns the associated servant.
+ */
+ public Servant getServant()
+ {
+ return servant;
+ }
+
+ /**
+ * Return the associated invocation handler.
+ */
+ public InvokeHandler getHandler(String operation, CookieHolder cookie,
+ boolean forwarding_allowed
+ )
+ throws gnuForwardRequest
+ {
+ if (servant != null)
+ return servantToHandler(servant);
+ else
+ {
+ // Use servant locator to locate the servant.
+ if (poa.servant_locator != null)
+ {
+ try
+ {
+ servant =
+ poa.servant_locator.preinvoke(Id, poa, operation, cookie);
+ return servantToHandler(servant);
+ }
+ catch (ForwardRequest forw_ex)
+ {
+ if (forwarding_allowed)
+ throw new gnuForwardRequest(forw_ex.forward_reference);
+ else
+ {
+ servant =
+ ForwardedServant.create(forw_ex.forward_reference);
+ return servantToHandler(servant);
+ }
+ }
+ }
+ else
+ // Use servant activator to locate the servant.
+ if (poa.applies(ImplicitActivationPolicyValue.IMPLICIT_ACTIVATION) &&
+ poa.applies(ServantRetentionPolicyValue.RETAIN)
+ )
+ {
+ try
+ {
+ poa.activate_object_with_id(Id, servant, forwarding_allowed);
+ servant = poa.id_to_servant(Id);
+ return servantToHandler(servant);
+ }
+ catch (gnuForwardRequest forwarded)
+ {
+ throw forwarded;
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+
+ BAD_OPERATION bad =
+ new BAD_OPERATION("Unable to activate", 0x5004,
+ CompletionStatus.COMPLETED_NO
+ );
+ bad.initCause(ex);
+ throw bad;
+ }
+ }
+ else if (poa.default_servant != null)
+ {
+ servant = poa.default_servant;
+ return servantToHandler(servant);
+ }
+
+ // No servant and no servant manager - throw exception.
+ else
+ throw new BAD_OPERATION("Unable to activate", 0x5002,
+ CompletionStatus.COMPLETED_NO
+ );
+ }
+ }
+
+ /**
+ * Convert the servant to invocation handler.
+ */
+ public InvokeHandler servantToHandler(Servant servant)
+ {
+ if (servant instanceof InvokeHandler)
+ return (InvokeHandler) servant;
+ else if (servant instanceof DynamicImplementation)
+ return new dynImpHandler((DynamicImplementation) servant);
+ else
+ throw new BAD_OPERATION(servant + " must be either InvokeHandler or " +
+ "POA DynamicImplementation"
+ );
+ }
+
+ /**
+ * Create a servant object, associated with the passed servant.
+ * Requests the object id from the servant. Depending on the
+ * policies of the servants POA, the calls are eithe not
+ * synchronized or synchronized on POA or ORB.
+ *
+ * @param a_servant a servant, serving this object.
+ * @param an_id an Object Id for this object.
+ */
+ public gnuServantObject(Servant a_servant, gnuPOA poa)
+ {
+ this(a_servant, a_servant._object_id(), (ORB_1_4) a_servant._orb(), poa);
+ }
+
+ /**
+ * Delegates call to servant, passing the poa and Id.
+ */
+ public String[] _ids()
+ {
+ if (repository_ids == null)
+ return getServant()._all_interfaces(poa, Id);
+ else
+ return repository_ids;
+ }
+
+ /**
+ * Gets a string representation.
+ */
+ public String toString()
+ {
+ StringBuffer b = new StringBuffer("Servant object (");
+ for (int i = 0; i < Id.length; i++)
+ {
+ b.append(Integer.toHexString(Id [ i ] & 0xFF));
+ b.append(' ');
+ }
+ b.append(')');
+ return b.toString();
+ }
+
+ /**
+ * Always returns true.
+ */
+ public boolean _is_local()
+ {
+ return true;
+ }
+
+ /**
+ * Check if this object could be named by the given repository id.
+ * @param idl_id the repository id to check.
+ *
+ * @return true if it is one of the possible repository ids of this
+ * object.
+ */
+ public boolean _is_a(String idl_id)
+ {
+ String[] maybe = _ids();
+ for (int i = 0; i < maybe.length; i++)
+ {
+ if (maybe [ i ].equals(idl_id))
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Get an ORB, associated with the servant of this object.
+ * @return
+ */
+ public ORB _orb()
+ {
+ return getServant()._orb();
+ }
+
+ /**
+ * Handle the invocation (delegates to servant).
+ *
+ * @throws TRANSIENT minor 0x535503e9 if the POA is in discarding mode.
+ * @throws OBJ_ADAPTER minor 0x535503ea if the POA is inactivated.
+ * @throws OBJECT_NOT_EXISTS minor 0x535503ec if this object is
+ * inactivated.
+ *
+ * @specnote see {@link POAManagerOperations} for specnotes about
+ * the minor codes.
+ */
+ public OutputStream _invoke(String method, InputStream input,
+ ResponseHandler r_handler
+ )
+ throws SystemException
+ {
+ try
+ {
+ CookieHolder cookie = null;
+ activeObjectMap.Obj self = poa.aom.get(Id);
+
+ if (poa.servant_locator != null)
+ {
+ // If the servant locator is in use, it is always responsible
+ // for providing the servant.
+ self.servant = servant = null;
+ cookie = new CookieHolder();
+ }
+ else if (self != null && self.isDeactiveted())
+ {
+ if (poa.applies(ImplicitActivationPolicyValue.IMPLICIT_ACTIVATION) &&
+ poa.servant_activator != null
+ )
+ {
+ // Reset the servant, forcing the subsequent activation.
+ servant = null;
+ }
+ else
+ throw new OBJECT_NOT_EXIST("Object deactivated", 0x535503ec,
+ CompletionStatus.COMPLETED_NO
+ );
+ }
+
+ InvokeHandler handler = getHandler(method, cookie, true);
+
+ Delegate d = null;
+
+ try
+ {
+ d = servant._get_delegate();
+ orb.currents.put(Thread.currentThread(), this);
+ }
+ catch (Exception ex)
+ {
+ // In some cases exception is thrown if the delegate is not set.
+ }
+ if (d instanceof servantDelegate)
+ {
+ // If the delegate is already set, check maybe we can
+ // reuse the existing instance.
+ if (((servantDelegate) d).object != this)
+ servant._set_delegate(new servantDelegate(servant, poa, Id));
+ }
+ else
+ {
+ servant._set_delegate(new servantDelegate(servant, poa, Id));
+ }
+
+ try
+ {
+ switch (manager.get_state().value())
+ {
+ case State._ACTIVE :
+ return handler._invoke(method, input, r_handler);
+
+ case State._HOLDING :
+
+ // The holding mode is implemented
+ // relying on the holding capabilites of the network
+ // support (if any).
+ // TODO FIXME in more recent CORBA applications, the client
+ // ORB can free the connection and wait for a server side
+ // notification about the completed request. Implement this.
+ int sleep = 5;
+ int max = 500;
+
+ // Wait till the state will be switched into some other
+ // mode.
+ while (manager.get_state().value() == State._HOLDING)
+ {
+ try
+ {
+ Thread.sleep(sleep);
+ if (sleep < max)
+ sleep = max;
+ }
+ catch (InterruptedException ex)
+ {
+ }
+ }
+
+ // Handle another mode.
+ return _invoke(method, input, r_handler);
+
+ case State._DISCARDING :
+ throw new TRANSIENT("Discarding mode", 0x535503e9,
+ CompletionStatus.COMPLETED_NO
+ );
+
+ case State._INACTIVE :
+ throw new OBJ_ADAPTER("POA deactivated", 0x535503ea,
+ CompletionStatus.COMPLETED_NO
+ );
+
+ default :
+ throw new InternalError(); // No more states.
+ }
+ }
+ finally
+ {
+ if (poa.servant_locator != null)
+ {
+ poa.servant_locator.postinvoke(Id, poa, method, cookie.value,
+ servant
+ );
+ servant = null;
+ }
+ }
+ }
+ finally
+ {
+ orb.currents.remove(Thread.currentThread());
+ }
+ }
+
+ /**
+ * Compare with another object for equality, comparing the
+ * object keys.
+ */
+ public boolean equals(java.lang.Object other)
+ {
+ if (other instanceof gnuServantObject)
+ {
+ gnuServantObject o = (gnuServantObject) other;
+
+ return Arrays.equals(o.Id, Id);
+ }
+ else
+ return false;
+ }
+
+ /**
+ * Get the hash code, based on the object key.
+ */
+ public int hashCode()
+ {
+ long s = 0;
+ int v = 1;
+ for (int i = 0; i < Id.length; i++)
+ {
+ s += Id [ i ] * v;
+ if (s > Integer.MAX_VALUE)
+ {
+ s = s % Integer.MAX_VALUE;
+ v = 1;
+ }
+ v = v * 8;
+ }
+ return (int) (s % Integer.MAX_VALUE);
+ }
+
+ /**
+ * Get the object id.
+ */
+ public byte[] get_object_id()
+ {
+ return Id;
+ }
+
+ /**
+ * Get POA.
+ */
+ public POA get_POA()
+ {
+ return poa;
+ }
+
+ /**
+ * Returns without action.
+ */
+ public void _release()
+ {
+ }
+
+ /**
+ * Returns without action.
+ */
+ public void _releaseReply(InputStream stream)
+ {
+ }
+
+ /**
+ * Checks if this object is equivalent to another instance.
+ * These objects are assumed equal if they are connected to the
+ * same orb and poa under the same Id, regardless of they
+ * delegates.
+ *
+ * @param another instance to check.
+ * @return
+ */
+ public boolean _is_equivalent(org.omg.CORBA.Object other)
+ {
+ if (other instanceof gnuServantObject)
+ {
+ gnuServantObject g = (gnuServantObject) other;
+ return orb == g.orb && poa == g.poa && Arrays.equals(Id, g.Id);
+ }
+ else if (other instanceof IOR_contructed_object)
+ {
+ IOR_contructed_object ir = ((IOR_contructed_object) other);
+ try
+ {
+ IOR_Delegate ird = (IOR_Delegate) ir._get_delegate();
+ byte[] ior_id = poa.idFormIor(ird.getIor().key);
+ if (ior_id != null && Arrays.equals(ior_id, Id))
+ return true;
+ else
+ return false;
+ }
+ catch (Exception ex)
+ {
+ // Non - typical delegate or very specific subclass of
+ // IOR_constructed_object.
+ return super._is_equivalent(other);
+ }
+ }
+ return super._is_equivalent(other);
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/gnuServantRetentionPolicy.java b/gnu/CORBA/Poa/gnuServantRetentionPolicy.java
new file mode 100644
index 000000000..009e70e1b
--- /dev/null
+++ b/gnu/CORBA/Poa/gnuServantRetentionPolicy.java
@@ -0,0 +1,80 @@
+/* gnuServantRetentionPolicy.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA._PolicyImplBase;
+
+import org.omg.PortableServer.SERVANT_RETENTION_POLICY_ID;
+import org.omg.PortableServer.ServantRetentionPolicy;
+import org.omg.PortableServer.ServantRetentionPolicyValue;
+
+/**
+ * The implementation of the servant retention policy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuServantRetentionPolicy
+ extends _PolicyImplBase
+ implements ServantRetentionPolicy, vPolicy
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Create the policy.
+ *
+ * @param v a value for the policy.
+ */
+ public gnuServantRetentionPolicy(ServantRetentionPolicyValue v)
+ {
+ super(SERVANT_RETENTION_POLICY_ID.value, v, v.value(),
+ "IDL:org.omg/PortableServer/ServantRetentionPolicy:1.0"
+ );
+ }
+
+ /**
+ * Get the value for the policy that was passed in a constructor.
+ */
+ public ServantRetentionPolicyValue value()
+ {
+ return (ServantRetentionPolicyValue) getValue();
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/gnuThreadPolicy.java b/gnu/CORBA/Poa/gnuThreadPolicy.java
new file mode 100644
index 000000000..f42ebefb3
--- /dev/null
+++ b/gnu/CORBA/Poa/gnuThreadPolicy.java
@@ -0,0 +1,80 @@
+/* gnuThreadPolicy.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA._PolicyImplBase;
+
+import org.omg.PortableServer.THREAD_POLICY_ID;
+import org.omg.PortableServer.ThreadPolicy;
+import org.omg.PortableServer.ThreadPolicyValue;
+
+/**
+ * The implementation of the thread policy.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuThreadPolicy
+ extends _PolicyImplBase
+ implements ThreadPolicy, vPolicy
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Create the policy.
+ *
+ * @param v a value for the policy.
+ */
+ public gnuThreadPolicy(ThreadPolicyValue v)
+ {
+ super(THREAD_POLICY_ID.value, v, v.value(),
+ "IDL:org.omg/PortableServer/ThreadPolicy:1.0"
+ );
+ }
+
+ /**
+ * Get the value for the policy that was passed in a constructor.
+ */
+ public ThreadPolicyValue value()
+ {
+ return (ThreadPolicyValue) getValue();
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/policySets.java b/gnu/CORBA/Poa/policySets.java
new file mode 100644
index 000000000..eb688467a
--- /dev/null
+++ b/gnu/CORBA/Poa/policySets.java
@@ -0,0 +1,128 @@
+/* policySets.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import org.omg.CORBA.Policy;
+import org.omg.PortableServer.IdAssignmentPolicyValue;
+import org.omg.PortableServer.IdUniquenessPolicyValue;
+import org.omg.PortableServer.ImplicitActivationPolicyValue;
+import org.omg.PortableServer.LifespanPolicyValue;
+import org.omg.PortableServer.RequestProcessingPolicyValue;
+import org.omg.PortableServer.ServantRetentionPolicyValue;
+import org.omg.PortableServer.ThreadPolicyValue;
+
+import java.util.ArrayList;
+
+/**
+ * Contains the frequently uset POA policy sets. The policy
+ * arrays are package private for security reasons, the cloned
+ * copies are returned.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class policySets
+{
+ /**
+ * The default policy set, as defined in OMG specs. This is also
+ * the policy set for the root POA.
+ */
+ private static final vPolicy[] rootPOASet =
+ new vPolicy[]
+ {
+ new gnuThreadPolicy(ThreadPolicyValue.ORB_CTRL_MODEL),
+ new gnuLifespanPolicy(LifespanPolicyValue.TRANSIENT),
+ new gnuIdUniquenessPolicy(IdUniquenessPolicyValue.UNIQUE_ID),
+ new gnuIdAssignmentPolicy(IdAssignmentPolicyValue.SYSTEM_ID),
+ new gnuServantRetentionPolicy(ServantRetentionPolicyValue.RETAIN),
+ new gnuRequestProcessingPolicy(RequestProcessingPolicyValue.USE_ACTIVE_OBJECT_MAP_ONLY),
+ new gnuImplicitActivationPolicy(ImplicitActivationPolicyValue.IMPLICIT_ACTIVATION)
+ };
+
+ /**
+ * Return the policy set, applicable for the root POA, as defined
+ * in OMG specs.
+ */
+ public static Policy[] rootPoa()
+ {
+ Policy[] p = new Policy[ rootPOASet.length ];
+ System.arraycopy(rootPOASet, 0, p, 0, p.length);
+ return p;
+ }
+
+ /**
+ * Convert the potentially incomplete policy array into array, containing
+ * the complete policy set.
+ *
+ * @param policies the policy list, may be incomplete (even zero size).
+ *
+ * @return the complete policy array. The missing, but needed policies
+ * are added with they default values.
+ */
+ public static Policy[] withDefault(Policy[] policies)
+ {
+ ArrayList current = new ArrayList(rootPOASet.length);
+ Policy p_default;
+ boolean specified;
+
+ for (int i = 0; i < rootPOASet.length; i++)
+ {
+ p_default = rootPOASet [ i ];
+ specified = false;
+ ForThis:
+ for (int j = 0; j < policies.length; j++)
+ {
+ if (policies [ j ].policy_type() == p_default.policy_type())
+ {
+ specified = true;
+ current.add(policies [ j ]);
+ break ForThis;
+ }
+ }
+ if (!specified)
+ current.add(p_default.copy());
+ }
+
+ Policy[] complete = new Policy[ current.size() ];
+ for (int i = 0; i < complete.length; i++)
+ {
+ complete [ i ] = (Policy) current.get(i);
+ }
+ return complete;
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/Poa/servantDelegate.java b/gnu/CORBA/Poa/servantDelegate.java
new file mode 100644
index 000000000..1825db386
--- /dev/null
+++ b/gnu/CORBA/Poa/servantDelegate.java
@@ -0,0 +1,235 @@
+/* servantDelegate.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA.Poa;
+
+import gnu.CORBA.Unexpected;
+
+import org.omg.CORBA.NO_IMPLEMENT;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.ORBPackage.InvalidName;
+import org.omg.CORBA.Object;
+import org.omg.PortableServer.CurrentPackage.NoContext;
+import org.omg.PortableServer.POA;
+import org.omg.PortableServer.POAHelper;
+import org.omg.PortableServer.Servant;
+import org.omg.PortableServer.portable.Delegate;
+
+/**
+ * The implementation of the servant delegate for the locally existing
+ * servant.The associated servant that must also implement the
+ * {@link InvokeHandler} interface. Each servant requires a separate
+ * instance of this delegate and can serve a single object only.
+ * Hence the fields are final, but the delegate is typically reused
+ * unless the same servant is connected to different objects.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class servantDelegate
+ implements Delegate
+{
+ /**
+ * The servant, associated with this object.
+ */
+ final Servant servant;
+
+ /**
+ * The servant (not object) id.
+ */
+ final byte[] servant_id;
+
+ /**
+ * The POA, where the servant is connected.
+ */
+ final gnuPOA poa;
+
+ /**
+ * The object, exposed as an object, served by this servant.
+ */
+ final gnuServantObject object;
+
+ /**
+ * Create the delegat for the servant that will be connected to the
+ * given poa. The method is normally called from inside of gnuPOA.
+ * The constructor sets the newly created delegate as the delegate to this
+ * servant by calling Servant._set_delegate.
+ *
+ * @param a_poa the poa.
+ * @param a_servant the servant.
+ * @param a_servant_id the servant id.
+ */
+ public servantDelegate(Servant a_servant, gnuPOA a_poa, byte[] a_servant_id)
+ {
+ poa = a_poa;
+ servant = a_servant;
+ servant_id = a_servant_id;
+ servant._set_delegate(this);
+ object =
+ new gnuServantObject(servant, servant_id, (ORB_1_4) servant._orb(), a_poa);
+ object._set_delegate(new LocalDelegate(object, poa, a_servant_id));
+ }
+
+ /**
+ * Check if this object could be named by the given repository id.
+ * @param idl_id the repository id to check.
+ *
+ * @return true if it is one of the possible repository ids of this
+ * object.
+ */
+ public boolean is_a(Servant a_servant, String idl_id)
+ {
+ same(a_servant);
+
+ String[] maybe = object.repository_ids;
+ if (maybe == null)
+ maybe = servant._all_interfaces(poa, object.Id);
+ for (int i = 0; i < maybe.length; i++)
+ {
+ if (maybe [ i ].equals(idl_id))
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Return the ORB's default POA.
+ */
+ public POA default_POA(Servant a_servant)
+ {
+ same(a_servant);
+ try
+ {
+ return POAHelper.narrow(orb(a_servant).resolve_initial_references("RootPOA"));
+ }
+ catch (InvalidName ex)
+ {
+ throw new Unexpected(ex);
+ }
+ }
+
+ /**
+ * Get ORB.
+ */
+ public ORB orb(Servant a_servant)
+ {
+ same(a_servant);
+ return poa.orb();
+ }
+
+ /**
+ * Get the object, exposing the servant.
+ */
+ public Object this_object(Servant a_servant)
+ {
+ same(a_servant);
+ try
+ {
+ return poa.aom.get(poa.m_orb.currents.get_object_id()).object;
+ }
+ catch (NoContext ex)
+ {
+ return object;
+ }
+ }
+
+ /**
+ * Not supported.
+ *
+ * @specnote Same as for Sun up till 1.5 inclusive.
+ */
+ public Object get_interface_def(Servant a_servant)
+ {
+ same(a_servant);
+ throw new NO_IMPLEMENT();
+ }
+
+ /**
+ * Get the Id of the object being currently served.
+ */
+ public byte[] object_id(Servant a_servant)
+ {
+ same(a_servant);
+ try
+ {
+ byte[] id = poa.m_orb.currents.get_object_id();
+ return id;
+ }
+ catch (NoContext ex)
+ {
+ // TODO remove from mature code, this is a debug statement.
+ // The message should not appear during tests.
+ System.out.println("Not ok with object id");
+ return object.Id;
+ }
+ }
+
+ /**
+ * Always returns false;
+ */
+ public boolean non_existent(Servant a_servant)
+ {
+ same(a_servant);
+ return false;
+ }
+
+ /**
+ * Return the associated POA.
+ */
+ public POA poa(Servant a_servant)
+ {
+ same(a_servant);
+ try
+ {
+ return poa.m_orb.currents.get_POA();
+ }
+ catch (NoContext ex)
+ {
+ return poa;
+ }
+ }
+
+ /**
+ * Checks if the passed servant is the same as the servant, associated with
+ * this delegate. This class requires a single servant per delegate.
+ */
+ void same(Servant some_servant)
+ {
+ if (servant != some_servant)
+ throw new InternalError("Only one servant per delegate is supported.");
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/CDR/uncObjectInputStream.java b/gnu/CORBA/Poa/vPolicy.java
index b912f5d2c..9e45b56d7 100644
--- a/gnu/CORBA/CDR/uncObjectInputStream.java
+++ b/gnu/CORBA/Poa/vPolicy.java
@@ -1,4 +1,4 @@
-/* uncObjectInputStream.java --
+/* vPolicy.java --
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -36,35 +36,27 @@ obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-package gnu.CORBA.CDR;
+package gnu.CORBA.Poa;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectInputStream;
+import org.omg.CORBA.Policy;
/**
- * An object input stream that cannot be closed. Used in cases where
- * it represents only part of the input data.
+ * The Classpath implementation of the policy, providing the policy
+ * value and the code of the policy type.
*
- * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
-public class uncObjectInputStream
- extends ObjectInputStream
+public interface vPolicy
+ extends Policy
{
/**
- * Delegate call to super class constructor.
+ * Get the value of this policy
*/
- public uncObjectInputStream(InputStream in)
- throws IOException
- {
- super(in);
- }
+ java.lang.Object getValue();
/**
- * Do not close the stream, return without action.
+ * Get the integer code of this policy value.
*/
- public void close()
- {
- // Do nothing.
- }
+ int getCode();
+
} \ No newline at end of file
diff --git a/gnu/CORBA/Restricted_ORB.java b/gnu/CORBA/Restricted_ORB.java
index e2e7e7e93..801154e20 100644
--- a/gnu/CORBA/Restricted_ORB.java
+++ b/gnu/CORBA/Restricted_ORB.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -49,18 +49,19 @@ import org.omg.CORBA.NO_IMPLEMENT;
import org.omg.CORBA.NVList;
import org.omg.CORBA.NamedValue;
import org.omg.CORBA.ORB;
+import org.omg.CORBA.ORBPackage.InvalidName;
import org.omg.CORBA.Request;
import org.omg.CORBA.StructMember;
import org.omg.CORBA.TCKind;
import org.omg.CORBA.TypeCode;
-import org.omg.CORBA.UnionMember;
-
-import org.omg.CORBA.ORBPackage.InvalidName;
import org.omg.CORBA.TypeCodePackage.BadKind;
+import org.omg.CORBA.UnionMember;
import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.ValueFactory;
import java.applet.Applet;
+import java.util.Hashtable;
import java.util.Properties;
/**
@@ -80,7 +81,7 @@ import java.util.Properties;
* @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
*/
public class Restricted_ORB
- extends ORB
+ extends org.omg.CORBA_2_3.ORB
{
/**
* The singleton instance of this ORB.
@@ -88,6 +89,11 @@ public class Restricted_ORB
public static final ORB Singleton = new Restricted_ORB();
/**
+ * The value factories.
+ */
+ protected Hashtable factories = new Hashtable();
+
+ /**
* Create a new instance of the RestrictedORB. This is used
* in derived classes only.
*/
@@ -104,7 +110,9 @@ public class Restricted_ORB
/** {@inheritDoc} */
public Any create_any()
{
- return new gnuAny();
+ gnuAny any = new gnuAny();
+ any.setOrb(this);
+ return any;
}
/** {@inheritDoc} */
@@ -410,4 +418,46 @@ public class Restricted_ORB
{
no();
}
+
+ /**
+ * Register the value factory under the given repository id.
+ */
+ public ValueFactory register_value_factory(String repository_id,
+ ValueFactory factory
+ )
+ {
+ factories.put(repository_id, factory);
+ return factory;
+ }
+
+ /**
+ * Unregister the value factroy.
+ */
+ public void unregister_value_factory(String id)
+ {
+ factories.remove(id);
+ }
+
+ /**
+ * Look for the value factory for the value, having the given repository id.
+ * The implementation checks for the registered value factories first.
+ * If none found, it tries to load and instantiate the class, mathing the
+ * given naming convention. If this faild, null is returned.
+ *
+ * @param repository_id a repository id.
+ *
+ * @return a found value factory, null if none.
+ */
+ public ValueFactory lookup_value_factory(String repository_id)
+ {
+ ValueFactory f = (ValueFactory) factories.get(repository_id);
+ if (f != null)
+ return f;
+
+ f = (ValueFactory) ObjectCreator.createObject(repository_id, "DefaultFactory");
+ if (f != null)
+ factories.put(repository_id, f);
+
+ return f;
+ }
} \ No newline at end of file
diff --git a/gnu/CORBA/ServiceDetailHolder.java b/gnu/CORBA/ServiceDetailHolder.java
index 8073350a0..e8786374a 100644
--- a/gnu/CORBA/ServiceDetailHolder.java
+++ b/gnu/CORBA/ServiceDetailHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/ServiceRequestAdapter.java b/gnu/CORBA/ServiceRequestAdapter.java
index f584eb7a3..7f40fc84d 100644
--- a/gnu/CORBA/ServiceRequestAdapter.java
+++ b/gnu/CORBA/ServiceRequestAdapter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -53,10 +53,11 @@ import org.omg.CORBA.portable.ResponseHandler;
import org.omg.CORBA.portable.Streamable;
/**
- * This class exists to handle obsolete invocation style using
- * ServerRequest.
- *
- * @deprecated The method {@link ObjectImpl#_invoke} is much faster.
+ * This class supports invocation using ServerRequest. When possible,
+ * it is better to use the {@link ObjectImpl#_invoke} rather than
+ * working via ServerRequest. However since 1.4 the ServerRequest is
+ * involved into POA machinery making this type of call is sometimes
+ * inavoidable.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
@@ -86,13 +87,13 @@ public class ServiceRequestAdapter
}
/**
- * The old style invocation using the currently deprecated server
- * request class.
+ * Make an invocation.
*
* @param request a server request, containg the invocation information.
* @param target the invocation target
- * @param result the result holder with the set suitable streamable to read
- * the result or null for void.
+ * @param result the result holder with the set suitable streamable.
+ * Using this parameter only increase the performance. It can be
+ * null if the return type is void or unknown.
*/
public static void invoke(ServerRequest request, InvokeHandler target,
Streamable result
@@ -133,12 +134,20 @@ public class ServiceRequestAdapter
else
{
if (result != null)
- {
- result._read(in);
- gnuAny r = new gnuAny();
- r.insert_Streamable(result);
- request.set_result(r);
- };
+ {
+ // Use the holder for the return value, if provided.
+ result._read(in);
+
+ gnuAny r = new gnuAny();
+ r.insert_Streamable(result);
+ request.set_result(r);
+ }
+ else
+ {
+ // Use the universal holder otherwise.
+ gnuAny r = new gnuAny();
+ r.insert_Streamable(new streamReadyHolder(in));
+ }
// Unpack the arguments
for (int i = 0; i < args.count(); i++)
diff --git a/gnu/CORBA/SetOverrideTypeHolder.java b/gnu/CORBA/SetOverrideTypeHolder.java
index d1fcc18f3..12b4b9f0c 100644
--- a/gnu/CORBA/SetOverrideTypeHolder.java
+++ b/gnu/CORBA/SetOverrideTypeHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/Simple_delegate.java b/gnu/CORBA/Simple_delegate.java
index 662dfef18..5eabc7da8 100644
--- a/gnu/CORBA/Simple_delegate.java
+++ b/gnu/CORBA/Simple_delegate.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -195,13 +195,40 @@ public class Simple_delegate
}
/**
- * Only returns true if the objects are equal ('==').
+ * Returns true if the objects are the same of have
+ * the same delegate set. All objects in this implementation
+ * have a separate delegate.
*/
public boolean is_equivalent(org.omg.CORBA.Object target,
org.omg.CORBA.Object other
)
{
- return target == other;
+ if (target == other)
+ return true;
+ if ((target instanceof ObjectImpl) && other instanceof ObjectImpl)
+ {
+ try
+ {
+ org.omg.CORBA.portable.Delegate a =
+ ((ObjectImpl) target)._get_delegate();
+ org.omg.CORBA.portable.Delegate b =
+ ((ObjectImpl) other)._get_delegate();
+ if (a == b)
+ {
+ return true;
+ }
+ if (a != null && b != null)
+ {
+ return a.equals(b);
+ }
+ }
+ catch (Exception ex)
+ {
+ // Unable to get one of the delegates.
+ return false;
+ }
+ }
+ return false;
}
/**
@@ -246,4 +273,4 @@ public class Simple_delegate
{
throw new InternalError();
}
-}
+} \ No newline at end of file
diff --git a/gnu/CORBA/SocketRepository.java b/gnu/CORBA/SocketRepository.java
new file mode 100644
index 000000000..70bceadf5
--- /dev/null
+++ b/gnu/CORBA/SocketRepository.java
@@ -0,0 +1,93 @@
+/* SocketRepository.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA;
+
+import java.net.Socket;
+
+import java.util.HashMap;
+
+/**
+ * This class caches the opened sockets that are reused during the
+ * frequent calls. Otherwise, some CORBA applications may spend
+ * up to 90 % of the working time just for closing and opening the sockets.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class SocketRepository
+{
+ /**
+ * The socket map.
+ */
+ private static HashMap sockets = new HashMap();
+
+ /**
+ * Put a socket.
+ *
+ * @param key as socket key.
+ *
+ * @param s a socket.
+ */
+ public static void put_socket(Object key, Socket s)
+ {
+ sockets.put(key, s);
+ }
+
+ /**
+ * Get a socket.
+ *
+ * @param key a socket key.
+ *
+ * @return an opened socket for reuse, null if no such
+ * available or it is closed.
+ */
+ public static Socket get_socket(Object key)
+ {
+ Socket s = (Socket) sockets.get(key);
+ if (s != null && s.isClosed())
+ {
+ sockets.remove(key);
+ return null;
+ }
+ else
+ {
+ sockets.remove(key);
+ return s;
+ }
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/TypeCodeHelper.java b/gnu/CORBA/TypeCodeHelper.java
index 163ebbeb9..c74227542 100644
--- a/gnu/CORBA/TypeCodeHelper.java
+++ b/gnu/CORBA/TypeCodeHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/Unexpected.java b/gnu/CORBA/Unexpected.java
index f030d4dfc..89fb7e7b9 100644
--- a/gnu/CORBA/Unexpected.java
+++ b/gnu/CORBA/Unexpected.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/Version.java b/gnu/CORBA/Version.java
index 64ef01853..84f40bf4f 100644
--- a/gnu/CORBA/Version.java
+++ b/gnu/CORBA/Version.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/WCharHolder.java b/gnu/CORBA/WCharHolder.java
index baa768fdf..23f0ad100 100644
--- a/gnu/CORBA/WCharHolder.java
+++ b/gnu/CORBA/WCharHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/WStringHolder.java b/gnu/CORBA/WStringHolder.java
index 84ffcae96..c9e8e3323 100644
--- a/gnu/CORBA/WStringHolder.java
+++ b/gnu/CORBA/WStringHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/_PolicyImplBase.java b/gnu/CORBA/_PolicyImplBase.java
new file mode 100644
index 000000000..d9ff9d648
--- /dev/null
+++ b/gnu/CORBA/_PolicyImplBase.java
@@ -0,0 +1,231 @@
+/* _PolicyImplBase.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA;
+
+import org.omg.CORBA.BAD_OPERATION;
+import org.omg.CORBA.CompletionStatus;
+import org.omg.CORBA.Policy;
+import org.omg.CORBA.PolicyHelper;
+import org.omg.CORBA.portable.InputStream;
+import org.omg.CORBA.portable.InvokeHandler;
+import org.omg.CORBA.portable.ObjectImpl;
+import org.omg.CORBA.portable.OutputStream;
+import org.omg.CORBA.portable.ResponseHandler;
+
+/**
+ * The server side implementation base for the {@link Policy}.
+ *
+ * @specnote The java 1.4 API does not define the server side policy
+ * implementation base, but it defines the policy client side stub.
+ * As these two classes always work together, and even no separate testing is
+ * possible, the required implementation base is provided in gnu.CORBA
+ * namespace. Sun will probably include they base in the future java APIs.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public abstract class _PolicyImplBase
+ extends ObjectImpl
+ implements Policy, InvokeHandler
+{
+ /**
+ * Use serialVersionUID for interoperability.
+ */
+ private static final long serialVersionUID = 1;
+
+ /**
+ * The policy repository ids.
+ */
+ private final String[] ids;
+
+ /**
+ * The type of this policy.
+ */
+ private final int type;
+
+ /**
+ * The value of this policy. The value object is never the same
+ * for different policies.
+ */
+ private final java.lang.Object value;
+
+ /**
+ * The policy integer code, written in request to write
+ * the policy value.
+ */
+ private final int policyCode;
+
+ /**
+ * Create the new policy of the given type, having the given value.
+ * For security reasons, the method is kept package private.
+ *
+ * @param p_type the type of this policy.
+ * @param p_value the value of this policy.
+ * @param p_code the integer code of this policy.
+ * @param p_idl the policy IDL type string. The {@link #_ids()}
+ * will return array, first line being this string and another
+ * being PolicyHelper.id().
+ */
+ public _PolicyImplBase(int p_type, java.lang.Object p_value, int p_code,
+ String p_idl
+ )
+ {
+ type = p_type;
+ value = p_value;
+ policyCode = p_code;
+ ids = new String[] { p_idl, PolicyHelper.id() };
+ }
+
+ /**
+ * Get the integer code of the type of this policy.
+ */
+ public final int policy_type()
+ {
+ return type;
+ }
+
+ /**
+ * Return the list of repository ids.
+ */
+ public final String[] _ids()
+ {
+ return ids;
+ }
+
+ /**
+ * Call the required method.
+ */
+ public final OutputStream _invoke(String method, InputStream input,
+ ResponseHandler rh
+ )
+ {
+ OutputStream output = null;
+
+ if (method.equals("destroy"))
+ {
+ // The "destroy" has been invoked.
+ destroy();
+ output = rh.createReply();
+ }
+ else if (method.equals("copy"))
+ {
+ // The "copy" has been invoked.
+ org.omg.CORBA.Object returns = copy();
+ output = rh.createReply();
+ output.write_Object(this);
+ }
+ else if (method.equals("policy_type"))
+ {
+ // The "policy_type" has been invoked.
+ int returns = policy_type();
+ output = rh.createReply();
+ output.write_long(returns);
+ }
+ else if (method.equals("value"))
+ {
+ // The "value" can be invoked on the children types
+ // and must return an integer, representing the policy value
+ // (CORBA enumeration).
+ output = rh.createReply();
+ output.write_long(policyCode);
+ }
+ else
+ throw new BAD_OPERATION(method, 0, CompletionStatus.COMPLETED_MAYBE);
+
+ return output;
+ }
+
+ /**
+ * Get the value of this policy
+ */
+ public final java.lang.Object getValue()
+ {
+ return value;
+ }
+
+ /**
+ * Get the integer code of this policy value.
+ */
+ public final int getCode()
+ {
+ return policyCode;
+ }
+
+ /**
+ * Returns without action. It is a work of garbage collector
+ * to remove the unused objects.
+ */
+ public final void destroy()
+ {
+ }
+
+ /**
+ * Returns the string representation of the given policy.
+ */
+ public final String toString()
+ {
+ return value.toString();
+ }
+
+ /**
+ * Create a copy of this policy. The object is not mutable, so
+ * <code>this</code> can be returned.
+ *
+ * @return <code>this</code>
+ */
+ public Policy copy()
+ {
+ return this;
+ }
+
+ /**
+ * Use the value to get a hash code.
+ */
+ public int hashCode()
+ {
+ return getValue().hashCode();
+ }
+
+ /**
+ * Check the values for equality.
+ */
+ public boolean equals(Object x)
+ {
+ return x == null ? false : getValue().equals(x);
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/aliasTypeCode.java b/gnu/CORBA/aliasTypeCode.java
index a211b641f..884663101 100644
--- a/gnu/CORBA/aliasTypeCode.java
+++ b/gnu/CORBA/aliasTypeCode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/binaryReply.java b/gnu/CORBA/binaryReply.java
index 6d3c19291..71afa3776 100644
--- a/gnu/CORBA/binaryReply.java
+++ b/gnu/CORBA/binaryReply.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/bufferedResponseHandler.java b/gnu/CORBA/bufferedResponseHandler.java
index 03745a03a..e7f00baeb 100644
--- a/gnu/CORBA/bufferedResponseHandler.java
+++ b/gnu/CORBA/bufferedResponseHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/cdrEncapsCodec.java b/gnu/CORBA/cdrEncapsCodec.java
new file mode 100644
index 000000000..699c6f76a
--- /dev/null
+++ b/gnu/CORBA/cdrEncapsCodec.java
@@ -0,0 +1,356 @@
+/* cdrEncapsCodec.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA;
+
+import gnu.CORBA.CDR.cdrBufInput;
+import gnu.CORBA.CDR.cdrBufOutput;
+import gnu.CORBA.CDR.cdrOutput;
+
+import org.omg.CORBA.Any;
+import org.omg.CORBA.LocalObject;
+import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.ORB;
+import org.omg.CORBA.TCKind;
+import org.omg.CORBA.TypeCode;
+import org.omg.CORBA.UserException;
+import org.omg.IOP.Codec;
+import org.omg.IOP.CodecPackage.FormatMismatch;
+import org.omg.IOP.CodecPackage.InvalidTypeForEncoding;
+import org.omg.IOP.CodecPackage.TypeMismatch;
+
+/**
+ * The local {@link Codec} implementation for ENCODING_CDR_ENCAPS
+ * encoding. This is a local implementation; the remote side should
+ * have its own Codec of this kind.
+ *
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class cdrEncapsCodec
+ extends LocalObject
+ implements Codec
+{
+ /**
+ * The default version of encoding, used in parameterless constructor.
+ */
+ private static final Version DEFAULT_VERSION = new Version(1, 2);
+
+ /**
+ * If set to true, no wide string or wide character is allowed (GIOP 1.0).
+ */
+ private final boolean noWide;
+
+ /**
+ * The version of this encoding.
+ */
+ private final Version version;
+
+ /**
+ * The associated ORB.
+ */
+ protected final ORB orb;
+
+ /**
+ * If true, this Codec writes the record length (as int) in the beginning
+ * of the record. This indicator is part of the formal OMG standard, but it is
+ * missing in Sun's implementation. Both Suns's and this Codec detects
+ * the indicator, if present, but can also decode data where this information
+ * is missing. If the length indicator is missing, the first four bytes in
+ * Suns encoding are equal to 0 (Big Endian marker).
+ */
+ private boolean lengthIndicator = true;
+
+ /**
+ * Create an instance of this Codec, encoding following the given version.
+ */
+ public cdrEncapsCodec(ORB _orb, Version _version)
+ {
+ orb = _orb;
+ version = _version;
+ noWide = version.until_inclusive(1, 0);
+ }
+
+ /**
+ * Return the array of repository ids for this object.
+ *
+ * @return { "IDL:gnu/CORBA/cdrEnapsCodec:1.0" }, always.
+ */
+ public String[] _ids()
+ {
+ return new String[] { "IDL:gnu/CORBA/cdrEnapsCodec:1.0" };
+ }
+
+ /**
+ * Decode the contents of the byte array into Any.
+ * The byte array may have the optional four byte length indicator
+ * in the beginning. If these four bytes are zero, it is assumed,
+ * that no length indicator is present.
+ */
+ public Any decode(byte[] them)
+ throws FormatMismatch
+ {
+ cdrBufInput input = createInput(them);
+ cdrBufInput encapsulation = createEncapsulation(them, input);
+
+ TypeCode type = encapsulation.read_TypeCode();
+
+ try
+ {
+ checkTypePossibility("", type);
+ }
+ catch (InvalidTypeForEncoding ex)
+ {
+ throw new FormatMismatch(ex.getMessage());
+ }
+
+ return readAny(type, encapsulation);
+ }
+
+ private cdrBufInput createEncapsulation(byte[] them, cdrBufInput input)
+ {
+ cdrBufInput encapsulation;
+
+ if ((them [ 0 ] | them [ 1 ] | them [ 2 ] | them [ 3 ]) == 0)
+ {
+ // Skip that appears to be the always present Big Endian marker.
+ encapsulation = input;
+ input.read_short();
+ }
+ else
+ encapsulation = input.read_encapsulation();
+ return encapsulation;
+ }
+
+ /** {@inheritDoc} */
+ public byte[] encode(Any that)
+ throws InvalidTypeForEncoding
+ {
+ checkTypePossibility("", that.type());
+
+ cdrBufOutput output = createOutput(that);
+
+ // cdrBufOutput has internal support for this encoding.
+ cdrOutput encapsulation = output.createEncapsulation();
+
+ try
+ {
+ TypeCodeHelper.write(encapsulation, that.type());
+ that.write_value(encapsulation);
+
+ encapsulation.close();
+ output.close();
+ }
+ catch (Exception ex)
+ {
+ MARSHAL m = new MARSHAL();
+ m.initCause(ex);
+ throw m;
+ }
+ return output.buffer.toByteArray();
+ }
+
+ /**
+ * Decode the value, stored in the byte array, into Any, assuming,
+ * that the byte array holds the data structure, defined by the
+ * given typecode.
+ *
+ * The byte array may have the optional four byte length indicator
+ * in the beginning. If these four bytes are zero, it is assumed,
+ * that no length indicator is present.
+ */
+ public Any decode_value(byte[] them, TypeCode type)
+ throws FormatMismatch, TypeMismatch
+ {
+ try
+ {
+ checkTypePossibility("", type);
+ }
+ catch (InvalidTypeForEncoding ex)
+ {
+ throw new TypeMismatch(ex.getMessage());
+ }
+
+ cdrBufInput input = createInput(them);
+ cdrBufInput encapsulation = createEncapsulation(them, input);
+ return readAny(type, encapsulation);
+ }
+
+ /**
+ * Read an Any from the given stream.
+ *
+ * @param type a type of the Any to read.
+ * @param input the encapsulation stream.
+ */
+ private Any readAny(TypeCode type, cdrBufInput encapsulation)
+ throws MARSHAL
+ {
+ gnuAny a = new gnuAny();
+ a.setOrb(orb);
+
+ // cdrBufInput has internal support for this encoding.
+ a.read_value(encapsulation, type);
+ return a;
+ }
+
+ /** {@inheritDoc} */
+ public byte[] encode_value(Any that)
+ throws InvalidTypeForEncoding
+ {
+ checkTypePossibility("", that.type());
+
+ cdrBufOutput output = createOutput(that);
+
+ cdrOutput encapsulation = output.createEncapsulation();
+
+ try
+ {
+ that.write_value(encapsulation);
+
+ encapsulation.close();
+ output.close();
+ }
+ catch (Exception ex)
+ {
+ MARSHAL m = new MARSHAL();
+ m.initCause(ex);
+ throw m;
+ }
+ return output.buffer.toByteArray();
+ }
+
+ /**
+ * Create the CDR output stream for writing the given Any.
+ * The cdrBufOutput has internal support for encapsulation encodings.
+ *
+ * @param that the Any that will be written.
+ *
+ * @return the stream.
+ *
+ * @throws InvalidTypeForEncoding if that Any cannot be written under the
+ * given version.
+ */
+ private cdrBufOutput createOutput(Any that)
+ throws InvalidTypeForEncoding
+ {
+ cdrBufOutput output = new cdrBufOutput();
+ output.setOrb(orb);
+ output.setVersion(version);
+ return output;
+ }
+
+ /**
+ * Checks if the given type can be encoded. Currently only checks for wide
+ * strings and wide chars for GIOP 1.0.
+ *
+ * @param t a typecode to chek.
+ *
+ * @throws InvalidTypeForEncoding if the typecode is not valid for the given
+ * version.
+ */
+ private void checkTypePossibility(String name, TypeCode t)
+ throws InvalidTypeForEncoding
+ {
+ if (noWide)
+ {
+ try
+ {
+ int kind = t.kind().value();
+
+ if (kind == TCKind._tk_wchar || kind == TCKind._tk_wstring)
+ throw new InvalidTypeForEncoding(name + " wide char in " +
+ version
+ );
+ else if (kind == TCKind._tk_alias || kind == TCKind._tk_array ||
+ kind == TCKind._tk_sequence
+ )
+ checkTypePossibility("Array member", t.content_type());
+
+ else if (kind == TCKind._tk_struct || kind == TCKind._tk_union)
+ {
+ for (int i = 0; i < t.member_count(); i++)
+ {
+ checkTypePossibility(t.member_name(i), t.member_type(i));
+ }
+ }
+ }
+ catch (UserException ex)
+ {
+ InternalError ierr = new InternalError();
+ ierr.initCause(ex);
+ throw ierr;
+ }
+ }
+ }
+
+ /**
+ * Create the CDR input stream for reading the given byte array.
+ *
+ * @param them a byte array to read.
+ *
+ * @return the stream.
+ */
+ private cdrBufInput createInput(byte[] them)
+ {
+ cdrBufInput input = new cdrBufInput(them);
+ input.setOrb(orb);
+ input.setVersion(version);
+ return input;
+ }
+
+ /**
+ * Check if the Codec writes the length indicator.
+ */
+ public boolean hasLengthIndicator()
+ {
+ return lengthIndicator;
+ }
+
+ /**
+ * Sets if the Codec must write the record length in the beginning of the
+ * array. Encodings both with and without that indicator are understood
+ * both by Suns and this codec, but the OMG specification seems requiring
+ * it. The default behavior is to use the length indicator.
+ *
+ * @param use_lengthIndicator
+ */
+ public void setUseLengthIndicator(boolean use_lengthIndicator)
+ {
+ lengthIndicator = use_lengthIndicator;
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/corbaArrayList.java b/gnu/CORBA/corbaArrayList.java
index 7d531c092..1690f0583 100644
--- a/gnu/CORBA/corbaArrayList.java
+++ b/gnu/CORBA/corbaArrayList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/fixedTypeCode.java b/gnu/CORBA/fixedTypeCode.java
index 4d09e043d..ec88c22be 100644
--- a/gnu/CORBA/fixedTypeCode.java
+++ b/gnu/CORBA/fixedTypeCode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/generalTypeCode.java b/gnu/CORBA/generalTypeCode.java
index 222e7afb3..3b7914878 100644
--- a/gnu/CORBA/generalTypeCode.java
+++ b/gnu/CORBA/generalTypeCode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -62,7 +62,7 @@ public class generalTypeCode
/**
* Indicates that the field value has not been previously set.
*/
- protected static int UNSET = -Integer.MIN_VALUE;
+ protected static int UNSET = Integer.MIN_VALUE;
/**
* The kinds for that the length() must return 0 even if it
diff --git a/gnu/CORBA/gnuAny.java b/gnu/CORBA/gnuAny.java
index 7997265df..a48c50d61 100644
--- a/gnu/CORBA/gnuAny.java
+++ b/gnu/CORBA/gnuAny.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -68,6 +68,8 @@ import org.omg.CORBA.portable.Streamable;
import java.io.IOException;
import java.io.Serializable;
+import java.lang.reflect.Field;
+
import java.math.BigDecimal;
import java.util.Arrays;
@@ -279,9 +281,19 @@ public class gnuAny
{
try
{
- return ((ValueBaseHolder) has).value;
+ if (has instanceof ValueBaseHolder)
+ return ((ValueBaseHolder) has).value;
+ else
+ {
+ // Normally, ValueBase holder must be an instance of the
+ // ValueBaseHolder. However some IDL compilers probably
+ // have a bug, do not deriving this way. The the only
+ // way to access the wrapped value is via reflection.
+ Field f = has.getClass().getField("value");
+ return (Serializable) f.get(has);
+ }
}
- catch (ClassCastException ex)
+ catch (Exception ex)
{
return new BAD_OPERATION("Value type expected");
}
diff --git a/gnu/CORBA/gnuCodecFactory.java b/gnu/CORBA/gnuCodecFactory.java
new file mode 100644
index 000000000..8b71baf14
--- /dev/null
+++ b/gnu/CORBA/gnuCodecFactory.java
@@ -0,0 +1,95 @@
+/* gnuCodecFactory.java --
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.CORBA;
+
+import org.omg.CORBA.*;
+import org.omg.CORBA.LocalObject;
+import org.omg.IOP.*;
+import org.omg.IOP.Codec;
+import org.omg.IOP.CodecFactory;
+import org.omg.IOP.CodecFactoryPackage.UnknownEncoding;
+import org.omg.IOP.Encoding;
+
+/**
+ * A simple implementation of the Codec factory, able to return the
+ * standard Codec's. Only ENCODING_CDR_ENCAPS encoding is supported.
+ *
+ * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
+ */
+public class gnuCodecFactory
+ extends LocalObject
+ implements CodecFactory
+{
+ /**
+ * The associated ORB.
+ */
+ private final ORB orb;
+
+ /**
+ * Create a new instance of the this factory, associated with the given ORB.
+ */
+ public gnuCodecFactory(ORB an_orb)
+ {
+ orb = an_orb;
+ }
+
+ /**
+ * Creates the Codec for the given encoding.
+ *
+ * @param for_encoding the encoding for that the Codec must be created.
+ *
+ * @return the suitable Codec.
+ *
+ * @throws UnknownEncoding if the encoding is not a ENCODING_CDR_ENCAPS.
+ */
+ public Codec create_codec(Encoding for_encoding)
+ throws UnknownEncoding
+ {
+ if (for_encoding.format != ENCODING_CDR_ENCAPS.value)
+ throw new UnknownEncoding("Only ENCODING_CDR_ENCAPS is " +
+ "supported by this factory."
+ );
+
+ return new cdrEncapsCodec(orb,
+ new Version(for_encoding.major_version,
+ for_encoding.minor_version
+ )
+ );
+ }
+} \ No newline at end of file
diff --git a/gnu/CORBA/gnuContext.java b/gnu/CORBA/gnuContext.java
index 533d7026b..baa9fc804 100644
--- a/gnu/CORBA/gnuContext.java
+++ b/gnu/CORBA/gnuContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/gnuContextList.java b/gnu/CORBA/gnuContextList.java
index 5375e8b59..2a26437de 100644
--- a/gnu/CORBA/gnuContextList.java
+++ b/gnu/CORBA/gnuContextList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/gnuEnvironment.java b/gnu/CORBA/gnuEnvironment.java
index f470c95c0..ba02e3b19 100644
--- a/gnu/CORBA/gnuEnvironment.java
+++ b/gnu/CORBA/gnuEnvironment.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/gnuExceptionList.java b/gnu/CORBA/gnuExceptionList.java
index 55a9cc19e..b684ec928 100644
--- a/gnu/CORBA/gnuExceptionList.java
+++ b/gnu/CORBA/gnuExceptionList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/gnuNVList.java b/gnu/CORBA/gnuNVList.java
index e423df3b4..e436c332c 100644
--- a/gnu/CORBA/gnuNVList.java
+++ b/gnu/CORBA/gnuNVList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/gnuNamedValue.java b/gnu/CORBA/gnuNamedValue.java
index eda91df2c..6e3c271c9 100644
--- a/gnu/CORBA/gnuNamedValue.java
+++ b/gnu/CORBA/gnuNamedValue.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/gnuRequest.java b/gnu/CORBA/gnuRequest.java
index 745b350d5..cbff17f69 100644
--- a/gnu/CORBA/gnuRequest.java
+++ b/gnu/CORBA/gnuRequest.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -51,25 +51,27 @@ import org.omg.CORBA.ARG_OUT;
import org.omg.CORBA.Any;
import org.omg.CORBA.BAD_INV_ORDER;
import org.omg.CORBA.Bounds;
+import org.omg.CORBA.CompletionStatus;
import org.omg.CORBA.Context;
import org.omg.CORBA.ContextList;
import org.omg.CORBA.Environment;
import org.omg.CORBA.ExceptionList;
import org.omg.CORBA.MARSHAL;
+import org.omg.CORBA.NO_RESOURCES;
import org.omg.CORBA.NVList;
import org.omg.CORBA.NamedValue;
import org.omg.CORBA.ORB;
import org.omg.CORBA.Request;
import org.omg.CORBA.SystemException;
import org.omg.CORBA.TypeCode;
-import org.omg.CORBA.UserException;
+import org.omg.CORBA.UnknownUserException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import java.net.BindException;
import java.net.Socket;
-import org.omg.CORBA.UnknownUserException;
/**
* The implementation of the CORBA request.
@@ -86,9 +88,23 @@ public class gnuRequest
public static Version MAX_SUPPORTED = new Version(1, 2);
/**
- * The request reading buffer size.
+ * The initial pause that the Request makes when
+ * the required port is not available.
+ */
+ public static int PAUSE_INITIAL = 50;
+
+ /**
+ * The number of repretetive attempts to get a required
+ * port, if it is not immediately available.
*/
- public static final int READ_BUFFER_SIZE = 2048;
+ public static int PAUSE_STEPS = 12;
+
+ /**
+ * The maximal pausing interval between two repetetive attempts.
+ * The interval doubles after each unsuccessful attempt, but
+ * will not exceed this value.
+ */
+ public static int PAUSE_MAX = 1000;
/**
* The empty byte array.
@@ -196,6 +212,11 @@ public class gnuRequest
}
/**
+ * Used when redirecting request to another target.
+ */
+ gnuRequest redirected;
+
+ /**
* Get the IOR data, sufficient to find the invocation target.
*
* @return the IOR data.
@@ -648,9 +669,54 @@ public class gnuRequest
// Now the message size is available.
header.message_size = request_part.buffer.size();
+ Socket socket = null;
+
+ java.lang.Object key = ior.Internet.host + ":" + ior.Internet.port;
+
+ synchronized (SocketRepository.class)
+ {
+ socket = SocketRepository.get_socket(key);
+ }
+
try
{
- Socket socket = new Socket(ior.Internet.host, ior.Internet.port);
+ long pause = PAUSE_INITIAL;
+
+ if (socket == null)
+ {
+ // The BindException may be thrown under very heavy parallel
+ // load. For some time, just wait, exceptiong the socket to free.
+ Open:
+ for (int i = 0; i < PAUSE_STEPS; i++)
+ {
+ try
+ {
+ socket = new Socket(ior.Internet.host, ior.Internet.port);
+ break Open;
+ }
+ catch (BindException ex)
+ {
+ try
+ {
+ // Expecting to free a socket via finaliser.
+ System.gc();
+ Thread.sleep(pause);
+ pause = pause * 2;
+ if (pause > PAUSE_MAX)
+ pause = PAUSE_MAX;
+ }
+ catch (InterruptedException iex)
+ {
+ }
+ }
+ }
+ }
+
+ if (socket == null)
+ throw new NO_RESOURCES(ior.Internet.host + ":" + ior.Internet.port +
+ " in use"
+ );
+ socket.setKeepAlive(true);
OutputStream socketOutput = socket.getOutputStream();
@@ -674,16 +740,37 @@ public class gnuRequest
{
n += socketInput.read(r, n, r.length - n);
}
- socketInput.close();
return new binaryReply(orb, response_header, r);
}
else
return EMPTY;
}
- catch (IOException ex1)
+ catch (IOException io_ex)
+ {
+ MARSHAL m =
+ new MARSHAL("Unable to open a socket at " + ior.Internet.host + ":" +
+ ior.Internet.port, 10000 + ior.Internet.port,
+ CompletionStatus.COMPLETED_NO
+ );
+ m.initCause(io_ex);
+ throw m;
+ }
+ finally
{
- ex1.printStackTrace();
- return null;
+ try
+ {
+ if (socket != null && !socket.isClosed())
+ {
+ socket.setSoTimeout(Functional_ORB.TANDEM_REQUESTS);
+ SocketRepository.put_socket(key, socket);
+ }
+ }
+ catch (IOException scx)
+ {
+ InternalError ierr = new InternalError();
+ ierr.initCause(scx);
+ throw ierr;
+ }
}
}
@@ -754,8 +841,6 @@ public class gnuRequest
// The stream must be aligned sinve v1.2, but only once.
boolean align = response.header.version.since_inclusive(1, 2);
- boolean moved_permanently = false;
-
switch (rh.reply_status)
{
case ReplyHeader.NO_EXCEPTION :
@@ -843,16 +928,21 @@ public class gnuRequest
}
catch (IOException ex)
{
- throw new MARSHAL(ex + " while reading the forwarding info");
+ new MARSHAL("Cant read forwarding info", 5103,
+ CompletionStatus.COMPLETED_NO
+ );
}
setIor(forwarded);
+
// Repeat with the forwarded information.
p_invoke();
return;
default :
- throw new MARSHAL("Unknow reply status: " + rh.reply_status);
+ throw new MARSHAL("Unknow reply status", 8100 + rh.reply_status,
+ CompletionStatus.COMPLETED_NO
+ );
}
}
@@ -864,10 +954,10 @@ public class gnuRequest
*
* @throws MARSHAL if the attempt to write the parameters has failde.
*/
- private void write_parameter_buffer(MessageHeader header,
- cdrBufOutput request_part
- )
- throws MARSHAL
+ protected void write_parameter_buffer(MessageHeader header,
+ cdrBufOutput request_part
+ )
+ throws MARSHAL
{
try
{
@@ -891,8 +981,10 @@ public class gnuRequest
*
* @throws MARSHAL if the attempt to write the parameters has failde.
*/
- private void write_parameters(MessageHeader header, cdrBufOutput request_part)
- throws MARSHAL
+ protected void write_parameters(MessageHeader header,
+ cdrBufOutput request_part
+ )
+ throws MARSHAL
{
// Align after 1.2, but only once.
boolean align = header.version.since_inclusive(1, 2);
@@ -919,7 +1011,9 @@ public class gnuRequest
}
catch (Bounds ex)
{
- throw new MARSHAL("Unable to write method arguments to CDR output.");
+ InternalError ierr = new InternalError();
+ ierr.initCause(ex);
+ throw ierr;
}
}
-}
+} \ No newline at end of file
diff --git a/gnu/CORBA/holderFactory.java b/gnu/CORBA/holderFactory.java
index 17e0a68e5..177797a9c 100644
--- a/gnu/CORBA/holderFactory.java
+++ b/gnu/CORBA/holderFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -177,7 +177,6 @@ public class holderFactory
}
catch (Exception ex)
{
- ex.printStackTrace();
return null;
}
}
diff --git a/gnu/CORBA/primitiveArrayTypeCode.java b/gnu/CORBA/primitiveArrayTypeCode.java
index 6a4864033..7e2beebc9 100644
--- a/gnu/CORBA/primitiveArrayTypeCode.java
+++ b/gnu/CORBA/primitiveArrayTypeCode.java
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/primitiveTypeCode.java b/gnu/CORBA/primitiveTypeCode.java
index d240c9aee..1fa5cd09f 100644
--- a/gnu/CORBA/primitiveTypeCode.java
+++ b/gnu/CORBA/primitiveTypeCode.java
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/recordTypeCode.java b/gnu/CORBA/recordTypeCode.java
index 1e34b9aa3..8f2ecde7d 100644
--- a/gnu/CORBA/recordTypeCode.java
+++ b/gnu/CORBA/recordTypeCode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/recursiveTypeCode.java b/gnu/CORBA/recursiveTypeCode.java
index 1fbae2401..6bc672e6e 100644
--- a/gnu/CORBA/recursiveTypeCode.java
+++ b/gnu/CORBA/recursiveTypeCode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/streamReadyHolder.java b/gnu/CORBA/streamReadyHolder.java
index db35495c0..a777bd555 100644
--- a/gnu/CORBA/streamReadyHolder.java
+++ b/gnu/CORBA/streamReadyHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/streamRequest.java b/gnu/CORBA/streamRequest.java
index 5b63ca88e..a0f7eb099 100644
--- a/gnu/CORBA/streamRequest.java
+++ b/gnu/CORBA/streamRequest.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/stringTypeCode.java b/gnu/CORBA/stringTypeCode.java
index 40adffaff..27aa119f3 100644
--- a/gnu/CORBA/stringTypeCode.java
+++ b/gnu/CORBA/stringTypeCode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/stubFinder.java b/gnu/CORBA/stubFinder.java
index 3aff84133..77efd0047 100644
--- a/gnu/CORBA/stubFinder.java
+++ b/gnu/CORBA/stubFinder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/typeNamer.java b/gnu/CORBA/typeNamer.java
index ec3cf6e97..8b701015e 100644
--- a/gnu/CORBA/typeNamer.java
+++ b/gnu/CORBA/typeNamer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/universalHolder.java b/gnu/CORBA/universalHolder.java
index 1a5226c3e..6d8b77472 100644
--- a/gnu/CORBA/universalHolder.java
+++ b/gnu/CORBA/universalHolder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/classpath/Configuration.java.in b/gnu/classpath/Configuration.java.in
index 27c36ddc3..569ccf541 100644
--- a/gnu/classpath/Configuration.java.in
+++ b/gnu/classpath/Configuration.java.in
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -80,33 +80,6 @@ public interface Configuration
boolean INIT_LOAD_LIBRARY = @INIT_LOAD_LIBRARY@;
/**
- * Set to true if the VM provides a native method to implement
- * Proxy.getProxyClass completely, including argument verification.
- * If this is true, HAVE_NATIVE_GET_PROXY_DATA and
- * HAVE_NATIVE_GENERATE_PROXY_CLASS should be false.
- * @see java.lang.reflect.Proxy
- */
- boolean HAVE_NATIVE_GET_PROXY_CLASS = false;
-
- /**
- * Set to true if the VM provides a native method to implement
- * the first part of Proxy.getProxyClass: generation of the array
- * of methods to convert, and verification of the arguments.
- * If this is true, HAVE_NATIVE_GET_PROXY_CLASS should be false.
- * @see java.lang.reflect.Proxy
- */
- boolean HAVE_NATIVE_GET_PROXY_DATA = false;
-
- /**
- * Set to true if the VM provides a native method to implement
- * the second part of Proxy.getProxyClass: conversion of an array of
- * methods into an actual proxy class.
- * If this is true, HAVE_NATIVE_GET_PROXY_CLASS should be false.
- * @see java.lang.reflect.Proxy
- */
- boolean HAVE_NATIVE_GENERATE_PROXY_CLASS = false;
-
- /**
* Name of default AWT peer library.
*/
String default_awt_peer_toolkit = "@default_toolkit@";
diff --git a/gnu/classpath/ObjectPool.java b/gnu/classpath/ObjectPool.java
new file mode 100644
index 000000000..dd7510c72
--- /dev/null
+++ b/gnu/classpath/ObjectPool.java
@@ -0,0 +1,250 @@
+/* ObjectPool.java -- A generic object pool.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath;
+
+import java.util.HashMap;
+import java.util.Stack;
+
+/**
+ * A generic object pool that can be used to cache frequently used
+ * objects. Typical examples are 'throwaway' objects like java.awt.Dimension
+ * java.awt.Rectangle and java.awt.Point of which are created plenty in
+ * Swing but that usually have a very short lifecycle. For such objects
+ * it is much more efficient to hold them in an object pool, because the
+ * overhead of allocating heap and garbage collecting is avoided.
+ * <p>
+ * To use this pool you have to do 3 steps:
+ * <ol>
+ * <li>Get a reference to the (singleton) ObjectPool instance.</li>
+ * <li>Get a reference to an object of the correct type; Do something with it
+ * </li>
+ * <li>After use, return the object back to the pool.</li>
+ * </ol>
+ * Note that you should never make any assumptions about the state of such
+ * an object, you are responsible to take care of this before you use the
+ * object.
+ * </p><p>
+ * If a requested object is not available in the pool, then a new instance
+ * is created. It is therefore only possible to pool objects that have
+ * a zero-argument default constructor.
+ * </p><p>
+ * Example (using a java.awt.Point object):
+ * <pre>
+ * ObjectPool pool = ObjectPool.getInstance();
+ * Point point = (Point) pool.borrowObject(Point.class);
+ * doSomething(point);
+ * pool.returnObject(point);
+ * </pre>
+ *
+ *
+ * @author Roman Kennke (roman@kennke.org)
+ */
+public final class ObjectPool
+{
+
+ /** The maximum number of instances that we keep for each type. */
+ private static final int MAX_POOL_SIZE = 128;
+
+ /** This flag turns on/off caching (for benchmarking purposes). */
+ private static final boolean IS_CACHING = true;
+
+ /** The only instance of ObjectPool. */
+ private static ObjectPool instance;
+
+ /**
+ * The object pool. This maps Class objects (the type of the pooled objects)
+ * to Collections that contain the pooled instances. If there is no such
+ * mapping or the mapped COllection is empty, then no instance of the
+ * requested type is in the pool.
+ */
+ private HashMap pool;
+
+ /**
+ * Collect some stats in this fields. TODO: Can be removed later.
+ */
+ int created = 0;
+ int requested = 0;
+ int returned = 0;
+ int pooled = 0;
+
+ /**
+ * Creates a new instance of ObjectPool. This constructor is made private
+ * because it is an Singleton class. Use {@link #getInstance()} to
+ * get a reference to an ObjectPool.
+ */
+ private ObjectPool() {
+ pool = new HashMap();
+ }
+
+ /**
+ * Returns the ObjectPool that is used in this VM.
+ *
+ * @return an ObjectPool instance ready for use
+ */
+ public static synchronized ObjectPool getInstance()
+ {
+ if (instance == null)
+ instance = new ObjectPool();
+ return instance;
+ }
+
+ /**
+ * Return an instance of the specified type. If no such instance is available
+ * in the pool, then one is created using the zero argument default
+ * constructor.
+ *
+ * @param type the type of the requested object
+ *
+ * @return an object of the specified type, or <code>null</code> if there
+ * is no such object in the pool and an object of this type cannot
+ * be instantiated, like when the class does not provide a default
+ * constructor or it is not accessible
+ */
+ public Object borrowObject(Class type)
+ {
+ // This is only here for benchmarking purposes.
+ if (!IS_CACHING)
+ return createObject(type);
+ // Counts the requested objects. This is only here for benchmarking
+ // purposes.
+ requested++;
+ if (requested % 10000 == 0)
+ printStats();
+
+
+ Object object = null;
+ Stack pooledInstances = null;
+ synchronized (this)
+ {
+ pooledInstances = (Stack) pool.get(type);
+ }
+ if (pooledInstances == null)
+ object = createObject(type);
+ else
+ if (pooledInstances.size() == 0)
+ object = createObject(type);
+ else
+ synchronized (this)
+ {
+ object = pooledInstances.pop();
+ }
+ return object;
+ }
+
+ /**
+ * Returns an instance back into the pool.
+ *
+ * @param object the object that is returned into the pool
+ */
+ public void returnObject(Object object)
+ {
+ // This is only here for benchmarking purposes.
+ if (!IS_CACHING)
+ return;
+ // Count the returned objects. This is only here for benchmarking purposes.
+ returned++;
+
+ Class type = object.getClass();
+ Stack pooledInstances = null;
+ synchronized (this)
+ {
+ pooledInstances = (Stack) pool.get(type);
+ }
+ if (pooledInstances == null)
+ {
+ pooledInstances = new Stack();
+ }
+ if (pooledInstances.size() < MAX_POOL_SIZE)
+ synchronized (this)
+ {
+ pool.put(type, pooledInstances);
+
+ // Count the objects that are actually pooled. This is only
+ // here for benchmarking purposes.
+ pooled++;
+ }
+
+ synchronized (this)
+ {
+ pooledInstances.push(object);
+ }
+ }
+
+ /**
+ * Creates a new instance of the specified type.
+ *
+ * @param type the type of the requested object
+ *
+ * @return an instance of that type or <code>null</code> if the object
+ * cannot be instantiated for some reason
+ */
+ private Object createObject(Class type)
+ {
+ // Counts the objects that are created here. This is only here for
+ // benchmarking purposes.
+ created++;
+
+
+ Object object = null;
+ try
+ {
+ object = type.newInstance();
+ }
+ catch (InstantiationException ex)
+ {
+ // We return null if the object cannot be instantiated.
+ }
+ catch (IllegalAccessException ex)
+ {
+ // We return null if the object cannot be instantiated.
+ }
+ return object;
+ }
+
+ /**
+ * This method prints out some stats about the object pool. This gives
+ * an indication on how efficiently the pool is used.
+ */
+ void printStats()
+ {
+ System.err.println("Requested Objects: " + requested);
+ System.err.println("Returned Objects: " + returned);
+ System.err.println("Created Objects: " + created);
+ System.err.println("Pooled Objects: " + pooled);
+ }
+}
diff --git a/gnu/classpath/RawData.java b/gnu/classpath/RawData.java
index da3e23b9b..3ce97482c 100644
--- a/gnu/classpath/RawData.java
+++ b/gnu/classpath/RawData.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/classpath/RawData32.java b/gnu/classpath/RawData32.java
index 0c5df1726..c77163152 100644
--- a/gnu/classpath/RawData32.java
+++ b/gnu/classpath/RawData32.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/classpath/RawData64.java b/gnu/classpath/RawData64.java
index 38c70f05b..e3b6a93e2 100644
--- a/gnu/classpath/RawData64.java
+++ b/gnu/classpath/RawData64.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/classpath/ServiceFactory.java b/gnu/classpath/ServiceFactory.java
index e2faef9e3..711a9042c 100644
--- a/gnu/classpath/ServiceFactory.java
+++ b/gnu/classpath/ServiceFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/classpath/ServiceProviderLoadingAction.java b/gnu/classpath/ServiceProviderLoadingAction.java
index 4832c9712..b5e59cb4b 100644
--- a/gnu/classpath/ServiceProviderLoadingAction.java
+++ b/gnu/classpath/ServiceProviderLoadingAction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/classpath/SystemProperties.java b/gnu/classpath/SystemProperties.java
index 5d43dce28..17f8ebdb7 100644
--- a/gnu/classpath/SystemProperties.java
+++ b/gnu/classpath/SystemProperties.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -106,6 +106,12 @@ public class SystemProperties
if (defaultProperties.get("file.encoding") == null)
defaultProperties.put("file.encoding", "8859_1");
+ // Default to the Swing FocusManager so that the old-style Swing API
+ // for FocusManager can be supported without hardcoding it in AWT.
+ if (defaultProperties.get("gnu.java.awt.FocusManager") == null)
+ defaultProperties.put("gnu.java.awt.FocusManager",
+ "gnu.java.awt.FocusManager");
+
// XXX FIXME - Temp hack for old systems that set the wrong property
if (defaultProperties.get("java.io.tmpdir") == null)
defaultProperties.put("java.io.tmpdir",
diff --git a/gnu/classpath/debug/Component.java b/gnu/classpath/debug/Component.java
new file mode 100644
index 000000000..3dfc8927b
--- /dev/null
+++ b/gnu/classpath/debug/Component.java
@@ -0,0 +1,159 @@
+/* Component.java -- a component log level.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is a part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at
+your option) any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under terms
+of your choice, provided that you also meet, for each linked independent
+module, the terms and conditions of the license of that module. An
+independent module is a module which is not derived from or based on
+this library. If you modify this library, you may extend this exception
+to your version of the library, but you are not obligated to do so. If
+you do not wish to do so, delete this exception statement from your
+version. */
+
+
+package gnu.classpath.debug;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.logging.Level;
+
+public final class Component extends Level
+{
+
+ /*
+ * HOW TO ADD NEW COMPONENTS:
+ *
+ * If you want to add a new, simple component, that you will use in
+ * logging statements, simply create a new class variable that
+ * instantiates this class, and choose an appropriate string name
+ * and a integer constant not used by any other component level.
+ *
+ * For example, if my component had to do with 'frobbing', I would
+ * add this entry below:
+ *
+ * private static final Component FROBBING = new Component ("FROBBING", 7);
+ *
+ * Then, I would update the component 'EVERYTHING' to have and end
+ * index ONE GREATER THAN the index of the new component.
+ *
+ * ADDING NEW COMPONENT CLASSES:
+ *
+ * A "component class" is a run of more than one component, which can
+ * be enabled all at once. EVERYTHING and SSL are examples of component
+ * classes. To add a new class, create a new component with a start index
+ * equal to the index of the first member component, and with an end
+ * index equal to the index of the last member component plus one.
+ */
+
+ /**
+ * Signifies that everything should be logged. This should be used to
+ * enable or disable levels only; logging code should not use it.
+ */
+ public static final Component EVERYTHING = new Component ("*", 0, 7);
+
+ /**
+ * Signifies that all SSL related messages should be logged. This should
+ * be used to enable or disable levels only; logging code should not use
+ * it.
+ */
+ public static final Component SSL = new Component ("SSL", 0, 5);
+
+ /**
+ * Traces the progression of an SSL handshake.
+ */
+ public static final Component SSL_HANDSHAKE = new Component ("SSL HANDSHAKE", 0);
+
+ /**
+ * Traces the application messages during SSL communications.
+ */
+ public static final Component SSL_APPLICATION = new Component ("SSL APPLICATION", 1);
+
+ /**
+ * Trace details about the SSL key exchange.
+ */
+ public static final Component SSL_KEY_EXCHANGE = new Component ("SSL KEY EXCHANGE", 2);
+
+ /* Indices 3 and 4 reserved for future use by SSL components. */
+
+ /**
+ * Trace the operation of cryptographic primitives.
+ */
+ public static final Component CRYPTO = new Component ("CRYPTO", 5);
+
+ /**
+ * Trace the parsing of X.509 certificates and related objects.
+ */
+ public static final Component X509 = new Component ("X.509", 6);
+
+ private final int startIndex;
+ private final int endIndex;
+
+ private Component (final String name, final int bitIndex)
+ {
+ this (name, bitIndex, bitIndex + 1);
+ }
+
+ private Component (final String name, final int startIndex, final int endIndex)
+ {
+ super (name, Level.FINE.intValue ());
+ this.startIndex = startIndex;
+ this.endIndex = endIndex;
+ }
+
+ /**
+ * Return the component for the given name.
+ *
+ * @param name The name of the component to get.
+ * @return The named component, or null if there is no such component.
+ */
+ public static Component forName (final String name)
+ {
+ try
+ {
+ Field f = Component.class.getField (name.toUpperCase ());
+ if (!Modifier.isStatic (f.getModifiers ())
+ || Component.class.isAssignableFrom (f.getClass ()))
+ return null;
+ return (Component) f.get (null);
+ }
+ catch (Throwable _)
+ {
+ return null;
+ }
+ }
+
+ public int startIndex ()
+ {
+ return startIndex;
+ }
+
+ public int endIndex ()
+ {
+ return endIndex;
+ }
+} \ No newline at end of file
diff --git a/gnu/classpath/debug/PreciseFilter.java b/gnu/classpath/debug/PreciseFilter.java
new file mode 100644
index 000000000..7b88b2c8c
--- /dev/null
+++ b/gnu/classpath/debug/PreciseFilter.java
@@ -0,0 +1,105 @@
+/* PreciseFilter.java -- filter log messages by precise level.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is a part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at
+your option) any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under terms
+of your choice, provided that you also meet, for each linked independent
+module, the terms and conditions of the license of that module. An
+independent module is a module which is not derived from or based on
+this library. If you modify this library, you may extend this exception
+to your version of the library, but you are not obligated to do so. If
+you do not wish to do so, delete this exception statement from your
+version. */
+
+
+package gnu.classpath.debug;
+
+import java.util.BitSet;
+import java.util.logging.Filter;
+import java.util.logging.LogRecord;
+
+public final class PreciseFilter implements Filter
+{
+
+ /**
+ * The singleton filter instance.
+ */
+ public static final PreciseFilter GLOBAL = new PreciseFilter ();
+
+ private final BitSet enabled;
+
+ private PreciseFilter ()
+ {
+ enabled = new BitSet ();
+ }
+
+ /**
+ * Disable logging of a component.
+ *
+ * @param component The component to disable logging for.
+ * @throws NullPointerException If component is null.
+ */
+ public void disable (final Component component)
+ {
+ enabled.clear (component.startIndex (), component.endIndex ());
+ }
+
+ /**
+ * Enable logging of a component.
+ *
+ * @param component The component to enable logging for.
+ * @throws NullPointerException If component is null.
+ */
+ public void enable (final Component component)
+ {
+ enabled.set (component.startIndex (), component.endIndex ());
+ }
+
+ /**
+ * Tell if a component is enabled for logging.
+ *
+ * @param component The component to test.
+ * @return True iff the specified component is enabled for logging.
+ * @throws NullPointerException If component is null.
+ */
+ public boolean isEnabled (final Component component)
+ {
+ return (enabled.get (component.startIndex ()));
+ }
+
+ public boolean isLoggable (final LogRecord record)
+ {
+ try
+ {
+ return isEnabled ((Component) record.getLevel ());
+ }
+ catch (ClassCastException cce)
+ {
+ return true;
+ }
+ }
+} \ No newline at end of file
diff --git a/gnu/classpath/debug/SystemLogger.java b/gnu/classpath/debug/SystemLogger.java
new file mode 100644
index 000000000..94aa93f69
--- /dev/null
+++ b/gnu/classpath/debug/SystemLogger.java
@@ -0,0 +1,71 @@
+/* SystemLogger.java -- Classpath's system debugging logger.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is a part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or (at
+your option) any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under terms
+of your choice, provided that you also meet, for each linked independent
+module, the terms and conditions of the license of that module. An
+independent module is a module which is not derived from or based on
+this library. If you modify this library, you may extend this exception
+to your version of the library, but you are not obligated to do so. If
+you do not wish to do so, delete this exception statement from your
+version. */
+
+
+package gnu.classpath.debug;
+
+import gnu.classpath.SystemProperties;
+import java.util.StringTokenizer;
+import java.util.logging.Logger;
+
+public final class SystemLogger
+{
+ public static final Logger SYSTEM = Logger.getLogger ("gnu.classpath");
+
+ static
+ {
+ SYSTEM.setFilter (PreciseFilter.GLOBAL);
+
+ String defaults = SystemProperties.getProperty ("gnu.classpath.debug.components");
+
+ if (defaults != null)
+ {
+ StringTokenizer tok = new StringTokenizer (defaults, ",");
+ while (tok.hasMoreTokens ())
+ {
+ Component c = Component.forName (tok.nextToken ());
+ if (c != null)
+ PreciseFilter.GLOBAL.enable (c);
+ SYSTEM.log (java.util.logging.Level.INFO, "enabled: {0}", c);
+ }
+ }
+
+ java.util.logging.Handler[] h = SYSTEM.getHandlers ();
+ for (int i = 0; i < h.length; i++)
+ System.out.println (h[i]);
+ }
+}
diff --git a/gnu/classpath/jdwp/exception/InvalidClassException.java b/gnu/classpath/jdwp/exception/InvalidClassException.java
new file mode 100644
index 000000000..cd276be8c
--- /dev/null
+++ b/gnu/classpath/jdwp/exception/InvalidClassException.java
@@ -0,0 +1,63 @@
+/* InvalidClassException.java -- invalid/unknown class reference id exception
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.exception;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * An exception thrown by the JDWP back-end when an invalid reference
+ * type id is used by the debugger.
+ *
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class InvalidClassException
+ extends JdwpException
+{
+ public InvalidClassException (long id)
+ {
+ super (JdwpConstants.Error.INVALID_CLASS,
+ "invalid class id (" + id + ")");
+ }
+
+ public InvalidClassException (Throwable t)
+ {
+ super (JdwpConstants.Error.INVALID_CLASS, t);
+ }
+}
diff --git a/gnu/classpath/jdwp/exception/InvalidCountException.java b/gnu/classpath/jdwp/exception/InvalidCountException.java
new file mode 100644
index 000000000..d5f40c96b
--- /dev/null
+++ b/gnu/classpath/jdwp/exception/InvalidCountException.java
@@ -0,0 +1,61 @@
+/* InvalidCountException -- an invalid count exception
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.exception;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * An exception thrown when a count filter is given an invalid count.
+ *
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class InvalidCountException
+ extends JdwpException
+{
+ public InvalidCountException (int id)
+ {
+ super (JdwpConstants.Error.INVALID_COUNT, "invalid count (" + id + ")");
+ }
+
+ public InvalidCountException (Throwable t)
+ {
+ super (JdwpConstants.Error.INVALID_COUNT, t);
+ }
+}
diff --git a/gnu/classpath/jdwp/exception/InvalidEventTypeException.java b/gnu/classpath/jdwp/exception/InvalidEventTypeException.java
new file mode 100644
index 000000000..e0402283f
--- /dev/null
+++ b/gnu/classpath/jdwp/exception/InvalidEventTypeException.java
@@ -0,0 +1,63 @@
+/* InvalidEventTypeException.java -- an invalid event kind exception
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.exception;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * An exception thrown when the debugger asks for an event request
+ * for a non-existant event
+ *
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class InvalidEventTypeException
+ extends JdwpException
+{
+ public InvalidEventTypeException (byte kind)
+ {
+ super (JdwpConstants.Error.INVALID_EVENT_TYPE,
+ "invalid event type (" + kind + ")");
+ }
+
+ public InvalidEventTypeException (Throwable t)
+ {
+ super (JdwpConstants.Error.INVALID_EVENT_TYPE, t);
+ }
+}
diff --git a/gnu/classpath/jdwp/exception/InvalidObjectException.java b/gnu/classpath/jdwp/exception/InvalidObjectException.java
new file mode 100644
index 000000000..49e8ac1e5
--- /dev/null
+++ b/gnu/classpath/jdwp/exception/InvalidObjectException.java
@@ -0,0 +1,63 @@
+/* InvalidObjectException.java -- an invalid object id exception
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.exception;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * An exception thrown when an invalid object id is used by
+ * the debugger
+ *
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class InvalidObjectException
+ extends JdwpException
+{
+ public InvalidObjectException (long id)
+ {
+ super (JdwpConstants.Error.INVALID_OBJECT,
+ "invalid object id (" + id + ")");
+ }
+
+ public InvalidObjectException (Throwable t)
+ {
+ super (JdwpConstants.Error.INVALID_OBJECT, t);
+ }
+}
diff --git a/gnu/classpath/jdwp/exception/InvalidStringException.java b/gnu/classpath/jdwp/exception/InvalidStringException.java
new file mode 100644
index 000000000..c84a960f1
--- /dev/null
+++ b/gnu/classpath/jdwp/exception/InvalidStringException.java
@@ -0,0 +1,68 @@
+/* InvalidStringException.java -- an invalid string exception
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.exception;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * An exception thrown when the debugger uses an invalid String.
+ *
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class InvalidStringException
+ extends JdwpException
+{
+ public InvalidStringException (String str)
+ {
+ super (JdwpConstants.Error.INVALID_STRING,
+ "invalid string (" + str + ")");
+ }
+
+ public InvalidStringException (long id)
+ {
+ super (JdwpConstants.Error.INVALID_STRING,
+ "invalid string id (" + id + ")");
+ }
+
+ public InvalidStringException (Throwable t)
+ {
+ super (JdwpConstants.Error.INVALID_STRING, t);
+ }
+}
diff --git a/gnu/java/awt/EmbeddedWindowSupport.java b/gnu/classpath/jdwp/exception/InvalidThreadException.java
index 3018f469f..985b1a791 100644
--- a/gnu/java/awt/EmbeddedWindowSupport.java
+++ b/gnu/classpath/jdwp/exception/InvalidThreadException.java
@@ -1,5 +1,5 @@
-/* EmbeddedWindowSupport.java --
- Copyright (C) 2003 Free Software Foundation, Inc.
+/* InvalidThreadException.java -- an invalid thread exception
+ Copyright (C) 2005 Free Software Foundation
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -28,6 +28,7 @@ permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
@@ -36,30 +37,27 @@ obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-package gnu.java.awt;
+package gnu.classpath.jdwp.exception;
-import gnu.java.awt.peer.EmbeddedWindowPeer;
+import gnu.classpath.jdwp.JdwpConstants;
/**
- * Declares a method for creating native embedded window peers.
- *
- * All classes inherited from java.awt.Toolkit that implement this
- * interface are assumed to support the creation of embedded window
- * peers. To create an embedded window, use
- * gnu.java.awt.EmbeddedWindow.
- *
- * @see gnu.java.awt.EmbeddedWindow
- * @see java.awt.Toolkit
+ * An exception thrown when an invalid thread is used
+ * by the debugger
*
- * @author Michael Koch (konqueror@gmx.de)
+ * @author Keith Seitz (keiths@redhat.com)
*/
-public interface EmbeddedWindowSupport
+public class InvalidThreadException
+ extends JdwpException
{
- /**
- * Creates an embedded window peer, and associates it with an
- * EmbeddedWindow object.
- *
- * @param w The embedded window with which to associate a peer.
- */
- EmbeddedWindowPeer createEmbeddedWindow (EmbeddedWindow w);
+ public InvalidThreadException (long id)
+ {
+ super (JdwpConstants.Error.INVALID_THREAD,
+ "invalid thread id (" + id + ")");
+ }
+
+ public InvalidThreadException (Throwable t)
+ {
+ super (JdwpConstants.Error.INVALID_THREAD, t);
+ }
}
diff --git a/gnu/classpath/jdwp/exception/InvalidThreadGroupException.java b/gnu/classpath/jdwp/exception/InvalidThreadGroupException.java
new file mode 100644
index 000000000..047621892
--- /dev/null
+++ b/gnu/classpath/jdwp/exception/InvalidThreadGroupException.java
@@ -0,0 +1,63 @@
+/* InvalidThreadGroupException.java -- an invalid thread group exception
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.exception;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * An exception thrown when an invalid thread group is used
+ * by the debugger
+ *
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class InvalidThreadGroupException
+ extends JdwpException
+{
+ public InvalidThreadGroupException (long id)
+ {
+ super (JdwpConstants.Error.INVALID_THREAD_GROUP,
+ "invalid thread id (" + id + ")");
+ }
+
+ public InvalidThreadGroupException (Throwable t)
+ {
+ super (JdwpConstants.Error.INVALID_THREAD, t);
+ }
+}
diff --git a/gnu/classpath/jdwp/exception/JdwpException.java b/gnu/classpath/jdwp/exception/JdwpException.java
new file mode 100644
index 000000000..5c96cc56b
--- /dev/null
+++ b/gnu/classpath/jdwp/exception/JdwpException.java
@@ -0,0 +1,86 @@
+/* JdwpException.java -- an exception base class for all JDWP exceptions
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.exception;
+
+/**
+ * A base class exception for all JDWP back-end exceptions
+ *
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class JdwpException
+ extends Exception
+{
+ // The integer error code defined by JDWP
+ private short _errorCode;
+
+ /**
+ * Constructs a new <code>JdwpException</code> with the
+ * given error code and given cause
+ *
+ * @param code the JDWP error code
+ * @param t the cause of the exception
+ */
+ public JdwpException (short code, Throwable t)
+ {
+ super (t);
+ _errorCode = code;
+ }
+
+ /**
+ * Constructs a new <code>JdwpException</code> with the
+ * given error code and string error message
+ *
+ * @param code the JDWP error code
+ * @param str an error message
+ */
+ public JdwpException (short code, String str)
+ {
+ super (str);
+ _errorCode = code;
+ }
+
+ /**
+ * Returns the JDWP error code represented by this exception
+ */
+ public short getErrorCode ()
+ {
+ return _errorCode;
+ }
+}
diff --git a/gnu/classpath/jdwp/exception/JdwpInternalErrorException.java b/gnu/classpath/jdwp/exception/JdwpInternalErrorException.java
new file mode 100644
index 000000000..c022dc537
--- /dev/null
+++ b/gnu/classpath/jdwp/exception/JdwpInternalErrorException.java
@@ -0,0 +1,57 @@
+/* JdwpInternalErrorException.java -- an internal error exception
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.exception;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * An exception thrown by the JDWP back-end when an unusual runtime
+ * error occurs internally
+ *
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class JdwpInternalErrorException
+ extends JdwpException
+{
+ public JdwpInternalErrorException (Throwable cause)
+ {
+ super (JdwpConstants.Error.INTERNAL, cause);
+ }
+}
diff --git a/gnu/classpath/jdwp/exception/NotImplementedException.java b/gnu/classpath/jdwp/exception/NotImplementedException.java
new file mode 100644
index 000000000..fba627ea2
--- /dev/null
+++ b/gnu/classpath/jdwp/exception/NotImplementedException.java
@@ -0,0 +1,58 @@
+/* NotImplementedException.java -- an exception for unimplemented JDWP
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.exception;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * An exception thrown by virtual machines when functionality
+ * or features are not implemented
+ *
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class NotImplementedException
+ extends JdwpException
+{
+ public NotImplementedException (String feature)
+ {
+ super (JdwpConstants.Error.NOT_IMPLEMENTED,
+ feature + " is not yet implemented");
+ }
+}
diff --git a/gnu/classpath/jdwp/exception/VmDeadException.java b/gnu/classpath/jdwp/exception/VmDeadException.java
new file mode 100644
index 000000000..f3c4a152b
--- /dev/null
+++ b/gnu/classpath/jdwp/exception/VmDeadException.java
@@ -0,0 +1,55 @@
+/* VmDeadException.java -- dead virtual machine exception
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.jdwp.exception;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * An exception thrown when the virtual machine is dead
+ *
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class VmDeadException
+ extends JdwpException
+{
+ public VmDeadException ()
+ {
+ super (JdwpConstants.Error.VM_DEAD, "Virtual machine is dead");
+ }
+}
diff --git a/gnu/javax/swing/plaf/gtk/GtkCheckBoxUI.java b/gnu/classpath/jdwp/id/ArrayId.java
index c50b20bfa..cd428a172 100644
--- a/gnu/javax/swing/plaf/gtk/GtkCheckBoxUI.java
+++ b/gnu/classpath/jdwp/id/ArrayId.java
@@ -1,5 +1,5 @@
-/* GtkCheckBoxUI.java
- Copyright (c) 1999 by Free Software Foundation, Inc.
+/* ArrayId.java -- array object IDs
+ Copyright (C) 2005 Free Software Foundation
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -28,6 +28,7 @@ permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
@@ -35,35 +36,27 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-package gnu.javax.swing.plaf.gtk;
-import java.awt.*;
-import javax.swing.*;
-import javax.swing.plaf.*;
-import javax.swing.plaf.basic.*;
+package gnu.classpath.jdwp.id;
+
+import gnu.classpath.jdwp.JdwpConstants;
/**
+ * A class which represents a JDWP array id
*
- * @author Brian Jones
- * @see javax.swing.LookAndFeel
+ * @author Keith Seitz <keiths@redhat.com>
*/
-public class GtkCheckBoxUI extends GtkRadioButtonUI
+public class ArrayId
+ extends ObjectId
{
- public GtkCheckBoxUI()
- {
- super();
- }
-
- public static ComponentUI createUI(JComponent c)
- {
- return new GtkCheckBoxUI();
- }
-
- public String getPropertyPrefix()
- {
- // FIXME
- System.err.println(super.getPropertyPrefix());
- return super.getPropertyPrefix();
- }
+ // Arrays are handled a little differently than other IDs
+ //public static final Class typeClass = UNDEFINED
+
+ /**
+ * Constructs a new <code>ArrayId</code>
+ */
+ public ArrayId ()
+ {
+ super (JdwpConstants.Tag.ARRAY);
+ }
}
-
diff --git a/gnu/classpath/jdwp/id/ArrayReferenceTypeId.java b/gnu/classpath/jdwp/id/ArrayReferenceTypeId.java
new file mode 100644
index 000000000..14a73dc5b
--- /dev/null
+++ b/gnu/classpath/jdwp/id/ArrayReferenceTypeId.java
@@ -0,0 +1,59 @@
+/* ArrayReferenceTypeId.java -- array reference type ids
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.id;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * A reference type ID representing java arrays
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class ArrayReferenceTypeId
+ extends ReferenceTypeId
+{
+ /**
+ * Constructs a new <code>ArrayReferenceTypeId</code>
+ */
+ public ArrayReferenceTypeId ()
+ {
+ super (JdwpConstants.TypeTag.ARRAY);
+ }
+}
diff --git a/gnu/classpath/jdwp/id/ClassLoaderId.java b/gnu/classpath/jdwp/id/ClassLoaderId.java
new file mode 100644
index 000000000..133872566
--- /dev/null
+++ b/gnu/classpath/jdwp/id/ClassLoaderId.java
@@ -0,0 +1,64 @@
+/* ClassLoaderId.java -- class loader IDs
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.id;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * A class which represents a JDWP thread id
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class ClassLoaderId
+ extends ObjectId
+{
+ /**
+ * The object class that this id represents
+ */
+ public static final Class typeClass = ClassLoader.class;
+
+ /**
+ * Constructs a new <code>ClassLoaderId</code>
+ */
+ public ClassLoaderId ()
+ {
+ super (JdwpConstants.Tag.CLASS_LOADER);
+ }
+}
diff --git a/gnu/classpath/jdwp/id/ClassObjectId.java b/gnu/classpath/jdwp/id/ClassObjectId.java
new file mode 100644
index 000000000..e5559ce10
--- /dev/null
+++ b/gnu/classpath/jdwp/id/ClassObjectId.java
@@ -0,0 +1,64 @@
+/* ClassObjectId.java -- class object IDs
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.id;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * A class which represents a JDWP class object id
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class ClassObjectId
+ extends ObjectId
+{
+ /**
+ * The object class that this id represents
+ */
+ public static final Class typeClass = Class.class;
+
+ /**
+ * Constructs a new <code>ClassObjectId</code>
+ */
+ public ClassObjectId ()
+ {
+ super (JdwpConstants.Tag.CLASS_OBJECT);
+ }
+}
diff --git a/gnu/classpath/jdwp/id/ClassReferenceTypeId.java b/gnu/classpath/jdwp/id/ClassReferenceTypeId.java
new file mode 100644
index 000000000..6b57673f8
--- /dev/null
+++ b/gnu/classpath/jdwp/id/ClassReferenceTypeId.java
@@ -0,0 +1,59 @@
+/* ClassReferenceTypeId.java -- class reference type ids
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.id;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * A reference type ID representing java classes
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class ClassReferenceTypeId
+ extends ReferenceTypeId
+{
+ /**
+ * Constructs a new <code>ClassReferenceTypeId</code>
+ */
+ public ClassReferenceTypeId ()
+ {
+ super (JdwpConstants.TypeTag.CLASS);
+ }
+}
diff --git a/gnu/javax/swing/plaf/gtk/GtkRadioButtonUI.java b/gnu/classpath/jdwp/id/InterfaceReferenceTypeId.java
index b0b064e8d..bdbd6b6eb 100644
--- a/gnu/javax/swing/plaf/gtk/GtkRadioButtonUI.java
+++ b/gnu/classpath/jdwp/id/InterfaceReferenceTypeId.java
@@ -1,5 +1,5 @@
-/* GtkRadioButtonUI.java
- Copyright (c) 1999 by Free Software Foundation, Inc.
+/* InterfaceReferenceTypeId.java -- interface reference type ids
+ Copyright (C) 2005 Free Software Foundation
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -28,6 +28,7 @@ permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
@@ -35,35 +36,24 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-package gnu.javax.swing.plaf.gtk;
-import java.awt.*;
-import javax.swing.*;
-import javax.swing.plaf.*;
-import javax.swing.plaf.basic.*;
+package gnu.classpath.jdwp.id;
+
+import gnu.classpath.jdwp.JdwpConstants;
/**
+ * A reference type ID representing java interfaces
*
- * @author Brian Jones
- * @see javax.swing.LookAndFeel
+ * @author Keith Seitz <keiths@redhat.com>
*/
-public class GtkRadioButtonUI extends BasicRadioButtonUI
+public class InterfaceReferenceTypeId
+ extends ReferenceTypeId
{
- public GtkRadioButtonUI()
- {
- super();
- }
-
- public static ComponentUI createUI(JComponent c)
- {
- return new GtkRadioButtonUI();
- }
-
- public String getPropertyPrefix()
- {
- // FIXME
- System.err.println(super.getPropertyPrefix());
- return super.getPropertyPrefix();
- }
+ /**
+ * Constructs a new <code>InterfaceReferenceTypeId</code>
+ */
+ public InterfaceReferenceTypeId ()
+ {
+ super (JdwpConstants.TypeTag.INTERFACE);
+ }
}
-
diff --git a/gnu/classpath/jdwp/id/JdwpId.java b/gnu/classpath/jdwp/id/JdwpId.java
new file mode 100644
index 000000000..37f82e208
--- /dev/null
+++ b/gnu/classpath/jdwp/id/JdwpId.java
@@ -0,0 +1,127 @@
+/* JdwpId.java -- base class for all object ID types
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.id;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * A baseclass for all object types reported to the debugger
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public abstract class JdwpId
+{
+ /**
+ * ID assigned to this object
+ */
+ protected long _id;
+
+ /**
+ * Tag of ID's type (see {@link gnu.classpath.jdwp.JdwpConstants.Tag})
+ * for object-like IDs or the type tag (see {@link
+ * gnu.classpath.JdwpConstants.TypeTag}) for reference type IDs.
+ */
+ private byte _tag;
+
+ /**
+ * Constructs an empty <code>JdwpId</code>
+ */
+ public JdwpId (byte tag)
+ {
+ _tag = tag;
+ }
+
+ /**
+ * Sets the id for this object reference
+ */
+ void setId (long id)
+ {
+ _id = id;
+ }
+
+ /**
+ * Returns the id for this object reference
+ */
+ public long getId ()
+ {
+ return _id;
+ }
+
+ /**
+ * Compares two object ids for equality. Two object ids
+ * are equal if they point to the same type and contain to
+ * the same id number. (NOTE: This is a much stricter check
+ * than is necessary: all <code>JdwpId</code>s have unique
+ * ids.)
+ */
+ public boolean equals (JdwpId id)
+ {
+ return ((id.getClass () == getClass ()) && (id.getId () == getId ()));
+ }
+
+ /**
+ * Returns size of this type (used by IDSizes)
+ */
+ public abstract int size ();
+
+ /**
+ * Writes the contents of this type to the <code>DataOutputStream</code>
+ * @param outStream the <code>DataOutputStream</code> to use
+ * @throws IOException when an error occurs on the <code>OutputStream</code>
+ */
+ public abstract void write (DataOutputStream outStream)
+ throws IOException;
+
+ /**
+ * Writes the contents of this type to the output stream, preceded
+ * by a one-byte tag for tagged object IDs or type tag for
+ * reference type IDs.
+ *
+ * @param outStream the <code>DataOutputStream</code> to use
+ * @throws IOException when an error occurs on the <code>OutputStream</code>
+ */
+ public void writeTagged (DataOutputStream outStream)
+ throws IOException
+ {
+ outStream.writeByte (_tag);
+ write (outStream);
+ }
+}
diff --git a/gnu/classpath/jdwp/id/JdwpIdFactory.java b/gnu/classpath/jdwp/id/JdwpIdFactory.java
new file mode 100644
index 000000000..06ec3c768
--- /dev/null
+++ b/gnu/classpath/jdwp/id/JdwpIdFactory.java
@@ -0,0 +1,165 @@
+/* JdwpIdFactory.java -- factory for generating type and object IDs
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.id;
+
+import java.util.HashMap;
+
+/**
+ * This factory generates ids for objects and types that may
+ * be sent to a debugger.
+ *
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class JdwpIdFactory
+{
+ // ID of last object / referencetype
+ private static Object _idLock = new Object ();
+ private static Object _ridLock = new Object ();
+ private static long _lastId = 0;
+ private static long _lastRid = 0;
+
+ // A list of all ID types
+ private static HashMap _idList = new HashMap ();
+
+ // Initialize the id list with known types
+ static
+ {
+ // ObjectId and ArrayId are special cases. See newId.
+ _idList.put (ClassLoaderId.typeClass, ClassLoaderId.class);
+ _idList.put (ClassObjectId.typeClass, ClassObjectId.class);
+ //_idList.put (FieldId.typeClass, FieldId.class);
+ //_idList.put (FrameId.typeClass, FrameId.class);
+ //_idList.put (MethodId.typeClass, MethodId.class);
+ _idList.put (StringId.typeClass, StringId.class);
+ _idList.put (ThreadId.typeClass, ThreadId.class);
+ _idList.put (ThreadGroupId.typeClass, ThreadGroupId.class);
+ }
+
+ /**
+ * Returns a new id for the given object
+ *
+ * @param object the object for which an id is desired
+ * @returns a suitable object id
+ */
+ public static JdwpId newId (Object object)
+ {
+ JdwpId id = null;
+
+ // Special case: arrays
+ if (object.getClass ().isArray ())
+ id = new ArrayId ();
+ else
+ {
+ // Loop through all classes until we hit baseclass
+ Class myClass;
+ for (myClass = object.getClass (); myClass != null;
+ myClass = myClass.getSuperclass ())
+ {
+ Class clz = (Class) _idList.get (myClass);
+ if (clz != null)
+ {
+ try
+ {
+ id = (JdwpId) clz.newInstance ();
+ synchronized (_idLock)
+ {
+ id.setId (++_lastId);
+ }
+ return id;
+ }
+ catch (InstantiationException ie)
+ {
+ // This really should not happen
+ throw new RuntimeException ("cannot create new ID", ie);
+ }
+ catch (IllegalAccessException iae)
+ {
+ // This really should not happen
+ throw new RuntimeException ("illegal access of ID", iae);
+ }
+ }
+ }
+
+ /* getSuperclass returned null and no matching ID type found.
+ So it must derive from Object. */
+ id = new ObjectId ();
+ }
+
+ synchronized (_idLock)
+ {
+ id.setId (++_lastId);
+ }
+
+ return id;
+ }
+
+ /**
+ * Returns a new reference type id for the given class
+ *
+ * @param clazz the <code>Class</code> for which an id is desired
+ * @returns a suitable reference type id or <code>null</code>
+ */
+ public static ReferenceTypeId newReferenceTypeId (Class clazz)
+ {
+ ReferenceTypeId id = null;
+ try
+ {
+ if (clazz.isArray ())
+ id = new ArrayReferenceTypeId ();
+ else if (clazz.isInterface ())
+ id = new InterfaceReferenceTypeId ();
+ else
+ id = new ClassReferenceTypeId ();
+ synchronized (_ridLock)
+ {
+ id.setId (++_lastRid);
+ }
+ return id;
+ }
+ catch (InstantiationException ie)
+ {
+ return null;
+ }
+ catch (IllegalAccessException iae)
+ {
+ return null;
+ }
+ }
+}
diff --git a/gnu/java/awt/peer/gtk/GtkTextComponentPeer.java b/gnu/classpath/jdwp/id/ObjectId.java
index 3051ecfcf..e34a3b59e 100644
--- a/gnu/java/awt/peer/gtk/GtkTextComponentPeer.java
+++ b/gnu/classpath/jdwp/id/ObjectId.java
@@ -1,5 +1,5 @@
-/* GtkTextComponentPeer.java -- Implements TextComponentPeer with GTK
- Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+/* ObjectId.java -- object IDs
+ Copyright (C) 2005 Free Software Foundation
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -28,6 +28,7 @@ permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
@@ -36,52 +37,63 @@ obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-package gnu.java.awt.peer.gtk;
+package gnu.classpath.jdwp.id;
-import java.awt.Rectangle;
-import java.awt.TextComponent;
-import java.awt.event.TextEvent;
-import java.awt.peer.TextComponentPeer;
+import gnu.classpath.jdwp.JdwpConstants;
-public class GtkTextComponentPeer extends GtkComponentPeer
- implements TextComponentPeer
-{
- GtkTextComponentPeer (TextComponent tc)
- {
- super (tc);
+import java.io.DataOutputStream;
+import java.io.IOException;
- setText (tc.getText ());
- setCaretPosition(0);
- }
-
- public native void connectSignals ();
-
- public native int getCaretPosition ();
- public native void setCaretPosition (int pos);
- public native int getSelectionStart ();
- public native int getSelectionEnd ();
- public native String getText ();
- public native void select (int start, int end);
- public native void setEditable (boolean state);
- public native void setText (String text);
-
- public int getIndexAtPoint(int x, int y)
+/**
+ * A class which represents a JDWP object id for an object
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class ObjectId
+ extends JdwpId
+{
+ /**
+ * The object class that this id represents
+ */
+ public static final Class typeClass = Object.class;
+
+ /**
+ * Constructs a new <code>ObjectId</code>
+ */
+ public ObjectId ()
{
- return 0; // FIXME
+ super (JdwpConstants.Tag.OBJECT);
}
- public Rectangle getCharacterBounds (int pos)
+ /**
+ * Constructs a new <code>ObjectId</code> of the
+ * given type.
+ *
+ * @param tag the tag of this type of object ID
+ */
+ public ObjectId (byte tag)
{
- return null;
+ super (tag);
}
- public long filterEvents (long filter)
+ /**
+ * Returns the size of this id type
+ */
+ public int size ()
{
- return filter; // FIXME
+ return 8;
}
- protected void postTextEvent ()
+ /**
+ * Writes the id to the stream
+ *
+ * @param outStream the stream to which to write
+ * @throws IOException when an error occurs on the <code>OutputStream</code>
+ */
+ public void write (DataOutputStream outStream)
+ throws IOException
{
- q().postEvent (new TextEvent (awtComponent, TextEvent.TEXT_VALUE_CHANGED));
+ // All we need to do is write out our id as an 8-byte integer
+ outStream.writeLong (_id);
}
}
diff --git a/gnu/classpath/jdwp/id/ReferenceTypeId.java b/gnu/classpath/jdwp/id/ReferenceTypeId.java
new file mode 100644
index 000000000..cdb78040a
--- /dev/null
+++ b/gnu/classpath/jdwp/id/ReferenceTypeId.java
@@ -0,0 +1,81 @@
+/* ReferenceTypeId.java -- a base class for all reference type IDs
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.id;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * Base class for reference type IDs. This class usurps
+ * <code>JdwpId</code>'s tag member for its own use (type tag).
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class ReferenceTypeId
+ extends JdwpId
+{
+ /**
+ * Constructor used by {Array,Interface,Class}ReferenceTypeId
+ */
+ public ReferenceTypeId (byte tag)
+ {
+ super (tag);
+ }
+
+ /**
+ * Returns the size of this ID type
+ */
+ public int size ()
+ {
+ return 8;
+ }
+
+ /**
+ * Outputs the reference type ID to the given output stream
+ *
+ * @param outStream the stream to which to write the data
+ * @throws IOException for errors writing to the stream
+ */
+ public void write (DataOutputStream outStream)
+ throws IOException
+ {
+ outStream.writeLong (_id);
+ }
+}
diff --git a/gnu/classpath/jdwp/id/StringId.java b/gnu/classpath/jdwp/id/StringId.java
new file mode 100644
index 000000000..ea1a83a56
--- /dev/null
+++ b/gnu/classpath/jdwp/id/StringId.java
@@ -0,0 +1,64 @@
+/* StringId.java -- string IDs
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.id;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * A class which represents a JDWP string id
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class StringId
+ extends ObjectId
+{
+ /**
+ * The object class that this id represents
+ */
+ public static final Class typeClass = String.class;
+
+ /**
+ * Constructs a new <code>StringId</code>
+ */
+ public StringId ()
+ {
+ super (JdwpConstants.Tag.STRING);
+ }
+}
diff --git a/gnu/classpath/jdwp/id/ThreadGroupId.java b/gnu/classpath/jdwp/id/ThreadGroupId.java
new file mode 100644
index 000000000..aef7d5b54
--- /dev/null
+++ b/gnu/classpath/jdwp/id/ThreadGroupId.java
@@ -0,0 +1,64 @@
+/* ThreadGroupId.java -- thread group IDs
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.id;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * A class which represents a JDWP thread group id
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class ThreadGroupId
+ extends ObjectId
+{
+ /**
+ * The object class that this id represents
+ */
+ public static final Class typeClass = ThreadGroup.class;
+
+ /**
+ * Constructs a new <code>ThreadGroupId</code>
+ */
+ public ThreadGroupId ()
+ {
+ super (JdwpConstants.Tag.THREAD_GROUP);
+ }
+}
diff --git a/gnu/classpath/jdwp/id/ThreadId.java b/gnu/classpath/jdwp/id/ThreadId.java
new file mode 100644
index 000000000..733bf5510
--- /dev/null
+++ b/gnu/classpath/jdwp/id/ThreadId.java
@@ -0,0 +1,64 @@
+/* ThreadId.java -- thread IDs
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.id;
+
+import gnu.classpath.jdwp.JdwpConstants;
+
+/**
+ * A class which represents a JDWP thread id
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class ThreadId
+ extends ObjectId
+{
+ /**
+ * The object class that this id represents
+ */
+ public static final Class typeClass = Thread.class;
+
+ /**
+ * Constructs a new <code>ThreadId</code>
+ */
+ public ThreadId ()
+ {
+ super (JdwpConstants.Tag.THREAD);
+ }
+}
diff --git a/gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java b/gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java
new file mode 100644
index 000000000..ffe709b83
--- /dev/null
+++ b/gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java
@@ -0,0 +1,178 @@
+/* ArrayReferenceCommandSet.java -- class to implement the Array
+ Reference Command Set
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.processor;
+
+import gnu.classpath.jdwp.Jdwp;
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.exception.InvalidObjectException;
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
+import gnu.classpath.jdwp.exception.NotImplementedException;
+import gnu.classpath.jdwp.id.IdManager;
+import gnu.classpath.jdwp.id.ObjectId;
+import gnu.classpath.jdwp.util.Value;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.lang.reflect.Array;
+import java.nio.ByteBuffer;
+
+/**
+ * A class representing the ArrayReference Command Set.
+ *
+ * @author Aaron Luchko <aluchko@redhat.com>
+ */
+public class ArrayReferenceCommandSet implements CommandSet
+{
+ // Manages all the different ids that are assigned by jdwp
+ private final IdManager idMan = Jdwp.getIdManager();
+
+ public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
+ throws JdwpException
+ {
+ try
+ {
+ switch (command)
+ {
+ case JdwpConstants.CommandSet.ArrayReference.LENGTH:
+ executeLength(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ArrayReference.GET_VALUES:
+ executeGetValues(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ArrayReference.SET_VALUES:
+ executeSetValues(bb, os);
+ break;
+ default:
+ throw new NotImplementedException("Command " + command +
+ " not found in Array Reference Command Set.");
+ }
+ }
+ catch (IOException ex)
+ {
+ // The DataOutputStream we're using isn't talking to a socket at all
+ // So if we throw an IOException we're in serious trouble
+ throw new JdwpInternalErrorException(ex);
+ }
+ return true;
+ }
+
+ private void executeLength(ByteBuffer bb, DataOutputStream os)
+ throws InvalidObjectException, IOException
+ {
+ ObjectId oid = idMan.readId(bb);
+ Object array = oid.getObject();
+ os.writeInt(Array.getLength(array));
+ }
+
+ private void executeGetValues(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = idMan.readId(bb);
+ Object array = oid.getObject();
+ int first = bb.getInt();
+ int length = bb.getInt();
+
+ // We need to write out the byte signifying the type of array first
+ Class clazz = array.getClass().getComponentType();
+
+ // Uugh, this is a little ugly but it's the only time we deal with
+ // arrayregions
+ if (clazz == byte.class)
+ os.writeByte(JdwpConstants.Tag.BYTE);
+ else if (clazz == char.class)
+ os.writeByte(JdwpConstants.Tag.CHAR);
+ else if (clazz == float.class)
+ os.writeByte(JdwpConstants.Tag.FLOAT);
+ else if (clazz == double.class)
+ os.writeByte(JdwpConstants.Tag.DOUBLE);
+ else if (clazz == int.class)
+ os.writeByte(JdwpConstants.Tag.BYTE);
+ else if (clazz == long.class)
+ os.writeByte(JdwpConstants.Tag.LONG);
+ else if (clazz == short.class)
+ os.writeByte(JdwpConstants.Tag.SHORT);
+ else if (clazz == void.class)
+ os.writeByte(JdwpConstants.Tag.VOID);
+ else if (clazz == boolean.class)
+ os.writeByte(JdwpConstants.Tag.BOOLEAN);
+ else if (clazz.isArray())
+ os.writeByte(JdwpConstants.Tag.ARRAY);
+ else if (String.class.isAssignableFrom(clazz))
+ os.writeByte(JdwpConstants.Tag.STRING);
+ else if (Thread.class.isAssignableFrom(clazz))
+ os.writeByte(JdwpConstants.Tag.THREAD);
+ else if (ThreadGroup.class.isAssignableFrom(clazz))
+ os.writeByte(JdwpConstants.Tag.THREAD_GROUP);
+ else if (ClassLoader.class.isAssignableFrom(clazz))
+ os.writeByte(JdwpConstants.Tag.CLASS_LOADER);
+ else if (Class.class.isAssignableFrom(clazz))
+ os.writeByte(JdwpConstants.Tag.CLASS_OBJECT);
+ else
+ os.writeByte(JdwpConstants.Tag.OBJECT);
+
+ // Write all the values, primitives should be untagged and Objects must be
+ // tagged
+ for (int i = first; i < first + length; i++)
+ {
+ Object value = Array.get(array, i);
+ if (clazz.isPrimitive())
+ Value.writeUntaggedValue(os, value);
+ else
+ Value.writeTaggedValue(os, value);
+ }
+ }
+
+ private void executeSetValues(ByteBuffer bb, DataOutputStream os)
+ throws IOException, JdwpException
+ {
+ ObjectId oid = idMan.readId(bb);
+ Object array = oid.getObject();
+ int first = bb.getInt();
+ int length = bb.getInt();
+ Class type = array.getClass().getComponentType();
+ for (int i = first; i < first + length; i++)
+ {
+ Object value = Value.getUntaggedObj(bb, type);
+ Array.set(array, i, value);
+ }
+ }
+}
diff --git a/gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java b/gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java
new file mode 100644
index 000000000..91eba6183
--- /dev/null
+++ b/gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java
@@ -0,0 +1,108 @@
+/* ArrayTypeCommandSet.java -- class to implement the ArrayType Command Set
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.processor;
+
+import gnu.classpath.jdwp.Jdwp;
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
+import gnu.classpath.jdwp.exception.NotImplementedException;
+import gnu.classpath.jdwp.id.IdManager;
+import gnu.classpath.jdwp.id.ObjectId;
+import gnu.classpath.jdwp.id.ReferenceTypeId;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.lang.reflect.Array;
+import java.nio.ByteBuffer;
+
+/**
+ * A class representing the ArrayType Command Set.
+ *
+ * @author Aaron Luchko <aluchko@redhat.com>
+ */
+public class ArrayTypeCommandSet implements CommandSet
+{
+ // Manages all the different ids that are assigned by jdwp
+ private final IdManager idMan = Jdwp.getIdManager();
+
+ public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
+ throws JdwpException
+ {
+
+ // Although there's only a single command to choose from we still use
+ // a switch to maintain consistency with the rest of the CommandSets
+ try
+ {
+ switch (command)
+ {
+ case JdwpConstants.CommandSet.ArrayType.NEW_INSTANCE:
+ executeNewInstance(bb, os);
+ break;
+ default:
+ throw new NotImplementedException("Command " + command +
+ " not found in ArrayType Command Set.");
+ }
+ }
+ catch (IOException ex)
+ {
+ // The DataOutputStream we're using isn't talking to a socket at all
+ // So if we throw an IOException we're in serious trouble
+ throw new JdwpInternalErrorException(ex);
+ }
+ return true;
+ }
+
+ public void executeNewInstance(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
+ Class arrayType = refId.getType();
+ Class componentType = arrayType.getComponentType();
+
+ int length = bb.getInt();
+ Object newArray = Array.newInstance(componentType, length);
+ ObjectId oid = idMan.getId(newArray);
+
+ // Since this array isn't referenced anywhere we'll disable garbage
+ // collection on it so it's still around when the debugger gets back to it.
+ oid.disableCollection();
+ oid.writeTagged(os);
+ }
+}
diff --git a/gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java b/gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java
new file mode 100644
index 000000000..f219f2290
--- /dev/null
+++ b/gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java
@@ -0,0 +1,100 @@
+/* ClassObjectReferenceCommandSet.java -- class to implement the
+ ClassObjectReference Command Set
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.processor;
+
+import gnu.classpath.jdwp.Jdwp;
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
+import gnu.classpath.jdwp.exception.NotImplementedException;
+import gnu.classpath.jdwp.id.IdManager;
+import gnu.classpath.jdwp.id.ObjectId;
+import gnu.classpath.jdwp.id.ReferenceTypeId;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+
+/**
+ * A class representing the ClassObjectReference Command Set.
+ *
+ * @author Aaron Luchko <aluchko@redhat.com>
+ */
+public class ClassObjectReferenceCommandSet implements CommandSet
+{
+ // Manages all the different ids that are assigned by jdwp
+ private final IdManager idMan = Jdwp.getIdManager();
+
+ public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
+ throws JdwpException
+ {
+ try
+ {
+ switch (command)
+ {
+ case JdwpConstants.CommandSet.ClassObjectReference.REFLECTED_TYPE:
+ executeReflectedType(bb, os);
+ break;
+ default:
+ throw new NotImplementedException("Command " + command +
+ " not found in ClassObject Reference Command Set.");
+ }
+ }
+ catch (IOException ex)
+ {
+ // The DataOutputStream we're using isn't talking to a socket at all
+ // So if we throw an IOException we're in serious trouble
+ throw new JdwpInternalErrorException(ex);
+ }
+ return true;
+ }
+
+ public void executeReflectedType(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = idMan.readId(bb);
+ Class clazz = (Class) oid.getObject();
+
+ // The difference between a ClassObjectId and a ReferenceTypeId is one is
+ // stored as an ObjectId and the other as a ReferenceTypeId.
+ ReferenceTypeId refId = idMan.getReferenceTypeId(clazz);
+ refId.writeTagged(os);
+ }
+}
diff --git a/gnu/classpath/jdwp/processor/CommandSet.java b/gnu/classpath/jdwp/processor/CommandSet.java
new file mode 100644
index 000000000..17b956cea
--- /dev/null
+++ b/gnu/classpath/jdwp/processor/CommandSet.java
@@ -0,0 +1,68 @@
+/* CommandSet.java -- An interface defining JDWP Command Sets
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.processor;
+
+import gnu.classpath.jdwp.exception.JdwpException;
+
+import java.io.DataOutputStream;
+import java.nio.ByteBuffer;
+
+/**
+ * A class representing a JDWP Command Set. This class serves as a generic
+ * interface for all Command Sets types used by JDWP.
+ *
+ * @author Aaron Luchko <aluchko@redhat.com>
+ */
+public interface CommandSet
+{
+ /**
+ * Runs the given command with the data in distr and writes the data for the
+ * reply packet to ostr.
+ *
+ * @param bb holds the data portion of the Command Packet
+ * @param os data portion of the Reply Packet will be written here
+ * @param command the command field of the Command Packet
+ * @return true if the JDWP layer should shut down in response to this packet
+ * @throws JdwpException command wasn't carried out successfully
+ */
+ public boolean runCommand(ByteBuffer bb, DataOutputStream os,
+ byte command)
+ throws JdwpException;
+}
diff --git a/gnu/classpath/jdwp/processor/FieldCommandSet.java b/gnu/classpath/jdwp/processor/FieldCommandSet.java
new file mode 100644
index 000000000..f14635b91
--- /dev/null
+++ b/gnu/classpath/jdwp/processor/FieldCommandSet.java
@@ -0,0 +1,66 @@
+/* FieldCommandSet.java -- class to implement the Field Command Set
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.processor;
+
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.exception.NotImplementedException;
+
+import java.io.DataOutputStream;
+import java.nio.ByteBuffer;
+
+/**
+ * A class representing the Field Command Set.
+ *
+ * @author Aaron Luchko <aluchko@redhat.com>
+ */
+public class FieldCommandSet implements CommandSet
+{
+ /**
+ * There are no commands for this CommandSet at this time so we just throw a
+ * NotImplementedException whenever it's called.
+ *
+ * @throws JdwpException An exception will always be thrown
+ */
+ public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
+ throws JdwpException
+ {
+ throw new NotImplementedException(
+ "No commands for command set Field implemented.");
+ }
+}
diff --git a/gnu/classpath/jdwp/processor/InterfaceTypeCommandSet.java b/gnu/classpath/jdwp/processor/InterfaceTypeCommandSet.java
new file mode 100644
index 000000000..a32da38b3
--- /dev/null
+++ b/gnu/classpath/jdwp/processor/InterfaceTypeCommandSet.java
@@ -0,0 +1,67 @@
+/* InterfaceTypeCommandSet.java -- class to implement the InterfaceType
+ Command Set
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.processor;
+
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.exception.NotImplementedException;
+
+import java.io.DataOutputStream;
+import java.nio.ByteBuffer;
+
+/**
+ * A class representing the InterfaceType Command Set.
+ *
+ * @author Aaron Luchko <aluchko@redhat.com>
+ */
+public class InterfaceTypeCommandSet implements CommandSet
+{
+ /**
+ * There are no commands for this CommandSet at this time so we just throw a
+ * NotImplementedException whenever it's called.
+ *
+ * @throws JdwpException An exception will always be thrown
+ */
+ public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
+ throws JdwpException
+ {
+ throw new NotImplementedException(
+ "No commands for command set InterfaceType implemented.");
+ }
+}
diff --git a/gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java b/gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java
new file mode 100644
index 000000000..56980eecd
--- /dev/null
+++ b/gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java
@@ -0,0 +1,266 @@
+/* ObjectReferenceCommandSet.java -- lass to implement the ObjectReference
+ Command Set
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.processor;
+
+import gnu.classpath.jdwp.IVirtualMachine;
+import gnu.classpath.jdwp.Jdwp;
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.exception.InvalidFieldException;
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
+import gnu.classpath.jdwp.exception.NotImplementedException;
+import gnu.classpath.jdwp.id.IdManager;
+import gnu.classpath.jdwp.id.ObjectId;
+import gnu.classpath.jdwp.id.ReferenceTypeId;
+import gnu.classpath.jdwp.util.Value;
+import gnu.classpath.jdwp.util.MethodInvoker;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.nio.ByteBuffer;
+
+/**
+ * A class representing the ObjectReference Command Set.
+ *
+ * @author Aaron Luchko <aluchko@redhat.com>
+ */
+public class ObjectReferenceCommandSet implements CommandSet
+{
+ // Our hook into the jvm
+ private final IVirtualMachine vm = Jdwp.getIVirtualMachine();
+
+ // Manages all the different ids that are assigned by jdwp
+ private final IdManager idMan = Jdwp.getIdManager();
+
+ public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
+ throws JdwpException
+ {
+ try
+ {
+ switch (command)
+ {
+ case JdwpConstants.CommandSet.ObjectReference.REFERENCE_TYPE:
+ executeReferenceType(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ObjectReference.GET_VALUES:
+ executeGetValues(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ObjectReference.SET_VALUES:
+ executeSetValues(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ObjectReference.MONITOR_INFO:
+ executeMonitorInfo(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ObjectReference.INVOKE_METHOD:
+ executeInvokeMethod(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ObjectReference.DISABLE_COLLECTION:
+ executeDisableCollection(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ObjectReference.ENABLE_COLLECTION:
+ executeEnableCollection(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ObjectReference.IS_COLLECTED:
+ executeIsCollected(bb, os);
+ break;
+ default:
+ throw new NotImplementedException("Command " + command +
+ " not found in ObjectReference Command Set.");
+ }
+ }
+ catch (IOException ex)
+ {
+ // The DataOutputStream we're using isn't talking to a socket at all
+ // So if we throw an IOException we're in serious trouble
+ throw new JdwpInternalErrorException(ex);
+ }
+ return true;
+ }
+
+ private void executeReferenceType(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = idMan.readId(bb);
+ Object obj = oid.getObject();
+ Class clazz = obj.getClass();
+ ReferenceTypeId refId = idMan.getReferenceTypeId(clazz);
+ refId.writeTagged(os);
+ }
+
+ private void executeGetValues(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = idMan.readId(bb);
+ Object obj = oid.getObject();
+
+ int numFields = bb.getInt();
+
+ os.writeInt(numFields); // Looks pointless but this is the protocol
+
+ for (int i = 0; i < numFields; i++)
+ {
+ Field field = (Field) idMan.readId(bb).getObject();
+ try
+ {
+ field.setAccessible(true); // Might be a private field
+ Object value = field.get(obj);
+ Value.writeTaggedValue(os, value);
+ }
+ catch (IllegalArgumentException ex)
+ {
+ // I suppose this would best qualify as an invalid field then
+ throw new InvalidFieldException(ex);
+ }
+ catch (IllegalAccessException ex)
+ {
+ // Since we set it as accessible this really shouldn't happen
+ throw new JdwpInternalErrorException(ex);
+ }
+ }
+ }
+
+ private void executeSetValues(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = idMan.readId(bb);
+ Object obj = oid.getObject();
+
+ int numFields = bb.getInt();
+
+ for (int i = 0; i < numFields; i++)
+ {
+ Field field = (Field) idMan.readId(bb).getObject();
+ Object value = Value.getUntaggedObj(bb, field.getType());
+ try
+ {
+ field.setAccessible(true); // Might be a private field
+ field.set(obj, value);
+ }
+ catch (IllegalArgumentException ex)
+ {
+ // I suppose this would best qualify as an invalid field then
+ throw new InvalidFieldException(ex);
+ }
+ catch (IllegalAccessException ex)
+ {
+ // Since we set it as accessible this really shouldn't happen
+ throw new JdwpInternalErrorException(ex);
+ }
+ }
+ }
+
+ private void executeMonitorInfo(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException
+ {
+ // This command is optional, determined by VirtualMachines CapabilitiesNew
+ // so we'll leave it till later to implement
+ throw new NotImplementedException(
+ "Command ExecuteMonitorInfo not implemented.");
+
+ }
+
+ private void executeInvokeMethod(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = idMan.readId(bb);
+ Object obj = oid.getObject();
+
+ ObjectId tid = idMan.readId(bb);
+ Thread thread = (Thread) tid.getObject();
+
+ ReferenceTypeId rid = idMan.readReferenceTypeId(bb);
+ Class clazz = rid.getType();
+
+ ObjectId mid = idMan.readId(bb);
+ Method method = (Method) mid.getObject();
+
+ int args = bb.getInt();
+ Object[] values = new Object[args];
+
+ for (int i = 0; i < args; i++)
+ {
+ values[i] = Value.getObj(bb);
+ }
+
+ int invokeOptions = bb.getInt();
+
+ if ((invokeOptions & JdwpConstants.InvokeOptions.INVOKE_SINGLE_THREADED) != 0)
+ { // We must suspend all other running threads first
+ vm.suspendAllThreadsExcept(Thread.currentThread().getThreadGroup());
+ }
+ boolean nonVirtual;
+ if ((invokeOptions & JdwpConstants.InvokeOptions.INVOKE_NONVIRTUAL) != 0)
+ nonVirtual = true;
+ else
+ nonVirtual = false;
+ MethodInvoker vmi = new MethodInvoker(vm);
+
+ vmi.executeMethod(obj, thread, clazz, method, values, nonVirtual);
+ Object value = vmi.getReturnedValue();
+ ObjectId exceptionId = vmi.getExceptionId();
+
+ Value.writeTaggedValue(os, value);
+ exceptionId.writeTagged(os);
+ }
+
+ private void executeDisableCollection(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = idMan.readId(bb);
+ oid.disableCollection();
+ }
+
+ private void executeEnableCollection(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = idMan.readId(bb);
+ oid.enableCollection();
+ }
+
+ private void executeIsCollected(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = idMan.readId(bb);
+ boolean collected = oid.isCollected();
+ os.writeBoolean(collected);
+ }
+}
diff --git a/gnu/classpath/jdwp/processor/PacketProcessor.java b/gnu/classpath/jdwp/processor/PacketProcessor.java
new file mode 100644
index 000000000..9e281f217
--- /dev/null
+++ b/gnu/classpath/jdwp/processor/PacketProcessor.java
@@ -0,0 +1,217 @@
+/* PacketProcessor.java -- a thread which processes command packets
+ from the debugger
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.processor;
+
+import gnu.classpath.jdwp.Jdwp;
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.transport.JdwpCommandPacket;
+import gnu.classpath.jdwp.transport.JdwpConnection;
+import gnu.classpath.jdwp.transport.JdwpPacket;
+import gnu.classpath.jdwp.transport.JdwpReplyPacket;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.security.PrivilegedAction;
+
+/**
+ * This class is responsible for processing packets from the
+ * debugger. It waits for an available packet from the connection
+ * ({@link gnu.classpath.jdwp.transport.JdwpConnection}) and then
+ * processes the packet and any reply.
+ *
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class PacketProcessor
+ implements PrivilegedAction
+{
+ // The connection to the debugger
+ private JdwpConnection _connection;
+
+ // Shutdown this thread?
+ private boolean _shutdown;
+
+ // A Mapping of the command set (Byte) to the specific CommandSet
+ private CommandSet[] _sets;
+
+ // Contents of the ReplyPackets data field
+ private ByteArrayOutputStream _outputBytes;
+
+ // Output stream around _outputBytes
+ private DataOutputStream _os;
+
+ /**
+ * Constructs a new <code>PacketProcessor</code> object
+ * Connection must be validated before getting here!
+ *
+ * @param con the connection
+ */
+ public PacketProcessor (JdwpConnection con)
+ {
+ _connection = con;
+ _shutdown = false;
+
+ // MAXIMUM is the value of the largest command set we may receive
+ _sets = new CommandSet[JdwpConstants.CommandSet.MAXIMUM + 1];
+ _outputBytes = new ByteArrayOutputStream();
+ _os = new DataOutputStream (_outputBytes);
+
+ // Create all the Command Sets and add them to our array
+ _sets[JdwpConstants.CommandSet.VirtualMachine.CS_VALUE] =
+ new VirtualMachineCommandSet();
+ _sets[JdwpConstants.CommandSet.ReferenceType.CS_VALUE] =
+ new ReferenceTypeCommandSet();
+ _sets[JdwpConstants.CommandSet.ClassType.CS_VALUE] =
+ new ClassTypeCommandSet();
+ _sets[JdwpConstants.CommandSet.ArrayType.CS_VALUE] =
+ new ArrayTypeCommandSet();
+ _sets[JdwpConstants.CommandSet.InterfaceType.CS_VALUE] =
+ new InterfaceTypeCommandSet();
+ _sets[JdwpConstants.CommandSet.Method.CS_VALUE] =
+ new MethodCommandSet();
+ _sets[JdwpConstants.CommandSet.Field.CS_VALUE] =
+ new FieldCommandSet();
+ _sets[JdwpConstants.CommandSet.ObjectReference.CS_VALUE] =
+ new ObjectReferenceCommandSet();
+ _sets[JdwpConstants.CommandSet.StringReference.CS_VALUE] =
+ new StringReferenceCommandSet();
+ _sets[JdwpConstants.CommandSet.ThreadReference.CS_VALUE] =
+ new ThreadReferenceCommandSet();
+ _sets[JdwpConstants.CommandSet.ThreadGroupReference.CS_VALUE] =
+ new ThreadGroupReferenceCommandSet();
+ _sets[JdwpConstants.CommandSet.ArrayReference.CS_VALUE] =
+ new ArrayReferenceCommandSet();
+ _sets[JdwpConstants.CommandSet.ClassLoaderReference.CS_VALUE] =
+ new ClassLoaderReferenceCommandSet();
+ _sets[JdwpConstants.CommandSet.EventRequest.CS_VALUE] =
+ new EventRequestCommandSet();
+ _sets[JdwpConstants.CommandSet.StackFrame.CS_VALUE] =
+ new StackFrameCommandSet();
+ _sets[JdwpConstants.CommandSet.ClassObjectReference.CS_VALUE] =
+ new ClassObjectReferenceCommandSet();
+ }
+
+ /**
+ * Main run routine for this thread. Will loop getting packets
+ * from the connection and processing them.
+ */
+ public Object run ()
+ {
+ try
+ {
+ while (!_shutdown)
+ {
+ _processOnePacket ();
+ }
+ }
+ catch (IOException ex)
+ {
+ ex.printStackTrace();
+ }
+ // Time to shutdown, tell Jdwp to shutdown
+ Jdwp.getDefault().shutdown();
+ return null;
+ }
+
+ /**
+ * Shutdown the packet processor
+ */
+ public void shutdown ()
+ {
+ _shutdown = true;
+ }
+
+ // Helper function which actually does all the work of waiting
+ // for a packet and getting it processed.
+ private void _processOnePacket ()
+ throws IOException
+ {
+ JdwpPacket pkt = _connection.getPacket ();
+
+ if (!(pkt instanceof JdwpCommandPacket))
+ {
+ // We're not supposed to get these from the debugger!
+ // Drop it on the floor
+ return;
+ }
+
+ if (pkt != null)
+ {
+ JdwpCommandPacket commandPkt = (JdwpCommandPacket) pkt;
+ JdwpReplyPacket reply = new JdwpReplyPacket(commandPkt);
+
+ // Reset our output stream
+ _outputBytes.reset();
+
+ // Create a ByteBuffer around the command packet
+ ByteBuffer bb = ByteBuffer.wrap(commandPkt.getData());
+ byte command = commandPkt.getCommand();
+ byte commandSet = commandPkt.getCommandSet();
+
+ CommandSet set = null;
+ try
+ {
+ // There is no command set with value 0
+ if (commandSet > 0 && commandSet < _sets.length)
+ {
+ set = _sets[commandPkt.getCommandSet()];
+ }
+ if (set != null)
+ {
+ _shutdown = set.runCommand(bb, _os, command);
+ reply.setData(_outputBytes.toByteArray());
+ }
+ else
+ {
+ // This command set wasn't in our tree
+ reply.setErrorCode(JdwpConstants.Error.NOT_IMPLEMENTED);
+ }
+ }
+ catch (JdwpException ex)
+ {
+ reply.setErrorCode(ex.getErrorCode ());
+ }
+ _connection.sendPacket (reply);
+ }
+ }
+}
diff --git a/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java b/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java
new file mode 100644
index 000000000..4c74db333
--- /dev/null
+++ b/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java
@@ -0,0 +1,339 @@
+/* ReferenceTypeCommandSet.java -- class to implement the ReferenceType
+ Command Set
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.processor;
+
+import gnu.classpath.jdwp.IVirtualMachine;
+import gnu.classpath.jdwp.Jdwp;
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.exception.InvalidFieldException;
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
+import gnu.classpath.jdwp.exception.NotImplementedException;
+import gnu.classpath.jdwp.id.IdManager;
+import gnu.classpath.jdwp.id.ObjectId;
+import gnu.classpath.jdwp.id.ReferenceTypeId;
+import gnu.classpath.jdwp.util.JdwpString;
+import gnu.classpath.jdwp.util.Signature;
+import gnu.classpath.jdwp.util.Value;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.nio.ByteBuffer;
+
+/**
+ * A class representing the ReferenceType Command Set.
+ *
+ * @author Aaron Luchko <aluchko@redhat.com>
+ */
+public class ReferenceTypeCommandSet implements CommandSet
+{
+ // Our hook into the jvm
+ private final IVirtualMachine vm = Jdwp.getIVirtualMachine();
+
+ // Manages all the different ids that are assigned by jdwp
+ private final IdManager idMan = Jdwp.getIdManager();
+
+ public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
+ throws JdwpException
+ {
+ try
+ {
+ switch (command)
+ {
+ case JdwpConstants.CommandSet.ReferenceType.SIGNATURE:
+ executeSignature(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.CLASS_LOADER:
+ executeClassLoader(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.MODIFIERS:
+ executeModifiers(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.FIELDS:
+ executeFields(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.METHODS:
+ executeMethods(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.GET_VALUES:
+ executeGetValues(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.SOURCE_FILE:
+ executeSourceFile(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.NESTED_TYPES:
+ executeNestedTypes(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.STATUS:
+ executeStatus(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.INTERFACES:
+ executeInterfaces(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.CLASS_OBJECT:
+ executeClassObject(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.SOURCE_DEBUG_EXTENSION:
+ executeSourceDebugExtension(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.SIGNATURE_WITH_GENERIC:
+ executeSignatureWithGeneric(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.FIELDS_WITH_GENERIC:
+ executeFieldWithGeneric(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ReferenceType.METHODS_WITH_GENERIC:
+ executeMethodsWithGeneric(bb, os);
+ break;
+ default:
+ throw new NotImplementedException("Command " + command +
+ " not found in ReferenceType Command Set.");
+ }
+ }
+ catch (IOException ex)
+ {
+ // The DataOutputStream we're using isn't talking to a socket at all
+ // So if we throw an IOException we're in serious trouble
+ throw new JdwpInternalErrorException(ex);
+ }
+ return true;
+ }
+
+ private void executeSignature(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
+ String sig = Signature.computeClassSignature(refId.getType());
+ JdwpString.writeString(os, sig);
+ }
+
+ private void executeClassLoader(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
+
+ Class clazz = refId.getType();
+ ClassLoader loader = clazz.getClassLoader();
+ ObjectId oid = idMan.getId(loader);
+ oid.write(os);
+ }
+
+ private void executeModifiers(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
+
+ Class clazz = refId.getType();
+ os.writeInt(clazz.getModifiers());
+ }
+
+ private void executeFields(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
+ Class clazz = refId.getType();
+
+ Field[] fields = clazz.getFields();
+ os.writeInt(fields.length);
+ for (int i = 0; i < fields.length; i++)
+ {
+ Field field = fields[i];
+ idMan.getId(field).write(os);
+ JdwpString.writeString(os, field.getName());
+ JdwpString.writeString(os, Signature.computeFieldSignature(field));
+ os.writeInt(field.getModifiers());
+ }
+ }
+
+ private void executeMethods(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
+ Class clazz = refId.getType();
+
+ Method[] methods = clazz.getMethods();
+ os.writeInt(methods.length);
+ for (int i = 0; i < methods.length; i++)
+ {
+ Method method = methods[i];
+ idMan.getId(method).write(os);
+ JdwpString.writeString(os, method.getName());
+ JdwpString.writeString(os, Signature.computeMethodSignature(method));
+ os.writeInt(method.getModifiers());
+ }
+ }
+
+ private void executeGetValues(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
+ Class clazz = refId.getType();
+
+ int numFields = bb.getInt();
+ os.writeInt(numFields); // Looks pointless but this is the protocol
+ for (int i = 0; i < numFields; i++)
+ {
+ ObjectId fieldId = idMan.readId(bb);
+ Field field = (Field) (fieldId.getObject());
+ Class fieldClazz = field.getDeclaringClass();
+
+ // We don't actually need the clazz to get the field but we might as
+ // well check that the debugger got it right
+ if (fieldClazz.isAssignableFrom(clazz))
+ {
+ try
+ {
+ field.setAccessible(true); // Might be a private field
+ Object value = field.get(null);
+ Value.writeTaggedValue(os, value);
+ }
+ catch (IllegalArgumentException ex)
+ {
+ // I suppose this would best qualify as an invalid field then
+ throw new InvalidFieldException(ex);
+ }
+ catch (IllegalAccessException ex)
+ {
+ // Since we set it as accessible this really shouldn't happen
+ throw new JdwpInternalErrorException(ex);
+ }
+ }
+ else
+ throw new InvalidFieldException(fieldId.getId());
+ }
+ }
+
+ private void executeSourceFile(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
+ Class clazz = refId.getType();
+
+ // We'll need to go into the jvm for this unless there's an easier way
+ String sourceFileName = vm.getSourceFile(clazz);
+ JdwpString.writeString(os, sourceFileName);
+ // clazz.getProtectionDomain().getCodeSource().getLocation();
+ }
+
+ private void executeNestedTypes(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
+ Class clazz = refId.getType();
+ Class[] declaredClazzes = clazz.getDeclaredClasses();
+ os.writeInt(declaredClazzes.length);
+ for (int i = 0; i < declaredClazzes.length; i++)
+ {
+ Class decClazz = declaredClazzes[i];
+ ReferenceTypeId clazzId = idMan.getReferenceTypeId(decClazz);
+ clazzId.writeTagged(os);
+ }
+ }
+
+ private void executeStatus(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
+ Class clazz = refId.getType();
+
+ // I don't think there's any other way to get this
+ int status = vm.getStatus(clazz);
+ os.writeInt(status);
+ }
+
+ private void executeInterfaces(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
+ Class clazz = refId.getType();
+ Class[] interfaces = clazz.getInterfaces();
+ os.writeInt(interfaces.length);
+ for (int i = 0; i < interfaces.length; i++)
+ {
+ Class interfaceClass = interfaces[i];
+ ReferenceTypeId intId = idMan.getReferenceTypeId(interfaceClass);
+ intId.write(os);
+ }
+ }
+
+ private void executeClassObject(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
+ Class clazz = refId.getType();
+ ObjectId clazzObjectId = idMan.getId(clazz);
+ clazzObjectId.write(os);
+ }
+
+ private void executeSourceDebugExtension(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ // This command is optional, determined by VirtualMachines CapabilitiesNew
+ // so we'll leave it till later to implement
+ throw new NotImplementedException(
+ "Command SourceDebugExtension not implemented.");
+ }
+
+ private void executeSignatureWithGeneric(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ // We don't have generics yet
+ throw new NotImplementedException(
+ "Command SourceDebugExtension not implemented.");
+ }
+
+ private void executeFieldWithGeneric(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ // We don't have generics yet
+ throw new NotImplementedException(
+ "Command SourceDebugExtension not implemented.");
+ }
+
+ private void executeMethodsWithGeneric(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ // We don't have generics yet
+ throw new NotImplementedException(
+ "Command SourceDebugExtension not implemented.");
+ }
+}
diff --git a/gnu/classpath/jdwp/processor/StringReferenceCommandSet.java b/gnu/classpath/jdwp/processor/StringReferenceCommandSet.java
new file mode 100644
index 000000000..1f1b04cb0
--- /dev/null
+++ b/gnu/classpath/jdwp/processor/StringReferenceCommandSet.java
@@ -0,0 +1,98 @@
+/* StringReferenceCommandSet.java -- class to implement the StringReference
+ Command Set
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.processor;
+
+import gnu.classpath.jdwp.Jdwp;
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
+import gnu.classpath.jdwp.exception.NotImplementedException;
+import gnu.classpath.jdwp.id.ObjectId;
+import gnu.classpath.jdwp.util.JdwpString;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+
+/**
+ * A class representing the StringReference Command Set.
+ *
+ * @author Aaron Luchko <aluchko@redhat.com>
+ */
+public class StringReferenceCommandSet implements CommandSet
+{
+
+ public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
+ throws JdwpException
+ {
+ try
+ {
+
+ // Although there's only a single command to choose from we still use
+ // a switch to maintain consistency with the rest of the CommandSets
+ switch (command)
+ {
+ case JdwpConstants.CommandSet.StringReference.VALUE:
+ executeValue(bb, os);
+ break;
+ default:
+ throw new NotImplementedException("Command " + command +
+ " not found in String Reference Command Set.");
+ }
+ }
+ catch (IOException ex)
+ {
+ // The DataOutputStream we're using isn't talking to a socket at all
+ // So if we throw an IOException we're in serious trouble
+ throw new JdwpInternalErrorException(ex);
+ }
+ return true;
+ }
+
+ private void executeValue(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = Jdwp.getIdManager().readId(bb);
+
+ String str = (String) oid.getObject();
+ JdwpString.writeString(os, str);
+ }
+}
diff --git a/gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java b/gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java
new file mode 100644
index 000000000..28ff860c0
--- /dev/null
+++ b/gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java
@@ -0,0 +1,178 @@
+/* ThreadGroupReferenceCommandSet.java -- class to implement the
+ ThreadGroupReference Command Set
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.processor;
+
+import gnu.classpath.jdwp.Jdwp;
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
+import gnu.classpath.jdwp.exception.NotImplementedException;
+import gnu.classpath.jdwp.id.IdManager;
+import gnu.classpath.jdwp.id.ObjectId;
+import gnu.classpath.jdwp.util.JdwpString;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+
+/**
+ * A class representing the ThreadGroupReference Command Set.
+ *
+ * @author Aaron Luchko <aluchko@redhat.com>
+ */
+public class ThreadGroupReferenceCommandSet implements CommandSet
+{
+ // Manages all the different ids that are assigned by jdwp
+ private final IdManager idMan = Jdwp.getIdManager();
+
+ public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
+ throws JdwpException
+ {
+ try
+ {
+ switch (command)
+ {
+ case JdwpConstants.CommandSet.ThreadGroupReference.NAME:
+ executeName(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ThreadGroupReference.PARENT:
+ executeParent(bb, os);
+ break;
+ case JdwpConstants.CommandSet.ThreadGroupReference.CHILDREN:
+ executeChildren(bb, os);
+ break;
+ default:
+ throw new NotImplementedException("Command " + command +
+ " not found in ThreadGroupReference Command Set.");
+ }
+ }
+ catch (IOException ex)
+ {
+ // The DataOutputStream we're using isn't talking to a socket at all
+ // So if we throw an IOException we're in serious trouble
+ throw new JdwpInternalErrorException(ex);
+ }
+ return true;
+ }
+
+ private void executeName(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = idMan.readId(bb);
+ ThreadGroup group = (ThreadGroup) oid.getObject();
+ JdwpString.writeString(os, group.getName());
+ }
+
+ private void executeParent(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = idMan.readId(bb);
+ ThreadGroup group = (ThreadGroup) oid.getObject();
+ ThreadGroup parent = group.getParent();
+ ObjectId parentId = idMan.getId(parent);
+ parentId.write(os);
+ }
+
+ private void executeChildren(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = idMan.readId(bb);
+ ThreadGroup group = (ThreadGroup) oid.getObject();
+
+ ThreadGroup jdwpGroup = Thread.currentThread().getThreadGroup();
+ int numThreads = group.activeCount();
+ Thread allThreads[] = new Thread[numThreads];
+
+ group.enumerate(allThreads, false);
+
+ // We need to loop through for the true count since some threads may have
+ // been destroyed since we got activeCount so those spots in the array will
+ // be null. As well we must ignore any threads that belong to jdwp
+ numThreads = 0;
+ for (int i = 0; i < allThreads.length; i++)
+ {
+ Thread thread = allThreads[i];
+ if (thread == null)
+ break; // No threads after this point
+ if (!thread.getThreadGroup().equals(jdwpGroup))
+ numThreads++;
+ }
+
+ os.writeInt(numThreads);
+
+ for (int i = 0; i < allThreads.length; i++)
+ {
+ Thread thread = allThreads[i];
+ if (thread == null)
+ break; // No threads after this point
+ if (!thread.getThreadGroup().equals(jdwpGroup))
+ idMan.getId(thread).write(os);
+ }
+
+ int numGroups = group.activeCount();
+ ThreadGroup allGroups[] = new ThreadGroup[numGroups];
+
+ group.enumerate(allGroups, false);
+
+ // We need to loop through for the true count since some ThreadGroups may
+ // have been destroyed since we got activeCount so those spots in the array
+ // will be null. As well we must ignore any threads that belong to jdwp.
+ numGroups = 0;
+ for (int i = 0; i < allGroups.length; i++)
+ {
+ ThreadGroup tgroup = allGroups[i];
+ if (tgroup == null)
+ break; // No ThreadGroups after this point
+ if (!tgroup.equals(jdwpGroup))
+ numGroups++;
+ }
+
+ os.writeInt(numGroups);
+
+ for (int i = 0; i < allGroups.length; i++)
+ {
+ ThreadGroup tgroup = allGroups[i];
+ if (tgroup == null)
+ break; // No ThreadGroups after this point
+ if (!tgroup.equals(jdwpGroup))
+ idMan.getId(tgroup).write(os);
+ }
+ }
+}
diff --git a/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java b/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java
new file mode 100644
index 000000000..32b987817
--- /dev/null
+++ b/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java
@@ -0,0 +1,474 @@
+/* VirtualMachineCommandSet.java -- class to implement the VirtualMachine
+ Command Set
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.processor;
+
+import gnu.classpath.jdwp.IVirtualMachine;
+import gnu.classpath.jdwp.Jdwp;
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
+import gnu.classpath.jdwp.exception.NotImplementedException;
+import gnu.classpath.jdwp.id.IdManager;
+import gnu.classpath.jdwp.id.ObjectId;
+import gnu.classpath.jdwp.id.ReferenceTypeId;
+import gnu.classpath.jdwp.util.JdwpString;
+import gnu.classpath.jdwp.util.Signature;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Properties;
+
+/**
+ * A class representing the VirtualMachine Command Set.
+ *
+ * @author Aaron Luchko <aluchko@redhat.com>
+ */
+public class VirtualMachineCommandSet implements CommandSet
+{
+ // Our hook into the jvm
+ private final IVirtualMachine vm = Jdwp.getIVirtualMachine();
+
+ // Manages all the different ids that are assigned by jdwp
+ private final IdManager idMan = Jdwp.getIdManager();
+
+ // The Jdwp object
+ private final Jdwp jdwp = Jdwp.getDefault();
+
+ public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
+ throws JdwpException
+ {
+ boolean keepRunning = true;
+ try
+ {
+ switch (command)
+ {
+ case JdwpConstants.CommandSet.VirtualMachine.VERSION:
+ executeVersion(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.CLASSES_BY_SIGNATURE:
+ executeClassesBySignature(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.ALL_CLASSES:
+ executeAllClasses(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.ALL_THREADS:
+ executeAllThreads(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.TOP_LEVEL_THREAD_GROUPS:
+ executeTopLevelThreadGroups(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.IDSIZES:
+ executeIDsizes(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.DISPOSE:
+ keepRunning = false;
+ executeDispose(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.SUSPEND:
+ executeSuspend(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.RESUME:
+ executeResume(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.EXIT:
+ keepRunning = false;
+ executeExit(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.CREATE_STRING:
+ executeCreateString(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.CAPABILITIES:
+ executeCapabilities(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.CLASS_PATHS:
+ executeClassPaths(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.DISPOSE_OBJECTS:
+ executeDisposeObjects(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.HOLD_EVENTS:
+ executeHoldEvents(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.RELEASE_EVENTS:
+ executeReleaseEvents(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.CAPABILITIES_NEW:
+ executeCapabilitiesNew(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.REDEFINE_CLASSES:
+ executeRedefineClasses(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.SET_DEFAULT_STRATUM:
+ executeSetDefaultStratum(bb, os);
+ break;
+ case JdwpConstants.CommandSet.VirtualMachine.ALL_CLASSES_WITH_GENERIC:
+ executeAllClassesWithGeneric(bb, os);
+ break;
+
+ default:
+ break;
+ }
+ }
+ catch (IOException ex)
+ {
+ // The DataOutputStream we're using isn't talking to a socket at all
+ // So if we throw an IOException we're in serious trouble
+ throw new JdwpInternalErrorException(ex);
+ }
+ return keepRunning;
+ }
+
+ private void executeVersion(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+
+ Properties props = System.getProperties();
+
+ int jdwpMajor = JdwpConstants.Version.MAJOR;
+ int jdwpMinor = JdwpConstants.Version.MINOR;
+ // The description field is pretty loosely defined
+ String description = "JDWP version " + jdwpMajor + "." + jdwpMinor
+ + ", JVM version " + props.getProperty("java.vm.name")
+ + " " + props.getProperty("java.vm.version") + " "
+ + props.getProperty("java.version");
+ String vmVersion = props.getProperty("java.version");
+ String vmName = props.getProperty("java.vm.name");
+ JdwpString.writeString(os, description);
+ os.write(jdwpMajor);
+ os.write(jdwpMinor);
+ JdwpString.writeString(os, vmName);
+ JdwpString.writeString(os, vmVersion);
+ }
+
+ private void executeClassesBySignature(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ String sig = JdwpString.readString(bb);
+ ArrayList allMatchingClasses = new ArrayList();
+
+ // This will be an Iterator over all loaded Classes
+ Iterator iter = vm.getAllLoadedClasses();
+
+ while (iter.hasNext())
+ {
+ Class clazz = (Class) iter.next();
+ String clazzSig = Signature.computeClassSignature(clazz);
+ if (clazzSig.equals(sig))
+ allMatchingClasses.add(clazz);
+ }
+
+ os.writeInt(allMatchingClasses.size());
+ for (int i = 0; i < allMatchingClasses.size(); i++)
+ {
+ Class clazz = (Class) allMatchingClasses.get(i);
+ ReferenceTypeId id = idMan.getReferenceTypeId(clazz);
+ id.writeTagged(os);
+ int status = vm.getStatus(clazz);
+ os.writeInt(status);
+ }
+ }
+
+ private void executeAllClasses(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ // Disable garbage collection while we're collecting the info on loaded
+ // classes so we some classes don't get collected between the time we get
+ // the count and the time we get the list
+ vm.disableGarbageCollection();
+
+ int classCount = vm.getAllLoadedClassesCount();
+ os.writeInt(classCount);
+
+ // This will be an Iterator over all loaded Classes
+ Iterator iter = vm.getAllLoadedClasses();
+ vm.enableGarbageCollection();
+ int count = 0;
+
+ // Note it's possible classes were created since out classCount so make
+ // sure we don't write more classes than we told the debugger
+ while (iter.hasNext() && count++ < classCount)
+ {
+ Class clazz = (Class) iter.next();
+ ReferenceTypeId id = idMan.getReferenceTypeId(clazz);
+ id.writeTagged(os);
+ String sig = Signature.computeClassSignature(clazz);
+ JdwpString.writeString(os, sig);
+ int status = vm.getStatus(clazz);
+ os.writeInt(status);
+ }
+ }
+
+ private void executeAllThreads(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ThreadGroup jdwpGroup = Thread.currentThread().getThreadGroup();
+ ThreadGroup root = getRootThreadGroup(jdwpGroup);
+
+ int numThreads = root.activeCount();
+ Thread allThreads[] = new Thread[numThreads];
+ root.enumerate(allThreads, true);
+
+ // We need to loop through for the true count since some threads may have
+ // been destroyed since we got
+ // activeCount so those spots in the array will be null. As well we must
+ // ignore any threads that belong to jdwp
+ numThreads = 0;
+ for (int i = 0; i < allThreads.length; i++)
+ {
+ Thread thread = allThreads[i];
+ if (thread == null)
+ break; // No threads after this point
+ if (!thread.getThreadGroup().equals(jdwpGroup))
+ numThreads++;
+ }
+
+ os.writeInt(numThreads);
+
+ for (int i = 0; i < allThreads.length; i++)
+ {
+ Thread thread = allThreads[i];
+ if (thread == null)
+ break; // No threads after this point
+ if (!thread.getThreadGroup().equals(jdwpGroup))
+ idMan.getId(thread).write(os);
+ }
+ }
+
+ private void executeTopLevelThreadGroups(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ThreadGroup jdwpGroup = jdwp.getJdwpThreadGroup();
+ ThreadGroup root = getRootThreadGroup(jdwpGroup);
+
+ os.writeInt(1); // Just one top level group allowed?
+ idMan.getId(root);
+ }
+
+ private void executeDispose(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException
+ {
+ // resumeAllThreads isn't sufficient as a thread may have been
+ // suspended multiple times, we likely need a way to keep track of how many
+ // times a thread has been suspended or else a stronger resume method for
+ // this purpose
+ // vm.resumeAllThreadsExcept(jdwp.getJdwpThreadGroup());
+
+ // Simply shutting down the jdwp layer will take care of the rest of the
+ // shutdown other than disabling debugging in the VM
+ // vm.disableDebugging();
+
+ // Don't implement this until we're sure how to remove all the debugging
+ // effects from the VM.
+ throw new NotImplementedException(
+ "Command VirtualMachine.Dispose not implemented");
+
+ }
+
+ private void executeIDsizes(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ ObjectId oid = new ObjectId();
+ os.writeInt(oid.size()); // fieldId
+ os.writeInt(oid.size()); // methodId
+ os.writeInt(oid.size()); // objectId
+ os.writeInt(new ReferenceTypeId((byte) 0x00).size()); // referenceTypeId
+ os.writeInt(oid.size()); // frameId
+ }
+
+ private void executeSuspend(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException
+ {
+ vm.suspendAllThreadsExcept(jdwp.getJdwpThreadGroup());
+ }
+
+ private void executeResume(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException
+ {
+ vm.resumeAllThreadsExcept(jdwp.getJdwpThreadGroup());
+ }
+
+ private void executeExit(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ int exitCode = bb.getInt();
+ jdwp.setExit(exitCode);
+ }
+
+ private void executeCreateString(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ String string = JdwpString.readString(bb);
+ ObjectId stringId = Jdwp.getIdManager().getId(string);
+
+ // Since this string isn't referenced anywhere we'll disable garbage
+ // collection on it so it's still around when the debugger gets back to it.
+ stringId.disableCollection();
+ stringId.write(os);
+ }
+
+ private void executeCapabilities(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ // Store these somewhere?
+ os.writeBoolean(false); // canWatchFieldModification
+ os.writeBoolean(false); // canWatchFieldAccess
+ os.writeBoolean(false); // canGetBytecodes
+ os.writeBoolean(false); // canGetSyntheticAttribute
+ os.writeBoolean(false); // canGetOwnedMonitorInfo
+ os.writeBoolean(false); // canGetCurrentContendedMonitor
+ os.writeBoolean(false); // canGetMonitorInfo
+ }
+
+ private void executeClassPaths(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ String baseDir = System.getProperty("user.dir");
+ JdwpString.writeString(os, baseDir);
+
+ // Find and write the classpath
+ String classPath = System.getProperty("java.class.path");
+ String[] paths = classPath.split(":");
+
+ os.writeInt(paths.length);
+ for (int i = 0; i < paths.length; i++)
+ JdwpString.writeString(os, paths[i]);
+
+ // Now the bootpath
+ String bootPath = System.getProperty("sun.boot.class.path");
+ paths = bootPath.split(":");
+ os.writeInt(paths.length);
+ for (int i = 0; i < paths.length; i++)
+ JdwpString.writeString(os, paths[i]);
+ }
+
+ private void executeDisposeObjects(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException
+ {
+ // Instead of going through the list of objects they give us it's probably
+ // better just to find the garbage collected objects ourselves
+ idMan.update();
+ }
+
+ private void executeHoldEvents(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException
+ {
+ // Going to have to implement a send queue somewhere and do this without
+ // triggering events
+ // Until then just don't implement
+ throw new NotImplementedException(
+ "Command VirtualMachine.HoldEvents not implemented");
+ }
+
+ // Opposite of executeHoldEvents
+ private void executeReleaseEvents(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException
+ {
+ throw new NotImplementedException(
+ "Command VirtualMachine.ReleaseEvents not implemented");
+ }
+
+ private void executeCapabilitiesNew(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException, IOException
+ {
+ // Store these somewhere?
+ final int CAPABILITIES_NEW_SIZE = 32;
+ os.writeBoolean(false); // canWatchFieldModification
+ os.writeBoolean(false); // canWatchFieldAccess
+ os.writeBoolean(false); // canGetBytecodes
+ os.writeBoolean(false); // canGetSyntheticAttribute
+ os.writeBoolean(false); // canGetOwnedMonitorInfo
+ os.writeBoolean(false); // canGetCurrentContendedMonitor
+ os.writeBoolean(false); // canGetMonitorInfo
+ os.writeBoolean(false); // canRedefineClasses
+ os.writeBoolean(false); // canAddMethod
+ os.writeBoolean(false); // canUnrestrictedlyRedefineClasses
+ os.writeBoolean(false); // canPopFrames
+ os.writeBoolean(false); // canUseInstanceFilters
+ os.writeBoolean(false); // canGetSourceDebugExtension
+ os.writeBoolean(false); // canRequestVMDeathEvent
+ os.writeBoolean(false); // canSetDefaultStratum
+ for (int i = 15; i < CAPABILITIES_NEW_SIZE; i++)
+ // Future capabilities
+ // currently unused
+ os.writeBoolean(false); // Set to false
+ }
+
+ private void executeRedefineClasses(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException
+ {
+ // Optional command, don't implement
+ throw new NotImplementedException(
+ "Command VirtualMachine.RedefineClasses not implemented");
+ }
+
+ private void executeSetDefaultStratum(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException
+ {
+ // Optional command, don't implement
+ throw new NotImplementedException(
+ "Command VirtualMachine.SetDefaultStratum not implemented");
+ }
+
+ private void executeAllClassesWithGeneric(ByteBuffer bb, DataOutputStream os)
+ throws JdwpException
+ {
+ // We don't handle generics
+ throw new NotImplementedException(
+ "Command VirtualMachine.AllClassesWithGeneric not implemented");
+ }
+
+ /**
+ * Find the root ThreadGroup of this ThreadGroup
+ */
+ private ThreadGroup getRootThreadGroup(ThreadGroup group)
+ {
+ ThreadGroup parent = group.getParent();
+
+ while (parent != null)
+ {
+ group = parent;
+ parent = group.getParent();
+ }
+ return group; // This group was the root
+ }
+}
diff --git a/gnu/classpath/jdwp/transport/ITransport.java b/gnu/classpath/jdwp/transport/ITransport.java
new file mode 100644
index 000000000..371cf8f06
--- /dev/null
+++ b/gnu/classpath/jdwp/transport/ITransport.java
@@ -0,0 +1,84 @@
+/* ITransport.java -- An interface defining JDWP transports
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.transport;
+
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.lang.IllegalArgumentException;
+import java.util.HashMap;
+
+/**
+ * A class representing a transport layer. This class serves as a generic
+ * interface for all transport types used in the JDWP back-end.
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public interface ITransport
+{
+ /**
+ * Configure the transport with the given properties
+ *
+ * @param properties properties of the transport configuration
+ * @throws TransportException on configury error
+ */
+ public void configure (HashMap properties)
+ throws TransportException;
+
+ /**
+ * Initialize the transport
+ *
+ * @throws TransportException on initialization error
+ */
+ public void initialize ()
+ throws TransportException;
+
+ /**
+ * Get the input stream for the transport
+ */
+ public InputStream getInputStream ()
+ throws IOException;
+
+ /**
+ * Get the output stream for the transport
+ */
+ public OutputStream getOutputStream ()
+ throws IOException;
+}
diff --git a/gnu/classpath/jdwp/transport/JdwpCommandPacket.java b/gnu/classpath/jdwp/transport/JdwpCommandPacket.java
new file mode 100644
index 000000000..e99159aad
--- /dev/null
+++ b/gnu/classpath/jdwp/transport/JdwpCommandPacket.java
@@ -0,0 +1,149 @@
+/* JdwpCommandPacket.java -- JDWP command packet
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.transport;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * A class representing a JDWP command packet.
+ * This class adds command set and command to the packet header
+ * information in {@link gnu.classpath.jdwp.transport.JdwpPacket}
+ * and adds additional command packet-specific processing.
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class JdwpCommandPacket extends JdwpPacket
+{
+ /**
+ * Command set
+ */
+ protected byte _commandSet;
+
+ /**
+ * Command
+ */
+ protected byte _command;
+
+ // Minimum packet size [excluding super class]
+ // ( commandSet (1) + command (1) )
+ private static final int MINIMUM_LENGTH = 2;
+
+ /**
+ * Constructs a new <code>JdwpCommandPacket</code>
+ */
+ public JdwpCommandPacket ()
+ {
+ // Don't assign an id. This constructor is called by
+ // JdwpPacket.fromBytes, and that will assign a packet id.
+ }
+
+ /**
+ * Constructs a new <code>JdwpCommandPacket</code>
+ * with the given command set and command
+ *
+ * @param set the command set
+ * @param command the command
+ */
+ public JdwpCommandPacket (byte set, byte command)
+ {
+ _id = ++_last_id;
+ _commandSet = set;
+ _command = command;
+ }
+
+ /**
+ * Retuns the length of this packet
+ */
+ public int getLength ()
+ {
+ return MINIMUM_LENGTH + super.getLength ();
+ }
+
+ /**
+ * Returns the command set
+ */
+ public byte getCommandSet ()
+ {
+ return _commandSet;
+ }
+
+ /**
+ * Sets the command set
+ */
+ public void setCommandSet (byte cs)
+ {
+ _commandSet = cs;
+ }
+
+ /**
+ * Returns the command
+ */
+ public byte getCommand ()
+ {
+ return _command;
+ }
+
+ /**
+ * Sets the command
+ */
+ public void setCommand (byte cmd)
+ {
+ _command = cmd;
+ }
+
+ // Reads command packet data from the given buffer, starting
+ // at the given offset
+ protected int myFromBytes (byte[] bytes, int index)
+ {
+ int i = 0;
+ setCommandSet (bytes[index + i++]);
+ setCommand (bytes[index + i++]);
+ return i;
+ }
+
+ // Writes the command packet data into the given buffer
+ protected void myWrite (DataOutputStream dos)
+ throws IOException
+ {
+ dos.writeByte (getCommandSet ());
+ dos.writeByte (getCommand ());
+ }
+}
diff --git a/gnu/classpath/jdwp/transport/JdwpConnection.java b/gnu/classpath/jdwp/transport/JdwpConnection.java
new file mode 100644
index 000000000..18250d320
--- /dev/null
+++ b/gnu/classpath/jdwp/transport/JdwpConnection.java
@@ -0,0 +1,298 @@
+/* JdwpConnection.java -- A JDWP-speaking connection
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.transport;
+
+import gnu.classpath.jdwp.Jdwp;
+import gnu.classpath.jdwp.event.Event;
+import gnu.classpath.jdwp.event.EventRequest;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+
+/**
+ * A connection via some transport to some JDWP-speaking entity.
+ * This is also a thread which handles all communications to/from
+ * the debugger. While access to the transport layer may be accessed by
+ * several threads, start-up and initialization should not be allowed
+ * to occur more than once.
+ *
+ * <p>This class is also a thread that is responsible for pulling
+ * packets off the wire and sticking them in a queue for packet
+ * processing threads.
+ *
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class JdwpConnection
+ extends Thread
+{
+ // The JDWP handshake
+ private static final byte[] _HANDSHAKE = {'J', 'D', 'W', 'P', '-', 'H', 'a',
+ 'n', 'd', 's', 'h', 'a', 'k', 'e'};
+
+ // Transport method
+ private ITransport _transport;
+
+ // Command queue
+ private ArrayList _commandQueue;
+
+ // Shutdown flag
+ private boolean _shutdown;
+
+ // Input stream from transport
+ private DataInputStream _inStream;
+
+ // Output stream from transprot
+ private DataOutputStream _outStream;
+
+ // A buffer used to construct the packet data
+ private ByteArrayOutputStream _bytes;
+
+ // A DataOutputStream for the byte buffer
+ private DataOutputStream _doStream;
+
+ /**
+ * Creates a new <code>JdwpConnection</code> instance
+ *
+ * @param transport the transport to use for communications
+ */
+ public JdwpConnection (ITransport transport)
+ {
+ _transport = transport;
+ _commandQueue = new ArrayList ();
+ _shutdown = false;
+ _bytes = new ByteArrayOutputStream ();
+ _doStream = new DataOutputStream (_bytes);
+ }
+
+ /**
+ * Initializes the connection, including connecting
+ * to socket or shared memory endpoint
+ *
+ * @throws TransportException if initialization fails
+ */
+ public void initialize ()
+ throws TransportException
+ {
+ // Initialize transport (connect socket, e.g.)
+ _transport.initialize ();
+
+ // Do handshake
+ try
+ {
+ _inStream = new DataInputStream (_transport.getInputStream ());
+ _outStream = new DataOutputStream (_transport.getOutputStream ());
+ _doHandshake ();
+ }
+ catch (IOException ioe)
+ {
+ throw new TransportException (ioe);
+ }
+ }
+
+ /* Does the JDWP handshake -- this should not need synchronization
+ because this is called by VM startup code, i.e., no packet
+ processing threads have started yet. */
+ private void _doHandshake ()
+ throws IOException
+ {
+ // According to the spec, the handshake is always initiated by
+ // the debugger, regardless of whether the JVM is in client mode or
+ // server mode.
+
+ // Wait for handshake from debugger
+ byte[] hshake = new byte[_HANDSHAKE.length];
+ _inStream.readFully (hshake, 0, _HANDSHAKE.length);
+
+ if (Arrays.equals (hshake, _HANDSHAKE))
+ {
+ // Send reply handshake
+ _outStream.write (_HANDSHAKE, 0, _HANDSHAKE.length);
+ return;
+ }
+ else
+ {
+ throw new IOException ("invalid JDWP handshake (\"" + hshake + "\")");
+ }
+ }
+
+ /**
+ * Main run method for the thread. This thread loops waiting for
+ * packets to be read via the connection. When a packet is complete
+ * and ready for processing, it places the packet in a queue that can
+ * be accessed via <code>getPacket</code>
+ */
+ public void run ()
+ {
+ while (!_shutdown)
+ {
+ try
+ {
+ _readOnePacket ();
+ }
+ catch (IOException ioe)
+ {
+ /* IOException can occur for two reasons:
+ 1. Lost connection with the other side
+ 2. Transport was shutdown
+ In either case, we make sure that all of the
+ back-end gets shutdown. */
+ Jdwp.getInstance().shutdown ();
+ }
+ catch (Throwable t)
+ {
+ System.out.println ("JdwpConnection.run: caught an exception: "
+ + t);
+ // Just keep going
+ }
+ }
+ }
+
+ // Reads a single packet from the connection, adding it to the packet
+ // queue when a complete packet is ready.
+ private void _readOnePacket ()
+ throws IOException
+ {
+ byte[] data = null;
+
+ // Read in the packet
+ int length = _inStream.readInt ();
+ if (length < 11)
+ {
+ throw new IOException ("JDWP packet length < 11 ("
+ + length + ")");
+ }
+
+ data = new byte[length];
+ data[0] = (byte) (length >>> 24);
+ data[1] = (byte) (length >>> 16);
+ data[2] = (byte) (length >>> 8);
+ data[3] = (byte) length;
+ _inStream.readFully (data, 4, length - 4);
+
+ JdwpPacket packet = JdwpPacket.fromBytes (data);
+ if (packet != null)
+ {
+ synchronized (_commandQueue)
+ {
+ _commandQueue.add (packet);
+ _commandQueue.notifyAll ();
+ }
+ }
+ }
+
+ /**
+ * Returns a packet from the queue of ready packets
+ *
+ * @returns a <code>JdwpPacket</code> ready for processing
+ * <code>null</code> when shutting down
+ */
+ public JdwpPacket getPacket ()
+ {
+ synchronized (_commandQueue)
+ {
+ while (_commandQueue.isEmpty ())
+ {
+ try
+ {
+ _commandQueue.wait ();
+ }
+ catch (InterruptedException ie)
+ {
+ /* PacketProcessor is interrupted
+ when shutting down */
+ return null;
+ }
+ }
+
+ return (JdwpPacket) _commandQueue.remove (0);
+ }
+ }
+
+ /**
+ * Send a packet to the debugger
+ *
+ * @param pkt a <code>JdwpPacket</code> to send
+ * @throws IOException
+ */
+ public void sendPacket (JdwpPacket pkt)
+ throws IOException
+ {
+ pkt.write (_outStream);
+ }
+
+ /**
+ * Send an event notification to the debugger
+ *
+ * @param request the debugger request that wanted this event
+ * @param event the event
+ * @throws IOException
+ */
+ public void sendEvent (EventRequest request, Event event)
+ throws IOException
+ {
+ JdwpPacket pkt;
+
+ synchronized (_bytes)
+ {
+ _bytes.reset ();
+ pkt = event.toPacket (_doStream, request);
+ pkt.setData (_bytes.toByteArray ());
+ }
+
+ sendPacket (pkt);
+ }
+
+ /**
+ * Shutdown the connection
+ */
+ public void shutdown ()
+ {
+ if (!_shutdown)
+ {
+ _transport.shutdown ();
+ _shutdown = true;
+ interrupt ();
+ }
+ }
+}
diff --git a/gnu/classpath/jdwp/transport/JdwpPacket.java b/gnu/classpath/jdwp/transport/JdwpPacket.java
new file mode 100644
index 000000000..7fa93e2de
--- /dev/null
+++ b/gnu/classpath/jdwp/transport/JdwpPacket.java
@@ -0,0 +1,278 @@
+/* JdwpPacket.java -- Base class for JDWP command and reply packets
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.transport;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * All command and reply packets in JDWP share
+ * common header type information:
+ *
+ * length (4 bytes) : size of entire packet, including length
+ * id (4 bytes) : unique packet id
+ * flags (1 byte) : flag byte
+ * [command packet stuff | reply packet stuff]
+ * data (variable) : unique command-/reply-specific data
+ *
+ * This class deal with everything except the command- and reply-specific
+ * data, which get handled in {@link
+ * gnu.classpath.jdwp.transport.JdwpCommandPacket} and {@link
+ * gnu.classpath.jdwp.transprot.JdwpReplyPacket}.
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public abstract class JdwpPacket
+{
+ // Last id of packet constructed
+ protected static int _last_id = 0;
+
+ // JDWP reply packet flag
+ protected static final int JDWP_FLAG_REPLY = 0x80;
+
+ /**
+ * Minimum packet size excluding sub-class data
+ * ( length (4) + id (4) + flags (1) )
+ */
+ protected static final int MINIMUM_SIZE = 9;
+
+ /**
+ * Id of command/reply
+ */
+ protected int _id;
+
+ /**
+ * Packet flags
+ */
+ protected byte _flags;
+
+ /**
+ * Packet-specific data
+ */
+ protected byte[] _data;
+
+ /**
+ * Constructor
+ */
+ public JdwpPacket ()
+ {
+ // By default, DON'T assign an id. This way when a packet
+ // is constructed from fromBytes, _last_id won't increment (i.e.,
+ // it won't leave holes in the outgoing packet ids).
+ }
+
+ /**
+ * Constructs a <code>JdwpPacket</code> with the id
+ * from the given packet.
+ *
+ * @param pkt a packet whose id will be used in this new packet
+ */
+ public JdwpPacket (JdwpPacket pkt)
+ {
+ _id = pkt.getId ();
+ }
+
+ /**
+ * Returns the packet id
+ */
+ public int getId ()
+ {
+ return _id;
+ }
+
+ /**
+ * Sets the packet id
+ */
+ public void setId (int id)
+ {
+ _id = id;
+ }
+
+ /**
+ * Returns the packet flags
+ */
+ public byte getFlags ()
+ {
+ return _flags;
+ }
+
+ /**
+ * Sets the packet flags
+ */
+ public void setFlags (byte flags)
+ {
+ _flags = flags;
+ }
+
+ /**
+ * Gets the command/reply-specific data in this packet
+ */
+ public byte[] getData ()
+ {
+ return _data;
+ }
+
+ /**
+ * Sets the command/reply-specific data in this packet
+ */
+ public void setData (byte[] data)
+ {
+ _data = data;
+ }
+
+ /**
+ * Returns the length of this entire packet
+ */
+ public int getLength ()
+ {
+ return MINIMUM_SIZE + (_data == null ? 0 : _data.length);
+ }
+
+ /**
+ * Allow subclasses to initialize from data
+ *
+ * @param bytes packet data from the wire
+ * @param index index into <code>bytes</code> to start processing
+ * @return number of bytes in <code>bytes</code> processed
+ */
+ protected abstract int myFromBytes (byte[] bytes, int index);
+
+ /**
+ * Convert the given bytes into a <code>JdwpPacket</code>. Uses the
+ * abstract method <code>myFromBytes</code> to allow subclasses to
+ * process data.
+ *
+ * If the given data does not represent a valid JDWP packet, it returns
+ * <code>null</code>.
+ *
+ * @param bytes packet data from the wire
+ * @param index index into <code>bytes</code> to start processing
+ * @return number of bytes in <code>bytes</code> processed
+ */
+ public static JdwpPacket fromBytes (byte[] bytes)
+ {
+ int i = 0;
+ int length = ((bytes[i++] & 0xff) << 24 | (bytes[i++] & 0xff) << 16
+ | (bytes[i++] & 0xff) << 8 | (bytes[i++] & 0xff));
+ int id = 0;
+ byte flags = 0;
+
+ if (bytes.length == length)
+ {
+ id = ((bytes[i++] & 0xff) << 24 | (bytes[i++] & 0xff) << 16
+ | (bytes[i++] & 0xff) << 8 | (bytes[i++] & 0xff));
+ flags = bytes[i++];
+
+ Class clazz = null;
+ if (flags == 0)
+ clazz = JdwpCommandPacket.class;
+ else if ((flags & JDWP_FLAG_REPLY) != 0)
+ clazz = JdwpReplyPacket.class;
+ else
+ {
+ // Malformed packet. Discard it.
+ return null;
+ }
+
+ JdwpPacket pkt = null;
+ try
+ {
+ pkt = (JdwpPacket) clazz.newInstance ();
+ }
+ catch (InstantiationException ie)
+ {
+ // Discard packet
+ return null;
+ }
+ catch (IllegalAccessException iae)
+ {
+ // Discard packet
+ return null;
+ }
+
+ pkt.setId (id);
+ pkt.setFlags (flags);
+
+ i += pkt.myFromBytes (bytes, i);
+ byte[] data = new byte[length - i];
+ System.arraycopy (bytes, i, data, 0, data.length);
+ pkt.setData (data);
+
+ return pkt;
+ }
+
+ return null;
+ }
+
+ /**
+ * Put subclass information onto the stream
+ *
+ * @param dos the output stream to which to write
+ */
+ protected abstract void myWrite (DataOutputStream dos)
+ throws IOException;
+
+ /**
+ * Writes the packet to the output stream
+ *
+ * @param dos the output stream to which to write the packet
+ */
+ public void write (DataOutputStream dos)
+ throws IOException
+ {
+ // length
+ int length = getLength ();
+ dos.writeInt (length);
+
+ // ID
+ dos.writeInt (getId ());
+
+ // flag
+ dos.writeByte (getFlags ());
+
+ // packet-specific stuff
+ myWrite (dos);
+
+ // data (if any)
+ byte[] data = getData ();
+ if (data != null && data.length > 0)
+ dos.write (data, 0, data.length);
+ }
+}
diff --git a/gnu/classpath/jdwp/transport/JdwpReplyPacket.java b/gnu/classpath/jdwp/transport/JdwpReplyPacket.java
new file mode 100644
index 000000000..de32ecf99
--- /dev/null
+++ b/gnu/classpath/jdwp/transport/JdwpReplyPacket.java
@@ -0,0 +1,137 @@
+/* JdwpReplyPacket.java -- JDWP reply packet
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.transport;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+/**
+ * A class represents a JDWP reply packet.
+ * This class adds an error code to the packet header information
+ * in {@link gnu.classpath.transport.JdwpPacket} and adds additional
+ * reply packet-specific processing.
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class JdwpReplyPacket extends JdwpPacket
+{
+ /**
+ * Error code
+ */
+ protected short _errorCode;
+
+ // Minimum packet size [excluding super class] ( errorCode (2) )
+ private static final int MINIMUM_LENGTH = 2;
+
+ /**
+ * Constructs a <code>JdwpReplyPacket</code>.
+ */
+ public JdwpReplyPacket ()
+ {
+ // Don't assign a packet id. This is called by JdwpPacket.fromBytes
+ // which assigns a packet id. (Not that a VM would do that...)
+ }
+
+ /**
+ * Constructs a <code>JdwpReplyPacket</code> with the
+ * id from the given packet and error code
+ *
+ * @param pkt the packet whose id this packet will use
+ * @param errorCode the error code
+ */
+ public JdwpReplyPacket (JdwpPacket pkt, short errorCode)
+ {
+ this(pkt);
+ _errorCode = errorCode;
+ }
+
+ /**
+ * Constructs a <code>JdwpReplyPacket</code> with the
+ * id from the given packet and an empty error code
+ *
+ * @param pkt the packet whose id this packet will use
+ */
+ public JdwpReplyPacket (JdwpPacket pkt)
+ {
+ super (pkt);
+ _flags = (byte) JDWP_FLAG_REPLY;
+ }
+
+ /**
+ * Returns the length of this packet
+ */
+ public int getLength ()
+ {
+ return MINIMUM_LENGTH + super.getLength ();
+ }
+
+ /**
+ * Returns the error code
+ */
+ public short getErrorCode ()
+ {
+ return _errorCode;
+ }
+
+ /**
+ * Sets the error code
+ */
+ public void setErrorCode (short ec)
+ {
+ _errorCode = ec;
+ }
+
+ // Reads command packet data from the given buffer, starting
+ // at the given offset
+ protected int myFromBytes (byte[] bytes, int index)
+ {
+ int i = 0;
+ setErrorCode ((short) ((bytes[index + i++] & 0xff) << 8
+ | (bytes[index + i++] & 0xff)));
+ return i;
+ }
+
+ // Writes the command packet data into the given buffer
+ protected void myWrite (DataOutputStream dos)
+ throws IOException
+ {
+ dos.writeShort (getErrorCode ());
+ }
+}
diff --git a/gnu/classpath/jdwp/transport/SocketTransport.java b/gnu/classpath/jdwp/transport/SocketTransport.java
new file mode 100644
index 000000000..0ad7357e1
--- /dev/null
+++ b/gnu/classpath/jdwp/transport/SocketTransport.java
@@ -0,0 +1,171 @@
+/* SocketTransport.java -- a socket transport
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.transport;
+
+import gnu.classpath.jdwp.transport.ITransport;
+import gnu.classpath.jdwp.transport.TransportException;
+
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.util.HashMap;
+
+import javax.net.ServerSocketFactory;
+import javax.net.SocketFactory;
+
+/**
+ * A socket-based transport. This transport uses
+ * configury string that looks like "name=dt_socket,
+ * address=localhost:1234,server=y".
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+class SocketTransport
+ implements ITransport
+{
+ /**
+ * Name of this transport
+ */
+ public static final String NAME = "dt_socket";
+
+ // Configure properties
+ private static final String _PROPERTY_ADDRESS = "address";
+ private static final String _PROPERTY_SERVER = "server";
+
+ // Port number
+ private int _port;
+
+ // Host name
+ private String _host;
+
+ // Are we acting as a server?
+ private boolean _server = false;
+
+ // Socket
+ private Socket _socket;
+
+ /**
+ * Setup the connection configuration from the given properties
+ *
+ * @param properties the properties of the JDWP session
+ * @throws TransportException for any configury errors
+ */
+ public void configure (HashMap properties)
+ throws TransportException
+ {
+ // Get address [form: "hostname:port"]
+ String p = (String) properties.get (_PROPERTY_ADDRESS);
+ if (p != null)
+ {
+ String[] s = p.split (":");
+ if (s.length == 2)
+ {
+ _host = s[0];
+ _port = Integer.parseInt (s[1]);
+ }
+ }
+
+ // Get server [form: "y" or "n"]
+ p = (String) properties.get (_PROPERTY_SERVER);
+ if (p != null)
+ {
+ if (p.toLowerCase().equals ("y"))
+ _server = true;
+ }
+ }
+
+ /**
+ * Initialize this socket connection. This includes
+ * connecting to the host (or listening for it).
+ *
+ * @throws TransportException if a transport-related error occurs
+ */
+ public void initialize ()
+ throws TransportException
+ {
+ try
+ {
+ if (_server)
+ {
+ // Get a server socket
+ ServerSocketFactory ssf = ServerSocketFactory.getDefault ();
+ ServerSocket ss = ssf.createServerSocket (_port, 1);
+ _socket = ss.accept ();
+ }
+ else
+ {
+ // Get a client socket (the factory will connect it)
+ SocketFactory sf = SocketFactory.getDefault ();
+ _socket = sf.createSocket (_host, _port);
+ }
+ }
+ catch (IOException ioe)
+ {
+ // This will grab UnknownHostException, too.
+ throw new TransportException (ioe);
+ }
+ }
+
+ /**
+ * Returns an <code>InputStream</code> for the transport
+ *
+ * @throws IOException if an I/O error occurs creating the stream
+ * or the socket is not connected
+ */
+ public InputStream getInputStream ()
+ throws IOException
+ {
+ return _socket.getInputStream ();
+ }
+
+ /**
+ * Returns an <code>OutputStream</code> for the transport
+ *
+ * @throws IOException if an I/O error occurs creating the stream
+ * or the socket is not connected
+ */
+ public OutputStream getOutputStream ()
+ throws IOException
+ {
+ return _socket.getOutputStream ();
+ }
+}
diff --git a/gnu/classpath/jdwp/transport/TransportException.java b/gnu/classpath/jdwp/transport/TransportException.java
new file mode 100644
index 000000000..057422a87
--- /dev/null
+++ b/gnu/classpath/jdwp/transport/TransportException.java
@@ -0,0 +1,75 @@
+/* TransportException.java -- Exception for transport configury errors
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.transport;
+
+/**
+ * A transport configury or initialization exception thrown by
+ * JDWP transports. This class is a generic exception class
+ * that the different transport layers use to report transport-specific
+ * exceptions that may occur (which could be very different from
+ * one transport to the next.).
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class TransportException
+ extends Exception
+{
+ /**
+ * Constructs a <code>TransportException</code> with the
+ * given message
+ *
+ * @param message a message describing the exception
+ */
+ public TransportException (String message)
+ {
+ super (message);
+ }
+
+ /**
+ * Constructs a <code>TransportException</code> with the
+ * given <code>Throwable</code> root cause
+ *
+ * @param t the cause of the exception
+ */
+ public TransportException (Throwable t)
+ {
+ super (t);
+ }
+}
diff --git a/gnu/classpath/jdwp/transport/TransportFactory.java b/gnu/classpath/jdwp/transport/TransportFactory.java
new file mode 100644
index 000000000..480fb3629
--- /dev/null
+++ b/gnu/classpath/jdwp/transport/TransportFactory.java
@@ -0,0 +1,115 @@
+/* TransportFactory.java -- Factory for transports
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.transport;
+
+import java.util.HashMap;
+
+/**
+ * A factory class that constructs transports for use by
+ * the JDWP back-end.
+ *
+ * @author Keith Seitz <keiths@redhat.com>
+ */
+public class TransportFactory
+{
+ // Keyword in configspec that specifies transport method
+ private static final String _TRANSPORT_PROPERTY = "transport";
+
+ // A single transport method mapping
+ private static class TransportMethod
+ {
+ String name;
+ Class clazz;
+ public TransportMethod (String name, Class clazz)
+ {
+ this.name = name;
+ this.clazz = clazz;
+ }
+ }
+
+ // List of all supported transport methods
+ private static TransportMethod[] _transportMethods = new TransportMethod[]
+ {
+ new TransportMethod (SocketTransport.NAME, SocketTransport.class)
+ //new TransportMethod (ShmemTransport.NAME, ShmemTransport.class)
+ };
+
+ /**
+ * Get a transport configured as specified in the properties
+ *
+ * @param properties a <code>HashMap</code> specifying the JDWP
+ * configuration properties
+ * @returns the created and configured transport
+ * @throws TransportException for invalid configurations
+ */
+ public static ITransport newInstance (HashMap properties)
+ throws TransportException
+ {
+ String name = null;
+ if (properties != null)
+ name = (String) properties.get (_TRANSPORT_PROPERTY);
+ if (name == null)
+ throw new TransportException ("no transport specified");
+
+ for (int i = 0; i < _transportMethods.length; ++i)
+ {
+ if (_transportMethods[i].name.equals (name))
+ {
+ try
+ {
+ ITransport t;
+ t = (ITransport) _transportMethods[i].clazz.newInstance ();
+ t.configure (properties);
+ return t;
+ }
+ catch (TransportException te)
+ {
+ throw te;
+ }
+ catch (Exception e)
+ {
+ throw new TransportException (e);
+ }
+ }
+ }
+
+ throw new TransportException ("transport \"" + name + "\" not found");
+ }
+}
diff --git a/gnu/classpath/jdwp/util/JdwpString.java b/gnu/classpath/jdwp/util/JdwpString.java
new file mode 100644
index 000000000..e94700fe1
--- /dev/null
+++ b/gnu/classpath/jdwp/util/JdwpString.java
@@ -0,0 +1,95 @@
+/* JdwpString.java -- utility class to read and write jdwp strings
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath.jdwp.util;
+
+import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.nio.ByteBuffer;
+
+/**
+ * A class to compute the JDWP representation of Strings.
+ *
+ * @author Aaron Luchko <aluchko@redhat.com>
+ */
+public class JdwpString
+{
+
+ /**
+ * Write this String to the outStream as a string understood by jdwp.
+ *
+ * @param os write the String here
+ * @param string the String to write
+ * @throws IOException
+ */
+ public static void writeString(DataOutputStream os, String string)
+ throws IOException
+ {
+ // Get the bytes of the string as a string in UTF-8
+ byte[] strBytes = string.getBytes("UTF-8");
+ os.writeInt(strBytes.length);
+ os.write(strBytes);
+ }
+
+ /**
+ * Read a jdwp style string from the ByteBuffer.
+ *
+ * @param bb contains the string
+ * @return the String that was read
+ * @throws JdwpInternalErrorException bb didn't contain a value UTF-8 string
+ */
+ public static String readString(ByteBuffer bb)
+ throws JdwpInternalErrorException
+ {
+ int length = bb.getInt();
+ byte[] strBytes = new byte[length];
+ bb.get(strBytes);
+ try
+ {
+ return new String(strBytes, "UTF-8");
+ }
+ catch (UnsupportedEncodingException ex)
+ {
+ // Any string from the VM should be in UTF-8 so an encoding error
+ // shouldn't be possible
+ throw new JdwpInternalErrorException(ex);
+ }
+ }
+}
diff --git a/gnu/classpath/jdwp/util/Signature.java b/gnu/classpath/jdwp/util/Signature.java
new file mode 100644
index 000000000..36445c318
--- /dev/null
+++ b/gnu/classpath/jdwp/util/Signature.java
@@ -0,0 +1,149 @@
+/* Signature.java -- utility class to compute class and method signatures
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.util;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+
+/**
+ * A class to compute class and method signatures.
+ *
+ * @author Tom Tromey (tromey@redhat.com)
+ * @author Keith Seitz (keiths@redhat.com)
+ */
+public class Signature
+{
+ /**
+ * Computes the class signature, i.e., java.lang.String.class
+ * returns "Ljava/lang/String;".
+ *
+ * @param theClass the class for which to compute the signature
+ * @return the class's type signature
+ */
+ public static String computeClassSignature (Class theClass)
+ {
+ StringBuffer sb = new StringBuffer ();
+ _addToSignature (sb, theClass);
+ return sb.toString ();
+ }
+
+ /**
+ * Computes the field signature which is just the class signature of the
+ * field's type, ie a Field of type java.lang.String this will return
+ * "Ljava/lang/String;".
+ *
+ * @param field the field for which to compute the signature
+ * @return the field's type signature
+ */
+ public static String computeFieldSignature (Field field)
+ {
+ return computeClassSignature (field.getType());
+ }
+
+ /**
+ * Computes the method signature, i.e., java.lang.String.split (String, int)
+ * returns "(Ljava/lang/String;I)[Ljava/lang/String;"
+ *
+ * @param method the method for which to compute the signature
+ * @return the method's type signature
+ */
+ public static String computeMethodSignature (Method method)
+ {
+ return _computeSignature (method.getReturnType (),
+ method.getParameterTypes ());
+ }
+
+ private static String _computeSignature (Class returnType,
+ Class[] paramTypes)
+ {
+ StringBuffer sb = new StringBuffer ("(");
+ if (paramTypes != null)
+ {
+ for (int i = 0; i < paramTypes.length; ++i)
+ _addToSignature (sb, paramTypes[i]);
+ }
+ sb.append (")");
+ _addToSignature (sb, returnType);
+ return sb.toString();
+ }
+
+ private static void _addToSignature (StringBuffer sb, Class k)
+ {
+ // For some reason there's no easy way to get the signature of a
+ // class.
+ if (k.isPrimitive ())
+ {
+ if (k == void.class)
+ sb.append('V');
+ else if (k == boolean.class)
+ sb.append('Z');
+ else if (k == byte.class)
+ sb.append('B');
+ else if (k == char.class)
+ sb.append('C');
+ else if (k == short.class)
+ sb.append('S');
+ else if (k == int.class)
+ sb.append('I');
+ else if (k == float.class)
+ sb.append('F');
+ else if (k == double.class)
+ sb.append('D');
+ else if (k == long.class)
+ sb.append('J');
+ return;
+ }
+
+ String name = k.getName ();
+ int len = name.length ();
+ sb.ensureCapacity (len);
+ if (! k.isArray ())
+ sb.append('L');
+ for (int i = 0; i < len; ++i)
+ {
+ char c = name.charAt (i);
+ if (c == '.')
+ c = '/';
+ sb.append (c);
+ }
+ if (! k.isArray ())
+ sb.append(';');
+ }
+}
diff --git a/gnu/classpath/jdwp/util/Value.java b/gnu/classpath/jdwp/util/Value.java
new file mode 100644
index 000000000..de7194dc7
--- /dev/null
+++ b/gnu/classpath/jdwp/util/Value.java
@@ -0,0 +1,297 @@
+/* Value.java -- class to read/write JDWP tagged and untagged values
+ Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package gnu.classpath.jdwp.util;
+
+import gnu.classpath.jdwp.Jdwp;
+import gnu.classpath.jdwp.JdwpConstants;
+import gnu.classpath.jdwp.exception.InvalidFieldException;
+import gnu.classpath.jdwp.exception.JdwpException;
+import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
+import gnu.classpath.jdwp.id.ObjectId;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+
+/**
+ * A class to read/write JDWP tagged and untagged values.
+ *
+ * @author Aaron Luchko <aluchko@redhat.com>
+ */
+public class Value
+{
+ /**
+ * Will write the given object as an untagged value to the DataOutputStream.
+ *
+ * @param os write the value here
+ * @param obj the Object to write
+ * @throws IOException
+ * @throws InvalidFieldException
+ */
+ public static void writeUntaggedValue(DataOutputStream os, Object obj)
+ throws InvalidFieldException, IOException
+ {
+ writeValue(os, obj, false);
+ }
+
+ /**
+ * Will write the given object as a tagged value to the DataOutputStream.
+ *
+ * @param os write the value here
+ * @param obj the Object to write
+ * @throws IOException
+ * @throws InvalidFieldException
+ */
+ public static void writeTaggedValue(DataOutputStream os, Object obj)
+ throws InvalidFieldException, IOException
+ {
+ writeValue(os, obj, true);
+ }
+
+ /**
+ * Will write the given object as either a value or an untagged value to the
+ * DataOutputStream.
+ *
+ * @param os write the value here
+ * @param obj the Object to write
+ * @param tagged true if the value is tagged, false otherwise
+ * @throws IOException
+ * @throws InvalidFieldException
+ */
+ private static void writeValue(DataOutputStream os, Object obj,
+ boolean tagged)
+ throws IOException, InvalidFieldException
+ {
+ Class clazz = obj.getClass();
+ if (clazz.isPrimitive())
+ {
+ if (clazz == byte.class)
+ {
+ if (tagged)
+ os.writeByte(JdwpConstants.Tag.BYTE);
+ os.writeByte(((Byte) obj).byteValue());
+ }
+ else if (clazz == char.class)
+ {
+ if (tagged)
+ os.writeByte(JdwpConstants.Tag.CHAR);
+ os.writeChar(((Character) obj).charValue());
+ }
+ else if (clazz == float.class)
+ {
+ if (tagged)
+ os.writeByte(JdwpConstants.Tag.FLOAT);
+ os.writeFloat(((Float) obj).floatValue());
+ }
+ else if (clazz == double.class)
+ {
+ if (tagged)
+ os.writeByte(JdwpConstants.Tag.DOUBLE);
+ os.writeDouble(((Double) obj).doubleValue());
+ }
+ else if (clazz == int.class)
+ {
+ if (tagged)
+ os.writeByte(JdwpConstants.Tag.BYTE);
+ os.writeInt(((Integer) obj).intValue());
+ }
+ else if (clazz == long.class)
+ {
+ if (tagged)
+ os.writeByte(JdwpConstants.Tag.LONG);
+ os.writeLong(((Long) obj).longValue());
+ }
+ else if (clazz == short.class)
+ {
+ if (tagged)
+ os.writeByte(JdwpConstants.Tag.SHORT);
+ os.writeInt(((Short) obj).shortValue());
+ }
+ else if (clazz == void.class)
+ { // A 'void' has no data
+ if (tagged)
+ os.writeByte(JdwpConstants.Tag.VOID);
+ }
+ else if (clazz == boolean.class)
+ {
+ if (tagged)
+ os.writeByte(JdwpConstants.Tag.BOOLEAN);
+ os.writeBoolean(((Boolean) obj).booleanValue());
+ }
+ else
+ { // This shouldn't be possible
+ throw new InvalidFieldException("Field has invalid primitive!");
+ }
+ }
+ else
+ {
+ // Object is an Object, not a primitive type wrapped in an object
+ // Write the appropriate tag
+ if (tagged)
+ {
+ if (clazz.isArray())
+ os.writeByte(JdwpConstants.Tag.ARRAY);
+ else if (obj instanceof String)
+ os.writeByte(JdwpConstants.Tag.STRING);
+ else if (obj instanceof Thread)
+ os.writeByte(JdwpConstants.Tag.THREAD);
+ else if (obj instanceof ThreadGroup)
+ os.writeByte(JdwpConstants.Tag.THREAD_GROUP);
+ else if (obj instanceof ClassLoader)
+ os.writeByte(JdwpConstants.Tag.CLASS_LOADER);
+ else if (obj instanceof Class)
+ os.writeByte(JdwpConstants.Tag.CLASS_OBJECT);
+ else
+ os.writeByte(JdwpConstants.Tag.OBJECT);
+ }
+ ObjectId oid = Jdwp.getIdManager().getId(obj);
+ oid.write(os);
+ }
+ }
+
+ /**
+ * Reads the appropriate object for the tagged value contained in the
+ * ByteBuffer.
+ *
+ * @param bb contains the Object
+ * @return The Object referenced by the value
+ * @throws JdwpException
+ * @throws IOException
+ */
+ public static Object getObj(ByteBuffer bb)
+ throws JdwpException, IOException
+ {
+ return getUntaggedObj(bb, bb.get());
+ }
+
+ /**
+ * Reads the an object of the given Class from the untagged value contained
+ * in the ByteBuffer.
+ *
+ * @param bb contains the Object
+ * @param type corresponds to the TAG of value to be read
+ * @return
+ * @throws JdwpException
+ * @throws IOException
+ */
+ public static Object getUntaggedObj(ByteBuffer bb, Class type)
+ throws JdwpException, IOException
+ {
+ if (type.isPrimitive())
+ {
+ if (type == byte.class)
+ return new Byte(bb.get());
+ else if (type == char.class)
+ return new Character(bb.getChar());
+ else if (type == float.class)
+ return new Float(bb.getFloat());
+ else if (type == double.class)
+ return new Double(bb.getDouble());
+ else if (type == int.class)
+ return new Integer(bb.getInt());
+ else if (type == long.class)
+ return new Long(bb.getLong());
+ else if (type == short.class)
+ return new Short(bb.getShort());
+ else if (type == boolean.class)
+ return (bb.get() == 0) ? new Boolean(false) : new Boolean(true);
+ else if (type == void.class)
+ return new byte[0];
+ else
+ { // This shouldn't be possible
+ throw new InvalidFieldException("Field has invalid primitive!");
+ }
+ }
+ else
+ {
+ // Field is an object
+ ObjectId oid = Jdwp.getIdManager().readId(bb);
+ return oid.getObject();
+ }
+ }
+
+ /**
+ * Reads the an object of the given Class from the untagged value contained
+ * in the ByteBuffer.
+ *
+ * @param bb contains the Object
+ * @param tag TAG of the Value to be read
+ * @return the object
+ * @throws JdwpException
+ * @throws IOException
+ */
+ public static Object getUntaggedObj(ByteBuffer bb, byte tag)
+ throws JdwpException, IOException
+ {
+ switch (tag)
+ {
+ case JdwpConstants.Tag.BYTE:
+ return new Byte(bb.get());
+ case JdwpConstants.Tag.CHAR:
+ return new Character(bb.getChar());
+ case JdwpConstants.Tag.FLOAT:
+ return new Float(bb.getFloat());
+ case JdwpConstants.Tag.DOUBLE:
+ return new Double(bb.getDouble());
+ case JdwpConstants.Tag.INT:
+ return new Integer(bb.getInt());
+ case JdwpConstants.Tag.LONG:
+ return new Long(bb.getLong());
+ case JdwpConstants.Tag.SHORT:
+ return new Short(bb.getShort());
+ case JdwpConstants.Tag.VOID:
+ return new byte[0];
+ case JdwpConstants.Tag.BOOLEAN:
+ return (bb.get() == 0) ? new Boolean(false) : new Boolean(true);
+ case JdwpConstants.Tag.STRING:
+ return JdwpString.readString(bb);
+ case JdwpConstants.Tag.ARRAY:
+ case JdwpConstants.Tag.THREAD:
+ case JdwpConstants.Tag.OBJECT:
+ case JdwpConstants.Tag.THREAD_GROUP:
+ case JdwpConstants.Tag.CLASS_LOADER:
+ case JdwpConstants.Tag.CLASS_OBJECT:
+ // All these cases are ObjectIds
+ ObjectId oid = Jdwp.getIdManager().readId(bb);
+ return oid.getObject();
+ default:
+ throw new JdwpInternalErrorException("Could not find TAG:" + tag);
+ }
+ }
+}
diff --git a/gnu/java/awt/AWTUtilities.java b/gnu/java/awt/AWTUtilities.java
new file mode 100644
index 000000000..af1fc13ca
--- /dev/null
+++ b/gnu/java/awt/AWTUtilities.java
@@ -0,0 +1,694 @@
+/* AWTUtilities.java -- Common utility methods for AWT and Swing.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.java.awt;
+
+import java.applet.Applet;
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Insets;
+import java.awt.Point;
+import java.awt.Rectangle;
+import java.awt.Toolkit;
+import java.awt.Window;
+import java.awt.event.MouseEvent;
+import java.util.AbstractSequentialList;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.NoSuchElementException;
+import java.util.WeakHashMap;
+import java.lang.reflect.InvocationTargetException;
+
+/**
+ * This class mirrors the javax.swing.SwingUtilities class. It
+ * provides commonly needed functionalities for AWT classes without
+ * the need to reference classes in the javax.swing package.
+ */
+public class AWTUtilities
+{
+
+ /**
+ * This List implementation wraps the Component[] returned by
+ * {@link Container#getComponents()} and iterates over the visible Components
+ * in that array. This class is used in {@link #getVisibleChildren}.
+ */
+ static class VisibleComponentList extends AbstractSequentialList
+ {
+ /**
+ * The ListIterator for this List.
+ */
+ class VisibleComponentIterator implements ListIterator
+ {
+ /** The current index in the Component[]. */
+ int index;
+
+ /** The index in the List of visible Components. */
+ int listIndex;
+
+ /**
+ * Creates a new VisibleComponentIterator that starts at the specified
+ * <code>listIndex</code>. The array of Components is searched from
+ * the beginning to find the matching array index.
+ *
+ * @param listIndex the index from where to begin iterating
+ */
+ VisibleComponentIterator(int listIndex)
+ {
+ this.listIndex = listIndex;
+ int visibleComponentsFound = 0;
+ for (index = 0; visibleComponentsFound != listIndex; index++)
+ {
+ if (components[index].isVisible())
+ visibleComponentsFound++;
+ }
+ }
+
+ /**
+ * Returns <code>true</code> if there are more visible components in the
+ * array, <code>false</code> otherwise.
+ *
+ * @return <code>true</code> if there are more visible components in the
+ * array, <code>false</code> otherwise
+ */
+ public boolean hasNext()
+ {
+ boolean hasNext = false;
+ for (int i = index; i < components.length; i++)
+ {
+ if (components[i].isVisible())
+ {
+ hasNext = true;
+ break;
+ }
+ }
+ return hasNext;
+ }
+
+ /**
+ * Returns the next visible <code>Component</code> in the List.
+ *
+ * @return the next visible <code>Component</code> in the List
+ *
+ * @throws if there is no next element
+ */
+ public Object next()
+ {
+ Object o = null;
+ for (; index < components.length; index++)
+ {
+ if (components[index].isVisible())
+ {
+ o = components[index];
+ break;
+ }
+ }
+ if (o != null)
+ {
+ index++;
+ listIndex++;
+ return o;
+ }
+ else
+ throw new NoSuchElementException();
+ }
+
+ /**
+ * Returns <code>true</code> if there are more visible components in the
+ * array in the reverse direction, <code>false</code> otherwise.
+ *
+ * @return <code>true</code> if there are more visible components in the
+ * array in the reverse direction, <code>false</code> otherwise
+ */
+ public boolean hasPrevious()
+ {
+ boolean hasPrevious = false;
+ for (int i = index - 1; i >= 0; i--)
+ {
+ if (components[i].isVisible())
+ {
+ hasPrevious = true;
+ break;
+ }
+ }
+ return hasPrevious;
+ }
+
+ /**
+ * Returns the previous visible <code>Component</code> in the List.
+ *
+ * @return the previous visible <code>Component</code> in the List
+ *
+ * @throws NoSuchElementException if there is no previous element
+ */
+ public Object previous()
+ {
+ Object o = null;
+ for (index--; index >= 0; index--)
+ {
+ if (components[index].isVisible())
+ {
+ o = components[index];
+ break;
+ }
+ }
+ if (o != null)
+ {
+ listIndex--;
+ return o;
+ }
+ else
+ throw new NoSuchElementException();
+ }
+
+ /**
+ * Returns the index of the next element in the List.
+ *
+ * @return the index of the next element in the List
+ */
+ public int nextIndex()
+ {
+ return listIndex + 1;
+ }
+
+ /**
+ * Returns the index of the previous element in the List.
+ *
+ * @return the index of the previous element in the List
+ */
+ public int previousIndex()
+ {
+ return listIndex - 1;
+ }
+
+ /**
+ * This operation is not supported because the List is immutable.
+ *
+ * @throws UnsupportedOperationException because the List is immutable
+ */
+ public void remove()
+ {
+ throw new UnsupportedOperationException
+ ("VisibleComponentList is immutable");
+ }
+
+ /**
+ * This operation is not supported because the List is immutable.
+ *
+ * @param o not used here
+ *
+ * @throws UnsupportedOperationException because the List is immutable
+ */
+ public void set(Object o)
+ {
+ throw new UnsupportedOperationException
+ ("VisibleComponentList is immutable");
+ }
+
+ /**
+ * This operation is not supported because the List is immutable.
+ *
+ * @param o not used here
+ *
+ * @throws UnsupportedOperationException because the List is immutable
+ */
+ public void add(Object o)
+ {
+ throw new UnsupportedOperationException
+ ("VisibleComponentList is immutable");
+ }
+ }
+
+ /**
+ * The components over which we iterate. Only the visible components
+ * are returned by this List.
+ */
+ Component[] components;
+
+ /**
+ * Creates a new instance of VisibleComponentList that wraps the specified
+ * <code>Component[]</code>.
+ *
+ * @param c the <code>Component[]</code> to be wrapped.
+ */
+ VisibleComponentList(Component[] c)
+ {
+ components = c;
+ }
+
+ /**
+ * Returns a {@link ListIterator} for iterating over this List.
+ *
+ * @return a {@link ListIterator} for iterating over this List
+ */
+ public ListIterator listIterator(int index)
+ {
+ return new VisibleComponentIterator(index);
+ }
+
+ /**
+ * Returns the number of visible components in the wrapped Component[].
+ *
+ * @return the number of visible components
+ */
+ public int size()
+ {
+ int visibleComponents = 0;
+ for (int i = 0; i < components.length; i++)
+ if (components[i].isVisible())
+ visibleComponents++;
+ return visibleComponents;
+ }
+ }
+
+ /**
+ * The cache for our List instances. We try to hold one instance of
+ * VisibleComponentList for each Component[] that is requested. Note
+ * that we use a WeakHashMap for caching, so that the cache itself
+ * does not keep the array or the List from beeing garbage collected
+ * if no other objects hold references to it.
+ */
+ static WeakHashMap visibleChildrenCache = new WeakHashMap();
+
+ /**
+ * Returns the visible children of a {@link Container}. This method is
+ * commonly needed in LayoutManagers, because they only have to layout
+ * the visible children of a Container.
+ *
+ * @param c the Container from which to extract the visible children
+ *
+ * @return the visible children of <code>c</code>
+ */
+ public static List getVisibleChildren(Container c)
+ {
+ Component[] children = c.getComponents();
+ Object o = visibleChildrenCache.get(children);
+ VisibleComponentList visibleChildren = null;
+ if (o == null)
+ {
+ visibleChildren = new VisibleComponentList(children);
+ visibleChildrenCache.put(children, visibleChildren);
+ }
+ else
+ visibleChildren = (VisibleComponentList) o;
+
+ return visibleChildren;
+ }
+
+ /**
+ * Calculates the portion of the base rectangle which is inside the
+ * insets.
+ *
+ * @param base The rectangle to apply the insets to
+ * @param insets The insets to apply to the base rectangle
+ * @param ret A rectangle to use for storing the return value, or
+ * <code>null</code>
+ *
+ * @return The calculated area inside the base rectangle and its insets,
+ * either stored in ret or a new Rectangle if ret is <code>null</code>
+ *
+ * @see #calculateInnerArea
+ */
+ public static Rectangle calculateInsetArea(Rectangle base, Insets insets,
+ Rectangle ret)
+ {
+ if (ret == null)
+ ret = new Rectangle();
+ ret.setBounds(base.x + insets.left, base.y + insets.top,
+ base.width - (insets.left + insets.right),
+ base.height - (insets.top + insets.bottom));
+ return ret;
+ }
+
+ /**
+ * Calculates the bounds of a component in the component's own coordinate
+ * space. The result has the same height and width as the component's
+ * bounds, but its location is set to (0,0).
+ *
+ * @param aComponent The component to measure
+ *
+ * @return The component's bounds in its local coordinate space
+ */
+ public static Rectangle getLocalBounds(Component aComponent)
+ {
+ Rectangle bounds = aComponent.getBounds();
+ return new Rectangle(0, 0, bounds.width, bounds.height);
+ }
+
+ /**
+ * Returns the font metrics object for a given font. The metrics can be
+ * used to calculate crude bounding boxes and positioning information,
+ * for laying out components with textual elements.
+ *
+ * @param font The font to get metrics for
+ *
+ * @return The font's metrics
+ *
+ * @see java.awt.font.GlyphMetrics
+ */
+ public static FontMetrics getFontMetrics(Font font)
+ {
+ return Toolkit.getDefaultToolkit().getFontMetrics(font);
+ }
+
+ /**
+ * Returns the least ancestor of <code>comp</code> which has the
+ * specified name.
+ *
+ * @param name The name to search for
+ * @param comp The component to search the ancestors of
+ *
+ * @return The nearest ancestor of <code>comp</code> with the given
+ * name, or <code>null</code> if no such ancestor exists
+ *
+ * @see java.awt.Component#getName
+ * @see #getAncestorOfClass
+ */
+ public static Container getAncestorNamed(String name, Component comp)
+ {
+ while (comp != null && (comp.getName() != name))
+ comp = comp.getParent();
+ return (Container) comp;
+ }
+
+ /**
+ * Returns the least ancestor of <code>comp</code> which is an instance
+ * of the specified class.
+ *
+ * @param c The class to search for
+ * @param comp The component to search the ancestors of
+ *
+ * @return The nearest ancestor of <code>comp</code> which is an instance
+ * of the given class, or <code>null</code> if no such ancestor exists
+ *
+ * @see #getAncestorOfClass
+ * @see #windowForComponent
+ * @see
+ *
+ */
+ public static Container getAncestorOfClass(Class c, Component comp)
+ {
+ while (comp != null && (! c.isInstance(comp)))
+ comp = comp.getParent();
+ return (Container) comp;
+ }
+
+ /**
+ * Equivalent to calling <code>getAncestorOfClass(Window, comp)</code>.
+ *
+ * @param comp The component to search for an ancestor window
+ *
+ * @return An ancestral window, or <code>null</code> if none exists
+ */
+ public static Window windowForComponent(Component comp)
+ {
+ return (Window) getAncestorOfClass(Window.class, comp);
+ }
+
+ /**
+ * Returns the "root" of the component tree containint <code>comp</code>
+ * The root is defined as either the <em>least</em> ancestor of
+ * <code>comp</code> which is a {@link Window}, or the <em>greatest</em>
+ * ancestor of <code>comp</code> which is a {@link Applet} if no {@link
+ * Window} ancestors are found.
+ *
+ * @param comp The component to search for a root
+ *
+ * @return The root of the component's tree, or <code>null</code>
+ */
+ public static Component getRoot(Component comp)
+ {
+ Applet app = null;
+ Window win = null;
+
+ while (comp != null)
+ {
+ if (win == null && comp instanceof Window)
+ win = (Window) comp;
+ else if (comp instanceof Applet)
+ app = (Applet) comp;
+ comp = comp.getParent();
+ }
+
+ if (win != null)
+ return win;
+ else
+ return app;
+ }
+
+ /**
+ * Return true if a descends from b, in other words if b is an
+ * ancestor of a.
+ *
+ * @param a The child to search the ancestry of
+ * @param b The potential ancestor to search for
+ *
+ * @return true if a is a descendent of b, false otherwise
+ */
+ public static boolean isDescendingFrom(Component a, Component b)
+ {
+ while (true)
+ {
+ if (a == null || b == null)
+ return false;
+ if (a == b)
+ return true;
+ a = a.getParent();
+ }
+ }
+
+ /**
+ * Returns the deepest descendent of parent which is both visible and
+ * contains the point <code>(x,y)</code>. Returns parent when either
+ * parent is not a container, or has no children which contain
+ * <code>(x,y)</code>. Returns <code>null</code> when either
+ * <code>(x,y)</code> is outside the bounds of parent, or parent is
+ * <code>null</code>.
+ *
+ * @param parent The component to search the descendents of
+ * @param x Horizontal coordinate to search for
+ * @param y Vertical coordinate to search for
+ *
+ * @return A component containing <code>(x,y)</code>, or
+ * <code>null</code>
+ *
+ * @see java.awt.Container#findComponentAt
+ */
+ public static Component getDeepestComponentAt(Component parent, int x, int y)
+ {
+ if (parent == null || (! parent.contains(x, y)))
+ return null;
+
+ if (! (parent instanceof Container))
+ return parent;
+
+ Container c = (Container) parent;
+ return c.findComponentAt(x, y);
+ }
+
+ /**
+ * Converts a point from a component's local coordinate space to "screen"
+ * coordinates (such as the coordinate space mouse events are delivered
+ * in). This operation is equivalent to translating the point by the
+ * location of the component (which is the origin of its coordinate
+ * space).
+ *
+ * @param p The point to convert
+ * @param c The component which the point is expressed in terms of
+ *
+ * @see convertPointFromScreen
+ */
+ public static void convertPointToScreen(Point p, Component c)
+ {
+ Point c0 = c.getLocationOnScreen();
+ p.translate(c0.x, c0.y);
+ }
+
+ /**
+ * Converts a point from "screen" coordinates (such as the coordinate
+ * space mouse events are delivered in) to a component's local coordinate
+ * space. This operation is equivalent to translating the point by the
+ * negation of the component's location (which is the origin of its
+ * coordinate space).
+ *
+ * @param p The point to convert
+ * @param c The component which the point should be expressed in terms of
+ */
+ public static void convertPointFromScreen(Point p, Component c)
+ {
+ Point c0 = c.getLocationOnScreen();
+ p.translate(-c0.x, -c0.y);
+ }
+
+ /**
+ * Converts a point <code>(x,y)</code> from the coordinate space of one
+ * component to another. This is equivalent to converting the point from
+ * <code>source</code> space to screen space, then back from screen space
+ * to <code>destination</code> space. If exactly one of the two
+ * Components is <code>null</code>, it is taken to refer to the root
+ * ancestor of the other component. If both are <code>null</code>, no
+ * transformation is done.
+ *
+ * @param source The component which the point is expressed in terms of
+ * @param x Horizontal coordinate of point to transform
+ * @param y Vertical coordinate of point to transform
+ * @param destination The component which the return value will be
+ * expressed in terms of
+ *
+ * @return The point <code>(x,y)</code> converted from the coordinate
+ * space of the
+ * source component to the coordinate space of the destination component
+ *
+ * @see #convertPointToScreen
+ * @see #convertPointFromScreen
+ * @see #convertRectangle
+ * @see #getRoot
+ */
+ public static Point convertPoint(Component source, int x, int y,
+ Component destination)
+ {
+ Point pt = new Point(x, y);
+
+ if (source == null && destination == null)
+ return pt;
+
+ if (source == null)
+ source = getRoot(destination);
+
+ if (destination == null)
+ destination = getRoot(source);
+
+ convertPointToScreen(pt, source);
+ convertPointFromScreen(pt, destination);
+
+ return pt;
+ }
+
+
+ /**
+ * Converts a rectangle from the coordinate space of one component to
+ * another. This is equivalent to converting the rectangle from
+ * <code>source</code> space to screen space, then back from screen space
+ * to <code>destination</code> space. If exactly one of the two
+ * Components is <code>null</code>, it is taken to refer to the root
+ * ancestor of the other component. If both are <code>null</code>, no
+ * transformation is done.
+ *
+ * @param source The component which the rectangle is expressed in terms of
+ * @param rect The rectangle to convert
+ * @param destination The component which the return value will be
+ * expressed in terms of
+ *
+ * @return A new rectangle, equal in size to the input rectangle, but
+ * with its position converted from the coordinate space of the source
+ * component to the coordinate space of the destination component
+ *
+ * @see #convertPointToScreen
+ * @see #convertPointFromScreen
+ * @see #convertPoint
+ * @see #getRoot
+ */
+ public static Rectangle convertRectangle(Component source, Rectangle rect,
+ Component destination)
+ {
+ Point pt = convertPoint(source, rect.x, rect.y, destination);
+ return new Rectangle(pt.x, pt.y, rect.width, rect.height);
+ }
+
+ /**
+ * Convert a mouse event which refrers to one component to another. This
+ * includes changing the mouse event's coordinate space, as well as the
+ * source property of the event. If <code>source</code> is
+ * <code>null</code>, it is taken to refer to <code>destination</code>'s
+ * root component. If <code>destination</code> is <code>null</code>, the
+ * new event will remain expressed in <code>source</code>'s coordinate
+ * system.
+ *
+ * @param source The component the mouse event currently refers to
+ * @param sourceEvent The mouse event to convert
+ * @param destination The component the new mouse event should refer to
+ *
+ * @return A new mouse event expressed in terms of the destination
+ * component's coordinate space, and with the destination component as
+ * its source
+ *
+ * @see #convertPoint
+ */
+ public static MouseEvent convertMouseEvent(Component source,
+ MouseEvent sourceEvent,
+ Component destination)
+ {
+ Point newpt = convertPoint(source, sourceEvent.getX(), sourceEvent.getY(),
+ destination);
+
+ return new MouseEvent(destination, sourceEvent.getID(),
+ sourceEvent.getWhen(), sourceEvent.getModifiers(),
+ newpt.x, newpt.y, sourceEvent.getClickCount(),
+ sourceEvent.isPopupTrigger(),
+ sourceEvent.getButton());
+ }
+
+
+ /**
+ * Calls {@link java.awt.EventQueue.invokeLater} with the
+ * specified {@link Runnable}.
+ */
+ public static void invokeLater(Runnable doRun)
+ {
+ java.awt.EventQueue.invokeLater(doRun);
+ }
+
+ /**
+ * Calls {@link java.awt.EventQueue.invokeAndWait} with the
+ * specified {@link Runnable}.
+ */
+ public static void invokeAndWait(Runnable doRun)
+ throws InterruptedException,
+ InvocationTargetException
+ {
+ java.awt.EventQueue.invokeAndWait(doRun);
+ }
+
+ /**
+ * Calls {@link java.awt.EventQueue.isEventDispatchThread}.
+ */
+ public static boolean isEventDispatchThread()
+ {
+ return java.awt.EventQueue.isDispatchThread();
+ }
+}
diff --git a/gnu/java/awt/BitMaskExtent.java b/gnu/java/awt/BitMaskExtent.java
index 3caad76a9..281349910 100644
--- a/gnu/java/awt/BitMaskExtent.java
+++ b/gnu/java/awt/BitMaskExtent.java
@@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/BitwiseXORComposite.java b/gnu/java/awt/BitwiseXORComposite.java
index 6a05ee6c5..b568e1108 100644
--- a/gnu/java/awt/BitwiseXORComposite.java
+++ b/gnu/java/awt/BitwiseXORComposite.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/Buffers.java b/gnu/java/awt/Buffers.java
index 22fc1f8ab..c6ccf9191 100644
--- a/gnu/java/awt/Buffers.java
+++ b/gnu/java/awt/Buffers.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/ClasspathToolkit.java b/gnu/java/awt/ClasspathToolkit.java
index 72302e11c..5fb444f98 100644
--- a/gnu/java/awt/ClasspathToolkit.java
+++ b/gnu/java/awt/ClasspathToolkit.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,7 +38,9 @@ exception statement from your version. */
package gnu.java.awt;
+import gnu.java.awt.EmbeddedWindow;
import gnu.java.awt.peer.ClasspathFontPeer;
+import gnu.java.awt.peer.EmbeddedWindowPeer;
import gnu.java.awt.peer.ClasspathTextLayoutPeer;
import java.awt.AWTException;
@@ -355,6 +357,14 @@ public abstract class ClasspathToolkit
public abstract RobotPeer createRobot (GraphicsDevice screen)
throws AWTException;
+ /**
+ * Creates an embedded window peer, and associates it with an
+ * EmbeddedWindow object.
+ *
+ * @param w The embedded window with which to associate a peer.
+ */
+ public abstract EmbeddedWindowPeer createEmbeddedWindow (EmbeddedWindow w);
+
/**
* Used to register ImageIO SPIs provided by the toolkit.
*/
diff --git a/gnu/java/awt/ComponentDataBlitOp.java b/gnu/java/awt/ComponentDataBlitOp.java
index 3401a8063..545427ea7 100644
--- a/gnu/java/awt/ComponentDataBlitOp.java
+++ b/gnu/java/awt/ComponentDataBlitOp.java
@@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/EmbeddedWindow.java b/gnu/java/awt/EmbeddedWindow.java
index c3cfac48b..a85ce7454 100644
--- a/gnu/java/awt/EmbeddedWindow.java
+++ b/gnu/java/awt/EmbeddedWindow.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -85,12 +85,8 @@ public class EmbeddedWindow extends Frame
*/
public void addNotify()
{
- Toolkit tk = getToolkit();
-
- if (! (tk instanceof EmbeddedWindowSupport))
- throw new UnsupportedOperationException
- ("Embedded windows are not supported by the current peers: "
- + tk.getClass());
+ // Assume we're using ClasspathToolkit
+ ClasspathToolkit tk = (ClasspathToolkit) getToolkit();
// Circumvent the package-privateness of the AWT internal
// java.awt.Component.peer member variable.
@@ -98,7 +94,7 @@ public class EmbeddedWindow extends Frame
{
Field peerField = Component.class.getDeclaredField("peer");
AccessController.doPrivileged(new SetAccessibleAction(peerField));
- peerField.set(this, ((EmbeddedWindowSupport) tk).createEmbeddedWindow (this));
+ peerField.set(this, tk.createEmbeddedWindow (this));
}
catch (IllegalAccessException e)
{
diff --git a/gnu/java/awt/EventModifier.java b/gnu/java/awt/EventModifier.java
index fe1a2782a..565fcbc32 100644
--- a/gnu/java/awt/EventModifier.java
+++ b/gnu/java/awt/EventModifier.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/CORBA/CDR/uncObjectOutputStream.java b/gnu/java/awt/FocusManager.java
index 3aa8582bb..49b40bfc1 100644
--- a/gnu/CORBA/CDR/uncObjectOutputStream.java
+++ b/gnu/java/awt/FocusManager.java
@@ -1,4 +1,4 @@
-/* uncObjectOutputStream.java --
+/* FocusManager.java -- Provide Swing FocusManager API compatibility
Copyright (C) 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -35,39 +35,18 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
-package gnu.CORBA.CDR;
-
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-import java.io.OutputStream;
+package gnu.java.awt;
/**
- * The Uncloseable Object Output Stream is used in cases when
- * it is necessary to write the data and leave the stream opened.
+ * This is a subclass of the otherwise abstract class
+ * {@link javax.swing.FocusManager}. Its sole purpose is to make the Swing
+ * FocusManager usable as a FocusManager in AWT, so that we can provide both
+ * the new (1.4) KeyboardFocusManager API and still support the older
+ * Swing FocusManager.
*
- * @author Audrius Meskauskas (AudriusA@Bioinformatics.org)
+ * @author Roman Kennke
*/
-public class uncObjectOutputStream
- extends ObjectOutputStream
+public class FocusManager
+ extends javax.swing.FocusManager
{
- /**
- * Delegate call to super class constructor.
- */
- public uncObjectOutputStream(OutputStream out)
- throws IOException
- {
- super(out);
- }
-
- /**
- * Do not close, just flush.
- *
- * @throws IOException if the flush() throws it.
- */
- public void close()
- throws IOException
- {
- flush();
- }
-} \ No newline at end of file
+}
diff --git a/gnu/java/awt/GradientPaintContext.java b/gnu/java/awt/GradientPaintContext.java
index 6073917cd..5e1d62dd9 100644
--- a/gnu/java/awt/GradientPaintContext.java
+++ b/gnu/java/awt/GradientPaintContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/CieXyzConverter.java b/gnu/java/awt/color/CieXyzConverter.java
index 4078ffa51..174280585 100644
--- a/gnu/java/awt/color/CieXyzConverter.java
+++ b/gnu/java/awt/color/CieXyzConverter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/ClutProfileConverter.java b/gnu/java/awt/color/ClutProfileConverter.java
index 471a47932..bff97cc9b 100644
--- a/gnu/java/awt/color/ClutProfileConverter.java
+++ b/gnu/java/awt/color/ClutProfileConverter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/ColorLookUpTable.java b/gnu/java/awt/color/ColorLookUpTable.java
index bf128907d..6b6418bc2 100644
--- a/gnu/java/awt/color/ColorLookUpTable.java
+++ b/gnu/java/awt/color/ColorLookUpTable.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/ColorSpaceConverter.java b/gnu/java/awt/color/ColorSpaceConverter.java
index 20bb89b7a..63ba08a4f 100644
--- a/gnu/java/awt/color/ColorSpaceConverter.java
+++ b/gnu/java/awt/color/ColorSpaceConverter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/GrayProfileConverter.java b/gnu/java/awt/color/GrayProfileConverter.java
index 94ab3db5d..3c725138a 100644
--- a/gnu/java/awt/color/GrayProfileConverter.java
+++ b/gnu/java/awt/color/GrayProfileConverter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/GrayScaleConverter.java b/gnu/java/awt/color/GrayScaleConverter.java
index 6ac3e6d38..7a27ddba8 100644
--- a/gnu/java/awt/color/GrayScaleConverter.java
+++ b/gnu/java/awt/color/GrayScaleConverter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/LinearRGBConverter.java b/gnu/java/awt/color/LinearRGBConverter.java
index 20ba56dbf..13a4e2c04 100644
--- a/gnu/java/awt/color/LinearRGBConverter.java
+++ b/gnu/java/awt/color/LinearRGBConverter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/ProfileHeader.java b/gnu/java/awt/color/ProfileHeader.java
index 759400540..4fdef560a 100644
--- a/gnu/java/awt/color/ProfileHeader.java
+++ b/gnu/java/awt/color/ProfileHeader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/PyccConverter.java b/gnu/java/awt/color/PyccConverter.java
index b3607af6d..cd50d8776 100644
--- a/gnu/java/awt/color/PyccConverter.java
+++ b/gnu/java/awt/color/PyccConverter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/RgbProfileConverter.java b/gnu/java/awt/color/RgbProfileConverter.java
index a52e80a2d..0cbd28f6c 100644
--- a/gnu/java/awt/color/RgbProfileConverter.java
+++ b/gnu/java/awt/color/RgbProfileConverter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/SrgbConverter.java b/gnu/java/awt/color/SrgbConverter.java
index f94ee674a..a30a0db90 100644
--- a/gnu/java/awt/color/SrgbConverter.java
+++ b/gnu/java/awt/color/SrgbConverter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/TagEntry.java b/gnu/java/awt/color/TagEntry.java
index 1e67dc2b6..a97864683 100644
--- a/gnu/java/awt/color/TagEntry.java
+++ b/gnu/java/awt/color/TagEntry.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/ToneReproductionCurve.java b/gnu/java/awt/color/ToneReproductionCurve.java
index f3b59b2ae..a1bccbd40 100644
--- a/gnu/java/awt/color/ToneReproductionCurve.java
+++ b/gnu/java/awt/color/ToneReproductionCurve.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/color/package.html b/gnu/java/awt/color/package.html
index 209002146..c4705cce5 100644
--- a/gnu/java/awt/color/package.html
+++ b/gnu/java/awt/color/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/image/ImageDecoder.java b/gnu/java/awt/image/ImageDecoder.java
index 63d3937bf..141c85417 100644
--- a/gnu/java/awt/image/ImageDecoder.java
+++ b/gnu/java/awt/image/ImageDecoder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/image/XBMDecoder.java b/gnu/java/awt/image/XBMDecoder.java
index 54bfd6cb0..0793d8ee7 100644
--- a/gnu/java/awt/image/XBMDecoder.java
+++ b/gnu/java/awt/image/XBMDecoder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/image/package.html b/gnu/java/awt/image/package.html
index 2aa55c40f..8823367ea 100644
--- a/gnu/java/awt/image/package.html
+++ b/gnu/java/awt/image/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/package.html b/gnu/java/awt/package.html
index d23292649..166168510 100644
--- a/gnu/java/awt/package.html
+++ b/gnu/java/awt/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/ClasspathFontPeer.java b/gnu/java/awt/peer/ClasspathFontPeer.java
index d34e86300..78ab3a9de 100644
--- a/gnu/java/awt/peer/ClasspathFontPeer.java
+++ b/gnu/java/awt/peer/ClasspathFontPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/ClasspathTextLayoutPeer.java b/gnu/java/awt/peer/ClasspathTextLayoutPeer.java
index 07b4b3eb4..70df2ef74 100644
--- a/gnu/java/awt/peer/ClasspathTextLayoutPeer.java
+++ b/gnu/java/awt/peer/ClasspathTextLayoutPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/EmbeddedWindowPeer.java b/gnu/java/awt/peer/EmbeddedWindowPeer.java
index 95a56d1a5..4c64a1d2d 100644
--- a/gnu/java/awt/peer/EmbeddedWindowPeer.java
+++ b/gnu/java/awt/peer/EmbeddedWindowPeer.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/GLightweightPeer.java b/gnu/java/awt/peer/GLightweightPeer.java
index c3219d1ea..3bcaebcea 100644
--- a/gnu/java/awt/peer/GLightweightPeer.java
+++ b/gnu/java/awt/peer/GLightweightPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GThreadMutex.java b/gnu/java/awt/peer/gtk/GThreadMutex.java
index 111c9a801..e73df9e55 100644
--- a/gnu/java/awt/peer/gtk/GThreadMutex.java
+++ b/gnu/java/awt/peer/gtk/GThreadMutex.java
@@ -18,8 +18,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GThreadNativeMethodRunner.java b/gnu/java/awt/peer/gtk/GThreadNativeMethodRunner.java
index 753c7cd46..9a1b8e3a3 100644
--- a/gnu/java/awt/peer/gtk/GThreadNativeMethodRunner.java
+++ b/gnu/java/awt/peer/gtk/GThreadNativeMethodRunner.java
@@ -19,8 +19,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GdkFontMetrics.java b/gnu/java/awt/peer/gtk/GdkFontMetrics.java
index e871587a4..7a439e83a 100644
--- a/gnu/java/awt/peer/gtk/GdkFontMetrics.java
+++ b/gnu/java/awt/peer/gtk/GdkFontMetrics.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GdkFontPeer.java b/gnu/java/awt/peer/gtk/GdkFontPeer.java
index d130c1175..c6d42b372 100644
--- a/gnu/java/awt/peer/gtk/GdkFontPeer.java
+++ b/gnu/java/awt/peer/gtk/GdkFontPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GdkGlyphVector.java b/gnu/java/awt/peer/gtk/GdkGlyphVector.java
index 29d38b5e3..f0ddea43a 100644
--- a/gnu/java/awt/peer/gtk/GdkGlyphVector.java
+++ b/gnu/java/awt/peer/gtk/GdkGlyphVector.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GdkGraphics.java b/gnu/java/awt/peer/gtk/GdkGraphics.java
index c870dc1d4..65c01b86e 100644
--- a/gnu/java/awt/peer/gtk/GdkGraphics.java
+++ b/gnu/java/awt/peer/gtk/GdkGraphics.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,8 @@ exception statement from your version. */
package gnu.java.awt.peer.gtk;
+import gnu.classpath.Configuration;
+
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
@@ -52,7 +54,17 @@ import java.text.AttributedCharacterIterator;
public class GdkGraphics extends Graphics
{
- private final int native_state = GtkGenericPeer.getUniqueInteger();
+ static
+ {
+ if (Configuration.INIT_LOAD_LIBRARY)
+ {
+ System.loadLibrary("gtkpeer");
+ }
+ initStaticState ();
+ }
+
+ static native void initStaticState();
+ private final int native_state = GtkGenericPeer.getUniqueInteger ();
Color color, xorColor;
GtkComponentPeer component;
diff --git a/gnu/java/awt/peer/gtk/GdkGraphics2D.java b/gnu/java/awt/peer/gtk/GdkGraphics2D.java
index 0ddc1c7a8..b8203179d 100644
--- a/gnu/java/awt/peer/gtk/GdkGraphics2D.java
+++ b/gnu/java/awt/peer/gtk/GdkGraphics2D.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -201,7 +201,7 @@ public class GdkGraphics2D extends Graphics2D
initState(width, height);
setColor(Color.black);
- setBackground(Color.black);
+ setBackground(new Color(0, 0, 0, 0));
setPaint(getColor());
setFont(new Font("SansSerif", Font.PLAIN, 12));
setTransform(new AffineTransform());
@@ -255,7 +255,7 @@ public class GdkGraphics2D extends Graphics2D
initState(this.pixelBuffer, bimage.getWidth(), bimage.getHeight());
setColor(Color.black);
- setBackground(Color.black);
+ setBackground(new Color(0, 0, 0, 0));
setPaint(getColor());
setFont(new Font("SansSerif", Font.PLAIN, 12));
setTransform(new AffineTransform());
@@ -290,8 +290,8 @@ public class GdkGraphics2D extends Graphics2D
private native void cairoRestore();
private native void cairoSetMatrix(double[] m);
private native void cairoSetOperator(int cairoOperator);
- private native void cairoSetRGBColor(double red, double green, double blue);
- private native void cairoSetAlpha(double alpha);
+ private native void cairoSetRGBAColor(double red, double green,
+ double blue, double alpha);
private native void cairoSetFillRule(int cairoFillRule);
private native void cairoSetLineWidth(double width);
private native void cairoSetLineCap(int cairoLineCap);
@@ -498,9 +498,10 @@ public class GdkGraphics2D extends Graphics2D
{
int height = bimage.getHeight();
int width = bimage.getWidth();
+ int index = 0;
for (int y = 0; y < height; ++y)
for (int x = 0; x < width; ++x)
- bimage.setRGB(x, y, pixelBuffer[y*width+height]);
+ bimage.setRGB(x, y, pixelBuffer[index++]);
}
}
@@ -544,7 +545,7 @@ public class GdkGraphics2D extends Graphics2D
// draw an image which has actually been loaded
// into memory fully
BufferedImage b = (BufferedImage) img;
- return drawRaster(b.getColorModel(), b.getData(),
+ return drawRaster(b.getColorModel(), b.getTile(0, 0),
invertedXform, bgcolor);
}
else
@@ -807,9 +808,8 @@ public class GdkGraphics2D extends Graphics2D
fg = c;
paint = c;
- cairoSetRGBColor(fg.getRed() / 255.0, fg.getGreen() / 255.0,
- fg.getBlue() / 255.0);
- cairoSetAlpha((fg.getAlpha() & 255) / 255.0);
+ cairoSetRGBAColor(fg.getRed() / 255.0, fg.getGreen() / 255.0,
+ fg.getBlue() / 255.0, fg.getAlpha() / 255.0);
}
public Color getColor()
@@ -914,9 +914,8 @@ public class GdkGraphics2D extends Graphics2D
public void clearRect(int x, int y, int width, int height)
{
- cairoSetRGBColor(bg.getRed() / 255.0, bg.getGreen() / 255.0,
- bg.getBlue() / 255.0);
- cairoSetAlpha(1.0);
+ cairoSetRGBAColor(bg.getRed() / 255.0, bg.getGreen() / 255.0,
+ bg.getBlue() / 255.0, 1.0);
cairoNewPath();
cairoRectangle(x, y, width, height);
cairoFill();
diff --git a/gnu/java/awt/peer/gtk/GdkGraphicsConfiguration.java b/gnu/java/awt/peer/gtk/GdkGraphicsConfiguration.java
index 94e1b0f01..bfad87aca 100644
--- a/gnu/java/awt/peer/gtk/GdkGraphicsConfiguration.java
+++ b/gnu/java/awt/peer/gtk/GdkGraphicsConfiguration.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java b/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java
index 3f7b87f45..4f9d1c27a 100644
--- a/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java
+++ b/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GdkPixbufDecoder.java b/gnu/java/awt/peer/gtk/GdkPixbufDecoder.java
index ee6c38f3c..57d5a36da 100644
--- a/gnu/java/awt/peer/gtk/GdkPixbufDecoder.java
+++ b/gnu/java/awt/peer/gtk/GdkPixbufDecoder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -83,15 +83,18 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
static native void initStaticState();
private final int native_state = GtkGenericPeer.getUniqueInteger ();
- private boolean initialized = false;
+
+ // initState() has been called, but pumpDone() has not yet been called.
+ private boolean needsClose = false;
// the current set of ImageConsumers for this decoder
Vector curr;
// interface to GdkPixbuf
native void initState ();
- native void pumpBytes (byte[] bytes, int len);
- native void finish ();
+ native void pumpBytes (byte[] bytes, int len) throws IOException;
+ native void pumpDone () throws IOException;
+ native void finish (boolean needsClose);
static native void streamImage(int[] bytes, String format, int width, int height, boolean hasAlpha, DataOutput sink);
// gdk-pixbuf provids data in RGBA format
@@ -163,8 +166,11 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
byte bytes[] = new byte[4096];
int len = 0;
initState();
+ needsClose = true;
while ((len = is.read (bytes)) != -1)
pumpBytes (bytes, len);
+ pumpDone();
+ needsClose = false;
for (int i = 0; i < curr.size (); i++)
{
@@ -177,7 +183,7 @@ public class GdkPixbufDecoder extends gnu.java.awt.image.ImageDecoder
public void finalize()
{
- finish();
+ finish(needsClose);
}
diff --git a/gnu/java/awt/peer/gtk/GdkRobotPeer.java b/gnu/java/awt/peer/gtk/GdkRobotPeer.java
index 054e73322..6d0218d05 100644
--- a/gnu/java/awt/peer/gtk/GdkRobotPeer.java
+++ b/gnu/java/awt/peer/gtk/GdkRobotPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GdkScreenGraphicsDevice.java b/gnu/java/awt/peer/gtk/GdkScreenGraphicsDevice.java
index c74fb880f..2bf9d23db 100644
--- a/gnu/java/awt/peer/gtk/GdkScreenGraphicsDevice.java
+++ b/gnu/java/awt/peer/gtk/GdkScreenGraphicsDevice.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GdkTextLayout.java b/gnu/java/awt/peer/gtk/GdkTextLayout.java
index 1a456d12a..ff51745f2 100644
--- a/gnu/java/awt/peer/gtk/GdkTextLayout.java
+++ b/gnu/java/awt/peer/gtk/GdkTextLayout.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkButtonPeer.java b/gnu/java/awt/peer/gtk/GtkButtonPeer.java
index 1ef992f02..ab5df9f46 100644
--- a/gnu/java/awt/peer/gtk/GtkButtonPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkButtonPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkCanvasPeer.java b/gnu/java/awt/peer/gtk/GtkCanvasPeer.java
index 1a0c4c968..dc2176120 100644
--- a/gnu/java/awt/peer/gtk/GtkCanvasPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkCanvasPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkCheckboxGroupPeer.java b/gnu/java/awt/peer/gtk/GtkCheckboxGroupPeer.java
index e387f1287..46b0733d3 100644
--- a/gnu/java/awt/peer/gtk/GtkCheckboxGroupPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkCheckboxGroupPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java b/gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java
index 83aa98981..01a6e3102 100644
--- a/gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkCheckboxMenuItemPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkCheckboxPeer.java b/gnu/java/awt/peer/gtk/GtkCheckboxPeer.java
index 4af88f533..851757245 100644
--- a/gnu/java/awt/peer/gtk/GtkCheckboxPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkCheckboxPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkChoicePeer.java b/gnu/java/awt/peer/gtk/GtkChoicePeer.java
index 43e48328d..5028ea779 100644
--- a/gnu/java/awt/peer/gtk/GtkChoicePeer.java
+++ b/gnu/java/awt/peer/gtk/GtkChoicePeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -72,6 +72,8 @@ public class GtkChoicePeer extends GtkComponentPeer
native void nativeRemove (int index);
native void nativeRemoveAll ();
+ native void connectSignals ();
+
public native void select (int position);
public void add (String item, int index)
@@ -118,7 +120,7 @@ public class GtkChoicePeer extends GtkComponentPeer
add (item, position);
}
- protected void choicePostItemEvent (String label, int stateChange)
+ protected void postChoiceItemEvent (String label, int stateChange)
{
// Must set our state before notifying listeners
if (stateChange == ItemEvent.SELECTED)
diff --git a/gnu/java/awt/peer/gtk/GtkClipboard.java b/gnu/java/awt/peer/gtk/GtkClipboard.java
index b9cc1613b..c719cddb5 100644
--- a/gnu/java/awt/peer/gtk/GtkClipboard.java
+++ b/gnu/java/awt/peer/gtk/GtkClipboard.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkComponentPeer.java b/gnu/java/awt/peer/gtk/GtkComponentPeer.java
index 3a1bf8b66..a7aea091d 100644
--- a/gnu/java/awt/peer/gtk/GtkComponentPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkComponentPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -63,11 +63,15 @@ import java.awt.event.ItemEvent;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.awt.event.PaintEvent;
+import java.awt.event.TextEvent;
+import java.awt.image.BufferedImage;
import java.awt.image.ColorModel;
import java.awt.image.ImageObserver;
import java.awt.image.ImageProducer;
import java.awt.image.VolatileImage;
import java.awt.peer.ComponentPeer;
+import java.util.Timer;
+import java.util.TimerTask;
public class GtkComponentPeer extends GtkGenericPeer
implements ComponentPeer
@@ -81,6 +85,8 @@ public class GtkComponentPeer extends GtkGenericPeer
boolean isInRepaint;
+ Timer repaintTimer = new Timer (true);
+
/* this isEnabled differs from Component.isEnabled, in that it
knows if a parent is disabled. In that case Component.isEnabled
may return true, but our isEnabled will always return false */
@@ -103,6 +109,13 @@ public class GtkComponentPeer extends GtkGenericPeer
native boolean isRealized ();
+ void realize ()
+ {
+ // Default implementation does nothing
+ }
+
+ native void setNativeEventMask ();
+
void create ()
{
throw new RuntimeException ();
@@ -135,6 +148,10 @@ public class GtkComponentPeer extends GtkGenericPeer
if (awtComponent instanceof Window
|| (parent != null && ! parent.isShowing ()))
setParentAndBounds ();
+
+ setNativeEventMask ();
+
+ realize ();
}
void setParentAndBounds ()
@@ -208,7 +225,12 @@ public class GtkComponentPeer extends GtkGenericPeer
public Image createImage (int width, int height)
{
- GtkImage image = new GtkImage (width, height);
+ Image image;
+ if (GtkToolkit.useGraphics2D ())
+ image = new BufferedImage (width, height, BufferedImage.TYPE_INT_RGB);
+ else
+ image = new GtkImage (width, height);
+
Graphics g = image.getGraphics();
g.setColor(getBackground());
g.fillRect(0, 0, width, height);
@@ -354,8 +376,26 @@ public class GtkComponentPeer extends GtkGenericPeer
if (x == 0 && y == 0 && width == 0 && height == 0)
return;
- q().postEvent (new PaintEvent (awtComponent, PaintEvent.UPDATE,
- new Rectangle (x, y, width, height)));
+ repaintTimer.schedule(new RepaintTimerTask(x, y, width, height), tm);
+ }
+
+ private class RepaintTimerTask extends TimerTask
+ {
+ private int x, y, width, height;
+
+ RepaintTimerTask(int x, int y, int width, int height)
+ {
+ this.x = x;
+ this.y = y;
+ this.width = width;
+ this.height = height;
+ }
+
+ public void run()
+ {
+ q().postEvent (new PaintEvent (awtComponent, PaintEvent.UPDATE,
+ new Rectangle (x, y, width, height)));
+ }
}
public void requestFocus ()
@@ -524,6 +564,11 @@ public class GtkComponentPeer extends GtkGenericPeer
item, stateChange));
}
+ protected void postTextEvent ()
+ {
+ q().postEvent (new TextEvent (awtComponent, TextEvent.TEXT_VALUE_CHANGED));
+ }
+
public GraphicsConfiguration getGraphicsConfiguration ()
{
// FIXME: just a stub for now.
@@ -563,7 +608,8 @@ public class GtkComponentPeer extends GtkGenericPeer
public void updateCursorImmediately ()
{
-
+ if (awtComponent.getCursor() != null)
+ setCursor(awtComponent.getCursor());
}
public boolean handlesWheelScrolling ()
diff --git a/gnu/java/awt/peer/gtk/GtkContainerPeer.java b/gnu/java/awt/peer/gtk/GtkContainerPeer.java
index e4aea64c9..c2865f70f 100644
--- a/gnu/java/awt/peer/gtk/GtkContainerPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkContainerPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkDialogPeer.java b/gnu/java/awt/peer/gtk/GtkDialogPeer.java
index 9bf234404..c2cbc37dc 100644
--- a/gnu/java/awt/peer/gtk/GtkDialogPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkDialogPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.java b/gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.java
index 9ee41c985..0533d2759 100644
--- a/gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkFileDialogPeer.java b/gnu/java/awt/peer/gtk/GtkFileDialogPeer.java
index 4281b49cc..bd1f0775a 100644
--- a/gnu/java/awt/peer/gtk/GtkFileDialogPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkFileDialogPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkFontPeer.java b/gnu/java/awt/peer/gtk/GtkFontPeer.java
index e0f070368..80ad15803 100644
--- a/gnu/java/awt/peer/gtk/GtkFontPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkFontPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkFramePeer.java b/gnu/java/awt/peer/gtk/GtkFramePeer.java
index 53e06bc08..b242d66ad 100644
--- a/gnu/java/awt/peer/gtk/GtkFramePeer.java
+++ b/gnu/java/awt/peer/gtk/GtkFramePeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkGenericPeer.java b/gnu/java/awt/peer/gtk/GtkGenericPeer.java
index f161526f6..705eed235 100644
--- a/gnu/java/awt/peer/gtk/GtkGenericPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkGenericPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -90,4 +90,9 @@ public class GtkGenericPeer
}
native void gtkWidgetModifyFont (String name, int style, int size);
+
+ static void printCurrentThread ()
+ {
+ System.out.println ("gtkgenericpeer, thread: " + Thread.currentThread ());
+ }
}
diff --git a/gnu/java/awt/peer/gtk/GtkImage.java b/gnu/java/awt/peer/gtk/GtkImage.java
index 9b794b4aa..abb4137f4 100644
--- a/gnu/java/awt/peer/gtk/GtkImage.java
+++ b/gnu/java/awt/peer/gtk/GtkImage.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -100,6 +100,11 @@ public class GtkImage extends Image
boolean offScreen;
/**
+ * Error flag for loading.
+ */
+ boolean errorLoading;
+
+ /**
* Original source, if created from an ImageProducer.
*/
ImageProducer source;
@@ -176,6 +181,7 @@ public class GtkImage extends Image
isLoaded = false;
observers = new Vector();
source = producer;
+ errorLoading = false;
source.startProduction(new GtkImageConsumer(this, source));
offScreen = false;
}
@@ -243,6 +249,13 @@ public class GtkImage extends Image
this.width = width;
this.height = height;
props = (properties != null) ? properties : new Hashtable();
+
+ if (width <= 0 || height <= 0 || pixels == null)
+ {
+ errorLoading = true;
+ return;
+ }
+
isLoaded = true;
deliver();
createPixmap();
@@ -281,6 +294,8 @@ public class GtkImage extends Image
*/
public ImageProducer getSource ()
{
+ if (!isLoaded)
+ return null;
return new MemoryImageSource(width, height, nativeModel, getPixels(),
0, width);
}
@@ -344,7 +359,12 @@ public class GtkImage extends Image
public int checkImage (ImageObserver observer)
{
if (addObserver(observer))
- return 0;
+ {
+ if (errorLoading == true)
+ return ImageObserver.ERROR;
+ else
+ return 0;
+ }
return ImageObserver.ALLBITS | ImageObserver.WIDTH | ImageObserver.HEIGHT;
}
@@ -373,18 +393,33 @@ public class GtkImage extends Image
int dstY = (dy1 < dy2) ? dy1 : dy2;
// Clipping. This requires the dst to be scaled as well,
+ if (srcWidth > width)
+ {
+ dstWidth = (int)((double)dstWidth*((double)width/(double)srcWidth));
+ srcWidth = width - srcX;
+ }
+
+ if (srcHeight > height)
+ {
+ dstHeight = (int)((double)dstHeight*((double)height/(double)srcHeight));
+ srcHeight = height - srcY;
+ }
+
if (srcWidth + srcX > width)
{
dstWidth = (int)((double)dstWidth * (double)(width - srcX)/(double)srcWidth);
srcWidth = width - srcX;
- }
+ }
if (srcHeight + srcY > height)
{
dstHeight = (int)((double)dstHeight * (double)(width - srcY)/(double)srcHeight);
srcHeight = height - srcY;
}
-
+
+ if ( srcWidth <= 0 || srcHeight <= 0 || dstWidth <= 0 || dstHeight <= 0)
+ return true;
+
if(bgcolor != null)
drawPixelsScaledFlipped (g, bgcolor.getRed (), bgcolor.getGreen (),
bgcolor.getBlue (),
@@ -433,7 +468,8 @@ public class GtkImage extends Image
ImageObserver.PROPERTIES |
ImageObserver.ALLBITS;
- for(int i=0; i < observers.size(); i++)
+ if (observers != null)
+ for(int i=0; i < observers.size(); i++)
((ImageObserver)observers.elementAt(i)).
imageUpdate(this, flags, 0, 0, width, height);
diff --git a/gnu/java/awt/peer/gtk/GtkImageConsumer.java b/gnu/java/awt/peer/gtk/GtkImageConsumer.java
index 93743fe1a..299f01dca 100644
--- a/gnu/java/awt/peer/gtk/GtkImageConsumer.java
+++ b/gnu/java/awt/peer/gtk/GtkImageConsumer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -45,6 +45,7 @@ import java.awt.image.DirectColorModel;
import java.awt.image.ImageConsumer;
import java.awt.image.ImageObserver;
import java.awt.image.ImageProducer;
+import java.awt.image.MemoryImageSource;
import java.util.Hashtable;
import java.util.Vector;
@@ -70,7 +71,10 @@ public class GtkImageConsumer implements ImageConsumer
public synchronized void imageComplete (int status)
{
- source.removeConsumer(this);
+ // we need to reuse the pixel cache for memory image sources since
+ // a memory image's backing array can be updated "live".
+ if (!(source instanceof MemoryImageSource))
+ source.removeConsumer(this);
target.setImage(width, height, pixelCache, properties);
}
diff --git a/gnu/java/awt/peer/gtk/GtkLabelPeer.java b/gnu/java/awt/peer/gtk/GtkLabelPeer.java
index 02251632b..fdd5fd15f 100644
--- a/gnu/java/awt/peer/gtk/GtkLabelPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkLabelPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkListPeer.java b/gnu/java/awt/peer/gtk/GtkListPeer.java
index 13055d33c..ff12fe34b 100644
--- a/gnu/java/awt/peer/gtk/GtkListPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkListPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkMenuBarPeer.java b/gnu/java/awt/peer/gtk/GtkMenuBarPeer.java
index 4b547f56a..79eeaf9ba 100644
--- a/gnu/java/awt/peer/gtk/GtkMenuBarPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkMenuBarPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java b/gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java
index cd7ca8ac7..8d9d1ca04 100644
--- a/gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkMenuItemPeer.java b/gnu/java/awt/peer/gtk/GtkMenuItemPeer.java
index f85648ee8..5728f262b 100644
--- a/gnu/java/awt/peer/gtk/GtkMenuItemPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkMenuItemPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkMenuPeer.java b/gnu/java/awt/peer/gtk/GtkMenuPeer.java
index 971a349d2..80332dd6a 100644
--- a/gnu/java/awt/peer/gtk/GtkMenuPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkMenuPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkPanelPeer.java b/gnu/java/awt/peer/gtk/GtkPanelPeer.java
index fbdfcf472..fb5addeb4 100644
--- a/gnu/java/awt/peer/gtk/GtkPanelPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkPanelPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -65,4 +65,6 @@ public class GtkPanelPeer extends GtkContainerPeer
}
super.handleEvent (event);
}
+
+ native void connectSignals ();
}
diff --git a/gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java b/gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java
index ed0b52193..d14c16dd7 100644
--- a/gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkScrollPanePeer.java b/gnu/java/awt/peer/gtk/GtkScrollPanePeer.java
index ae337a071..69f8b4946 100644
--- a/gnu/java/awt/peer/gtk/GtkScrollPanePeer.java
+++ b/gnu/java/awt/peer/gtk/GtkScrollPanePeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkScrollbarPeer.java b/gnu/java/awt/peer/gtk/GtkScrollbarPeer.java
index 065bab12e..aa3a26e34 100644
--- a/gnu/java/awt/peer/gtk/GtkScrollbarPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkScrollbarPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkTextAreaPeer.java b/gnu/java/awt/peer/gtk/GtkTextAreaPeer.java
index 94874deb6..a842b8318 100644
--- a/gnu/java/awt/peer/gtk/GtkTextAreaPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkTextAreaPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -41,11 +41,13 @@ package gnu.java.awt.peer.gtk;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.FontMetrics;
+import java.awt.Rectangle;
import java.awt.TextArea;
import java.awt.peer.TextAreaPeer;
+import java.awt.peer.TextComponentPeer;
-public class GtkTextAreaPeer extends GtkTextComponentPeer
- implements TextAreaPeer
+public class GtkTextAreaPeer extends GtkComponentPeer
+ implements TextComponentPeer, TextAreaPeer
{
private static transient int DEFAULT_ROWS = 10;
private static transient int DEFAULT_COLS = 80;
@@ -55,6 +57,35 @@ public class GtkTextAreaPeer extends GtkTextComponentPeer
native void gtkWidgetModifyFont (String name, int style, int size);
native void gtkWidgetRequestFocus ();
+ public native void connectSignals ();
+
+ public native int getCaretPosition ();
+ public native void setCaretPosition (int pos);
+ public native int getSelectionStart ();
+ public native int getSelectionEnd ();
+ public native String getText ();
+ public native void select (int start, int end);
+ public native void setEditable (boolean state);
+ public native void setText (String text);
+
+ public int getIndexAtPoint(int x, int y)
+ {
+ // FIXME
+ return 0;
+ }
+
+ public Rectangle getCharacterBounds (int pos)
+ {
+ // FIXME
+ return null;
+ }
+
+ public long filterEvents (long filter)
+ {
+ // FIXME
+ return filter;
+ }
+
void create ()
{
Font f = awtComponent.getFont ();
@@ -87,6 +118,9 @@ public class GtkTextAreaPeer extends GtkTextComponentPeer
public GtkTextAreaPeer (TextArea ta)
{
super (ta);
+
+ setText (ta.getText ());
+ setCaretPosition (0);
}
public native void insert (String str, int pos);
diff --git a/gnu/java/awt/peer/gtk/GtkTextFieldPeer.java b/gnu/java/awt/peer/gtk/GtkTextFieldPeer.java
index bd1ac8124..73a976bba 100644
--- a/gnu/java/awt/peer/gtk/GtkTextFieldPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkTextFieldPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -42,17 +42,48 @@ import java.awt.AWTEvent;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.FontMetrics;
+import java.awt.Rectangle;
import java.awt.TextField;
import java.awt.event.KeyEvent;
import java.awt.peer.TextFieldPeer;
+import java.awt.peer.TextComponentPeer;
-public class GtkTextFieldPeer extends GtkTextComponentPeer
- implements TextFieldPeer
+public class GtkTextFieldPeer extends GtkComponentPeer
+ implements TextComponentPeer, TextFieldPeer
{
native void create (int width);
native void gtkWidgetSetBackground (int red, int green, int blue);
native void gtkWidgetSetForeground (int red, int green, int blue);
+ public native void connectSignals ();
+
+ public native int getCaretPosition ();
+ public native void setCaretPosition (int pos);
+ public native int getSelectionStart ();
+ public native int getSelectionEnd ();
+ public native String getText ();
+ public native void select (int start, int end);
+ public native void setEditable (boolean state);
+ public native void setText (String text);
+
+ public int getIndexAtPoint(int x, int y)
+ {
+ // FIXME
+ return 0;
+ }
+
+ public Rectangle getCharacterBounds (int pos)
+ {
+ // FIXME
+ return null;
+ }
+
+ public long filterEvents (long filter)
+ {
+ // FIXME
+ return filter;
+ }
+
void create ()
{
Font f = awtComponent.getFont ();
@@ -86,6 +117,9 @@ public class GtkTextFieldPeer extends GtkTextComponentPeer
{
super (tf);
+ setText (tf.getText ());
+ setCaretPosition (0);
+
if (tf.echoCharIsSet ())
setEchoChar (tf.getEchoChar ());
}
diff --git a/gnu/java/awt/peer/gtk/GtkToolkit.java b/gnu/java/awt/peer/gtk/GtkToolkit.java
index 5c0ab5438..69901102f 100644
--- a/gnu/java/awt/peer/gtk/GtkToolkit.java
+++ b/gnu/java/awt/peer/gtk/GtkToolkit.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,7 +40,6 @@ package gnu.java.awt.peer.gtk;
import gnu.classpath.Configuration;
import gnu.java.awt.EmbeddedWindow;
-import gnu.java.awt.EmbeddedWindowSupport;
import gnu.java.awt.peer.ClasspathFontPeer;
import gnu.java.awt.peer.ClasspathTextLayoutPeer;
import gnu.java.awt.peer.EmbeddedWindowPeer;
@@ -86,7 +85,6 @@ import javax.imageio.spi.IIORegistry;
* object to be used.
*/
public class GtkToolkit extends gnu.java.awt.ClasspathToolkit
- implements EmbeddedWindowSupport
{
Hashtable containers = new Hashtable();
static EventQueue q;
diff --git a/gnu/java/awt/peer/gtk/GtkVolatileImage.java b/gnu/java/awt/peer/gtk/GtkVolatileImage.java
index e4d6bc8fa..496090a09 100644
--- a/gnu/java/awt/peer/gtk/GtkVolatileImage.java
+++ b/gnu/java/awt/peer/gtk/GtkVolatileImage.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/gtk/GtkWindowPeer.java b/gnu/java/awt/peer/gtk/GtkWindowPeer.java
index eabe59140..71e05a87d 100644
--- a/gnu/java/awt/peer/gtk/GtkWindowPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkWindowPeer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -63,6 +63,8 @@ public class GtkWindowPeer extends GtkContainerPeer
native void gtkWindowSetResizable (boolean resizable);
native void gtkWindowSetModal (boolean modal);
+ native void realize ();
+
int getWidth ()
{
return awtComponent.getWidth();
diff --git a/gnu/java/awt/peer/gtk/package.html b/gnu/java/awt/peer/gtk/package.html
index 96bc821dd..8dd4dd892 100644
--- a/gnu/java/awt/peer/gtk/package.html
+++ b/gnu/java/awt/peer/gtk/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/awt/peer/package.html b/gnu/java/awt/peer/package.html
index 458edc52c..846759a28 100644
--- a/gnu/java/awt/peer/package.html
+++ b/gnu/java/awt/peer/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/BeanInfoEmbryo.java b/gnu/java/beans/BeanInfoEmbryo.java
index 7c60e7cd3..0cf73e5b9 100644
--- a/gnu/java/beans/BeanInfoEmbryo.java
+++ b/gnu/java/beans/BeanInfoEmbryo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/DummyAppletContext.java b/gnu/java/beans/DummyAppletContext.java
index e10a9074f..4facb470d 100644
--- a/gnu/java/beans/DummyAppletContext.java
+++ b/gnu/java/beans/DummyAppletContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/DummyAppletStub.java b/gnu/java/beans/DummyAppletStub.java
index ff99e98d9..3bcb43534 100644
--- a/gnu/java/beans/DummyAppletStub.java
+++ b/gnu/java/beans/DummyAppletStub.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/ExplicitBeanInfo.java b/gnu/java/beans/ExplicitBeanInfo.java
index 6746bd8cc..6da5e8696 100644
--- a/gnu/java/beans/ExplicitBeanInfo.java
+++ b/gnu/java/beans/ExplicitBeanInfo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/IntrospectionIncubator.java b/gnu/java/beans/IntrospectionIncubator.java
index 9c2a652c3..e0d9480e3 100644
--- a/gnu/java/beans/IntrospectionIncubator.java
+++ b/gnu/java/beans/IntrospectionIncubator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/AbstractContext.java b/gnu/java/beans/decoder/AbstractContext.java
index ae945c295..0e95d4329 100644
--- a/gnu/java/beans/decoder/AbstractContext.java
+++ b/gnu/java/beans/decoder/AbstractContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/AbstractCreatableObjectContext.java b/gnu/java/beans/decoder/AbstractCreatableObjectContext.java
index e2943e213..47f04fa1c 100644
--- a/gnu/java/beans/decoder/AbstractCreatableObjectContext.java
+++ b/gnu/java/beans/decoder/AbstractCreatableObjectContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/AbstractElementHandler.java b/gnu/java/beans/decoder/AbstractElementHandler.java
index a097a759b..e5578a990 100644
--- a/gnu/java/beans/decoder/AbstractElementHandler.java
+++ b/gnu/java/beans/decoder/AbstractElementHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/AbstractObjectContext.java b/gnu/java/beans/decoder/AbstractObjectContext.java
index 3e3227902..202c33b34 100644
--- a/gnu/java/beans/decoder/AbstractObjectContext.java
+++ b/gnu/java/beans/decoder/AbstractObjectContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/ArrayContext.java b/gnu/java/beans/decoder/ArrayContext.java
index 73b8731a8..cf4267f27 100644
--- a/gnu/java/beans/decoder/ArrayContext.java
+++ b/gnu/java/beans/decoder/ArrayContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/ArrayHandler.java b/gnu/java/beans/decoder/ArrayHandler.java
index ac8f48673..23f028519 100644
--- a/gnu/java/beans/decoder/ArrayHandler.java
+++ b/gnu/java/beans/decoder/ArrayHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/AssemblyException.java b/gnu/java/beans/decoder/AssemblyException.java
index 0b5075b15..29dfa65ac 100644
--- a/gnu/java/beans/decoder/AssemblyException.java
+++ b/gnu/java/beans/decoder/AssemblyException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/BooleanHandler.java b/gnu/java/beans/decoder/BooleanHandler.java
index 2cb1e0405..a34fe346e 100644
--- a/gnu/java/beans/decoder/BooleanHandler.java
+++ b/gnu/java/beans/decoder/BooleanHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/ByteHandler.java b/gnu/java/beans/decoder/ByteHandler.java
index f21b280a8..d6c33d14d 100644
--- a/gnu/java/beans/decoder/ByteHandler.java
+++ b/gnu/java/beans/decoder/ByteHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/CharHandler.java b/gnu/java/beans/decoder/CharHandler.java
index 269c250c0..1b31e5b05 100644
--- a/gnu/java/beans/decoder/CharHandler.java
+++ b/gnu/java/beans/decoder/CharHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/ClassHandler.java b/gnu/java/beans/decoder/ClassHandler.java
index 1c8aebd60..1dbdd63e7 100644
--- a/gnu/java/beans/decoder/ClassHandler.java
+++ b/gnu/java/beans/decoder/ClassHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/ConstructorContext.java b/gnu/java/beans/decoder/ConstructorContext.java
index e2e6ef0ff..7838fb7e2 100644
--- a/gnu/java/beans/decoder/ConstructorContext.java
+++ b/gnu/java/beans/decoder/ConstructorContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/Context.java b/gnu/java/beans/decoder/Context.java
index 55746c856..a2db09732 100644
--- a/gnu/java/beans/decoder/Context.java
+++ b/gnu/java/beans/decoder/Context.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/DecoderContext.java b/gnu/java/beans/decoder/DecoderContext.java
index 42700e6ed..69d84e576 100644
--- a/gnu/java/beans/decoder/DecoderContext.java
+++ b/gnu/java/beans/decoder/DecoderContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/DefaultExceptionListener.java b/gnu/java/beans/decoder/DefaultExceptionListener.java
index bb20095f0..71e7158e7 100644
--- a/gnu/java/beans/decoder/DefaultExceptionListener.java
+++ b/gnu/java/beans/decoder/DefaultExceptionListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/DoubleHandler.java b/gnu/java/beans/decoder/DoubleHandler.java
index ae0f18fa1..8f6be7ec0 100644
--- a/gnu/java/beans/decoder/DoubleHandler.java
+++ b/gnu/java/beans/decoder/DoubleHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/DummyContext.java b/gnu/java/beans/decoder/DummyContext.java
index 55851dd6e..f3b24549d 100644
--- a/gnu/java/beans/decoder/DummyContext.java
+++ b/gnu/java/beans/decoder/DummyContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/DummyHandler.java b/gnu/java/beans/decoder/DummyHandler.java
index 81fb2f8e3..880d76adc 100644
--- a/gnu/java/beans/decoder/DummyHandler.java
+++ b/gnu/java/beans/decoder/DummyHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/ElementHandler.java b/gnu/java/beans/decoder/ElementHandler.java
index b3d720c59..e6ae60af8 100644
--- a/gnu/java/beans/decoder/ElementHandler.java
+++ b/gnu/java/beans/decoder/ElementHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/FloatHandler.java b/gnu/java/beans/decoder/FloatHandler.java
index d930aead2..5f0e15cef 100644
--- a/gnu/java/beans/decoder/FloatHandler.java
+++ b/gnu/java/beans/decoder/FloatHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/GrowableArrayContext.java b/gnu/java/beans/decoder/GrowableArrayContext.java
index 971989028..f24a60b4a 100644
--- a/gnu/java/beans/decoder/GrowableArrayContext.java
+++ b/gnu/java/beans/decoder/GrowableArrayContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/IndexContext.java b/gnu/java/beans/decoder/IndexContext.java
index be67ee582..11f840cae 100644
--- a/gnu/java/beans/decoder/IndexContext.java
+++ b/gnu/java/beans/decoder/IndexContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/IntHandler.java b/gnu/java/beans/decoder/IntHandler.java
index e04f95958..a96f4a031 100644
--- a/gnu/java/beans/decoder/IntHandler.java
+++ b/gnu/java/beans/decoder/IntHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/JavaHandler.java b/gnu/java/beans/decoder/JavaHandler.java
index e0a78624a..3bc8c6028 100644
--- a/gnu/java/beans/decoder/JavaHandler.java
+++ b/gnu/java/beans/decoder/JavaHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/LongHandler.java b/gnu/java/beans/decoder/LongHandler.java
index e61726ce0..d7bfa54e5 100644
--- a/gnu/java/beans/decoder/LongHandler.java
+++ b/gnu/java/beans/decoder/LongHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/MethodContext.java b/gnu/java/beans/decoder/MethodContext.java
index 2f951e487..bad0a213f 100644
--- a/gnu/java/beans/decoder/MethodContext.java
+++ b/gnu/java/beans/decoder/MethodContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/MethodFinder.java b/gnu/java/beans/decoder/MethodFinder.java
index ad3d222c6..3968b173a 100644
--- a/gnu/java/beans/decoder/MethodFinder.java
+++ b/gnu/java/beans/decoder/MethodFinder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/NullHandler.java b/gnu/java/beans/decoder/NullHandler.java
index 60a87c380..549617db3 100644
--- a/gnu/java/beans/decoder/NullHandler.java
+++ b/gnu/java/beans/decoder/NullHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/ObjectContext.java b/gnu/java/beans/decoder/ObjectContext.java
index 81b270af7..cf88a2c2c 100644
--- a/gnu/java/beans/decoder/ObjectContext.java
+++ b/gnu/java/beans/decoder/ObjectContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/ObjectHandler.java b/gnu/java/beans/decoder/ObjectHandler.java
index 801dc747b..dc5b3290b 100644
--- a/gnu/java/beans/decoder/ObjectHandler.java
+++ b/gnu/java/beans/decoder/ObjectHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/PersistenceParser.java b/gnu/java/beans/decoder/PersistenceParser.java
index 5bb4acfdf..4eb37abef 100644
--- a/gnu/java/beans/decoder/PersistenceParser.java
+++ b/gnu/java/beans/decoder/PersistenceParser.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/PropertyContext.java b/gnu/java/beans/decoder/PropertyContext.java
index 54785764e..838ef814b 100644
--- a/gnu/java/beans/decoder/PropertyContext.java
+++ b/gnu/java/beans/decoder/PropertyContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/ShortHandler.java b/gnu/java/beans/decoder/ShortHandler.java
index 8ac74a152..ab6ddbece 100644
--- a/gnu/java/beans/decoder/ShortHandler.java
+++ b/gnu/java/beans/decoder/ShortHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/SimpleHandler.java b/gnu/java/beans/decoder/SimpleHandler.java
index 14b5b9a35..bc187e8a0 100644
--- a/gnu/java/beans/decoder/SimpleHandler.java
+++ b/gnu/java/beans/decoder/SimpleHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/StaticMethodContext.java b/gnu/java/beans/decoder/StaticMethodContext.java
index 407a5d1ea..959c949f7 100644
--- a/gnu/java/beans/decoder/StaticMethodContext.java
+++ b/gnu/java/beans/decoder/StaticMethodContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/StringHandler.java b/gnu/java/beans/decoder/StringHandler.java
index 3154593cf..6f2311a9e 100644
--- a/gnu/java/beans/decoder/StringHandler.java
+++ b/gnu/java/beans/decoder/StringHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/VoidHandler.java b/gnu/java/beans/decoder/VoidHandler.java
index cc291d679..ca3664bbe 100644
--- a/gnu/java/beans/decoder/VoidHandler.java
+++ b/gnu/java/beans/decoder/VoidHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/decoder/package.html b/gnu/java/beans/decoder/package.html
index 573e70767..8fe65eeed 100644
--- a/gnu/java/beans/decoder/package.html
+++ b/gnu/java/beans/decoder/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/editors/ColorEditor.java b/gnu/java/beans/editors/ColorEditor.java
index 853633572..b099eb2f0 100644
--- a/gnu/java/beans/editors/ColorEditor.java
+++ b/gnu/java/beans/editors/ColorEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/editors/FontEditor.java b/gnu/java/beans/editors/FontEditor.java
index d634dac15..904f7bebf 100644
--- a/gnu/java/beans/editors/FontEditor.java
+++ b/gnu/java/beans/editors/FontEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/editors/NativeBooleanEditor.java b/gnu/java/beans/editors/NativeBooleanEditor.java
index 84ffdb9e3..3620cc174 100644
--- a/gnu/java/beans/editors/NativeBooleanEditor.java
+++ b/gnu/java/beans/editors/NativeBooleanEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/editors/NativeByteEditor.java b/gnu/java/beans/editors/NativeByteEditor.java
index 2d41f29e3..f3ec5fa19 100644
--- a/gnu/java/beans/editors/NativeByteEditor.java
+++ b/gnu/java/beans/editors/NativeByteEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/editors/NativeDoubleEditor.java b/gnu/java/beans/editors/NativeDoubleEditor.java
index a06b5e08f..8d8aae153 100644
--- a/gnu/java/beans/editors/NativeDoubleEditor.java
+++ b/gnu/java/beans/editors/NativeDoubleEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/editors/NativeFloatEditor.java b/gnu/java/beans/editors/NativeFloatEditor.java
index b76a96255..801377e7d 100644
--- a/gnu/java/beans/editors/NativeFloatEditor.java
+++ b/gnu/java/beans/editors/NativeFloatEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/editors/NativeIntEditor.java b/gnu/java/beans/editors/NativeIntEditor.java
index fcb429652..a6148841c 100644
--- a/gnu/java/beans/editors/NativeIntEditor.java
+++ b/gnu/java/beans/editors/NativeIntEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/editors/NativeLongEditor.java b/gnu/java/beans/editors/NativeLongEditor.java
index 4facba97b..95e9dc870 100644
--- a/gnu/java/beans/editors/NativeLongEditor.java
+++ b/gnu/java/beans/editors/NativeLongEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/editors/NativeShortEditor.java b/gnu/java/beans/editors/NativeShortEditor.java
index 326a51792..ffaa26649 100644
--- a/gnu/java/beans/editors/NativeShortEditor.java
+++ b/gnu/java/beans/editors/NativeShortEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/editors/StringEditor.java b/gnu/java/beans/editors/StringEditor.java
index 3e7fe7788..8242d5475 100644
--- a/gnu/java/beans/editors/StringEditor.java
+++ b/gnu/java/beans/editors/StringEditor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/editors/package.html b/gnu/java/beans/editors/package.html
index 3d7ac222b..465f68d17 100644
--- a/gnu/java/beans/editors/package.html
+++ b/gnu/java/beans/editors/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/beans/package.html b/gnu/java/beans/package.html
index 108185b1c..f3b052683 100644
--- a/gnu/java/beans/package.html
+++ b/gnu/java/beans/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/io/ASN1ParsingException.java b/gnu/java/io/ASN1ParsingException.java
index 3a5dade81..5d2c64ab5 100644
--- a/gnu/java/io/ASN1ParsingException.java
+++ b/gnu/java/io/ASN1ParsingException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/io/Base64InputStream.java b/gnu/java/io/Base64InputStream.java
index 617e83151..b0824ab69 100644
--- a/gnu/java/io/Base64InputStream.java
+++ b/gnu/java/io/Base64InputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/io/ClassLoaderObjectInputStream.java b/gnu/java/io/ClassLoaderObjectInputStream.java
index 5368ec90e..238ab26b1 100644
--- a/gnu/java/io/ClassLoaderObjectInputStream.java
+++ b/gnu/java/io/ClassLoaderObjectInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/io/NullOutputStream.java b/gnu/java/io/NullOutputStream.java
index 44b5ff17c..526bd26e8 100644
--- a/gnu/java/io/NullOutputStream.java
+++ b/gnu/java/io/NullOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/io/ObjectIdentityWrapper.java b/gnu/java/io/ObjectIdentityWrapper.java
index bebd69131..6db2e3a52 100644
--- a/gnu/java/io/ObjectIdentityWrapper.java
+++ b/gnu/java/io/ObjectIdentityWrapper.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/io/PlatformHelper.java b/gnu/java/io/PlatformHelper.java
index 1e21af30a..d2c601231 100644
--- a/gnu/java/io/PlatformHelper.java
+++ b/gnu/java/io/PlatformHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/io/package.html b/gnu/java/io/package.html
index 465525025..74da8277f 100644
--- a/gnu/java/io/package.html
+++ b/gnu/java/io/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/lang/ArrayHelper.java b/gnu/java/lang/ArrayHelper.java
index 5ce0a99f5..5f675831e 100644
--- a/gnu/java/lang/ArrayHelper.java
+++ b/gnu/java/lang/ArrayHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/lang/CharData.java b/gnu/java/lang/CharData.java
index ce38c95b6..b12078d9f 100644
--- a/gnu/java/lang/CharData.java
+++ b/gnu/java/lang/CharData.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/lang/ClassHelper.java b/gnu/java/lang/ClassHelper.java
index 604c9087a..14c8a39c4 100644
--- a/gnu/java/lang/ClassHelper.java
+++ b/gnu/java/lang/ClassHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/lang/MainThread.java b/gnu/java/lang/MainThread.java
index 64ab19a92..ab529efd1 100644
--- a/gnu/java/lang/MainThread.java
+++ b/gnu/java/lang/MainThread.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/lang/package.html b/gnu/java/lang/package.html
index 4f105c67f..1f16776b6 100644
--- a/gnu/java/lang/package.html
+++ b/gnu/java/lang/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/lang/reflect/TypeSignature.java b/gnu/java/lang/reflect/TypeSignature.java
index 248b3dd8c..842e5bdf0 100644
--- a/gnu/java/lang/reflect/TypeSignature.java
+++ b/gnu/java/lang/reflect/TypeSignature.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/lang/reflect/package.html b/gnu/java/lang/reflect/package.html
index e8effbab7..a837d37d2 100644
--- a/gnu/java/lang/reflect/package.html
+++ b/gnu/java/lang/reflect/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/locale/LocaleHelper.java b/gnu/java/locale/LocaleHelper.java
index 0bf77a6c6..ff0029390 100644
--- a/gnu/java/locale/LocaleHelper.java
+++ b/gnu/java/locale/LocaleHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,7 +38,6 @@ exception statement from your version. */
package gnu.java.locale;
-import java.util.Hashtable;
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
@@ -87,17 +86,17 @@ public class LocaleHelper
boolean checkRoot)
{
String localizedString;
- Hashtable table;
+ String property;
if (key.equals(""))
return "";
+ property = name + "." + key;
/* Localize to inLocale */
try
{
- table = (Hashtable)
+ localizedString =
ResourceBundle.getBundle("gnu.java.locale.LocaleInformation",
- inLocale).getObject(name);
- localizedString = (String) table.get(key);
+ inLocale).getString(property);
}
catch (MissingResourceException exception)
{
@@ -110,10 +109,9 @@ public class LocaleHelper
{
ResourceBundle bundle;
- bundle =
+ bundle =
ResourceBundle.getBundle("gnu.java.locale.LocaleInformation");
- table = (Hashtable) bundle.getObject(name);
- localizedString = (String) table.get(key);
+ localizedString = bundle.getString(property);
}
catch (MissingResourceException exception)
{
@@ -125,10 +123,9 @@ public class LocaleHelper
{
try
{
- table = (Hashtable)
+ localizedString =
ResourceBundle.getBundle("gnu.java.locale.LocaleInformation",
- Locale.ENGLISH).getObject(name);
- localizedString= (String) table.get(key);
+ Locale.ENGLISH).getString(property);
}
catch (MissingResourceException exception)
{
@@ -140,10 +137,10 @@ public class LocaleHelper
{
try
{
- table = (Hashtable)
+ localizedString =
ResourceBundle.getBundle("gnu.java.locale.LocaleInformation",
- new Locale("","","")).getObject(name);
- localizedString= (String) table.get(key);
+ new Locale("","","")
+ ).getString(property);
}
catch (MissingResourceException exception)
{
diff --git a/gnu/java/locale/package.html b/gnu/java/locale/package.html
index b63a101f0..c4bc7c3e8 100644
--- a/gnu/java/locale/package.html
+++ b/gnu/java/locale/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/math/MPN.java b/gnu/java/math/MPN.java
index 34a708170..05491bb7e 100644
--- a/gnu/java/math/MPN.java
+++ b/gnu/java/math/MPN.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/math/package.html b/gnu/java/math/package.html
index 73fa2e5f5..97e101831 100644
--- a/gnu/java/math/package.html
+++ b/gnu/java/math/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/BASE64.java b/gnu/java/net/BASE64.java
index 2b997e38a..901aa0c35 100644
--- a/gnu/java/net/BASE64.java
+++ b/gnu/java/net/BASE64.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/CRLFInputStream.java b/gnu/java/net/CRLFInputStream.java
index 927201c92..d0f9e8c41 100644
--- a/gnu/java/net/CRLFInputStream.java
+++ b/gnu/java/net/CRLFInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/CRLFOutputStream.java b/gnu/java/net/CRLFOutputStream.java
index 665a02b62..f27e0f218 100644
--- a/gnu/java/net/CRLFOutputStream.java
+++ b/gnu/java/net/CRLFOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/EmptyX509TrustManager.java b/gnu/java/net/EmptyX509TrustManager.java
index 18d433b53..b8faf41ad 100644
--- a/gnu/java/net/EmptyX509TrustManager.java
+++ b/gnu/java/net/EmptyX509TrustManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/GetLocalHostAction.java b/gnu/java/net/GetLocalHostAction.java
index 36d17d9df..7483b0257 100644
--- a/gnu/java/net/GetLocalHostAction.java
+++ b/gnu/java/net/GetLocalHostAction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/HeaderFieldHelper.java b/gnu/java/net/HeaderFieldHelper.java
index 7c78e69c5..0fb8d953d 100644
--- a/gnu/java/net/HeaderFieldHelper.java
+++ b/gnu/java/net/HeaderFieldHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/LineInputStream.java b/gnu/java/net/LineInputStream.java
index 5028fe480..5ca068618 100644
--- a/gnu/java/net/LineInputStream.java
+++ b/gnu/java/net/LineInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/PlainDatagramSocketImpl.java b/gnu/java/net/PlainDatagramSocketImpl.java
index 1e3425fcd..339b5561c 100644
--- a/gnu/java/net/PlainDatagramSocketImpl.java
+++ b/gnu/java/net/PlainDatagramSocketImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/PlainSocketImpl.java b/gnu/java/net/PlainSocketImpl.java
index 07bbaeee3..05221ff88 100644
--- a/gnu/java/net/PlainSocketImpl.java
+++ b/gnu/java/net/PlainSocketImpl.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/URLParseError.java b/gnu/java/net/URLParseError.java
index 7cb105fb3..90907480f 100644
--- a/gnu/java/net/URLParseError.java
+++ b/gnu/java/net/URLParseError.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/package.html b/gnu/java/net/package.html
index d0a4c8924..5641fbd92 100644
--- a/gnu/java/net/package.html
+++ b/gnu/java/net/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/file/Connection.java b/gnu/java/net/protocol/file/Connection.java
index 05611e24d..52bd04845 100644
--- a/gnu/java/net/protocol/file/Connection.java
+++ b/gnu/java/net/protocol/file/Connection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/file/Handler.java b/gnu/java/net/protocol/file/Handler.java
index fe3fafa7c..fc560491d 100644
--- a/gnu/java/net/protocol/file/Handler.java
+++ b/gnu/java/net/protocol/file/Handler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/file/package.html b/gnu/java/net/protocol/file/package.html
index 81f5faaa5..cbce7413f 100644
--- a/gnu/java/net/protocol/file/package.html
+++ b/gnu/java/net/protocol/file/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/ActiveModeDTP.java b/gnu/java/net/protocol/ftp/ActiveModeDTP.java
index 5e38bfdbd..3755e8beb 100644
--- a/gnu/java/net/protocol/ftp/ActiveModeDTP.java
+++ b/gnu/java/net/protocol/ftp/ActiveModeDTP.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/BlockInputStream.java b/gnu/java/net/protocol/ftp/BlockInputStream.java
index 882e79aee..63897f1d6 100644
--- a/gnu/java/net/protocol/ftp/BlockInputStream.java
+++ b/gnu/java/net/protocol/ftp/BlockInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/BlockOutputStream.java b/gnu/java/net/protocol/ftp/BlockOutputStream.java
index 15ee95679..85481c95b 100644
--- a/gnu/java/net/protocol/ftp/BlockOutputStream.java
+++ b/gnu/java/net/protocol/ftp/BlockOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/CompressedInputStream.java b/gnu/java/net/protocol/ftp/CompressedInputStream.java
index 8a5a34a24..f2e65b7d3 100644
--- a/gnu/java/net/protocol/ftp/CompressedInputStream.java
+++ b/gnu/java/net/protocol/ftp/CompressedInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/CompressedOutputStream.java b/gnu/java/net/protocol/ftp/CompressedOutputStream.java
index 136d8b635..b960fb3af 100644
--- a/gnu/java/net/protocol/ftp/CompressedOutputStream.java
+++ b/gnu/java/net/protocol/ftp/CompressedOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/DTP.java b/gnu/java/net/protocol/ftp/DTP.java
index 6c9089710..25580af40 100644
--- a/gnu/java/net/protocol/ftp/DTP.java
+++ b/gnu/java/net/protocol/ftp/DTP.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/DTPInputStream.java b/gnu/java/net/protocol/ftp/DTPInputStream.java
index a9df39087..363a5590f 100644
--- a/gnu/java/net/protocol/ftp/DTPInputStream.java
+++ b/gnu/java/net/protocol/ftp/DTPInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/DTPOutputStream.java b/gnu/java/net/protocol/ftp/DTPOutputStream.java
index 69ae0f81a..83f0be1e3 100644
--- a/gnu/java/net/protocol/ftp/DTPOutputStream.java
+++ b/gnu/java/net/protocol/ftp/DTPOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/FTPConnection.java b/gnu/java/net/protocol/ftp/FTPConnection.java
index 5ead9c814..d0f48727c 100644
--- a/gnu/java/net/protocol/ftp/FTPConnection.java
+++ b/gnu/java/net/protocol/ftp/FTPConnection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/FTPException.java b/gnu/java/net/protocol/ftp/FTPException.java
index cdf4cc7a4..14ad3813f 100644
--- a/gnu/java/net/protocol/ftp/FTPException.java
+++ b/gnu/java/net/protocol/ftp/FTPException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/FTPResponse.java b/gnu/java/net/protocol/ftp/FTPResponse.java
index 3ce998291..ec72c732c 100644
--- a/gnu/java/net/protocol/ftp/FTPResponse.java
+++ b/gnu/java/net/protocol/ftp/FTPResponse.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/FTPURLConnection.java b/gnu/java/net/protocol/ftp/FTPURLConnection.java
index efc6f635b..62c40f19e 100644
--- a/gnu/java/net/protocol/ftp/FTPURLConnection.java
+++ b/gnu/java/net/protocol/ftp/FTPURLConnection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/Handler.java b/gnu/java/net/protocol/ftp/Handler.java
index 01e187c4c..88491b3c1 100644
--- a/gnu/java/net/protocol/ftp/Handler.java
+++ b/gnu/java/net/protocol/ftp/Handler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/PassiveModeDTP.java b/gnu/java/net/protocol/ftp/PassiveModeDTP.java
index 495a59d73..6f4fd6341 100644
--- a/gnu/java/net/protocol/ftp/PassiveModeDTP.java
+++ b/gnu/java/net/protocol/ftp/PassiveModeDTP.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/StreamInputStream.java b/gnu/java/net/protocol/ftp/StreamInputStream.java
index 0efd2ffc9..93eee4e19 100644
--- a/gnu/java/net/protocol/ftp/StreamInputStream.java
+++ b/gnu/java/net/protocol/ftp/StreamInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/StreamOutputStream.java b/gnu/java/net/protocol/ftp/StreamOutputStream.java
index 67fd4f3b8..a6e28ece3 100644
--- a/gnu/java/net/protocol/ftp/StreamOutputStream.java
+++ b/gnu/java/net/protocol/ftp/StreamOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/ftp/package.html b/gnu/java/net/protocol/ftp/package.html
index ce48c3918..fa3e34d74 100644
--- a/gnu/java/net/protocol/ftp/package.html
+++ b/gnu/java/net/protocol/ftp/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/Authenticator.java b/gnu/java/net/protocol/http/Authenticator.java
index 1943810c9..0d7c98819 100644
--- a/gnu/java/net/protocol/http/Authenticator.java
+++ b/gnu/java/net/protocol/http/Authenticator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/ByteArrayRequestBodyWriter.java b/gnu/java/net/protocol/http/ByteArrayRequestBodyWriter.java
index d817114dc..35ad2bccf 100644
--- a/gnu/java/net/protocol/http/ByteArrayRequestBodyWriter.java
+++ b/gnu/java/net/protocol/http/ByteArrayRequestBodyWriter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/ByteArrayResponseBodyReader.java b/gnu/java/net/protocol/http/ByteArrayResponseBodyReader.java
index 1e615916c..680e45d3e 100644
--- a/gnu/java/net/protocol/http/ByteArrayResponseBodyReader.java
+++ b/gnu/java/net/protocol/http/ByteArrayResponseBodyReader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/ChunkedInputStream.java b/gnu/java/net/protocol/http/ChunkedInputStream.java
index cd4a88d9f..c0706b708 100644
--- a/gnu/java/net/protocol/http/ChunkedInputStream.java
+++ b/gnu/java/net/protocol/http/ChunkedInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/Cookie.java b/gnu/java/net/protocol/http/Cookie.java
index 452ca0f7a..45e2f733f 100644
--- a/gnu/java/net/protocol/http/Cookie.java
+++ b/gnu/java/net/protocol/http/Cookie.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/CookieManager.java b/gnu/java/net/protocol/http/CookieManager.java
index 59a36e317..cc1225c49 100644
--- a/gnu/java/net/protocol/http/CookieManager.java
+++ b/gnu/java/net/protocol/http/CookieManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/Credentials.java b/gnu/java/net/protocol/http/Credentials.java
index ff4a9ad12..9e5fcd172 100644
--- a/gnu/java/net/protocol/http/Credentials.java
+++ b/gnu/java/net/protocol/http/Credentials.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/HTTPConnection.java b/gnu/java/net/protocol/http/HTTPConnection.java
index 779dbbdfc..6d9f447a2 100644
--- a/gnu/java/net/protocol/http/HTTPConnection.java
+++ b/gnu/java/net/protocol/http/HTTPConnection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -402,7 +402,7 @@ public class HTTPConnection
* Retrieves the socket associated with this connection.
* This creates the socket if necessary.
*/
- protected Socket getSocket()
+ protected synchronized Socket getSocket()
throws IOException
{
if (socket == null)
@@ -489,7 +489,7 @@ public class HTTPConnection
sslSocketFactory = factory;
}
- protected InputStream getInputStream()
+ protected synchronized InputStream getInputStream()
throws IOException
{
if (socket == null)
@@ -499,7 +499,7 @@ public class HTTPConnection
return in;
}
- protected OutputStream getOutputStream()
+ protected synchronized OutputStream getOutputStream()
throws IOException
{
if (socket == null)
@@ -512,7 +512,7 @@ public class HTTPConnection
/**
* Closes the underlying socket, if any.
*/
- protected void closeConnection()
+ protected synchronized void closeConnection()
throws IOException
{
if (socket != null)
diff --git a/gnu/java/net/protocol/http/HTTPDateFormat.java b/gnu/java/net/protocol/http/HTTPDateFormat.java
index 0137596aa..2f59e4318 100644
--- a/gnu/java/net/protocol/http/HTTPDateFormat.java
+++ b/gnu/java/net/protocol/http/HTTPDateFormat.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/HTTPURLConnection.java b/gnu/java/net/protocol/http/HTTPURLConnection.java
index e739e6f22..9f2055fe6 100644
--- a/gnu/java/net/protocol/http/HTTPURLConnection.java
+++ b/gnu/java/net/protocol/http/HTTPURLConnection.java
@@ -1,5 +1,5 @@
/* HTTPURLConnection.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -82,11 +82,12 @@ public class HTTPURLConnection
*/
private HTTPConnection connection;
- private String proxyHostname;
- private int proxyPort;
- private String agent;
- private boolean keepAlive;
- private int maxConnections;
+ // These are package private for use in anonymous inner classes.
+ String proxyHostname;
+ int proxyPort;
+ String agent;
+ boolean keepAlive;
+ int maxConnections;
private Request request;
private Headers requestHeaders;
@@ -328,6 +329,8 @@ public class HTTPURLConnection
if (keepAlive)
{
StringBuffer buf = new StringBuffer(secure ? "https://" : "http://");
+ buf.append(Thread.currentThread().hashCode());
+ buf.append('@');
buf.append(host);
buf.append(':');
buf.append(port);
@@ -575,6 +578,10 @@ public class HTTPURLConnection
int count = 1;
do
{
+ if (!i.hasNext())
+ {
+ return null;
+ }
entry = (Map.Entry) i.next();
count++;
}
diff --git a/gnu/java/net/protocol/http/Handler.java b/gnu/java/net/protocol/http/Handler.java
index 43ff63df9..640542513 100644
--- a/gnu/java/net/protocol/http/Handler.java
+++ b/gnu/java/net/protocol/http/Handler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/Headers.java b/gnu/java/net/protocol/http/Headers.java
index 9968b2e77..847ebefc1 100644
--- a/gnu/java/net/protocol/http/Headers.java
+++ b/gnu/java/net/protocol/http/Headers.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/Request.java b/gnu/java/net/protocol/http/Request.java
index 323a325da..21205e6bb 100644
--- a/gnu/java/net/protocol/http/Request.java
+++ b/gnu/java/net/protocol/http/Request.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/RequestBodyWriter.java b/gnu/java/net/protocol/http/RequestBodyWriter.java
index c977451c3..05d98ebb8 100644
--- a/gnu/java/net/protocol/http/RequestBodyWriter.java
+++ b/gnu/java/net/protocol/http/RequestBodyWriter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/Response.java b/gnu/java/net/protocol/http/Response.java
index 5a0a618f8..29dc28b17 100644
--- a/gnu/java/net/protocol/http/Response.java
+++ b/gnu/java/net/protocol/http/Response.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/ResponseBodyReader.java b/gnu/java/net/protocol/http/ResponseBodyReader.java
index dea3ce9bb..49e1b376f 100644
--- a/gnu/java/net/protocol/http/ResponseBodyReader.java
+++ b/gnu/java/net/protocol/http/ResponseBodyReader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/ResponseHeaderHandler.java b/gnu/java/net/protocol/http/ResponseHeaderHandler.java
index ea0112076..8e4e6492a 100644
--- a/gnu/java/net/protocol/http/ResponseHeaderHandler.java
+++ b/gnu/java/net/protocol/http/ResponseHeaderHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/SimpleCookieManager.java b/gnu/java/net/protocol/http/SimpleCookieManager.java
index 19649074a..894747188 100644
--- a/gnu/java/net/protocol/http/SimpleCookieManager.java
+++ b/gnu/java/net/protocol/http/SimpleCookieManager.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/event/ConnectionEvent.java b/gnu/java/net/protocol/http/event/ConnectionEvent.java
index 749f711fa..3f6f5454e 100644
--- a/gnu/java/net/protocol/http/event/ConnectionEvent.java
+++ b/gnu/java/net/protocol/http/event/ConnectionEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/event/ConnectionListener.java b/gnu/java/net/protocol/http/event/ConnectionListener.java
index a29955d80..073e89d44 100644
--- a/gnu/java/net/protocol/http/event/ConnectionListener.java
+++ b/gnu/java/net/protocol/http/event/ConnectionListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/event/RequestEvent.java b/gnu/java/net/protocol/http/event/RequestEvent.java
index ebc91d2ef..281c621f3 100644
--- a/gnu/java/net/protocol/http/event/RequestEvent.java
+++ b/gnu/java/net/protocol/http/event/RequestEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/event/RequestListener.java b/gnu/java/net/protocol/http/event/RequestListener.java
index 6bf0c96e6..c880fbce6 100644
--- a/gnu/java/net/protocol/http/event/RequestListener.java
+++ b/gnu/java/net/protocol/http/event/RequestListener.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/event/package.html b/gnu/java/net/protocol/http/event/package.html
index 6ee147a36..6aed0fc01 100644
--- a/gnu/java/net/protocol/http/event/package.html
+++ b/gnu/java/net/protocol/http/event/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/http/package.html b/gnu/java/net/protocol/http/package.html
index 46207bee5..8cf7c1e16 100644
--- a/gnu/java/net/protocol/http/package.html
+++ b/gnu/java/net/protocol/http/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/https/Handler.java b/gnu/java/net/protocol/https/Handler.java
index 0e040d64e..2b1375170 100644
--- a/gnu/java/net/protocol/https/Handler.java
+++ b/gnu/java/net/protocol/https/Handler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/jar/Connection.java b/gnu/java/net/protocol/jar/Connection.java
index 966aad277..bd7a80da7 100644
--- a/gnu/java/net/protocol/jar/Connection.java
+++ b/gnu/java/net/protocol/jar/Connection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/net/protocol/jar/Handler.java b/gnu/java/net/protocol/jar/Handler.java
index 726eb4404..316d8cb02 100644
--- a/gnu/java/net/protocol/jar/Handler.java
+++ b/gnu/java/net/protocol/jar/Handler.java
@@ -1,5 +1,5 @@
/* gnu.java.net.protocol.jar.Handler - jar protocol handler for java.net
- Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -99,7 +99,7 @@ public class Handler extends URLStreamHandler
file = file.substring (0, idx + 1) + url_string;
}
- else
+ else if (url_string.length() > 0)
{
int idx = file.lastIndexOf ("/");
if (idx == -1) //context path is weird
@@ -156,14 +156,18 @@ public class Handler extends URLStreamHandler
protected String toExternalForm (URL url)
{
String file = url.getFile();
+ String ref = url.getRef();
// return "jar:" + file;
// Performance!!:
// Do the concatenation manually to avoid resize StringBuffer's
- // internal buffer.
+ // internal buffer. The length of ref is not taken into consideration
+ // as it's a rare path.
StringBuffer sb = new StringBuffer (file.length() + 5);
sb.append ("jar:");
sb.append (file);
+ if (ref != null)
+ sb.append('#').append(ref);
return sb.toString();
}
}
diff --git a/gnu/java/net/protocol/jar/package.html b/gnu/java/net/protocol/jar/package.html
index 90571965f..dcd263d59 100644
--- a/gnu/java/net/protocol/jar/package.html
+++ b/gnu/java/net/protocol/jar/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/ChannelInputStream.java b/gnu/java/nio/ChannelInputStream.java
index b7b1974cf..675a62f3d 100644
--- a/gnu/java/nio/ChannelInputStream.java
+++ b/gnu/java/nio/ChannelInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/ChannelOutputStream.java b/gnu/java/nio/ChannelOutputStream.java
index 73fd7dc3c..08323eace 100644
--- a/gnu/java/nio/ChannelOutputStream.java
+++ b/gnu/java/nio/ChannelOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/ChannelReader.java b/gnu/java/nio/ChannelReader.java
index 11e66a77e..44fe6625a 100644
--- a/gnu/java/nio/ChannelReader.java
+++ b/gnu/java/nio/ChannelReader.java
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/DatagramChannelImpl.java b/gnu/java/nio/DatagramChannelImpl.java
index 68535e627..51c7031fe 100644
--- a/gnu/java/nio/DatagramChannelImpl.java
+++ b/gnu/java/nio/DatagramChannelImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -93,11 +93,6 @@ public final class DatagramChannelImpl extends DatagramChannel
configureBlocking(true);
}
- public int getNativeFD()
- {
- return socket.getPlainDatagramSocketImpl().getNativeFD();
- }
-
public DatagramSocket socket ()
{
return socket;
diff --git a/gnu/java/nio/DatagramChannelSelectionKey.java b/gnu/java/nio/DatagramChannelSelectionKey.java
index 33f8123e9..698e07e34 100644
--- a/gnu/java/nio/DatagramChannelSelectionKey.java
+++ b/gnu/java/nio/DatagramChannelSelectionKey.java
@@ -1,5 +1,5 @@
/* DatagramChannelSelectionKey.java --
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -54,6 +54,8 @@ public final class DatagramChannelSelectionKey
public int getNativeFD()
{
- return ((DatagramChannelImpl) ch).getNativeFD();
+ NIODatagramSocket socket =
+ (NIODatagramSocket) ((DatagramChannelImpl) ch).socket();
+ return socket.getPlainDatagramSocketImpl().getNativeFD();
}
}
diff --git a/gnu/java/nio/FileLockImpl.java b/gnu/java/nio/FileLockImpl.java
index 8591dac43..245fa7340 100644
--- a/gnu/java/nio/FileLockImpl.java
+++ b/gnu/java/nio/FileLockImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/InputStreamChannel.java b/gnu/java/nio/InputStreamChannel.java
index 6e0119eb5..a3dffe245 100644
--- a/gnu/java/nio/InputStreamChannel.java
+++ b/gnu/java/nio/InputStreamChannel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/NIOConstants.java b/gnu/java/nio/NIOConstants.java
index 8a71202a3..bb5b3b7f9 100644
--- a/gnu/java/nio/NIOConstants.java
+++ b/gnu/java/nio/NIOConstants.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/NIODatagramSocket.java b/gnu/java/nio/NIODatagramSocket.java
index e35a20b6e..f23236eca 100644
--- a/gnu/java/nio/NIODatagramSocket.java
+++ b/gnu/java/nio/NIODatagramSocket.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/NIOServerSocket.java b/gnu/java/nio/NIOServerSocket.java
index 71a5076f8..fc4d0dbe0 100644
--- a/gnu/java/nio/NIOServerSocket.java
+++ b/gnu/java/nio/NIOServerSocket.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/NIOSocket.java b/gnu/java/nio/NIOSocket.java
index 7f955c3ac..4d812bf44 100644
--- a/gnu/java/nio/NIOSocket.java
+++ b/gnu/java/nio/NIOSocket.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/OutputStreamChannel.java b/gnu/java/nio/OutputStreamChannel.java
index 98f3f15dc..8167426b0 100644
--- a/gnu/java/nio/OutputStreamChannel.java
+++ b/gnu/java/nio/OutputStreamChannel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/PipeImpl.java b/gnu/java/nio/PipeImpl.java
index ca374c52f..f7b01c8b7 100644
--- a/gnu/java/nio/PipeImpl.java
+++ b/gnu/java/nio/PipeImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/SelectionKeyImpl.java b/gnu/java/nio/SelectionKeyImpl.java
index 0d3636037..a1f125e9f 100644
--- a/gnu/java/nio/SelectionKeyImpl.java
+++ b/gnu/java/nio/SelectionKeyImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/SelectorImpl.java b/gnu/java/nio/SelectorImpl.java
index f64c86d1f..dcafedeb8 100644
--- a/gnu/java/nio/SelectorImpl.java
+++ b/gnu/java/nio/SelectorImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/SelectorProviderImpl.java b/gnu/java/nio/SelectorProviderImpl.java
index 37f4074cb..47521107e 100644
--- a/gnu/java/nio/SelectorProviderImpl.java
+++ b/gnu/java/nio/SelectorProviderImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/ServerSocketChannelImpl.java b/gnu/java/nio/ServerSocketChannelImpl.java
index 38f2058bd..c538ea802 100644
--- a/gnu/java/nio/ServerSocketChannelImpl.java
+++ b/gnu/java/nio/ServerSocketChannelImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -60,11 +60,6 @@ public final class ServerSocketChannelImpl extends ServerSocketChannel
configureBlocking(true);
}
- public int getNativeFD()
- {
- return serverSocket.getPlainSocketImpl().getNativeFD();
- }
-
public void finalizer()
{
if (connected)
diff --git a/gnu/java/nio/ServerSocketChannelSelectionKey.java b/gnu/java/nio/ServerSocketChannelSelectionKey.java
index 55847e49a..d00c2b748 100644
--- a/gnu/java/nio/ServerSocketChannelSelectionKey.java
+++ b/gnu/java/nio/ServerSocketChannelSelectionKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -51,6 +51,8 @@ public final class ServerSocketChannelSelectionKey
public int getNativeFD()
{
- return ((ServerSocketChannelImpl) ch).getNativeFD();
+ NIOServerSocket socket =
+ (NIOServerSocket) ((ServerSocketChannelImpl) ch).socket();
+ return socket.getPlainSocketImpl().getNativeFD();
}
}
diff --git a/gnu/java/nio/SocketChannelImpl.java b/gnu/java/nio/SocketChannelImpl.java
index ff4b63c45..9fb71c1ae 100644
--- a/gnu/java/nio/SocketChannelImpl.java
+++ b/gnu/java/nio/SocketChannelImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -103,11 +103,6 @@ public final class SocketChannelImpl extends SocketChannel
return impl;
}
- int getNativeFD()
- {
- return socket.getPlainSocketImpl().getNativeFD();
- }
-
protected void implCloseSelectableChannel () throws IOException
{
socket.close();
diff --git a/gnu/java/nio/SocketChannelSelectionKey.java b/gnu/java/nio/SocketChannelSelectionKey.java
index dcbc7bd37..75b4dfd87 100644
--- a/gnu/java/nio/SocketChannelSelectionKey.java
+++ b/gnu/java/nio/SocketChannelSelectionKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -51,6 +51,8 @@ public final class SocketChannelSelectionKey
public int getNativeFD()
{
- return ((SocketChannelImpl) ch).getNativeFD();
+ NIOSocket socket =
+ (NIOSocket) ((SocketChannelImpl) ch).socket();
+ return socket.getPlainSocketImpl().getNativeFD();
}
}
diff --git a/gnu/java/nio/channels/FileChannelImpl.java b/gnu/java/nio/channels/FileChannelImpl.java
index 664e93c87..0ee5d3fc2 100644
--- a/gnu/java/nio/channels/FileChannelImpl.java
+++ b/gnu/java/nio/channels/FileChannelImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -73,6 +73,10 @@ public final class FileChannelImpl extends FileChannel
public static final int SYNC = 16;
public static final int DSYNC = 32;
+ public static FileChannelImpl in;
+ public static FileChannelImpl out;
+ public static FileChannelImpl err;
+
private static native void init();
static
@@ -83,6 +87,10 @@ public final class FileChannelImpl extends FileChannel
}
init();
+
+ in = new FileChannelImpl(0, READ);
+ out = new FileChannelImpl(1, WRITE);
+ err = new FileChannelImpl(2, WRITE);
}
/**
@@ -97,6 +105,8 @@ public final class FileChannelImpl extends FileChannel
private int mode;
+ final String description;
+
/* Open a file. MODE is a combination of the above mode flags. */
/* This is a static factory method, so that VM implementors can decide
* substitute subclasses of FileChannelImpl. */
@@ -109,7 +119,8 @@ public final class FileChannelImpl extends FileChannel
private FileChannelImpl(File file, int mode)
throws FileNotFoundException
{
- final String path = file.getPath();
+ String path = file.getPath();
+ description = path;
fd = open (path, mode);
this.mode = mode;
@@ -126,21 +137,26 @@ public final class FileChannelImpl extends FileChannel
/* ignore it */
}
- throw new FileNotFoundException(path + " is a directory");
+ throw new FileNotFoundException(description + " is a directory");
}
}
- /* Used by init() (native code) */
+ /**
+ * Constructor for default channels in, out and err.
+ *
+ * Used by init() (native code).
+ *
+ * @param fd the file descriptor (0, 1, 2 for stdin, stdout, stderr).
+ *
+ * @param mode READ or WRITE
+ */
FileChannelImpl (int fd, int mode)
{
this.fd = fd;
this.mode = mode;
+ this.description = "descriptor(" + fd + ")";
}
- public static FileChannelImpl in;
- public static FileChannelImpl out;
- public static FileChannelImpl err;
-
private native int open (String path, int mode) throws FileNotFoundException;
public native int available () throws IOException;
@@ -179,7 +195,7 @@ public final class FileChannelImpl extends FileChannel
throws IOException
{
if (position < 0)
- throw new IllegalArgumentException ();
+ throw new IllegalArgumentException ("position: " + position);
long oldPosition = implPosition ();
position (position);
int result = read(dst);
@@ -230,7 +246,7 @@ public final class FileChannelImpl extends FileChannel
throws IOException
{
if (position < 0)
- throw new IllegalArgumentException ();
+ throw new IllegalArgumentException ("position: " + position);
if (!isOpen ())
throw new ClosedChannelException ();
@@ -288,10 +304,11 @@ public final class FileChannelImpl extends FileChannel
throw new NonWritableChannelException();
}
else
- throw new IllegalArgumentException ();
+ throw new IllegalArgumentException ("mode: " + mode);
if (position < 0 || size < 0 || size > Integer.MAX_VALUE)
- throw new IllegalArgumentException ();
+ throw new IllegalArgumentException ("position: " + position
+ + ", size: " + size);
return mapImpl(nmode, position, (int) size);
}
@@ -302,8 +319,12 @@ public final class FileChannelImpl extends FileChannel
{
if (!isOpen ())
throw new ClosedChannelException ();
+
+ force ();
}
+ private native void force ();
+
// like transferTo, but with a count of less than 2Gbytes
private int smallTransferTo (long position, int count,
WritableByteChannel target)
@@ -332,7 +353,8 @@ public final class FileChannelImpl extends FileChannel
{
if (position < 0
|| count < 0)
- throw new IllegalArgumentException ();
+ throw new IllegalArgumentException ("position: " + position
+ + ", count: " + count);
if (!isOpen ())
throw new ClosedChannelException ();
@@ -395,7 +417,8 @@ public final class FileChannelImpl extends FileChannel
{
if (position < 0
|| count < 0)
- throw new IllegalArgumentException ();
+ throw new IllegalArgumentException ("position: " + position
+ + ", count: " + count);
if (!isOpen ())
throw new ClosedChannelException ();
@@ -420,24 +443,31 @@ public final class FileChannelImpl extends FileChannel
return total;
}
- public FileLock tryLock (long position, long size, boolean shared)
+ // Shared sanity checks between lock and tryLock methods.
+ private void lockCheck(long position, long size, boolean shared)
throws IOException
{
if (position < 0
|| size < 0)
- throw new IllegalArgumentException ();
+ throw new IllegalArgumentException ("position: " + position
+ + ", size: " + size);
if (!isOpen ())
- throw new ClosedChannelException ();
+ throw new ClosedChannelException();
- if (shared && (mode & READ) == 0)
- throw new NonReadableChannelException ();
-
- if (!shared && (mode & WRITE) == 0)
- throw new NonWritableChannelException ();
+ if (shared && ((mode & READ) == 0))
+ throw new NonReadableChannelException();
+ if (!shared && ((mode & WRITE) == 0))
+ throw new NonWritableChannelException();
+ }
+
+ public FileLock tryLock (long position, long size, boolean shared)
+ throws IOException
+ {
+ lockCheck(position, size, shared);
+
boolean completed = false;
-
try
{
begin();
@@ -464,15 +494,9 @@ public final class FileChannelImpl extends FileChannel
public FileLock lock (long position, long size, boolean shared)
throws IOException
{
- if (position < 0
- || size < 0)
- throw new IllegalArgumentException ();
-
- if (!isOpen ())
- throw new ClosedChannelException ();
+ lockCheck(position, size, shared);
boolean completed = false;
-
try
{
boolean lockable = lock(position, size, shared, true);
@@ -500,7 +524,7 @@ public final class FileChannelImpl extends FileChannel
throws IOException
{
if (newPosition < 0)
- throw new IllegalArgumentException ();
+ throw new IllegalArgumentException ("newPostition: " + newPosition);
if (!isOpen ())
throw new ClosedChannelException ();
@@ -515,7 +539,7 @@ public final class FileChannelImpl extends FileChannel
throws IOException
{
if (size < 0)
- throw new IllegalArgumentException ();
+ throw new IllegalArgumentException ("size: " + size);
if (!isOpen ())
throw new ClosedChannelException ();
@@ -528,4 +552,12 @@ public final class FileChannelImpl extends FileChannel
return this;
}
+
+ public String toString()
+ {
+ return (this.getClass()
+ + "[fd=" + fd
+ + ",mode=" + mode + ","
+ + description + "]");
+ }
}
diff --git a/gnu/java/nio/channels/package.html b/gnu/java/nio/channels/package.html
index 006f630d7..0c3821bea 100644
--- a/gnu/java/nio/channels/package.html
+++ b/gnu/java/nio/channels/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/ByteCharset.java b/gnu/java/nio/charset/ByteCharset.java
index f8cf197a9..2cc91b850 100644
--- a/gnu/java/nio/charset/ByteCharset.java
+++ b/gnu/java/nio/charset/ByteCharset.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp424.java b/gnu/java/nio/charset/Cp424.java
index 3bfed9221..9733a76a4 100644
--- a/gnu/java/nio/charset/Cp424.java
+++ b/gnu/java/nio/charset/Cp424.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp437.java b/gnu/java/nio/charset/Cp437.java
index 0fb5dfa76..d6083579d 100644
--- a/gnu/java/nio/charset/Cp437.java
+++ b/gnu/java/nio/charset/Cp437.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp737.java b/gnu/java/nio/charset/Cp737.java
index a69473a34..548da2191 100644
--- a/gnu/java/nio/charset/Cp737.java
+++ b/gnu/java/nio/charset/Cp737.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp775.java b/gnu/java/nio/charset/Cp775.java
index dc3fb67c6..4d3f1c36c 100644
--- a/gnu/java/nio/charset/Cp775.java
+++ b/gnu/java/nio/charset/Cp775.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp850.java b/gnu/java/nio/charset/Cp850.java
index 62e08b8de..9122105ad 100644
--- a/gnu/java/nio/charset/Cp850.java
+++ b/gnu/java/nio/charset/Cp850.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp852.java b/gnu/java/nio/charset/Cp852.java
index baef5262f..a859530a8 100644
--- a/gnu/java/nio/charset/Cp852.java
+++ b/gnu/java/nio/charset/Cp852.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp855.java b/gnu/java/nio/charset/Cp855.java
index 7c26da68e..fbec999c7 100644
--- a/gnu/java/nio/charset/Cp855.java
+++ b/gnu/java/nio/charset/Cp855.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp857.java b/gnu/java/nio/charset/Cp857.java
index cee3ca374..78f8dbd2d 100644
--- a/gnu/java/nio/charset/Cp857.java
+++ b/gnu/java/nio/charset/Cp857.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp860.java b/gnu/java/nio/charset/Cp860.java
index 314155b46..e3c7f46b8 100644
--- a/gnu/java/nio/charset/Cp860.java
+++ b/gnu/java/nio/charset/Cp860.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp861.java b/gnu/java/nio/charset/Cp861.java
index 3a3570618..6e17ea2e8 100644
--- a/gnu/java/nio/charset/Cp861.java
+++ b/gnu/java/nio/charset/Cp861.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp862.java b/gnu/java/nio/charset/Cp862.java
index 35d473aad..ccd74fa9d 100644
--- a/gnu/java/nio/charset/Cp862.java
+++ b/gnu/java/nio/charset/Cp862.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp863.java b/gnu/java/nio/charset/Cp863.java
index d7221403d..97812a6f6 100644
--- a/gnu/java/nio/charset/Cp863.java
+++ b/gnu/java/nio/charset/Cp863.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp864.java b/gnu/java/nio/charset/Cp864.java
index 35cfbe7ab..f136f43ec 100644
--- a/gnu/java/nio/charset/Cp864.java
+++ b/gnu/java/nio/charset/Cp864.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp865.java b/gnu/java/nio/charset/Cp865.java
index 20e0c9289..a1332a74f 100644
--- a/gnu/java/nio/charset/Cp865.java
+++ b/gnu/java/nio/charset/Cp865.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp866.java b/gnu/java/nio/charset/Cp866.java
index 8b12ca3a4..ca6958949 100644
--- a/gnu/java/nio/charset/Cp866.java
+++ b/gnu/java/nio/charset/Cp866.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp869.java b/gnu/java/nio/charset/Cp869.java
index 98a0155f6..f5e052984 100644
--- a/gnu/java/nio/charset/Cp869.java
+++ b/gnu/java/nio/charset/Cp869.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Cp874.java b/gnu/java/nio/charset/Cp874.java
index c1139267a..d81755c1e 100644
--- a/gnu/java/nio/charset/Cp874.java
+++ b/gnu/java/nio/charset/Cp874.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/EncodingHelper.java b/gnu/java/nio/charset/EncodingHelper.java
index d08caa34d..033440d5d 100644
--- a/gnu/java/nio/charset/EncodingHelper.java
+++ b/gnu/java/nio/charset/EncodingHelper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/ISO_8859_1.java b/gnu/java/nio/charset/ISO_8859_1.java
index 45fe5cc6f..cc06ecd5a 100644
--- a/gnu/java/nio/charset/ISO_8859_1.java
+++ b/gnu/java/nio/charset/ISO_8859_1.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/ISO_8859_13.java b/gnu/java/nio/charset/ISO_8859_13.java
index 41bb99d3f..c10eef305 100644
--- a/gnu/java/nio/charset/ISO_8859_13.java
+++ b/gnu/java/nio/charset/ISO_8859_13.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/ISO_8859_15.java b/gnu/java/nio/charset/ISO_8859_15.java
index 977be3b9c..973fe1c94 100644
--- a/gnu/java/nio/charset/ISO_8859_15.java
+++ b/gnu/java/nio/charset/ISO_8859_15.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/ISO_8859_2.java b/gnu/java/nio/charset/ISO_8859_2.java
index 11b2c4671..2de96df9b 100644
--- a/gnu/java/nio/charset/ISO_8859_2.java
+++ b/gnu/java/nio/charset/ISO_8859_2.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/ISO_8859_3.java b/gnu/java/nio/charset/ISO_8859_3.java
index 70739c10b..6e718719a 100644
--- a/gnu/java/nio/charset/ISO_8859_3.java
+++ b/gnu/java/nio/charset/ISO_8859_3.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/ISO_8859_4.java b/gnu/java/nio/charset/ISO_8859_4.java
index 057698393..96dc46754 100644
--- a/gnu/java/nio/charset/ISO_8859_4.java
+++ b/gnu/java/nio/charset/ISO_8859_4.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/ISO_8859_5.java b/gnu/java/nio/charset/ISO_8859_5.java
index 6360d7354..ad208729c 100644
--- a/gnu/java/nio/charset/ISO_8859_5.java
+++ b/gnu/java/nio/charset/ISO_8859_5.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/ISO_8859_6.java b/gnu/java/nio/charset/ISO_8859_6.java
index 167e8a1b9..5600e7923 100644
--- a/gnu/java/nio/charset/ISO_8859_6.java
+++ b/gnu/java/nio/charset/ISO_8859_6.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/ISO_8859_7.java b/gnu/java/nio/charset/ISO_8859_7.java
index 6c71268b2..9262a6077 100644
--- a/gnu/java/nio/charset/ISO_8859_7.java
+++ b/gnu/java/nio/charset/ISO_8859_7.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/ISO_8859_8.java b/gnu/java/nio/charset/ISO_8859_8.java
index 40aafd599..96fb0f48b 100644
--- a/gnu/java/nio/charset/ISO_8859_8.java
+++ b/gnu/java/nio/charset/ISO_8859_8.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/ISO_8859_9.java b/gnu/java/nio/charset/ISO_8859_9.java
index 9af9aee46..28be34cf8 100644
--- a/gnu/java/nio/charset/ISO_8859_9.java
+++ b/gnu/java/nio/charset/ISO_8859_9.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/KOI_8.java b/gnu/java/nio/charset/KOI_8.java
index 0f996538a..c67065607 100644
--- a/gnu/java/nio/charset/KOI_8.java
+++ b/gnu/java/nio/charset/KOI_8.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/MS874.java b/gnu/java/nio/charset/MS874.java
index 84f8795c8..b16e53f42 100644
--- a/gnu/java/nio/charset/MS874.java
+++ b/gnu/java/nio/charset/MS874.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/MacCentralEurope.java b/gnu/java/nio/charset/MacCentralEurope.java
index 76a111d73..5496db2b5 100644
--- a/gnu/java/nio/charset/MacCentralEurope.java
+++ b/gnu/java/nio/charset/MacCentralEurope.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/MacCroatian.java b/gnu/java/nio/charset/MacCroatian.java
index a055c6837..f71ac5199 100644
--- a/gnu/java/nio/charset/MacCroatian.java
+++ b/gnu/java/nio/charset/MacCroatian.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/MacCyrillic.java b/gnu/java/nio/charset/MacCyrillic.java
index 105ce596c..f152f6b1c 100644
--- a/gnu/java/nio/charset/MacCyrillic.java
+++ b/gnu/java/nio/charset/MacCyrillic.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/MacDingbat.java b/gnu/java/nio/charset/MacDingbat.java
index bee18e91c..84102d56f 100644
--- a/gnu/java/nio/charset/MacDingbat.java
+++ b/gnu/java/nio/charset/MacDingbat.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/MacGreek.java b/gnu/java/nio/charset/MacGreek.java
index 8be6ade4d..07624d59e 100644
--- a/gnu/java/nio/charset/MacGreek.java
+++ b/gnu/java/nio/charset/MacGreek.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/MacIceland.java b/gnu/java/nio/charset/MacIceland.java
index 3dbd1d3f1..7918e0266 100644
--- a/gnu/java/nio/charset/MacIceland.java
+++ b/gnu/java/nio/charset/MacIceland.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/MacRoman.java b/gnu/java/nio/charset/MacRoman.java
index c769d69e2..b413caf2b 100644
--- a/gnu/java/nio/charset/MacRoman.java
+++ b/gnu/java/nio/charset/MacRoman.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/MacRomania.java b/gnu/java/nio/charset/MacRomania.java
index d1f9e0034..d1779a40e 100644
--- a/gnu/java/nio/charset/MacRomania.java
+++ b/gnu/java/nio/charset/MacRomania.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/MacSymbol.java b/gnu/java/nio/charset/MacSymbol.java
index d85e4ef98..869de1947 100644
--- a/gnu/java/nio/charset/MacSymbol.java
+++ b/gnu/java/nio/charset/MacSymbol.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/MacThai.java b/gnu/java/nio/charset/MacThai.java
index 1a85869ee..498b9e6bb 100644
--- a/gnu/java/nio/charset/MacThai.java
+++ b/gnu/java/nio/charset/MacThai.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/MacTurkish.java b/gnu/java/nio/charset/MacTurkish.java
index 1f9f9563c..68ea27b8c 100644
--- a/gnu/java/nio/charset/MacTurkish.java
+++ b/gnu/java/nio/charset/MacTurkish.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Provider.java b/gnu/java/nio/charset/Provider.java
index 91d1335ed..3f25c5988 100644
--- a/gnu/java/nio/charset/Provider.java
+++ b/gnu/java/nio/charset/Provider.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/US_ASCII.java b/gnu/java/nio/charset/US_ASCII.java
index f2c66960b..d26f7ffc9 100644
--- a/gnu/java/nio/charset/US_ASCII.java
+++ b/gnu/java/nio/charset/US_ASCII.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/UTF_16.java b/gnu/java/nio/charset/UTF_16.java
index 2ba226d80..b1d7705d4 100644
--- a/gnu/java/nio/charset/UTF_16.java
+++ b/gnu/java/nio/charset/UTF_16.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/UTF_16BE.java b/gnu/java/nio/charset/UTF_16BE.java
index 0f38e4346..1fe3b5d7c 100644
--- a/gnu/java/nio/charset/UTF_16BE.java
+++ b/gnu/java/nio/charset/UTF_16BE.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/UTF_16Decoder.java b/gnu/java/nio/charset/UTF_16Decoder.java
index c5644fe44..302c83e62 100644
--- a/gnu/java/nio/charset/UTF_16Decoder.java
+++ b/gnu/java/nio/charset/UTF_16Decoder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/UTF_16Encoder.java b/gnu/java/nio/charset/UTF_16Encoder.java
index a71673037..d5ab744e0 100644
--- a/gnu/java/nio/charset/UTF_16Encoder.java
+++ b/gnu/java/nio/charset/UTF_16Encoder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/UTF_16LE.java b/gnu/java/nio/charset/UTF_16LE.java
index 0a042ed29..6d72a324c 100644
--- a/gnu/java/nio/charset/UTF_16LE.java
+++ b/gnu/java/nio/charset/UTF_16LE.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/UTF_8.java b/gnu/java/nio/charset/UTF_8.java
index fafb3cbf8..0e0730eec 100644
--- a/gnu/java/nio/charset/UTF_8.java
+++ b/gnu/java/nio/charset/UTF_8.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/UnicodeLittle.java b/gnu/java/nio/charset/UnicodeLittle.java
index e82e9c5c8..d354e04e5 100644
--- a/gnu/java/nio/charset/UnicodeLittle.java
+++ b/gnu/java/nio/charset/UnicodeLittle.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/Windows1250.java b/gnu/java/nio/charset/Windows1250.java
index b755f4e99..9d7ab8edd 100644
--- a/gnu/java/nio/charset/Windows1250.java
+++ b/gnu/java/nio/charset/Windows1250.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -86,7 +86,7 @@ public class Windows1250 extends ByteCharset
public Windows1250()
{
- super("Windows-1250", new String[] {
+ super("windows-1250", new String[] {
"Windows1250",
"ibm-5346_P100-1998",
"ibm-5346",
diff --git a/gnu/java/nio/charset/Windows1251.java b/gnu/java/nio/charset/Windows1251.java
index be8fdab69..bf3227e87 100644
--- a/gnu/java/nio/charset/Windows1251.java
+++ b/gnu/java/nio/charset/Windows1251.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -86,7 +86,7 @@ public class Windows1251 extends ByteCharset
public Windows1251()
{
- super("Windows-1251", new String[] {
+ super("windows-1251", new String[] {
"Windows1251",
"cp1251",
"cp-1251",
diff --git a/gnu/java/nio/charset/Windows1252.java b/gnu/java/nio/charset/Windows1252.java
index 8c98f9e89..9391c87d4 100644
--- a/gnu/java/nio/charset/Windows1252.java
+++ b/gnu/java/nio/charset/Windows1252.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -85,7 +85,7 @@ public class Windows1252 extends ByteCharset
public Windows1252()
{
- super("Windows-1252", new String[] {
+ super("windows-1252", new String[] {
"Windows1252",
"ibm-5348_P100-1997",
"ibm-5348",
diff --git a/gnu/java/nio/charset/Windows1253.java b/gnu/java/nio/charset/Windows1253.java
index a4abff929..02150b4af 100644
--- a/gnu/java/nio/charset/Windows1253.java
+++ b/gnu/java/nio/charset/Windows1253.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -86,7 +86,7 @@ public class Windows1253 extends ByteCharset
public Windows1253()
{
- super("Windows-1253", new String[] {
+ super("windows-1253", new String[] {
"Windows1253",
"cp1253",
"cp-1253",
diff --git a/gnu/java/nio/charset/Windows1254.java b/gnu/java/nio/charset/Windows1254.java
index 57ecc9d3b..7cdad3c46 100644
--- a/gnu/java/nio/charset/Windows1254.java
+++ b/gnu/java/nio/charset/Windows1254.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -86,7 +86,7 @@ public class Windows1254 extends ByteCharset
public Windows1254()
{
- super("Windows-1254", new String[] {
+ super("windows-1254", new String[] {
"Windows1254",
"cp1254",
"cp-1254",
diff --git a/gnu/java/nio/charset/Windows1255.java b/gnu/java/nio/charset/Windows1255.java
index 33c2f3d51..b706d1930 100644
--- a/gnu/java/nio/charset/Windows1255.java
+++ b/gnu/java/nio/charset/Windows1255.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -86,7 +86,7 @@ public class Windows1255 extends ByteCharset
public Windows1255()
{
- super("Windows-1255", new String[] {
+ super("windows-1255", new String[] {
"Windows1255",
"cp1255",
"cp-1255",
diff --git a/gnu/java/nio/charset/Windows1256.java b/gnu/java/nio/charset/Windows1256.java
index cf448a892..6924420e1 100644
--- a/gnu/java/nio/charset/Windows1256.java
+++ b/gnu/java/nio/charset/Windows1256.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -86,7 +86,7 @@ public class Windows1256 extends ByteCharset
public Windows1256()
{
- super("Windows-1256", new String[] {
+ super("windows-1256", new String[] {
"Windows1256",
"cp1256",
"cp-1256",
diff --git a/gnu/java/nio/charset/Windows1257.java b/gnu/java/nio/charset/Windows1257.java
index f2e258d9c..2f95d64ac 100644
--- a/gnu/java/nio/charset/Windows1257.java
+++ b/gnu/java/nio/charset/Windows1257.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -86,7 +86,7 @@ public class Windows1257 extends ByteCharset
public Windows1257()
{
- super("Windows-1257", new String[] {
+ super("windows-1257", new String[] {
"Windows1257",
"cp1257",
"cp-1257",
diff --git a/gnu/java/nio/charset/Windows1258.java b/gnu/java/nio/charset/Windows1258.java
index 06e03ef1d..7d653b497 100644
--- a/gnu/java/nio/charset/Windows1258.java
+++ b/gnu/java/nio/charset/Windows1258.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -86,7 +86,7 @@ public class Windows1258 extends ByteCharset
public Windows1258()
{
- super("Windows-1258", new String[] {
+ super("windows-1258", new String[] {
"Windows1258",
"cp1258",
"cp-1258",
diff --git a/gnu/java/nio/charset/iconv/IconvCharset.java b/gnu/java/nio/charset/iconv/IconvCharset.java
index 19fcda93d..ffd2a103f 100644
--- a/gnu/java/nio/charset/iconv/IconvCharset.java
+++ b/gnu/java/nio/charset/iconv/IconvCharset.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/iconv/IconvDecoder.java b/gnu/java/nio/charset/iconv/IconvDecoder.java
index 533418c9c..fa265a923 100644
--- a/gnu/java/nio/charset/iconv/IconvDecoder.java
+++ b/gnu/java/nio/charset/iconv/IconvDecoder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/iconv/IconvEncoder.java b/gnu/java/nio/charset/iconv/IconvEncoder.java
index acca24455..bb10c9b63 100644
--- a/gnu/java/nio/charset/iconv/IconvEncoder.java
+++ b/gnu/java/nio/charset/iconv/IconvEncoder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/iconv/IconvMetaData.java b/gnu/java/nio/charset/iconv/IconvMetaData.java
index b1e3044dd..c4686a25a 100644
--- a/gnu/java/nio/charset/iconv/IconvMetaData.java
+++ b/gnu/java/nio/charset/iconv/IconvMetaData.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/iconv/IconvProvider.java b/gnu/java/nio/charset/iconv/IconvProvider.java
index b1f9f9b0c..58eaa85ba 100644
--- a/gnu/java/nio/charset/iconv/IconvProvider.java
+++ b/gnu/java/nio/charset/iconv/IconvProvider.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/charset/package.html b/gnu/java/nio/charset/package.html
index 15418f74c..002516da3 100644
--- a/gnu/java/nio/charset/package.html
+++ b/gnu/java/nio/charset/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/nio/package.html b/gnu/java/nio/package.html
index 7a023af6d..87f0d9bf3 100644
--- a/gnu/java/nio/package.html
+++ b/gnu/java/nio/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/RMIMarshalledObjectInputStream.java b/gnu/java/rmi/RMIMarshalledObjectInputStream.java
index e20dda8eb..140069379 100644
--- a/gnu/java/rmi/RMIMarshalledObjectInputStream.java
+++ b/gnu/java/rmi/RMIMarshalledObjectInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/RMIMarshalledObjectOutputStream.java b/gnu/java/rmi/RMIMarshalledObjectOutputStream.java
index 931116a22..2bbbaacb4 100644
--- a/gnu/java/rmi/RMIMarshalledObjectOutputStream.java
+++ b/gnu/java/rmi/RMIMarshalledObjectOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/dgc/DGCImpl.java b/gnu/java/rmi/dgc/DGCImpl.java
index a41dabded..a32445c34 100644
--- a/gnu/java/rmi/dgc/DGCImpl.java
+++ b/gnu/java/rmi/dgc/DGCImpl.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/dgc/DGCImpl_Skel.java b/gnu/java/rmi/dgc/DGCImpl_Skel.java
index 545ebc7bd..5f032e72f 100644
--- a/gnu/java/rmi/dgc/DGCImpl_Skel.java
+++ b/gnu/java/rmi/dgc/DGCImpl_Skel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/dgc/DGCImpl_Stub.java b/gnu/java/rmi/dgc/DGCImpl_Stub.java
index bffde5280..b1e086a73 100644
--- a/gnu/java/rmi/dgc/DGCImpl_Stub.java
+++ b/gnu/java/rmi/dgc/DGCImpl_Stub.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/dgc/package.html b/gnu/java/rmi/dgc/package.html
index cb06ca8ba..3ed81cfdd 100644
--- a/gnu/java/rmi/dgc/package.html
+++ b/gnu/java/rmi/dgc/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/package.html b/gnu/java/rmi/package.html
index 3e220144b..53b5f5e57 100644
--- a/gnu/java/rmi/package.html
+++ b/gnu/java/rmi/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/registry/RegistryImpl.java b/gnu/java/rmi/registry/RegistryImpl.java
index 056ab804c..0c94434d8 100644
--- a/gnu/java/rmi/registry/RegistryImpl.java
+++ b/gnu/java/rmi/registry/RegistryImpl.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/registry/RegistryImpl_Skel.java b/gnu/java/rmi/registry/RegistryImpl_Skel.java
index de6b9e426..8cf14ccc0 100644
--- a/gnu/java/rmi/registry/RegistryImpl_Skel.java
+++ b/gnu/java/rmi/registry/RegistryImpl_Skel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/registry/RegistryImpl_Stub.java b/gnu/java/rmi/registry/RegistryImpl_Stub.java
index 45e10c490..b289426b4 100644
--- a/gnu/java/rmi/registry/RegistryImpl_Stub.java
+++ b/gnu/java/rmi/registry/RegistryImpl_Stub.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/registry/package.html b/gnu/java/rmi/registry/package.html
index dd2df7c4c..3750359d6 100644
--- a/gnu/java/rmi/registry/package.html
+++ b/gnu/java/rmi/registry/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/ConnectionRunnerPool.java b/gnu/java/rmi/server/ConnectionRunnerPool.java
index b917315cb..9cc57b228 100644
--- a/gnu/java/rmi/server/ConnectionRunnerPool.java
+++ b/gnu/java/rmi/server/ConnectionRunnerPool.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/ProtocolConstants.java b/gnu/java/rmi/server/ProtocolConstants.java
index 9f214c96a..30fb5e89b 100644
--- a/gnu/java/rmi/server/ProtocolConstants.java
+++ b/gnu/java/rmi/server/ProtocolConstants.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/RMIDefaultSocketFactory.java b/gnu/java/rmi/server/RMIDefaultSocketFactory.java
index b58be1ade..628e1cc87 100644
--- a/gnu/java/rmi/server/RMIDefaultSocketFactory.java
+++ b/gnu/java/rmi/server/RMIDefaultSocketFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/RMIHashes.java b/gnu/java/rmi/server/RMIHashes.java
index bb15733f8..5a414404d 100644
--- a/gnu/java/rmi/server/RMIHashes.java
+++ b/gnu/java/rmi/server/RMIHashes.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/RMIIncomingThread.java b/gnu/java/rmi/server/RMIIncomingThread.java
index a6e2fee83..990d37bc5 100644
--- a/gnu/java/rmi/server/RMIIncomingThread.java
+++ b/gnu/java/rmi/server/RMIIncomingThread.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/RMIObjectInputStream.java b/gnu/java/rmi/server/RMIObjectInputStream.java
index c890a1433..888b30bf6 100644
--- a/gnu/java/rmi/server/RMIObjectInputStream.java
+++ b/gnu/java/rmi/server/RMIObjectInputStream.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/RMIObjectOutputStream.java b/gnu/java/rmi/server/RMIObjectOutputStream.java
index 32aa5314e..d42908a41 100644
--- a/gnu/java/rmi/server/RMIObjectOutputStream.java
+++ b/gnu/java/rmi/server/RMIObjectOutputStream.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/RMIVoidValue.java b/gnu/java/rmi/server/RMIVoidValue.java
index bad8b9652..8e5546d35 100644
--- a/gnu/java/rmi/server/RMIVoidValue.java
+++ b/gnu/java/rmi/server/RMIVoidValue.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/UnicastConnection.java b/gnu/java/rmi/server/UnicastConnection.java
index ce7b75bda..216e453e7 100644
--- a/gnu/java/rmi/server/UnicastConnection.java
+++ b/gnu/java/rmi/server/UnicastConnection.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/UnicastConnectionManager.java b/gnu/java/rmi/server/UnicastConnectionManager.java
index c8c1d57ca..08f6a9bc3 100644
--- a/gnu/java/rmi/server/UnicastConnectionManager.java
+++ b/gnu/java/rmi/server/UnicastConnectionManager.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/UnicastRef.java b/gnu/java/rmi/server/UnicastRef.java
index 77042d724..c1b871fb8 100644
--- a/gnu/java/rmi/server/UnicastRef.java
+++ b/gnu/java/rmi/server/UnicastRef.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/UnicastRemoteCall.java b/gnu/java/rmi/server/UnicastRemoteCall.java
index e38f0f92b..c5206e76d 100644
--- a/gnu/java/rmi/server/UnicastRemoteCall.java
+++ b/gnu/java/rmi/server/UnicastRemoteCall.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/UnicastRemoteStub.java b/gnu/java/rmi/server/UnicastRemoteStub.java
index f19ecccb9..87e932de5 100644
--- a/gnu/java/rmi/server/UnicastRemoteStub.java
+++ b/gnu/java/rmi/server/UnicastRemoteStub.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/UnicastServer.java b/gnu/java/rmi/server/UnicastServer.java
index 99aef483f..065ef8c77 100644
--- a/gnu/java/rmi/server/UnicastServer.java
+++ b/gnu/java/rmi/server/UnicastServer.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/UnicastServerRef.java b/gnu/java/rmi/server/UnicastServerRef.java
index 71c84a58a..1f6eedec6 100644
--- a/gnu/java/rmi/server/UnicastServerRef.java
+++ b/gnu/java/rmi/server/UnicastServerRef.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/rmi/server/package.html b/gnu/java/rmi/server/package.html
index fc209823b..08c105b49 100644
--- a/gnu/java/rmi/server/package.html
+++ b/gnu/java/rmi/server/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/Engine.java b/gnu/java/security/Engine.java
index 9f6568cdd..b75de5caa 100644
--- a/gnu/java/security/Engine.java
+++ b/gnu/java/security/Engine.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/OID.java b/gnu/java/security/OID.java
index 918435108..473b6ba5a 100644
--- a/gnu/java/security/OID.java
+++ b/gnu/java/security/OID.java
@@ -1,5 +1,5 @@
/* OID.java -- numeric representation of an object identifier
- Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -48,7 +48,7 @@ import java.util.StringTokenizer;
/**
* This immutable class represents an object identifier, or OID.
*
- * <p>OIDs are represented as a series of hierarcical tokens, each of
+ * <p>OIDs are represented as a series of hierarchical tokens, each of
* which is usually represented as a single, unsigned integer. The
* hierarchy works so that later tokens are considered within the group
* of earlier tokens. Thus, the OID for the Serpent block cipher,
diff --git a/gnu/java/security/PolicyFile.java b/gnu/java/security/PolicyFile.java
index c939dda47..dd3a4dec4 100644
--- a/gnu/java/security/PolicyFile.java
+++ b/gnu/java/security/PolicyFile.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/action/GetPropertyAction.java b/gnu/java/security/action/GetPropertyAction.java
index 3657254d0..2886deb34 100644
--- a/gnu/java/security/action/GetPropertyAction.java
+++ b/gnu/java/security/action/GetPropertyAction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/action/GetSecurityPropertyAction.java b/gnu/java/security/action/GetSecurityPropertyAction.java
index b61e9c836..97fa15d03 100644
--- a/gnu/java/security/action/GetSecurityPropertyAction.java
+++ b/gnu/java/security/action/GetSecurityPropertyAction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/action/SetAccessibleAction.java b/gnu/java/security/action/SetAccessibleAction.java
index 2827a3a6f..77e5fc988 100644
--- a/gnu/java/security/action/SetAccessibleAction.java
+++ b/gnu/java/security/action/SetAccessibleAction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/action/package.html b/gnu/java/security/action/package.html
index c971a78cc..fc3dfa229 100644
--- a/gnu/java/security/action/package.html
+++ b/gnu/java/security/action/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/ber/BER.java b/gnu/java/security/ber/BER.java
index ff666bfe1..7efb1bf90 100644
--- a/gnu/java/security/ber/BER.java
+++ b/gnu/java/security/ber/BER.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/ber/BEREncodingException.java b/gnu/java/security/ber/BEREncodingException.java
index 5c3ed243b..aad10932c 100644
--- a/gnu/java/security/ber/BEREncodingException.java
+++ b/gnu/java/security/ber/BEREncodingException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/ber/BERReader.java b/gnu/java/security/ber/BERReader.java
index 600d46b4d..53a3f3ee9 100644
--- a/gnu/java/security/ber/BERReader.java
+++ b/gnu/java/security/ber/BERReader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/ber/BERValue.java b/gnu/java/security/ber/BERValue.java
index dd4364a6d..aeaef39bf 100644
--- a/gnu/java/security/ber/BERValue.java
+++ b/gnu/java/security/ber/BERValue.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/ber/package.html b/gnu/java/security/ber/package.html
index c7ff170f5..348a83c20 100644
--- a/gnu/java/security/ber/package.html
+++ b/gnu/java/security/ber/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/der/BitString.java b/gnu/java/security/der/BitString.java
index 67e34d7bd..b88b14541 100644
--- a/gnu/java/security/der/BitString.java
+++ b/gnu/java/security/der/BitString.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/der/DER.java b/gnu/java/security/der/DER.java
index 585c6800a..a7eb4a689 100644
--- a/gnu/java/security/der/DER.java
+++ b/gnu/java/security/der/DER.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/der/DEREncodingException.java b/gnu/java/security/der/DEREncodingException.java
index 3162b45d2..90042a3fc 100644
--- a/gnu/java/security/der/DEREncodingException.java
+++ b/gnu/java/security/der/DEREncodingException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/der/DERReader.java b/gnu/java/security/der/DERReader.java
index aab3a2fc8..cb07f1432 100644
--- a/gnu/java/security/der/DERReader.java
+++ b/gnu/java/security/der/DERReader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/der/DERValue.java b/gnu/java/security/der/DERValue.java
index 9c3431e0b..9a597d724 100644
--- a/gnu/java/security/der/DERValue.java
+++ b/gnu/java/security/der/DERValue.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/der/DERWriter.java b/gnu/java/security/der/DERWriter.java
index 5568b69bb..78524fc94 100644
--- a/gnu/java/security/der/DERWriter.java
+++ b/gnu/java/security/der/DERWriter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/der/package.html b/gnu/java/security/der/package.html
index 06d55182d..e74b0db4e 100644
--- a/gnu/java/security/der/package.html
+++ b/gnu/java/security/der/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/package.html b/gnu/java/security/package.html
index d87340849..bb6e91d61 100644
--- a/gnu/java/security/package.html
+++ b/gnu/java/security/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/pkcs/PKCS7SignedData.java b/gnu/java/security/pkcs/PKCS7SignedData.java
index 869febebd..ba5efc722 100644
--- a/gnu/java/security/pkcs/PKCS7SignedData.java
+++ b/gnu/java/security/pkcs/PKCS7SignedData.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/pkcs/SignerInfo.java b/gnu/java/security/pkcs/SignerInfo.java
index d6b747dea..c976799bb 100644
--- a/gnu/java/security/pkcs/SignerInfo.java
+++ b/gnu/java/security/pkcs/SignerInfo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/pkcs/package.html b/gnu/java/security/pkcs/package.html
index 945fb5d75..60d658f8e 100644
--- a/gnu/java/security/pkcs/package.html
+++ b/gnu/java/security/pkcs/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/CollectionCertStoreImpl.java b/gnu/java/security/provider/CollectionCertStoreImpl.java
index b67a4332c..4bf3d5434 100644
--- a/gnu/java/security/provider/CollectionCertStoreImpl.java
+++ b/gnu/java/security/provider/CollectionCertStoreImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/DSAKeyFactory.java b/gnu/java/security/provider/DSAKeyFactory.java
index 3414f423c..7e154e274 100644
--- a/gnu/java/security/provider/DSAKeyFactory.java
+++ b/gnu/java/security/provider/DSAKeyFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/DSAKeyPairGenerator.java b/gnu/java/security/provider/DSAKeyPairGenerator.java
index d4dff1671..2c643d5c3 100644
--- a/gnu/java/security/provider/DSAKeyPairGenerator.java
+++ b/gnu/java/security/provider/DSAKeyPairGenerator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/DSAParameterGenerator.java b/gnu/java/security/provider/DSAParameterGenerator.java
index 92032fa94..ccec1136c 100644
--- a/gnu/java/security/provider/DSAParameterGenerator.java
+++ b/gnu/java/security/provider/DSAParameterGenerator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/DSAParameters.java b/gnu/java/security/provider/DSAParameters.java
index 08bb6a273..77d648956 100644
--- a/gnu/java/security/provider/DSAParameters.java
+++ b/gnu/java/security/provider/DSAParameters.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/DSASignature.java b/gnu/java/security/provider/DSASignature.java
index 211cdb8cc..1d3875d28 100644
--- a/gnu/java/security/provider/DSASignature.java
+++ b/gnu/java/security/provider/DSASignature.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/DefaultPolicy.java b/gnu/java/security/provider/DefaultPolicy.java
index f7ef782fc..d42be6c90 100644
--- a/gnu/java/security/provider/DefaultPolicy.java
+++ b/gnu/java/security/provider/DefaultPolicy.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/EncodedKeyFactory.java b/gnu/java/security/provider/EncodedKeyFactory.java
index dd1a06a79..2bf0fff80 100644
--- a/gnu/java/security/provider/EncodedKeyFactory.java
+++ b/gnu/java/security/provider/EncodedKeyFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/Gnu.java b/gnu/java/security/provider/Gnu.java
index 34f86d8ba..849f63c16 100644
--- a/gnu/java/security/provider/Gnu.java
+++ b/gnu/java/security/provider/Gnu.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/GnuDHPublicKey.java b/gnu/java/security/provider/GnuDHPublicKey.java
index d62fcc93a..6e13f6bf2 100644
--- a/gnu/java/security/provider/GnuDHPublicKey.java
+++ b/gnu/java/security/provider/GnuDHPublicKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/GnuDSAPrivateKey.java b/gnu/java/security/provider/GnuDSAPrivateKey.java
index 8cac9c351..aac2faab2 100644
--- a/gnu/java/security/provider/GnuDSAPrivateKey.java
+++ b/gnu/java/security/provider/GnuDSAPrivateKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/GnuDSAPublicKey.java b/gnu/java/security/provider/GnuDSAPublicKey.java
index 6f3a29da9..41195fa99 100644
--- a/gnu/java/security/provider/GnuDSAPublicKey.java
+++ b/gnu/java/security/provider/GnuDSAPublicKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/GnuRSAPrivateKey.java b/gnu/java/security/provider/GnuRSAPrivateKey.java
index 45a212552..b09fc88bc 100644
--- a/gnu/java/security/provider/GnuRSAPrivateKey.java
+++ b/gnu/java/security/provider/GnuRSAPrivateKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/GnuRSAPublicKey.java b/gnu/java/security/provider/GnuRSAPublicKey.java
index 053774467..a35e761c0 100644
--- a/gnu/java/security/provider/GnuRSAPublicKey.java
+++ b/gnu/java/security/provider/GnuRSAPublicKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/MD2withRSA.java b/gnu/java/security/provider/MD2withRSA.java
index c43d07adb..a72ae5588 100644
--- a/gnu/java/security/provider/MD2withRSA.java
+++ b/gnu/java/security/provider/MD2withRSA.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/MD4withRSA.java b/gnu/java/security/provider/MD4withRSA.java
index 86cd2bed5..76a6a1ad0 100644
--- a/gnu/java/security/provider/MD4withRSA.java
+++ b/gnu/java/security/provider/MD4withRSA.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/MD5.java b/gnu/java/security/provider/MD5.java
index 41956fc87..1534eb910 100644
--- a/gnu/java/security/provider/MD5.java
+++ b/gnu/java/security/provider/MD5.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/MD5withRSA.java b/gnu/java/security/provider/MD5withRSA.java
index ec8370def..721d897ed 100644
--- a/gnu/java/security/provider/MD5withRSA.java
+++ b/gnu/java/security/provider/MD5withRSA.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/PKIXCertPathValidatorImpl.java b/gnu/java/security/provider/PKIXCertPathValidatorImpl.java
index 3e493ee6d..ab8943443 100644
--- a/gnu/java/security/provider/PKIXCertPathValidatorImpl.java
+++ b/gnu/java/security/provider/PKIXCertPathValidatorImpl.java
@@ -1,5 +1,5 @@
/* PKIXCertPathValidatorImpl.java -- PKIX certificate path validator.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -331,7 +331,7 @@ public class PKIXCertPathValidatorImpl extends CertPathValidatorSpi
continue;
try
{
- if (anchorCert == null)
+ if (anchorCert != null)
anchorCert.checkValidity(now);
p[p.length-1].verify(anchorKey);
if (anchorCert != null && anchorCert.getBasicConstraints() >= 0
diff --git a/gnu/java/security/provider/RSA.java b/gnu/java/security/provider/RSA.java
index 4fd463378..c3cfbbf79 100644
--- a/gnu/java/security/provider/RSA.java
+++ b/gnu/java/security/provider/RSA.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/RSAKeyFactory.java b/gnu/java/security/provider/RSAKeyFactory.java
index 33c8c2287..d13cbe510 100644
--- a/gnu/java/security/provider/RSAKeyFactory.java
+++ b/gnu/java/security/provider/RSAKeyFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/SHA.java b/gnu/java/security/provider/SHA.java
index 6b8d3ba5c..e3b09bc56 100644
--- a/gnu/java/security/provider/SHA.java
+++ b/gnu/java/security/provider/SHA.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/SHA1PRNG.java b/gnu/java/security/provider/SHA1PRNG.java
index 5b77aae80..e4058e307 100644
--- a/gnu/java/security/provider/SHA1PRNG.java
+++ b/gnu/java/security/provider/SHA1PRNG.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/SHA1withRSA.java b/gnu/java/security/provider/SHA1withRSA.java
index 7e1061929..0e63fdeeb 100644
--- a/gnu/java/security/provider/SHA1withRSA.java
+++ b/gnu/java/security/provider/SHA1withRSA.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/X509CertificateFactory.java b/gnu/java/security/provider/X509CertificateFactory.java
index 7cfa1f610..1a415eabb 100644
--- a/gnu/java/security/provider/X509CertificateFactory.java
+++ b/gnu/java/security/provider/X509CertificateFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/provider/package.html b/gnu/java/security/provider/package.html
index d5a0a2ece..641a22aff 100644
--- a/gnu/java/security/provider/package.html
+++ b/gnu/java/security/provider/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/util/Prime.java b/gnu/java/security/util/Prime.java
index 2184602f6..e493ce675 100644
--- a/gnu/java/security/util/Prime.java
+++ b/gnu/java/security/util/Prime.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/util/package.html b/gnu/java/security/util/package.html
index ea91cb5df..36dd33b79 100644
--- a/gnu/java/security/util/package.html
+++ b/gnu/java/security/util/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/GnuPKIExtension.java b/gnu/java/security/x509/GnuPKIExtension.java
index 36ce84db0..8e74b8b24 100644
--- a/gnu/java/security/x509/GnuPKIExtension.java
+++ b/gnu/java/security/x509/GnuPKIExtension.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/PolicyNodeImpl.java b/gnu/java/security/x509/PolicyNodeImpl.java
index d3d4bd9a4..72cb4a9ea 100644
--- a/gnu/java/security/x509/PolicyNodeImpl.java
+++ b/gnu/java/security/x509/PolicyNodeImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/Util.java b/gnu/java/security/x509/Util.java
index 3bbbff25b..d27392026 100644
--- a/gnu/java/security/x509/Util.java
+++ b/gnu/java/security/x509/Util.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/X500DistinguishedName.java b/gnu/java/security/x509/X500DistinguishedName.java
index 6c34f0579..daf746f5d 100644
--- a/gnu/java/security/x509/X500DistinguishedName.java
+++ b/gnu/java/security/x509/X500DistinguishedName.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/X509CRL.java b/gnu/java/security/x509/X509CRL.java
index 5fe255c2a..5b2d3b141 100644
--- a/gnu/java/security/x509/X509CRL.java
+++ b/gnu/java/security/x509/X509CRL.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/X509CRLEntry.java b/gnu/java/security/x509/X509CRLEntry.java
index 4f7e1c258..a3bcfdea8 100644
--- a/gnu/java/security/x509/X509CRLEntry.java
+++ b/gnu/java/security/x509/X509CRLEntry.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/X509CRLSelectorImpl.java b/gnu/java/security/x509/X509CRLSelectorImpl.java
index c409779ec..0ada55016 100644
--- a/gnu/java/security/x509/X509CRLSelectorImpl.java
+++ b/gnu/java/security/x509/X509CRLSelectorImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/X509CertPath.java b/gnu/java/security/x509/X509CertPath.java
index 598dbeb94..e8ed6bf35 100644
--- a/gnu/java/security/x509/X509CertPath.java
+++ b/gnu/java/security/x509/X509CertPath.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/X509CertSelectorImpl.java b/gnu/java/security/x509/X509CertSelectorImpl.java
index c355dc176..36187ad8e 100644
--- a/gnu/java/security/x509/X509CertSelectorImpl.java
+++ b/gnu/java/security/x509/X509CertSelectorImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/X509Certificate.java b/gnu/java/security/x509/X509Certificate.java
index 5d8f1d91c..14ac43a25 100644
--- a/gnu/java/security/x509/X509Certificate.java
+++ b/gnu/java/security/x509/X509Certificate.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,9 @@ exception statement from your version. */
package gnu.java.security.x509;
+import gnu.classpath.debug.Component;
+import gnu.classpath.debug.SystemLogger;
+
import gnu.java.security.OID;
import gnu.java.security.der.BitString;
import gnu.java.security.der.DER;
@@ -86,6 +89,9 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
import javax.security.auth.x500.X500Principal;
/**
@@ -100,23 +106,7 @@ public class X509Certificate extends java.security.cert.X509Certificate
// Constants and fields.
// ------------------------------------------------------------------------
- private static final boolean DEBUG = false;
- private static void debug(String msg)
- {
- if (DEBUG)
- {
- System.err.print(">> X509Certificate: ");
- System.err.println(msg);
- }
- }
- private static void debug(Throwable t)
- {
- if (DEBUG)
- {
- System.err.print(">> X509Certificate: ");
- t.printStackTrace();
- }
- }
+ private static final Logger logger = SystemLogger.SYSTEM;
protected static final OID ID_DSA = new OID ("1.2.840.10040.4.1");
protected static final OID ID_DSA_WITH_SHA1 = new OID ("1.2.840.10040.4.3");
@@ -177,12 +167,12 @@ public class X509Certificate extends java.security.cert.X509Certificate
}
catch (IOException ioe)
{
- debug(ioe);
+ logger.log (Component.X509, "", ioe);
throw ioe;
}
catch (Exception e)
{
- debug(e);
+ logger.log (Component.X509, "", e);
CertificateException ce = new CertificateException(e.getMessage());
ce.initCause (e);
throw ce;
@@ -543,7 +533,8 @@ public class X509Certificate extends java.security.cert.X509Certificate
private void doVerify(Signature sig, PublicKey key)
throws CertificateException, InvalidKeyException, SignatureException
{
- debug("verifying sig=" + sig + " key=" + key);
+ logger.log (Component.X509, "verifying sig={0} key={1}",
+ new Object[] { sig, key });
sig.initVerify(key);
sig.update(tbsCertBytes);
if (!sig.verify(signature))
@@ -563,7 +554,8 @@ public class X509Certificate extends java.security.cert.X509Certificate
// Certificate ::= SEQUENCE {
DERValue cert = der.read();
- debug("start Certificate len == " + cert.getLength());
+ logger.log (Component.X509, "start Certificate len == {0}",
+ new Integer (cert.getLength()));
this.encoded = cert.getEncoded();
if (!cert.isConstructed())
@@ -578,7 +570,8 @@ public class X509Certificate extends java.security.cert.X509Certificate
throw new IOException("malformed TBSCertificate");
}
tbsCertBytes = tbsCert.getEncoded();
- debug("start TBSCertificate len == " + tbsCert.getLength());
+ logger.log (Component.X509, "start TBSCertificate len == {0}",
+ new Integer (tbsCert.getLength()));
// Version ::= INTEGER [0] { v1(0), v2(1), v3(2) }
DERValue val = der.read();
@@ -591,11 +584,12 @@ public class X509Certificate extends java.security.cert.X509Certificate
{
version = 1;
}
- debug("read version == " + version);
+ logger.log (Component.X509, "read version == {0}",
+ new Integer (version));
// SerialNumber ::= INTEGER
serialNo = (BigInteger) val.getValue();
- debug("read serial number == " + serialNo);
+ logger.log (Component.X509, "read serial number == {0}", serialNo);
// AlgorithmIdentifier ::= SEQUENCE {
val = der.read();
@@ -604,12 +598,13 @@ public class X509Certificate extends java.security.cert.X509Certificate
throw new IOException("malformed AlgorithmIdentifier");
}
int certAlgLen = val.getLength();
- debug("start AlgorithmIdentifier len == " + certAlgLen);
+ logger.log (Component.X509, "start AlgorithmIdentifier len == {0}",
+ new Integer (certAlgLen));
val = der.read();
// algorithm OBJECT IDENTIFIER,
algId = (OID) val.getValue();
- debug("read algorithm ID == " + algId);
+ logger.log (Component.X509, "read algorithm ID == {0}", algId);
// parameters ANY DEFINED BY algorithm OPTIONAL }
if (certAlgLen > val.getEncodedLength())
@@ -622,18 +617,18 @@ public class X509Certificate extends java.security.cert.X509Certificate
else
{
algVal = val.getEncoded();
-
- if (val.isConstructed())
- encoded.skip(val.getLength());
+
+ if (val.isConstructed())
+ encoded.skip(val.getLength());
}
- debug("read algorithm parameters == " + algVal);
+ logger.log (Component.X509, "read algorithm parameters == {0}", algVal);
}
// issuer Name,
val = der.read();
issuer = new X500DistinguishedName(val.getEncoded());
der.skip(val.getLength());
- debug("read issuer == " + issuer);
+ logger.log (Component.X509, "read issuer == {0}", issuer);
// Validity ::= SEQUENCE {
// notBefore Time,
@@ -643,15 +638,15 @@ public class X509Certificate extends java.security.cert.X509Certificate
throw new IOException("malformed Validity");
}
notBefore = (Date) der.read().getValue();
+ logger.log (Component.X509, "read notBefore == {0}", notBefore);
notAfter = (Date) der.read().getValue();
- debug("read notBefore == " + notBefore);
- debug("read notAfter == " + notAfter);
+ logger.log (Component.X509, "read notAfter == {0}", notAfter);
// subject Name,
val = der.read();
subject = new X500DistinguishedName(val.getEncoded());
der.skip(val.getLength());
- debug("read subject == " + subject);
+ logger.log (Component.X509, "read subject == {0}", subject);
// SubjectPublicKeyInfo ::= SEQUENCE {
// algorithm AlgorithmIdentifier,
@@ -664,7 +659,7 @@ public class X509Certificate extends java.security.cert.X509Certificate
KeyFactory spkFac = KeyFactory.getInstance("X.509");
subjectKey = spkFac.generatePublic(new X509EncodedKeySpec(spki.getEncoded()));
der.skip(spki.getLength());
- debug("read subjectPublicKey == " + subjectKey);
+ logger.log (Component.X509, "read subjectPublicKey == {0}", subjectKey);
if (version > 1)
{
@@ -674,43 +669,50 @@ public class X509Certificate extends java.security.cert.X509Certificate
{
byte[] b = (byte[]) val.getValue();
issuerUniqueId = new BitString(b, 1, b.length-1, b[0] & 0xFF);
- debug("read issuerUniqueId == " + issuerUniqueId);
+ logger.log (Component.X509, "read issuerUniqueId == {0}", issuerUniqueId);
val = der.read();
}
if (version >= 2 && val.getTagClass() != DER.UNIVERSAL && val.getTag() == 2)
{
byte[] b = (byte[]) val.getValue();
subjectUniqueId = new BitString(b, 1, b.length-1, b[0] & 0xFF);
- debug("read subjectUniqueId == " + subjectUniqueId);
+ logger.log (Component.X509, "read subjectUniqueId == {0}", subjectUniqueId);
val = der.read();
}
if (version >= 3 && val.getTagClass() != DER.UNIVERSAL && val.getTag() == 3)
{
val = der.read();
- debug("start Extensions len == " + val.getLength());
+ logger.log (Component.X509, "start Extensions len == {0}",
+ new Integer (val.getLength()));
int len = 0;
while (len < val.getLength())
{
DERValue ext = der.read();
- debug("start extension len == " + ext.getLength());
+ logger.log (Component.X509, "start extension len == {0}",
+ new Integer (ext.getLength()));
Extension e = new Extension(ext.getEncoded());
extensions.put(e.getOid(), e);
der.skip(ext.getLength());
len += ext.getEncodedLength();
- debug("count == " + len);
+ logger.log (Component.X509, "read extension {0} == {1}",
+ new Object[] { e.getOid (), e });
+ logger.log (Component.X509, "count == {0}", new Integer (len));
}
+
+ val = der.read ();
}
- val = der.read();
+ logger.log (Component.X509, "read value {0}", val);
if (!val.isConstructed())
{
- throw new IOException("malformed AlgorithmIdentifier");
+ throw new CertificateException ("malformed AlgorithmIdentifier");
}
int sigAlgLen = val.getLength();
- debug("start AlgorithmIdentifier len == " + sigAlgLen);
+ logger.log (Component.X509, "start AlgorithmIdentifier len == {0}",
+ new Integer (sigAlgLen));
val = der.read();
sigAlgId = (OID) val.getValue();
- debug("read algorithm id == " + sigAlgId);
+ logger.log (Component.X509, "read algorithm id == {0}", sigAlgId);
if (sigAlgLen > val.getEncodedLength())
{
val = der.read();
@@ -735,9 +737,9 @@ public class X509Certificate extends java.security.cert.X509Certificate
{
encoded.skip(val.getLength());
}
- debug("read parameters == " + sigAlgVal);
+ logger.log (Component.X509, "read parameters == {0}", sigAlgVal);
}
signature = ((BitString) der.read().getValue()).toByteArray();
- debug("read signature ==\n" + Util.hexDump(signature, ">>>> "));
+ logger.log (Component.X509, "read signature ==\n{0}", Util.hexDump(signature, ">>>> "));
}
}
diff --git a/gnu/java/security/x509/ext/AuthorityKeyIdentifier.java b/gnu/java/security/x509/ext/AuthorityKeyIdentifier.java
index dafb3ba23..a94b76f09 100644
--- a/gnu/java/security/x509/ext/AuthorityKeyIdentifier.java
+++ b/gnu/java/security/x509/ext/AuthorityKeyIdentifier.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/BasicConstraints.java b/gnu/java/security/x509/ext/BasicConstraints.java
index a51e7a8f0..00f7a6ed2 100644
--- a/gnu/java/security/x509/ext/BasicConstraints.java
+++ b/gnu/java/security/x509/ext/BasicConstraints.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/CRLNumber.java b/gnu/java/security/x509/ext/CRLNumber.java
index 1c3e01e36..36b1c7b5f 100644
--- a/gnu/java/security/x509/ext/CRLNumber.java
+++ b/gnu/java/security/x509/ext/CRLNumber.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/CertificatePolicies.java b/gnu/java/security/x509/ext/CertificatePolicies.java
index 266a4c3c6..50bc6d367 100644
--- a/gnu/java/security/x509/ext/CertificatePolicies.java
+++ b/gnu/java/security/x509/ext/CertificatePolicies.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/ExtendedKeyUsage.java b/gnu/java/security/x509/ext/ExtendedKeyUsage.java
index cd551a99e..37b08acf4 100644
--- a/gnu/java/security/x509/ext/ExtendedKeyUsage.java
+++ b/gnu/java/security/x509/ext/ExtendedKeyUsage.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/Extension.java b/gnu/java/security/x509/ext/Extension.java
index 28a32fecc..5ca9ac3a9 100644
--- a/gnu/java/security/x509/ext/Extension.java
+++ b/gnu/java/security/x509/ext/Extension.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/GeneralNames.java b/gnu/java/security/x509/ext/GeneralNames.java
index 66473ee60..e92aedaef 100644
--- a/gnu/java/security/x509/ext/GeneralNames.java
+++ b/gnu/java/security/x509/ext/GeneralNames.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/IssuerAlternativeNames.java b/gnu/java/security/x509/ext/IssuerAlternativeNames.java
index 7576b6d34..8b017dc62 100644
--- a/gnu/java/security/x509/ext/IssuerAlternativeNames.java
+++ b/gnu/java/security/x509/ext/IssuerAlternativeNames.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/KeyUsage.java b/gnu/java/security/x509/ext/KeyUsage.java
index a6fd77573..dcd98181e 100644
--- a/gnu/java/security/x509/ext/KeyUsage.java
+++ b/gnu/java/security/x509/ext/KeyUsage.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/PolicyConstraint.java b/gnu/java/security/x509/ext/PolicyConstraint.java
index 866f015cd..20cf552a0 100644
--- a/gnu/java/security/x509/ext/PolicyConstraint.java
+++ b/gnu/java/security/x509/ext/PolicyConstraint.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/PolicyMappings.java b/gnu/java/security/x509/ext/PolicyMappings.java
index 81cb88c13..0493ed89d 100644
--- a/gnu/java/security/x509/ext/PolicyMappings.java
+++ b/gnu/java/security/x509/ext/PolicyMappings.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/PrivateKeyUsagePeriod.java b/gnu/java/security/x509/ext/PrivateKeyUsagePeriod.java
index c56cd27cf..3b531c055 100644
--- a/gnu/java/security/x509/ext/PrivateKeyUsagePeriod.java
+++ b/gnu/java/security/x509/ext/PrivateKeyUsagePeriod.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/ReasonCode.java b/gnu/java/security/x509/ext/ReasonCode.java
index d9651652c..a6d59e43a 100644
--- a/gnu/java/security/x509/ext/ReasonCode.java
+++ b/gnu/java/security/x509/ext/ReasonCode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/SubjectAlternativeNames.java b/gnu/java/security/x509/ext/SubjectAlternativeNames.java
index 73f36b1e3..f88e85496 100644
--- a/gnu/java/security/x509/ext/SubjectAlternativeNames.java
+++ b/gnu/java/security/x509/ext/SubjectAlternativeNames.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/SubjectKeyIdentifier.java b/gnu/java/security/x509/ext/SubjectKeyIdentifier.java
index 910decc79..fc65abe21 100644
--- a/gnu/java/security/x509/ext/SubjectKeyIdentifier.java
+++ b/gnu/java/security/x509/ext/SubjectKeyIdentifier.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/ext/package.html b/gnu/java/security/x509/ext/package.html
index 468cf97d6..cc44e55c9 100644
--- a/gnu/java/security/x509/ext/package.html
+++ b/gnu/java/security/x509/ext/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/security/x509/package.html b/gnu/java/security/x509/package.html
index ca04ca9ab..8b0ba0084 100644
--- a/gnu/java/security/x509/package.html
+++ b/gnu/java/security/x509/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/text/AttributedFormatBuffer.java b/gnu/java/text/AttributedFormatBuffer.java
index a02f8a1bc..8cfc8f56d 100644
--- a/gnu/java/text/AttributedFormatBuffer.java
+++ b/gnu/java/text/AttributedFormatBuffer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/text/BaseBreakIterator.java b/gnu/java/text/BaseBreakIterator.java
index 40a698f7c..c28a2089a 100644
--- a/gnu/java/text/BaseBreakIterator.java
+++ b/gnu/java/text/BaseBreakIterator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/text/CharacterBreakIterator.java b/gnu/java/text/CharacterBreakIterator.java
index c973f7b87..5274543a9 100644
--- a/gnu/java/text/CharacterBreakIterator.java
+++ b/gnu/java/text/CharacterBreakIterator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/text/FormatBuffer.java b/gnu/java/text/FormatBuffer.java
index addfcbe5c..e6b682087 100644
--- a/gnu/java/text/FormatBuffer.java
+++ b/gnu/java/text/FormatBuffer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/text/FormatCharacterIterator.java b/gnu/java/text/FormatCharacterIterator.java
index 942641a08..60773aa1e 100644
--- a/gnu/java/text/FormatCharacterIterator.java
+++ b/gnu/java/text/FormatCharacterIterator.java
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,8 +37,6 @@ obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package gnu.java.text;
-import gnu.classpath.Configuration;
-
import java.text.AttributedCharacterIterator;
import java.util.HashMap;
import java.util.HashSet;
@@ -65,7 +63,8 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
private int attributeIndex;
private int[] ranges;
private HashMap[] attributes;
-
+ private static final boolean DEBUG = false;
+
/**
* This constructor builds an empty iterated strings. The attributes
* are empty and so is the string. However you may append strings
@@ -496,7 +495,7 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
private void debug(String s)
{
- if (Configuration.DEBUG)
+ if (DEBUG)
System.out.println(s);
}
@@ -504,7 +503,7 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
{
int start_range = 0;
- if (!Configuration.DEBUG)
+ if (!DEBUG)
return;
System.out.println("Dumping internal table:");
diff --git a/gnu/java/text/LineBreakIterator.java b/gnu/java/text/LineBreakIterator.java
index 7f00a95df..ad07479fb 100644
--- a/gnu/java/text/LineBreakIterator.java
+++ b/gnu/java/text/LineBreakIterator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/text/SentenceBreakIterator.java b/gnu/java/text/SentenceBreakIterator.java
index 3d3958728..f91d269bb 100644
--- a/gnu/java/text/SentenceBreakIterator.java
+++ b/gnu/java/text/SentenceBreakIterator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/text/StringFormatBuffer.java b/gnu/java/text/StringFormatBuffer.java
index ec0ed8641..5772186b4 100644
--- a/gnu/java/text/StringFormatBuffer.java
+++ b/gnu/java/text/StringFormatBuffer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/text/WordBreakIterator.java b/gnu/java/text/WordBreakIterator.java
index 85c44da45..f140369f8 100644
--- a/gnu/java/text/WordBreakIterator.java
+++ b/gnu/java/text/WordBreakIterator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/text/package.html b/gnu/java/text/package.html
index b379b9b3b..a1025a8e9 100644
--- a/gnu/java/text/package.html
+++ b/gnu/java/text/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/util/DoubleEnumeration.java b/gnu/java/util/DoubleEnumeration.java
index a7da80156..94efb923d 100644
--- a/gnu/java/util/DoubleEnumeration.java
+++ b/gnu/java/util/DoubleEnumeration.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/util/EmptyEnumeration.java b/gnu/java/util/EmptyEnumeration.java
index 4e80499c8..46a82d6cb 100644
--- a/gnu/java/util/EmptyEnumeration.java
+++ b/gnu/java/util/EmptyEnumeration.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/util/package.html b/gnu/java/util/package.html
index 446a9c823..d90fa59d4 100644
--- a/gnu/java/util/package.html
+++ b/gnu/java/util/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/util/prefs/FileBasedFactory.java b/gnu/java/util/prefs/FileBasedFactory.java
index fc6085fee..70f3558fc 100644
--- a/gnu/java/util/prefs/FileBasedFactory.java
+++ b/gnu/java/util/prefs/FileBasedFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/util/prefs/MemoryBasedFactory.java b/gnu/java/util/prefs/MemoryBasedFactory.java
index ff21066d3..abaf0016f 100644
--- a/gnu/java/util/prefs/MemoryBasedFactory.java
+++ b/gnu/java/util/prefs/MemoryBasedFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/util/prefs/MemoryBasedPreferences.java b/gnu/java/util/prefs/MemoryBasedPreferences.java
index c1d59c7b1..b2f321c9c 100644
--- a/gnu/java/util/prefs/MemoryBasedPreferences.java
+++ b/gnu/java/util/prefs/MemoryBasedPreferences.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/util/prefs/NodeReader.java b/gnu/java/util/prefs/NodeReader.java
index e343b6b2b..4cd52e5db 100644
--- a/gnu/java/util/prefs/NodeReader.java
+++ b/gnu/java/util/prefs/NodeReader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/util/prefs/NodeWriter.java b/gnu/java/util/prefs/NodeWriter.java
index d570d99af..1eed9e66e 100644
--- a/gnu/java/util/prefs/NodeWriter.java
+++ b/gnu/java/util/prefs/NodeWriter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/java/util/prefs/package.html b/gnu/java/util/prefs/package.html
index b8ed83588..ee5d67f72 100644
--- a/gnu/java/util/prefs/package.html
+++ b/gnu/java/util/prefs/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/rmi/CORBA/DelegateFactory.java b/gnu/javax/rmi/CORBA/DelegateFactory.java
index abd4df040..d71546d75 100644
--- a/gnu/javax/rmi/CORBA/DelegateFactory.java
+++ b/gnu/javax/rmi/CORBA/DelegateFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/rmi/CORBA/GetDelegateInstanceException.java b/gnu/javax/rmi/CORBA/GetDelegateInstanceException.java
index c97e36ab9..7d98bb57b 100644
--- a/gnu/javax/rmi/CORBA/GetDelegateInstanceException.java
+++ b/gnu/javax/rmi/CORBA/GetDelegateInstanceException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java b/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java
index 82681c18d..6a7e6b746 100644
--- a/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java
+++ b/gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/rmi/CORBA/StubDelegateImpl.java b/gnu/javax/rmi/CORBA/StubDelegateImpl.java
index bc2d1f9ce..998d59e33 100644
--- a/gnu/javax/rmi/CORBA/StubDelegateImpl.java
+++ b/gnu/javax/rmi/CORBA/StubDelegateImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/rmi/CORBA/UtilDelegateImpl.java b/gnu/javax/rmi/CORBA/UtilDelegateImpl.java
index 70b2e60c6..7bed2aa22 100644
--- a/gnu/javax/rmi/CORBA/UtilDelegateImpl.java
+++ b/gnu/javax/rmi/CORBA/UtilDelegateImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/rmi/CORBA/ValueHandlerImpl.java b/gnu/javax/rmi/CORBA/ValueHandlerImpl.java
index 6935aa68c..906381fe4 100644
--- a/gnu/javax/rmi/CORBA/ValueHandlerImpl.java
+++ b/gnu/javax/rmi/CORBA/ValueHandlerImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/rmi/PortableServer.java b/gnu/javax/rmi/PortableServer.java
index 0f307aff8..4a841387d 100644
--- a/gnu/javax/rmi/PortableServer.java
+++ b/gnu/javax/rmi/PortableServer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/plaf/gtk/GtkBorders.java b/gnu/javax/swing/plaf/gtk/GtkBorders.java
deleted file mode 100644
index 4c5c72a74..000000000
--- a/gnu/javax/swing/plaf/gtk/GtkBorders.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/* GtkBorders.java
- Copyright (c) 1999 by Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. */
-
-package gnu.javax.swing.plaf.gtk;
-import java.awt.*;
-import javax.swing.*;
-import javax.swing.border.*;
-import javax.swing.plaf.*;
-
-/**
- * Optional class, can be used to define nifty borders.
- *
- * @author Brian Jones
- * @see javax.swing.LookAndFeel
- */
-public class GtkBorders
-{
- public static class ButtonBorder extends AbstractBorder
- implements UIResource
- {
- private Border raised; // use by default
- private Border lowered; // use this one when pressed
-
- // creat the border
- public ButtonBorder()
- {
- raised = BorderFactory.createRaisedBevelBorder();
- lowered = BorderFactory.createLoweredBevelBorder();
- }
-
- // define the insets (in terms of one of the others)
- public Insets getBorderInsets(Component c)
- {
- return raised.getBorderInsets(c);
- }
-
- public void paintBorder(Component c, Graphics g, int x, int y,
- int width, int height)
- {
- AbstractButton b = (AbstractButton)c;
- ButtonModel model = b.getModel();
-
- if (model.isPressed() && model.isArmed())
- lowered.paintBorder(c, g, x, y, width, height);
- else
- raised.paintBorder(c, g, x, y, width, height);
- }
- }
-}
diff --git a/gnu/javax/swing/plaf/gtk/GtkIconFactory.java b/gnu/javax/swing/plaf/gtk/GtkIconFactory.java
deleted file mode 100644
index a86eb1346..000000000
--- a/gnu/javax/swing/plaf/gtk/GtkIconFactory.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/* GtkIconFactory.java
- Copyright (c) 1999 by Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. */
-
-package gnu.javax.swing.plaf.gtk;
-import java.awt.*;
-import javax.swing.*;
-import javax.swing.plaf.*;
-import java.io.Serializable;
-
-/**
- *
- * @author Brian Jones
- * @see javax.swing.LookAndFeel
- */
-public class GtkIconFactory implements Serializable
-{
- private static Icon radioButtonIcon;
- private static Icon checkBoxIcon;
-
- public static Icon getRadioButtonIcon()
- {
- if (radioButtonIcon == null)
- radioButtonIcon = new RadioButtonIcon();
- return radioButtonIcon;
- }
-
- private static class RadioButtonIcon
- implements Icon, UIResource, Serializable
- {
- private static final int size = 15;
-
- public int getIconWidth() { return size; }
- public int getIconHeight() { return size; }
-
- public void paintIcon(Component c, Graphics g, int x, int y)
- {
- System.out.println("radiobuttonicon: paintIcon()");
- // get the button and model containing the state we are
- // supposed to show
- AbstractButton b = (AbstractButton)c;
- ButtonModel model = b.getModel();
-
- // If the button is being pressed (& armed), change the
- // background color
- // Note: could also do something different if the button is
- // disabled
-
- if (model.isPressed() && model.isArmed())
- {
- System.out.println("radiobuttonicon: pressed & armed");
- g.setColor(UIManager.getColor("RadioButton.pressed"));
- g.fillOval(x,y,size-1, size-1);
- }
- // draw an outer circle
- g.setColor(UIManager.getColor("RadioButton.foreground"));
- g.drawOval(x,y,size-1, size-1);
-
- // fill a small circle inside if the button is selected
- if (model.isSelected()) {
- g.fillOval(x+4, y+4, size-8, size-8);
- System.out.println("radiobuttonicon: is selected");
- }
- }
- }
-}
diff --git a/gnu/javax/swing/plaf/gtk/GtkLookAndFeel.java b/gnu/javax/swing/plaf/gtk/GtkLookAndFeel.java
deleted file mode 100644
index 6a8025e39..000000000
--- a/gnu/javax/swing/plaf/gtk/GtkLookAndFeel.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/* GtkLookAndFeel.java
- Copyright (c) 1999 by Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. */
-
-package gnu.javax.swing.plaf.gtk;
-import java.awt.*;
-import javax.swing.*;
-import javax.swing.border.*;
-import javax.swing.plaf.*;
-import javax.swing.plaf.basic.*;
-
-/**
- *
- * @author Brian Jones
- * @see javax.swing.LookAndFeel
- */
-public class GtkLookAndFeel extends BasicLookAndFeel
-{
- private UIDefaults uiDefaults;
-
- /**
- */
- public GtkLookAndFeel()
- {
- super();
- }
-
- /**
- * A short string to identify this look and feel, for example in a
- * drop down list to choose between several look and feels.
- */
- public String getName() { return "GIMP Toolkit"; }
-
- /**
- * A much longer description of the look and feel.
- */
- public String getDescription()
- {
- return new String("The GIMP Toolkit Look and Feel for Java, " +
- "written by Brian Jones (cbj@gnu.org), " +
- "(c) 1999 by Free Software Foundation, Inc. " +
- "http://www.classpath.org");
- }
-
- /**
- * Return a unique string identifying this look and feel as different
- * from and not a subclass of any other look and feel. Usually, a
- * subclass will return the same <code>String</code> here as the
- * original look and feel if only a few changes are being made rather
- * than something completely new and different.
- */
- public String getID()
- {
- return "Gtk";
- }
-
- public boolean isNativeLookAndFeel()
- {
- return false;
- }
-
- public boolean isSupportedLookAndFeel()
- {
- return true;
- }
-
- protected void initClassDefaults(UIDefaults table)
- {
- super.initClassDefaults(table);
-
- String gtkPkgName = "gnu.javax.swing.plaf.gtk.";
-
-
- Object[] defaults = {
- "SliderUI", gtkPkgName + "GtkSliderUI"
- };
- /*
- "CheckBoxUI", gtkPkgName + "GtkCheckBoxUI",
- "ButtonUI", gtkPkgName + "GtkButtonUI"
- "ColorChooserUI", "MetalColorChooserUI",
- "MenuBarUI", "MetalMenuBarUI",
- "MenuUI", "MetalMenuUI",
- "MenuItemUI", "MetalMenuItemUI",
- "CheckBoxMenuItemUI", "MetalCheckBoxMenuItemUI",
- "RadioButtonMenuItemUI", "MetalRadioButtonMenuItemUI",
- "RadioButtonUI", "MetalRadioButtonUI",
- "ToggleButtonUI", "MetalToggleButtonUI",
- "PopupMenuUI", "MetalPopupMenuUI",
- "ProgressBarUI", "MetalProgressBarUI",
- "ScrollBarUI", "MetalScrollBarUI",
- "ScrollPaneUI", "MetalScrollPaneUI",
- "SplitPaneUI", "MetalSplitPaneUI",
- "SeparatorUI", "MetalSeparatorUI",
- "ToolBarSeparatorUI", "MetalToolBarSeparatorUI",
- "PopupMenuSeparatorUI", "MetalPopupMenuSeparatorUI",
- "TabbedPaneUI", "MetalTabbedPaneUI",
- "TextAreaUI", "MetalTextAreaUI",
- "TextFieldUI", "MetalTextFieldUI",
- "PasswordFieldUI", "MetalPasswordFieldUI",
- "TextPaneUI", "MetalTextPaneUI",
- "EditorPaneUI", "MetalEditorPaneUI",
- "TreeUI", "MetalTreeUI",
- "LabelUI", "MetalLabelUI",
- "ListUI", "MetalListUI",
- "ToolBarUI", "MetalToolBarUI",
- "ToolTipUI", "MetalToolTipUI",
- "ComboBoxUI", "MetalComboBoxUI",
- "TableUI", "MetalTableUI",
- "TableHeaderUI", "MetalTableHeaderUI",
- "InternalFrameUI", "GtkInternalFrameUI",
- "StandardDialogUI", "GtkStandardDialogUI",
- "DesktopPaneUI", "GtkDesktopPaneUI",
- "DesktopIconUI", "GtkDesktopIconUI",
- "DirectoryPaneUI", "GtkDirectoryPaneUI",
- "FileChooserUI", "GtkFileChooserUI",
- "OptionPaneUI", "GtkOptionPaneUI" }
- */
- table.putDefaults(defaults);
-
- }
-
- protected void initSystemColorDefaults(UIDefaults table)
- {
- String[] colors = {
- "desktop", "#000000",
- "activeCaption", "#163555",
- "activeCaptionText", "#FFFFFF",
- "activeCaptionBorder", "#000000",
- "inactiveCaption", "#375676",
- "inactiveCaptionText", "#999999",
- "inactiveCaptionBorder", "#000000",
- "window", "#FFFFFF",
- "windowBorder", "#969696",
- "windowText", "#000000",
- "menu", "#d6d6d6",
- "menuText", "#000000",
- "text", "#FFFFFF",
- "textText", "#000000",
- "textHighlight", "#00009c",
- "textHighlightText", "#FFFFFF",
- "textInactiveText", "#999999",
- "control", "#d6d6d6",
- "controlText", "#000000",
- "controlHighlight", "#eaeaea",
- "controlLtHighlight", "#eaeaea",
- "controlShadow", "#c3c3c3",
- "controlDkShadow", "#888888",
- "scrollbar", "#c3c3c3",
- "info", "#d6d6d6",
- "infoText", "#000000"
- };
-
- loadSystemColors(table, colors, false);
- }
-
- protected void initComponentDefaults(UIDefaults table)
- {
- super.initComponentDefaults(table);
-
- // define common resources
- // fonts
- FontUIResource sansSerifPlain10 =
- new FontUIResource("SansSerif", Font.PLAIN, 10);
- FontUIResource serifPlain10 =
- new FontUIResource("Serif", Font.PLAIN, 10);
- // insets
- // borders
- // colors
- ColorUIResource controlDkShadow = new ColorUIResource(table.getColor("controlDkShadow"));
- ColorUIResource controlShadow = new ColorUIResource(table.getColor("controlShadow"));
- ColorUIResource control = new ColorUIResource(table.getColor("control"));
- ColorUIResource scrollbar = new ColorUIResource(table.getColor("scrollbar"));
- ColorUIResource controlHighlight = new ColorUIResource(table.getColor("controlHighlight"));
- if (scrollbar == null)
- System.out.println("scrollbar is null");
-
- ColorUIResource white = new ColorUIResource(Color.white);
- ColorUIResource black = new ColorUIResource(Color.black);
- ColorUIResource blue = new ColorUIResource(Color.blue);
-
- // icons
- Object errorIcon = LookAndFeel.makeIcon(getClass(), "icons/error.gif");
- // any other resources like dimensions and integer values
-
- // define defaults
- Object[] defaults =
- {
- "Button.font", sansSerifPlain10,
- "CheckBox.font", sansSerifPlain10,
- "RadioButton.pressed", black,
- "Slider.focus", blue,
- "Slider.foreground", control,
- "Slider.highlight", controlHighlight,
- "Slider.shadow", controlShadow,
- "Slider.background", controlDkShadow
-
-// "Slider.background", "#888888",
-// "Slider.focus", "#c3c3c3",
-// "Slider.foreground", "#d6d6d6",
-// "Slider.highlight", "#ffffff",
-// "Slider.shadow", "#000000"
-
-
- };
-
- table.putDefaults(defaults);
- }
-}
diff --git a/gnu/javax/swing/plaf/gtk/GtkSliderUI.java b/gnu/javax/swing/plaf/gtk/GtkSliderUI.java
deleted file mode 100644
index ade7e380a..000000000
--- a/gnu/javax/swing/plaf/gtk/GtkSliderUI.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/* GtkSliderUI.java
- Copyright (c) 1999 by Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. */
-
-package gnu.javax.swing.plaf.gtk;
-import java.awt.*;
-import javax.swing.*;
-import javax.swing.plaf.*;
-import javax.swing.plaf.basic.*;
-
-/**
- * Gtk-like slider
- *
- * @author Brian Jones
- * @see javax.swing.LookAndFeel
- */
-public class GtkSliderUI extends BasicSliderUI
-{
- private static Color thumbFgColor;
- private static Color thumbBgColor;
- private static Color thumbHighlight;
- private static Color thumbFocus;
-
- private static Color bgColor;
- private static Color fgColor;
- private static Color focusColor;
- private static Color highlight;
- private static Color shadow;
-
- private static final Dimension PREF_HORIZ = new Dimension(250, 15);
- private static final Dimension PREF_VERT = new Dimension(15, 250);
- private static final Dimension MIN_HORIZ = new Dimension(25, 15);
- private static final Dimension MIN_VERT = new Dimension(15, 25);
-
- public GtkSliderUI()
- {
- super(null);
- bgColor = UIManager.getColor("Slider.background");
- fgColor = UIManager.getColor("Slider.foreground");
- focusColor = UIManager.getColor("Slider.focus");
- highlight = UIManager.getColor("Slider.highlight");
- shadow = UIManager.getColor("Slider.shadow");
-
- System.out.println("bgColor: " + bgColor);
- System.out.println("fgColor: " + fgColor);
- System.out.println("focusColor: " + focusColor);
- System.out.println("highlight: " + highlight);
- System.out.println("shadow: " + shadow);
- }
-
- public static ComponentUI createUI(JComponent c)
- {
- return new GtkSliderUI();
- }
-
- // methods not overridden here, using Basic defaults
- // installUI()
- // uninstall()
-
- public Dimension getPreferredHorizontalSize()
- {
- /*
- Dimension thumbSize = getThumbSize();
- Dimenstion labelSize = getLabelSize();
- // getTickLength()
- int width = thumbSize.width +
- getWidthOfWidestLabel
- */
- return PREF_HORIZ;
- }
-
- public Dimension getPreferredVerticalSize()
- {
- return PREF_VERT;
- }
-
- public Dimension getMinimumHorizontalSize()
- {
- return MIN_HORIZ;
- }
-
- public Dimension getMinimumVerticalSize()
- {
- return MIN_VERT;
- }
-
- /**
- * Returns thumb size based on slider orientation
- */
- protected Dimension getThumbSize()
- {
- Dimension size = new Dimension();
-
- if (slider.getOrientation() == JSlider.VERTICAL) {
- size.width = 15;
- size.height = 33;
- }
- else {
- size.width = 33;
- size.height = 15;
- }
- return size;
- }
-
- /**
- * Reserved width or height for ticks, as appropriate to the slider
- * orientation.
- */
- protected int getTickLength()
- {
- return 10;
- }
-
- public void paintFocus(Graphics g)
- {
- super.paintFocus(g);
- System.err.println("focus " + focusRect);
- }
-
- /**
- * Must account for Unicode when drawing text.
- */
- public void paintLabels(Graphics g)
- {
- super.paintLabels(g);
- System.err.println("label " + labelRect);
- }
-
- /**
- * A drawRect() generated slider has ghosting when moving left on
- * a horizontal slider and the bottom is not painted when moving
- * right.
- */
- public void paintThumb(Graphics g)
- {
- int x = thumbRect.x;
- int y = thumbRect.y;
- int h = thumbRect.height;
- int w = thumbRect.width;
-
-// "Slider.background", "#888888",
-// "Slider.focus", "#c3c3c3",
-// "Slider.foreground", "#d6d6d6",
-// "Slider.highlight", "#ffffff",
-// "Slider.shadow", "#000000"
-
- g.setColor(fgColor);
- g.fillRect(x,y,w,h);
- g.setColor(bgColor);
-
- if (slider.getOrientation() == JSlider.HORIZONTAL) {
- g.drawRect(x, y, w, h);
- g.setColor(highlight);
- g.drawLine(x+1, y+h-1, x+w, y+h-1);
- g.setColor(focusColor);
- g.drawLine(x+2, y+h-2, x+w, y+h-2);
- g.setColor(Color.black);
- g.drawLine(x+1, y+h-2, x+1, y+h-2);
- g.drawRect(x+1, y+1, w-1, 12);
- }
- else
- g.drawRect(x, y, w, h);
-
- System.err.println("thumb " + thumbRect);
- }
-
- // public void paintTicks(Graphics g)
-
- public void paintTrack(Graphics g)
- {
-// super.paintTrack(g);
- int x = trackRect.x;
- int y = trackRect.y;
- int h = trackRect.height;
- int w = trackRect.width;
-
- System.err.println("track " + trackRect);
-
- g.setColor(Color.black);
- g.fillRect(x,y,w,h);
-
-// if (slider.getOrientation() == JSlider.HORIZONTAL)
-// g.drawLine(x, y+h-1, x+w-1, y+h-1);
-// else
-// g.drawLine(x+w-1, y, x+w-1, y+h-1);
-
-// System.err.println("track " + trackRect);
-// System.err.println("content " + contentRect);
- }
-
- // the four methods below allow you to control tick painting without
- // worrying about what paintTicks does, look for in other UI delegates
- // protected void paintMajorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
- // protected void paintMajorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
- // protected void paintMinorTickForHorizSlider(Graphics g, Rectangle tickBounds, int x)
- // protected void paintMinorTickForVertSlider(Graphics g, Rectangle tickBounds, int y)
-}
diff --git a/gnu/javax/swing/plaf/gtk/README b/gnu/javax/swing/plaf/gtk/README
deleted file mode 100644
index 2b3f001dd..000000000
--- a/gnu/javax/swing/plaf/gtk/README
+++ /dev/null
@@ -1,37 +0,0 @@
-This is a start at a GTK look and feel for Java.
-It is usable already, but it mainly just defaults back to Basic Look and
-Feel for everything.
-
-Sliders are currently broken. I haven't figured out why yet.
-
-A bunch of system colors defined in GtkLookandFeel though I have a feeling
-I'll be defining more ColorUIResources shortly.
-
-Based on Gnome File Manager colors... or my Window Manager setup
-
-desktop #000000 (gtk)
-activeCaption #163555 (window manager)
-activeCaptionText #FFFFFF (window manager)
-activeCaptionBorder #000000 (unsure of this)
-inactiveCaption #375676 (window manager)
-inactiveCaptionText #999999 (window manager)
-inactiveCaptionBorder #000000 (unsure of this)
-window #FFFFFF (gtk)
-windowBorder #969696 (gtk)
-windowText #000000 (gtk)
-menu #d6d6d6 (gtk)
-menuText #000000 (gtk)
-text #FFFFFF (gtk)
-textText #000000 (gtk)
-textHighlight #00009c (gtk)
-textHighlightText #FFFFFF (gtk)
-textInactiveText #999999 (unsure of this)
-control #d6d6d6 (gtk)
-controlText #000000 (gtk)
-controlHighlight #eaeaea (gtk)
-controlLtHighlight #eaeaea (unsure of this)
-controlShadow #c3c3c3 (gtk)
-controlDkShadow #888888 (unsure of this)
-scrollbar #c3c3c3 (gtk)
-info #d6d6d6 (gtk)
-infoText #000000 (gtk)
diff --git a/gnu/javax/swing/plaf/gtk/SliderTest.java b/gnu/javax/swing/plaf/gtk/SliderTest.java
deleted file mode 100644
index a83844492..000000000
--- a/gnu/javax/swing/plaf/gtk/SliderTest.java
+++ /dev/null
@@ -1,82 +0,0 @@
-import javax.swing.*;
-import javax.swing.event.*;
-import java.awt.*;
-import java.awt.event.*;
-import gnu.javax.swing.plaf.gtk.*;
-
-public class SliderTest extends JFrame
-{
- public SliderTest()
- {
- super("JSlider Test");
- Container c = getContentPane();
- c.setLayout(new BorderLayout());
- this.addWindowListener(new WindowAdapter() {
- public void windowClosing(WindowEvent e) { System.exit(0); }
- });
-
- JSlider s = new JSlider();
- s.createStandardLabels(10);
- s.setMinorTickSpacing(10);
- s.setMajorTickSpacing(20);
- s.setPaintTicks(true);
- s.setPaintTrack(true);
- s.setPaintLabels(true);
- s.setRequestFocusEnabled(true);
-
- // turning off double buffering in repaint manager
- // in order to use debug graphics
- RepaintManager repaintManager = RepaintManager.currentManager(s);
- repaintManager.setDoubleBufferingEnabled(false);
-
- s.setDebugGraphicsOptions(DebugGraphics.BUFFERED_OPTION | DebugGraphics.FLASH_OPTION);
- DebugGraphics.setFlashColor(Color.red); // color of flash
- DebugGraphics.setFlashTime(4); // time delay of drawing operation flashing
- DebugGraphics.setFlashCount(3); // number of time to draw
-
- this.setSize(250, 100);
- c.add(new JLabel("Default Slider"), "North");
- c.add(s, "Center");
-
- try {
- UIManager.setLookAndFeel("gnu.javax.swing.plaf.gtk.GtkLookAndFeel");
- SwingUtilities.updateComponentTreeUI(this);
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(0);
- }
-
- center();
- }
-
- public void actionPerformed(ActionEvent e) {
- System.exit(0);
- }
-
- public void center()
- {
- // Centering the frame
- Toolkit t = this.getToolkit();
- Dimension framesize = this.getSize();
- Dimension screensize = t.getScreenSize();
-
- // Calculate point for frame (main)
- Point pframe = new Point();
- pframe.x = (screensize.width - framesize.width) / 2;
- pframe.y = (screensize.height - framesize.height) / 2;
-
- // Set the location of each to be centered
- this.setLocation(pframe);
- }
-
- public static void main(String [] argv)
- {
- SliderTest t = new SliderTest();
- t.show();
- }
-
-}
-
-
-
-
diff --git a/gnu/javax/swing/text/html/package.html b/gnu/javax/swing/text/html/package.html
index 622c4fcc1..c7e774428 100644
--- a/gnu/javax/swing/text/html/package.html
+++ b/gnu/javax/swing/text/html/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/HTML_401F.java b/gnu/javax/swing/text/html/parser/HTML_401F.java
index bd2f9f9f8..1ed42a2ab 100644
--- a/gnu/javax/swing/text/html/parser/HTML_401F.java
+++ b/gnu/javax/swing/text/html/parser/HTML_401F.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/gnuDTD.java b/gnu/javax/swing/text/html/parser/gnuDTD.java
index 24d800af2..1f4b3ec6a 100644
--- a/gnu/javax/swing/text/html/parser/gnuDTD.java
+++ b/gnu/javax/swing/text/html/parser/gnuDTD.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/htmlAttributeSet.java b/gnu/javax/swing/text/html/parser/htmlAttributeSet.java
index f42b46328..a4e6f73c5 100644
--- a/gnu/javax/swing/text/html/parser/htmlAttributeSet.java
+++ b/gnu/javax/swing/text/html/parser/htmlAttributeSet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/htmlValidator.java b/gnu/javax/swing/text/html/parser/htmlValidator.java
index 456e008a0..b70f15ded 100644
--- a/gnu/javax/swing/text/html/parser/htmlValidator.java
+++ b/gnu/javax/swing/text/html/parser/htmlValidator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/models/PCDATAonly_model.java b/gnu/javax/swing/text/html/parser/models/PCDATAonly_model.java
index 4bfc3b960..5a19a1bc1 100644
--- a/gnu/javax/swing/text/html/parser/models/PCDATAonly_model.java
+++ b/gnu/javax/swing/text/html/parser/models/PCDATAonly_model.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/models/TableRowContentModel.java b/gnu/javax/swing/text/html/parser/models/TableRowContentModel.java
index 1a803d547..14514d584 100644
--- a/gnu/javax/swing/text/html/parser/models/TableRowContentModel.java
+++ b/gnu/javax/swing/text/html/parser/models/TableRowContentModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/models/list.java b/gnu/javax/swing/text/html/parser/models/list.java
index 1fa16d965..b77ef7fd8 100644
--- a/gnu/javax/swing/text/html/parser/models/list.java
+++ b/gnu/javax/swing/text/html/parser/models/list.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/models/noTagModel.java b/gnu/javax/swing/text/html/parser/models/noTagModel.java
index 7ac58f050..8aac14d8e 100644
--- a/gnu/javax/swing/text/html/parser/models/noTagModel.java
+++ b/gnu/javax/swing/text/html/parser/models/noTagModel.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/models/node.java b/gnu/javax/swing/text/html/parser/models/node.java
index 42505d0be..c615ddff3 100644
--- a/gnu/javax/swing/text/html/parser/models/node.java
+++ b/gnu/javax/swing/text/html/parser/models/node.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/models/package.html b/gnu/javax/swing/text/html/parser/models/package.html
index 60719d0cc..18e61aede 100644
--- a/gnu/javax/swing/text/html/parser/models/package.html
+++ b/gnu/javax/swing/text/html/parser/models/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/models/transformer.java b/gnu/javax/swing/text/html/parser/models/transformer.java
index c8c4a2544..22ae3c3fa 100644
--- a/gnu/javax/swing/text/html/parser/models/transformer.java
+++ b/gnu/javax/swing/text/html/parser/models/transformer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/package.html b/gnu/javax/swing/text/html/parser/package.html
index 7fa699530..cd050f9c2 100644
--- a/gnu/javax/swing/text/html/parser/package.html
+++ b/gnu/javax/swing/text/html/parser/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/Parser.java b/gnu/javax/swing/text/html/parser/support/Parser.java
index 1e5147a47..cef94942e 100644
--- a/gnu/javax/swing/text/html/parser/support/Parser.java
+++ b/gnu/javax/swing/text/html/parser/support/Parser.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/gnuStringIntMapper.java b/gnu/javax/swing/text/html/parser/support/gnuStringIntMapper.java
index 2887bac0a..9cdf810dd 100644
--- a/gnu/javax/swing/text/html/parser/support/gnuStringIntMapper.java
+++ b/gnu/javax/swing/text/html/parser/support/gnuStringIntMapper.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/low/Buffer.java b/gnu/javax/swing/text/html/parser/support/low/Buffer.java
index b9e8edc13..a39330af8 100644
--- a/gnu/javax/swing/text/html/parser/support/low/Buffer.java
+++ b/gnu/javax/swing/text/html/parser/support/low/Buffer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/low/Constants.java b/gnu/javax/swing/text/html/parser/support/low/Constants.java
index 367dd0396..283d32385 100644
--- a/gnu/javax/swing/text/html/parser/support/low/Constants.java
+++ b/gnu/javax/swing/text/html/parser/support/low/Constants.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/low/Location.java b/gnu/javax/swing/text/html/parser/support/low/Location.java
index 5a0f2046f..8a1cde1c8 100644
--- a/gnu/javax/swing/text/html/parser/support/low/Location.java
+++ b/gnu/javax/swing/text/html/parser/support/low/Location.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/low/ParseException.java b/gnu/javax/swing/text/html/parser/support/low/ParseException.java
index 9f1094e62..e71c0c1f6 100644
--- a/gnu/javax/swing/text/html/parser/support/low/ParseException.java
+++ b/gnu/javax/swing/text/html/parser/support/low/ParseException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/low/Queue.java b/gnu/javax/swing/text/html/parser/support/low/Queue.java
index 30890e4eb..31cf4bb4d 100644
--- a/gnu/javax/swing/text/html/parser/support/low/Queue.java
+++ b/gnu/javax/swing/text/html/parser/support/low/Queue.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/low/ReaderTokenizer.java b/gnu/javax/swing/text/html/parser/support/low/ReaderTokenizer.java
index f354bec6e..0ffc6c8b7 100644
--- a/gnu/javax/swing/text/html/parser/support/low/ReaderTokenizer.java
+++ b/gnu/javax/swing/text/html/parser/support/low/ReaderTokenizer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/low/Token.java b/gnu/javax/swing/text/html/parser/support/low/Token.java
index c298d7817..d91adf47a 100644
--- a/gnu/javax/swing/text/html/parser/support/low/Token.java
+++ b/gnu/javax/swing/text/html/parser/support/low/Token.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/low/node.java b/gnu/javax/swing/text/html/parser/support/low/node.java
index 981166562..b54ed86a3 100644
--- a/gnu/javax/swing/text/html/parser/support/low/node.java
+++ b/gnu/javax/swing/text/html/parser/support/low/node.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/low/package.html b/gnu/javax/swing/text/html/parser/support/low/package.html
index a4ae57bff..173583015 100644
--- a/gnu/javax/swing/text/html/parser/support/low/package.html
+++ b/gnu/javax/swing/text/html/parser/support/low/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/low/pattern.java b/gnu/javax/swing/text/html/parser/support/low/pattern.java
index ac82a2050..0fe03fdbe 100644
--- a/gnu/javax/swing/text/html/parser/support/low/pattern.java
+++ b/gnu/javax/swing/text/html/parser/support/low/pattern.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/package.html b/gnu/javax/swing/text/html/parser/support/package.html
index 35071ed00..97c6439b3 100644
--- a/gnu/javax/swing/text/html/parser/support/package.html
+++ b/gnu/javax/swing/text/html/parser/support/package.html
@@ -16,8 +16,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/parameterDefaulter.java b/gnu/javax/swing/text/html/parser/support/parameterDefaulter.java
index 4b4878a79..654acbbb5 100644
--- a/gnu/javax/swing/text/html/parser/support/parameterDefaulter.java
+++ b/gnu/javax/swing/text/html/parser/support/parameterDefaulter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/javax/swing/text/html/parser/support/textPreProcessor.java b/gnu/javax/swing/text/html/parser/support/textPreProcessor.java
index 20af8f635..cc1610585 100644
--- a/gnu/javax/swing/text/html/parser/support/textPreProcessor.java
+++ b/gnu/javax/swing/text/html/parser/support/textPreProcessor.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/CharIndexed.java b/gnu/regexp/CharIndexed.java
index eb1be13fd..a0d7106ae 100644
--- a/gnu/regexp/CharIndexed.java
+++ b/gnu/regexp/CharIndexed.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/CharIndexedCharArray.java b/gnu/regexp/CharIndexedCharArray.java
index dc488ba44..63d858c87 100644
--- a/gnu/regexp/CharIndexedCharArray.java
+++ b/gnu/regexp/CharIndexedCharArray.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/CharIndexedInputStream.java b/gnu/regexp/CharIndexedInputStream.java
index 7faeb3810..145fe11b1 100644
--- a/gnu/regexp/CharIndexedInputStream.java
+++ b/gnu/regexp/CharIndexedInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/CharIndexedString.java b/gnu/regexp/CharIndexedString.java
index adff7ac71..05be07ac6 100644
--- a/gnu/regexp/CharIndexedString.java
+++ b/gnu/regexp/CharIndexedString.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/CharIndexedStringBuffer.java b/gnu/regexp/CharIndexedStringBuffer.java
index 2eb8c23f3..1b88e3985 100644
--- a/gnu/regexp/CharIndexedStringBuffer.java
+++ b/gnu/regexp/CharIndexedStringBuffer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/RE.java b/gnu/regexp/RE.java
index b845fc88a..16427c756 100644
--- a/gnu/regexp/RE.java
+++ b/gnu/regexp/RE.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -629,20 +629,29 @@ public class RE extends REToken {
currentToken = setRepeated(currentToken,0,Integer.MAX_VALUE,index);
}
- // ONE-OR-MORE REPEAT OPERATOR
+ // ONE-OR-MORE REPEAT OPERATOR / POSSESSIVE MATCHING OPERATOR
// + | \+ depending on RE_BK_PLUS_QM
// not available if RE_LIMITED_OPS is set
else if ((unit.ch == '+') && !syntax.get(RESyntax.RE_LIMITED_OPS) && (!syntax.get(RESyntax.RE_BK_PLUS_QM) ^ (unit.bk || quot))) {
if (currentToken == null)
throw new REException(getLocalizedMessage("repeat.no.token"),REException.REG_BADRPT,index);
- if (currentToken instanceof RETokenRepeated)
- throw new REException(getLocalizedMessage("repeat.chained"),REException.REG_BADRPT,index);
- if (currentToken instanceof RETokenWordBoundary || currentToken instanceof RETokenWordBoundary)
+
+ // Check for possessive matching on RETokenRepeated
+ if (currentToken instanceof RETokenRepeated) {
+ RETokenRepeated tokenRep = (RETokenRepeated)currentToken;
+ if (syntax.get(RESyntax.RE_POSSESSIVE_OPS) && !tokenRep.isPossessive() && !tokenRep.isStingy())
+ tokenRep.makePossessive();
+ else
+ throw new REException(getLocalizedMessage("repeat.chained"),REException.REG_BADRPT,index);
+
+ }
+ else if (currentToken instanceof RETokenWordBoundary || currentToken instanceof RETokenWordBoundary)
throw new REException(getLocalizedMessage("repeat.assertion"),REException.REG_BADRPT,index);
- if (currentToken.getMinimumLength() == 0)
+ else if (currentToken.getMinimumLength() == 0)
throw new REException(getLocalizedMessage("repeat.empty.token"),REException.REG_BADRPT,index);
- currentToken = setRepeated(currentToken,1,Integer.MAX_VALUE,index);
+ else
+ currentToken = setRepeated(currentToken,1,Integer.MAX_VALUE,index);
}
// ZERO-OR-ONE REPEAT OPERATOR / STINGY MATCHING OPERATOR
@@ -655,13 +664,14 @@ public class RE extends REToken {
// Check for stingy matching on RETokenRepeated
if (currentToken instanceof RETokenRepeated) {
- if (syntax.get(RESyntax.RE_STINGY_OPS) && !((RETokenRepeated)currentToken).isStingy())
- ((RETokenRepeated)currentToken).makeStingy();
- else
- throw new REException(getLocalizedMessage("repeat.chained"),REException.REG_BADRPT,index);
- }
- else if (currentToken instanceof RETokenWordBoundary || currentToken instanceof RETokenWordBoundary)
- throw new REException(getLocalizedMessage("repeat.assertion"),REException.REG_BADRPT,index);
+ RETokenRepeated tokenRep = (RETokenRepeated)currentToken;
+ if (syntax.get(RESyntax.RE_STINGY_OPS) && !tokenRep.isStingy() && !tokenRep.isPossessive())
+ tokenRep.makeStingy();
+ else
+ throw new REException(getLocalizedMessage("repeat.chained"),REException.REG_BADRPT,index);
+ }
+ else if (currentToken instanceof RETokenWordBoundary || currentToken instanceof RETokenWordBoundary)
+ throw new REException(getLocalizedMessage("repeat.assertion"),REException.REG_BADRPT,index);
else
currentToken = setRepeated(currentToken,0,1,index);
}
diff --git a/gnu/regexp/REException.java b/gnu/regexp/REException.java
index a10d2fc71..73f86fa8a 100644
--- a/gnu/regexp/REException.java
+++ b/gnu/regexp/REException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/REFilterInputStream.java b/gnu/regexp/REFilterInputStream.java
index f56a9a2a9..485de5660 100644
--- a/gnu/regexp/REFilterInputStream.java
+++ b/gnu/regexp/REFilterInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/REMatch.java b/gnu/regexp/REMatch.java
index ac6c80e91..cf25bb331 100644
--- a/gnu/regexp/REMatch.java
+++ b/gnu/regexp/REMatch.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/REMatchEnumeration.java b/gnu/regexp/REMatchEnumeration.java
index c8e208a94..f164a69af 100644
--- a/gnu/regexp/REMatchEnumeration.java
+++ b/gnu/regexp/REMatchEnumeration.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/RESyntax.java b/gnu/regexp/RESyntax.java
index 649bd0df5..7272b0348 100644
--- a/gnu/regexp/RESyntax.java
+++ b/gnu/regexp/RESyntax.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -197,7 +197,12 @@ public final class RESyntax implements Serializable {
*/
public static final int RE_CHAR_CLASS_ESC_IN_LISTS = 24;
- private static final int BIT_TOTAL = 25;
+ /**
+ * Syntax bit. Possessive matching is allowed (++, *+, ?+, {x,y}+).
+ */
+ public static final int RE_POSSESSIVE_OPS = 25;
+
+ private static final int BIT_TOTAL = 26;
/**
* Predefined syntax.
@@ -425,6 +430,7 @@ public final class RESyntax implements Serializable {
RE_SYNTAX_JAVA_1_4 = new RESyntax(RE_SYNTAX_PERL5)
// XXX
+ .set(RE_POSSESSIVE_OPS) // *+,?+,++,{}+
.makeFinal();
}
diff --git a/gnu/regexp/REToken.java b/gnu/regexp/REToken.java
index aa576a5ad..4eae9ec47 100644
--- a/gnu/regexp/REToken.java
+++ b/gnu/regexp/REToken.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/RETokenAny.java b/gnu/regexp/RETokenAny.java
index 42fdd9e28..ac032dcb3 100644
--- a/gnu/regexp/RETokenAny.java
+++ b/gnu/regexp/RETokenAny.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/RETokenBackRef.java b/gnu/regexp/RETokenBackRef.java
index a811e16a7..674822abd 100644
--- a/gnu/regexp/RETokenBackRef.java
+++ b/gnu/regexp/RETokenBackRef.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/RETokenChar.java b/gnu/regexp/RETokenChar.java
index 17712e347..a15449b2d 100644
--- a/gnu/regexp/RETokenChar.java
+++ b/gnu/regexp/RETokenChar.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/RETokenEnd.java b/gnu/regexp/RETokenEnd.java
index 08e57084d..70483b746 100644
--- a/gnu/regexp/RETokenEnd.java
+++ b/gnu/regexp/RETokenEnd.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/RETokenEndSub.java b/gnu/regexp/RETokenEndSub.java
index 913d3f85c..f3bb4f2e1 100644
--- a/gnu/regexp/RETokenEndSub.java
+++ b/gnu/regexp/RETokenEndSub.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/RETokenLookAhead.java b/gnu/regexp/RETokenLookAhead.java
index 650bb351b..33eaec9fa 100644
--- a/gnu/regexp/RETokenLookAhead.java
+++ b/gnu/regexp/RETokenLookAhead.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/RETokenOneOf.java b/gnu/regexp/RETokenOneOf.java
index 7752b2577..3f6e89e21 100644
--- a/gnu/regexp/RETokenOneOf.java
+++ b/gnu/regexp/RETokenOneOf.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/RETokenPOSIX.java b/gnu/regexp/RETokenPOSIX.java
index 00fcf301a..bbb8066bc 100644
--- a/gnu/regexp/RETokenPOSIX.java
+++ b/gnu/regexp/RETokenPOSIX.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/RETokenRange.java b/gnu/regexp/RETokenRange.java
index 9ce3be926..dadaf2d80 100644
--- a/gnu/regexp/RETokenRange.java
+++ b/gnu/regexp/RETokenRange.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/RETokenRepeated.java b/gnu/regexp/RETokenRepeated.java
index 8c7892712..3165a6f16 100644
--- a/gnu/regexp/RETokenRepeated.java
+++ b/gnu/regexp/RETokenRepeated.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -44,6 +44,7 @@ final class RETokenRepeated extends REToken {
private REToken token;
private int min,max;
private boolean stingy;
+ private boolean possessive;
RETokenRepeated(int subIndex, REToken token, int min, int max) {
super(subIndex);
@@ -61,6 +62,16 @@ final class RETokenRepeated extends REToken {
boolean isStingy() {
return stingy;
}
+
+ /** Sets possessive matching mode to true. */
+ void makePossessive() {
+ possessive = true;
+ }
+
+ /** Queries if this token has possessive matching enabled. */
+ boolean isPossessive() {
+ return possessive;
+ }
/**
* The minimum length of a repeated token is the minimum length
@@ -172,6 +183,8 @@ final class RETokenRepeated extends REToken {
}
}
// else did not match rest of the tokens, try again on smaller sample
+ // or break out when performing possessive matching
+ if (possessive) break;
}
if (allResults != null) {
mymatch.assignFrom(allResults); // does this get all?
diff --git a/gnu/regexp/RETokenStart.java b/gnu/regexp/RETokenStart.java
index 8adb8c89c..8f7198237 100644
--- a/gnu/regexp/RETokenStart.java
+++ b/gnu/regexp/RETokenStart.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/RETokenWordBoundary.java b/gnu/regexp/RETokenWordBoundary.java
index 38baaec13..6804151e2 100644
--- a/gnu/regexp/RETokenWordBoundary.java
+++ b/gnu/regexp/RETokenWordBoundary.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/regexp/UncheckedRE.java b/gnu/regexp/UncheckedRE.java
index 660466eab..e67121138 100644
--- a/gnu/regexp/UncheckedRE.java
+++ b/gnu/regexp/UncheckedRE.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/test/Fail.java b/gnu/test/Fail.java
index e3f181491..f1c4a0cd2 100644
--- a/gnu/test/Fail.java
+++ b/gnu/test/Fail.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/test/Pass.java b/gnu/test/Pass.java
index 0afc35e4b..abec54ef6 100644
--- a/gnu/test/Pass.java
+++ b/gnu/test/Pass.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/test/Result.java b/gnu/test/Result.java
index ec80f8e76..908d4b485 100644
--- a/gnu/test/Result.java
+++ b/gnu/test/Result.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/test/Test.java b/gnu/test/Test.java
index bc58f546f..6b2e18df1 100644
--- a/gnu/test/Test.java
+++ b/gnu/test/Test.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/test/Unresolved.java b/gnu/test/Unresolved.java
index 35d507d5c..280d8b699 100644
--- a/gnu/test/Unresolved.java
+++ b/gnu/test/Unresolved.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/test/Unsupported.java b/gnu/test/Unsupported.java
index 5e31e5553..c6dabb09a 100644
--- a/gnu/test/Unsupported.java
+++ b/gnu/test/Unsupported.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/test/Untested.java b/gnu/test/Untested.java
index e56937856..5627fa8ca 100644
--- a/gnu/test/Untested.java
+++ b/gnu/test/Untested.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/test/XFail.java b/gnu/test/XFail.java
index c784095e3..793ff117f 100644
--- a/gnu/test/XFail.java
+++ b/gnu/test/XFail.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/test/XPass.java b/gnu/test/XPass.java
index 7e8d2bc04..b41dd1c37 100644
--- a/gnu/test/XPass.java
+++ b/gnu/test/XPass.java
@@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/aelfred2/ContentHandler2.java b/gnu/xml/aelfred2/ContentHandler2.java
index 7bb1e7dcd..151613835 100644
--- a/gnu/xml/aelfred2/ContentHandler2.java
+++ b/gnu/xml/aelfred2/ContentHandler2.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/aelfred2/JAXPFactory.java b/gnu/xml/aelfred2/JAXPFactory.java
index ff585a82a..37e8cc9c1 100644
--- a/gnu/xml/aelfred2/JAXPFactory.java
+++ b/gnu/xml/aelfred2/JAXPFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/aelfred2/SAXDriver.java b/gnu/xml/aelfred2/SAXDriver.java
index 003a73620..7e950ce04 100644
--- a/gnu/xml/aelfred2/SAXDriver.java
+++ b/gnu/xml/aelfred2/SAXDriver.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/aelfred2/XmlParser.java b/gnu/xml/aelfred2/XmlParser.java
index b29849217..f2abb8896 100644
--- a/gnu/xml/aelfred2/XmlParser.java
+++ b/gnu/xml/aelfred2/XmlParser.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -1437,7 +1437,7 @@ loop:
}
else
{
- if (type.equals("CDATA") || type == null)
+ if (type == null || type.equals("CDATA"))
{
value = readLiteral(flags);
}
@@ -4559,7 +4559,7 @@ loop:
encoding.substring(temp + 1,
encoding.indexOf('"', temp + 2));
}
- encoding.trim();
+ encoding = encoding.trim();
}
else
{
diff --git a/gnu/xml/aelfred2/XmlReader.java b/gnu/xml/aelfred2/XmlReader.java
index dacf8b103..a3bd03a86 100644
--- a/gnu/xml/aelfred2/XmlReader.java
+++ b/gnu/xml/aelfred2/XmlReader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/Consumer.java b/gnu/xml/dom/Consumer.java
index 426b1e5da..f99e221e9 100644
--- a/gnu/xml/dom/Consumer.java
+++ b/gnu/xml/dom/Consumer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DTDAttributeTypeInfo.java b/gnu/xml/dom/DTDAttributeTypeInfo.java
index 53e5fbdde..e3c69c43e 100644
--- a/gnu/xml/dom/DTDAttributeTypeInfo.java
+++ b/gnu/xml/dom/DTDAttributeTypeInfo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DTDElementTypeInfo.java b/gnu/xml/dom/DTDElementTypeInfo.java
index 535ea3ca5..c5553e20e 100644
--- a/gnu/xml/dom/DTDElementTypeInfo.java
+++ b/gnu/xml/dom/DTDElementTypeInfo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomAttr.java b/gnu/xml/dom/DomAttr.java
index 555902e3e..8673a7961 100644
--- a/gnu/xml/dom/DomAttr.java
+++ b/gnu/xml/dom/DomAttr.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomCDATASection.java b/gnu/xml/dom/DomCDATASection.java
index 4b4dcb571..e34359e71 100644
--- a/gnu/xml/dom/DomCDATASection.java
+++ b/gnu/xml/dom/DomCDATASection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomCharacterData.java b/gnu/xml/dom/DomCharacterData.java
index e5cc23189..e94dcc4ec 100644
--- a/gnu/xml/dom/DomCharacterData.java
+++ b/gnu/xml/dom/DomCharacterData.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomComment.java b/gnu/xml/dom/DomComment.java
index d1d84d1a0..71c816048 100644
--- a/gnu/xml/dom/DomComment.java
+++ b/gnu/xml/dom/DomComment.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomDOMException.java b/gnu/xml/dom/DomDOMException.java
index a56814cff..cf93fcf97 100644
--- a/gnu/xml/dom/DomDOMException.java
+++ b/gnu/xml/dom/DomDOMException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomDoctype.java b/gnu/xml/dom/DomDoctype.java
index 8c760a531..d35eedc7f 100644
--- a/gnu/xml/dom/DomDoctype.java
+++ b/gnu/xml/dom/DomDoctype.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomDocument.java b/gnu/xml/dom/DomDocument.java
index d8ccc9d82..dc476b582 100644
--- a/gnu/xml/dom/DomDocument.java
+++ b/gnu/xml/dom/DomDocument.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -581,7 +581,9 @@ public class DomDocument
}
else
{
- element = new DomElement(this, null, name);
+ DomElement domElement = new DomElement(this, null, name);
+ domElement.localName = null;
+ element = domElement;
}
defaultAttributes(element, name);
return element;
@@ -776,7 +778,9 @@ public class DomDocument
}
else
{
- return new DomAttr(this, null, name);
+ DomAttr ret = new DomAttr(this, null, name);
+ ret.localName = null;
+ return ret;
}
}
@@ -1155,7 +1159,8 @@ public class DomDocument
public Node adoptNode(Node source)
{
- switch (source.getNodeType())
+ int sourceNodeType = source.getNodeType();
+ switch (sourceNodeType)
{
case DOCUMENT_NODE:
case DOCUMENT_TYPE_NODE:
@@ -1166,6 +1171,7 @@ public class DomDocument
}
if (source instanceof DomNode)
{
+ // GNU native
DomNode src = (DomNode) source;
DomNode dst = src;
if (dst.parent != null)
@@ -1176,7 +1182,110 @@ public class DomDocument
src.notifyUserDataHandlers(UserDataHandler.NODE_ADOPTED, src, dst);
return dst;
}
- return null;
+ else
+ {
+ // Some other implementation
+ Node dst = null;
+ switch (sourceNodeType)
+ {
+ case Node.ATTRIBUTE_NODE:
+ {
+ Attr src = (Attr) source;
+ String nodeName = src.getNodeName();
+ String localName = src.getLocalName();
+ String namespaceUri = src.getNamespaceURI();
+ dst = (localName == null) ?
+ createAttribute(nodeName) :
+ createAttributeNS(namespaceUri, nodeName);
+ adoptChildren(src, dst);
+ break;
+ }
+ case Node.CDATA_SECTION_NODE:
+ {
+ CDATASection src = (CDATASection) source;
+ dst = createCDATASection(src.getData());
+ break;
+ }
+ case Node.COMMENT_NODE:
+ {
+ Comment src = (Comment) source;
+ dst = createComment(src.getData());
+ break;
+ }
+ case Node.DOCUMENT_FRAGMENT_NODE:
+ {
+ DocumentFragment src = (DocumentFragment) source;
+ dst = createDocumentFragment();
+ adoptChildren(src, dst);
+ break;
+ }
+ case Node.ELEMENT_NODE:
+ {
+ Element src = (Element) source;
+ String nodeName = src.getNodeName();
+ String localName = src.getLocalName();
+ String namespaceUri = src.getNamespaceURI();
+ dst = (localName == null) ?
+ createElement(nodeName) :
+ createElementNS(namespaceUri, nodeName);
+ adoptAttributes(src, dst);
+ adoptChildren(src, dst);
+ break;
+ }
+ case Node.ENTITY_REFERENCE_NODE:
+ {
+ EntityReference src = (EntityReference) source;
+ dst = createEntityReference(src.getNodeName());
+ adoptChildren(src, dst);
+ break;
+ }
+ case Node.PROCESSING_INSTRUCTION_NODE:
+ {
+ ProcessingInstruction src = (ProcessingInstruction) source;
+ dst = createProcessingInstruction(src.getTarget(),
+ src.getData());
+ break;
+ }
+ case Node.TEXT_NODE:
+ {
+ Text src = (Text) source;
+ dst = createTextNode(src.getData());
+ break;
+ }
+ }
+ return dst;
+ }
+ }
+
+ void adoptChildren(Node src, Node dst)
+ {
+ Node node = src.getFirstChild();
+ while (node != null)
+ {
+ Node next = node.getNextSibling();
+ dst.appendChild(adoptNode(node));
+ node = next;
+ }
+ }
+
+ void adoptAttributes(Node src, Node dst)
+ {
+ NamedNodeMap srcAttrs = src.getAttributes();
+ NamedNodeMap dstAttrs = dst.getAttributes();
+ int len = srcAttrs.getLength();
+ for (int i = 0; i < len; i++)
+ {
+ Node node = srcAttrs.item(i);
+ String localName = node.getLocalName();
+ if (localName == null)
+ {
+ dstAttrs.setNamedItem(adoptNode(node));
+ }
+ else
+ {
+ dstAttrs.setNamedItemNS(adoptNode(node));
+ }
+ }
}
public DOMConfiguration getDomConfig()
diff --git a/gnu/xml/dom/DomDocumentBuilder.java b/gnu/xml/dom/DomDocumentBuilder.java
index 223bcd3d1..42444e865 100644
--- a/gnu/xml/dom/DomDocumentBuilder.java
+++ b/gnu/xml/dom/DomDocumentBuilder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomDocumentBuilderFactory.java b/gnu/xml/dom/DomDocumentBuilderFactory.java
index 2d049bdec..814141c94 100644
--- a/gnu/xml/dom/DomDocumentBuilderFactory.java
+++ b/gnu/xml/dom/DomDocumentBuilderFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomDocumentConfiguration.java b/gnu/xml/dom/DomDocumentConfiguration.java
index 38d6e6d7b..5c589f82f 100644
--- a/gnu/xml/dom/DomDocumentConfiguration.java
+++ b/gnu/xml/dom/DomDocumentConfiguration.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomDocumentFragment.java b/gnu/xml/dom/DomDocumentFragment.java
index f54b2a7eb..8d2603778 100644
--- a/gnu/xml/dom/DomDocumentFragment.java
+++ b/gnu/xml/dom/DomDocumentFragment.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomElement.java b/gnu/xml/dom/DomElement.java
index 535608343..34509f647 100644
--- a/gnu/xml/dom/DomElement.java
+++ b/gnu/xml/dom/DomElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomEntity.java b/gnu/xml/dom/DomEntity.java
index 5432bbc32..3a76479a3 100644
--- a/gnu/xml/dom/DomEntity.java
+++ b/gnu/xml/dom/DomEntity.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomEntityReference.java b/gnu/xml/dom/DomEntityReference.java
index 65efcfcba..d4596b405 100644
--- a/gnu/xml/dom/DomEntityReference.java
+++ b/gnu/xml/dom/DomEntityReference.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomEvent.java b/gnu/xml/dom/DomEvent.java
index 4a524922f..d57eac0e4 100644
--- a/gnu/xml/dom/DomEvent.java
+++ b/gnu/xml/dom/DomEvent.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomExtern.java b/gnu/xml/dom/DomExtern.java
index afd5301f5..87a6909f7 100644
--- a/gnu/xml/dom/DomExtern.java
+++ b/gnu/xml/dom/DomExtern.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomImpl.java b/gnu/xml/dom/DomImpl.java
index a23f57d93..cabe741c9 100644
--- a/gnu/xml/dom/DomImpl.java
+++ b/gnu/xml/dom/DomImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomIterator.java b/gnu/xml/dom/DomIterator.java
index bb1f2cff2..472c6e805 100644
--- a/gnu/xml/dom/DomIterator.java
+++ b/gnu/xml/dom/DomIterator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomNSResolverContext.java b/gnu/xml/dom/DomNSResolverContext.java
index cf75ec1af..4cf57772e 100644
--- a/gnu/xml/dom/DomNSResolverContext.java
+++ b/gnu/xml/dom/DomNSResolverContext.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomNamedNodeMap.java b/gnu/xml/dom/DomNamedNodeMap.java
index 2b1106e64..6f224029a 100644
--- a/gnu/xml/dom/DomNamedNodeMap.java
+++ b/gnu/xml/dom/DomNamedNodeMap.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -206,6 +206,10 @@ public class DomNamedNodeMap
if (ns)
{
String tln = ctx.getLocalName();
+ if (tln == null)
+ {
+ tln = ctx.getNodeName();
+ }
if (tln.equals(localName))
{
String tu = ctx.getNamespaceURI();
diff --git a/gnu/xml/dom/DomNode.java b/gnu/xml/dom/DomNode.java
index f763adf99..3f29fb128 100644
--- a/gnu/xml/dom/DomNode.java
+++ b/gnu/xml/dom/DomNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -1840,7 +1840,7 @@ public abstract class DomNode
if (ns1 != null && ns2 != null)
{
return ns1.equals(ns2) &&
- getLocalName().equals(other.getLocalName());
+ equal(getLocalName(), other.getLocalName());
}
// if neither has a namespace, this is a "no-namespace" name.
diff --git a/gnu/xml/dom/DomNodeIterator.java b/gnu/xml/dom/DomNodeIterator.java
index c08e90ad6..6079f7a12 100644
--- a/gnu/xml/dom/DomNodeIterator.java
+++ b/gnu/xml/dom/DomNodeIterator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomNotation.java b/gnu/xml/dom/DomNotation.java
index d666699bb..26e78724f 100644
--- a/gnu/xml/dom/DomNotation.java
+++ b/gnu/xml/dom/DomNotation.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomNsNode.java b/gnu/xml/dom/DomNsNode.java
index 15b2fb542..b27514ecb 100644
--- a/gnu/xml/dom/DomNsNode.java
+++ b/gnu/xml/dom/DomNsNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -54,7 +54,7 @@ public abstract class DomNsNode
private String name;
private String namespace;
private String prefix;
- private String localName;
+ String localName;
/**
* Constructs a node associated with the specified document, and
diff --git a/gnu/xml/dom/DomProcessingInstruction.java b/gnu/xml/dom/DomProcessingInstruction.java
index 9697f33f7..2c90967d0 100644
--- a/gnu/xml/dom/DomProcessingInstruction.java
+++ b/gnu/xml/dom/DomProcessingInstruction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomText.java b/gnu/xml/dom/DomText.java
index dc2d50a8e..3ca17dc9b 100644
--- a/gnu/xml/dom/DomText.java
+++ b/gnu/xml/dom/DomText.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomXPathExpression.java b/gnu/xml/dom/DomXPathExpression.java
index c22f29413..25187520c 100644
--- a/gnu/xml/dom/DomXPathExpression.java
+++ b/gnu/xml/dom/DomXPathExpression.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomXPathNSResolver.java b/gnu/xml/dom/DomXPathNSResolver.java
index 467327f21..96dfd97d4 100644
--- a/gnu/xml/dom/DomXPathNSResolver.java
+++ b/gnu/xml/dom/DomXPathNSResolver.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/DomXPathResult.java b/gnu/xml/dom/DomXPathResult.java
index 5c57e25e2..bed249624 100644
--- a/gnu/xml/dom/DomXPathResult.java
+++ b/gnu/xml/dom/DomXPathResult.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/ImplementationList.java b/gnu/xml/dom/ImplementationList.java
index 0f996ba9d..8c0f44916 100644
--- a/gnu/xml/dom/ImplementationList.java
+++ b/gnu/xml/dom/ImplementationList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/ImplementationSource.java b/gnu/xml/dom/ImplementationSource.java
index f0c4bb553..913079cd0 100644
--- a/gnu/xml/dom/ImplementationSource.java
+++ b/gnu/xml/dom/ImplementationSource.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/JAXPFactory.java b/gnu/xml/dom/JAXPFactory.java
index 3602ef6b9..8f481fad6 100644
--- a/gnu/xml/dom/JAXPFactory.java
+++ b/gnu/xml/dom/JAXPFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLAnchorElement.java b/gnu/xml/dom/html2/DomHTMLAnchorElement.java
index 625fa6c93..5da913306 100644
--- a/gnu/xml/dom/html2/DomHTMLAnchorElement.java
+++ b/gnu/xml/dom/html2/DomHTMLAnchorElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLAppletElement.java b/gnu/xml/dom/html2/DomHTMLAppletElement.java
index 39bc4061a..8ec4d3c83 100644
--- a/gnu/xml/dom/html2/DomHTMLAppletElement.java
+++ b/gnu/xml/dom/html2/DomHTMLAppletElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLAreaElement.java b/gnu/xml/dom/html2/DomHTMLAreaElement.java
index 10229fe2c..d7eed07dd 100644
--- a/gnu/xml/dom/html2/DomHTMLAreaElement.java
+++ b/gnu/xml/dom/html2/DomHTMLAreaElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLBRElement.java b/gnu/xml/dom/html2/DomHTMLBRElement.java
index d02ad22ca..673699d52 100644
--- a/gnu/xml/dom/html2/DomHTMLBRElement.java
+++ b/gnu/xml/dom/html2/DomHTMLBRElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLBaseElement.java b/gnu/xml/dom/html2/DomHTMLBaseElement.java
index a7b241aad..ddc805307 100644
--- a/gnu/xml/dom/html2/DomHTMLBaseElement.java
+++ b/gnu/xml/dom/html2/DomHTMLBaseElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLBaseFontElement.java b/gnu/xml/dom/html2/DomHTMLBaseFontElement.java
index 0d64f445e..73172d3bf 100644
--- a/gnu/xml/dom/html2/DomHTMLBaseFontElement.java
+++ b/gnu/xml/dom/html2/DomHTMLBaseFontElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLBodyElement.java b/gnu/xml/dom/html2/DomHTMLBodyElement.java
index efcd855b3..44fbcf23c 100644
--- a/gnu/xml/dom/html2/DomHTMLBodyElement.java
+++ b/gnu/xml/dom/html2/DomHTMLBodyElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLButtonElement.java b/gnu/xml/dom/html2/DomHTMLButtonElement.java
index 996750ea6..5aff5f8c1 100644
--- a/gnu/xml/dom/html2/DomHTMLButtonElement.java
+++ b/gnu/xml/dom/html2/DomHTMLButtonElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLCollection.java b/gnu/xml/dom/html2/DomHTMLCollection.java
index da9d0142e..577337a3c 100644
--- a/gnu/xml/dom/html2/DomHTMLCollection.java
+++ b/gnu/xml/dom/html2/DomHTMLCollection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -99,7 +99,12 @@ class DomHTMLCollection
{
return NodeFilter.FILTER_SKIP;
}
- if (nodeNames != null && !acceptName(n.getLocalName()))
+ String localName = n.getLocalName();
+ if (localName == null)
+ {
+ localName = n.getNodeName();
+ }
+ if (nodeNames != null && !acceptName(localName))
{
return NodeFilter.FILTER_SKIP;
}
@@ -152,6 +157,10 @@ class DomHTMLCollection
{
Node attr = attrs.item(i);
String attrName = attr.getLocalName();
+ if (attrName == null)
+ {
+ attrName = attr.getNodeName();
+ }
if (name.equalsIgnoreCase(attrName))
{
return attr;
diff --git a/gnu/xml/dom/html2/DomHTMLDListElement.java b/gnu/xml/dom/html2/DomHTMLDListElement.java
index 790e3081a..2b9dbf236 100644
--- a/gnu/xml/dom/html2/DomHTMLDListElement.java
+++ b/gnu/xml/dom/html2/DomHTMLDListElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLDirectoryElement.java b/gnu/xml/dom/html2/DomHTMLDirectoryElement.java
index 0f71f960b..26af97e78 100644
--- a/gnu/xml/dom/html2/DomHTMLDirectoryElement.java
+++ b/gnu/xml/dom/html2/DomHTMLDirectoryElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLDivElement.java b/gnu/xml/dom/html2/DomHTMLDivElement.java
index a35a5fb93..462069dcf 100644
--- a/gnu/xml/dom/html2/DomHTMLDivElement.java
+++ b/gnu/xml/dom/html2/DomHTMLDivElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLDocument.java b/gnu/xml/dom/html2/DomHTMLDocument.java
index 1ff0a27ed..10ee9e747 100644
--- a/gnu/xml/dom/html2/DomHTMLDocument.java
+++ b/gnu/xml/dom/html2/DomHTMLDocument.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLElement.java b/gnu/xml/dom/html2/DomHTMLElement.java
index b2952e8b4..b957083d6 100644
--- a/gnu/xml/dom/html2/DomHTMLElement.java
+++ b/gnu/xml/dom/html2/DomHTMLElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -76,6 +76,10 @@ public abstract class DomHTMLElement
{
Node attr = attrs.item(i);
String attrName = attr.getLocalName();
+ if (attrName == null)
+ {
+ attrName = attr.getNodeName();
+ }
if (attrName.equalsIgnoreCase(name))
{
return attr.getNodeValue();
@@ -121,6 +125,10 @@ public abstract class DomHTMLElement
{
attr = attrs.item(i);
String attrName = attr.getLocalName();
+ if (attrName == null)
+ {
+ attrName = attr.getNodeName();
+ }
if (attrName.equalsIgnoreCase(name))
{
if (value != null)
@@ -162,7 +170,12 @@ public abstract class DomHTMLElement
for (Node parent = getParentNode(); parent != null;
parent = parent.getParentNode())
{
- if (name.equalsIgnoreCase(parent.getLocalName()))
+ String parentName = parent.getLocalName();
+ if (parentName == null)
+ {
+ parentName = parent.getNodeName();
+ }
+ if (name.equalsIgnoreCase(parentName))
{
return parent;
}
@@ -178,7 +191,12 @@ public abstract class DomHTMLElement
for (Node child = getFirstChild(); child != null;
child = child.getNextSibling())
{
- if (name.equalsIgnoreCase(child.getLocalName()))
+ String childName = child.getLocalName();
+ if (childName == null)
+ {
+ childName = child.getLocalName();
+ }
+ if (name.equalsIgnoreCase(childName))
{
return child;
}
diff --git a/gnu/xml/dom/html2/DomHTMLFieldSetElement.java b/gnu/xml/dom/html2/DomHTMLFieldSetElement.java
index 2e49fe474..2c8577219 100644
--- a/gnu/xml/dom/html2/DomHTMLFieldSetElement.java
+++ b/gnu/xml/dom/html2/DomHTMLFieldSetElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLFontElement.java b/gnu/xml/dom/html2/DomHTMLFontElement.java
index 3fd1d98e7..08bd349fa 100644
--- a/gnu/xml/dom/html2/DomHTMLFontElement.java
+++ b/gnu/xml/dom/html2/DomHTMLFontElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLFormElement.java b/gnu/xml/dom/html2/DomHTMLFormElement.java
index 0785cc989..119d97eb8 100644
--- a/gnu/xml/dom/html2/DomHTMLFormElement.java
+++ b/gnu/xml/dom/html2/DomHTMLFormElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLFrameElement.java b/gnu/xml/dom/html2/DomHTMLFrameElement.java
index db3cbfe00..124f35268 100644
--- a/gnu/xml/dom/html2/DomHTMLFrameElement.java
+++ b/gnu/xml/dom/html2/DomHTMLFrameElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLFrameSetElement.java b/gnu/xml/dom/html2/DomHTMLFrameSetElement.java
index 8e5eb3312..44d317f64 100644
--- a/gnu/xml/dom/html2/DomHTMLFrameSetElement.java
+++ b/gnu/xml/dom/html2/DomHTMLFrameSetElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLHRElement.java b/gnu/xml/dom/html2/DomHTMLHRElement.java
index 850907b8e..d1b480121 100644
--- a/gnu/xml/dom/html2/DomHTMLHRElement.java
+++ b/gnu/xml/dom/html2/DomHTMLHRElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLHeadElement.java b/gnu/xml/dom/html2/DomHTMLHeadElement.java
index d6072a070..f68e8c7fa 100644
--- a/gnu/xml/dom/html2/DomHTMLHeadElement.java
+++ b/gnu/xml/dom/html2/DomHTMLHeadElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLHeadingElement.java b/gnu/xml/dom/html2/DomHTMLHeadingElement.java
index a336e31e9..f1427ad89 100644
--- a/gnu/xml/dom/html2/DomHTMLHeadingElement.java
+++ b/gnu/xml/dom/html2/DomHTMLHeadingElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLHtmlElement.java b/gnu/xml/dom/html2/DomHTMLHtmlElement.java
index 6a4e195f6..95d45264e 100644
--- a/gnu/xml/dom/html2/DomHTMLHtmlElement.java
+++ b/gnu/xml/dom/html2/DomHTMLHtmlElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLIFrameElement.java b/gnu/xml/dom/html2/DomHTMLIFrameElement.java
index def7b967d..c5ca75d8c 100644
--- a/gnu/xml/dom/html2/DomHTMLIFrameElement.java
+++ b/gnu/xml/dom/html2/DomHTMLIFrameElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLImageElement.java b/gnu/xml/dom/html2/DomHTMLImageElement.java
index 7a621a6db..c96e5fede 100644
--- a/gnu/xml/dom/html2/DomHTMLImageElement.java
+++ b/gnu/xml/dom/html2/DomHTMLImageElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLImpl.java b/gnu/xml/dom/html2/DomHTMLImpl.java
index 6f5538e71..9f0db0850 100644
--- a/gnu/xml/dom/html2/DomHTMLImpl.java
+++ b/gnu/xml/dom/html2/DomHTMLImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLInputElement.java b/gnu/xml/dom/html2/DomHTMLInputElement.java
index 787be536a..1dbc9c28d 100644
--- a/gnu/xml/dom/html2/DomHTMLInputElement.java
+++ b/gnu/xml/dom/html2/DomHTMLInputElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLIsIndexElement.java b/gnu/xml/dom/html2/DomHTMLIsIndexElement.java
index 02d5a9886..087f4a0cd 100644
--- a/gnu/xml/dom/html2/DomHTMLIsIndexElement.java
+++ b/gnu/xml/dom/html2/DomHTMLIsIndexElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLLIElement.java b/gnu/xml/dom/html2/DomHTMLLIElement.java
index ea99ee171..11eccdf5d 100644
--- a/gnu/xml/dom/html2/DomHTMLLIElement.java
+++ b/gnu/xml/dom/html2/DomHTMLLIElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLLabelElement.java b/gnu/xml/dom/html2/DomHTMLLabelElement.java
index 0dd2f833f..c0cc39f8e 100644
--- a/gnu/xml/dom/html2/DomHTMLLabelElement.java
+++ b/gnu/xml/dom/html2/DomHTMLLabelElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLLegendElement.java b/gnu/xml/dom/html2/DomHTMLLegendElement.java
index 663e67c7d..a500f8fa1 100644
--- a/gnu/xml/dom/html2/DomHTMLLegendElement.java
+++ b/gnu/xml/dom/html2/DomHTMLLegendElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLLinkElement.java b/gnu/xml/dom/html2/DomHTMLLinkElement.java
index c81486a8a..127726ef7 100644
--- a/gnu/xml/dom/html2/DomHTMLLinkElement.java
+++ b/gnu/xml/dom/html2/DomHTMLLinkElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLMapElement.java b/gnu/xml/dom/html2/DomHTMLMapElement.java
index d078f70f0..1f7182f4f 100644
--- a/gnu/xml/dom/html2/DomHTMLMapElement.java
+++ b/gnu/xml/dom/html2/DomHTMLMapElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLMenuElement.java b/gnu/xml/dom/html2/DomHTMLMenuElement.java
index e674f3e7e..17f6f589f 100644
--- a/gnu/xml/dom/html2/DomHTMLMenuElement.java
+++ b/gnu/xml/dom/html2/DomHTMLMenuElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLMetaElement.java b/gnu/xml/dom/html2/DomHTMLMetaElement.java
index d8bd43509..1a0440504 100644
--- a/gnu/xml/dom/html2/DomHTMLMetaElement.java
+++ b/gnu/xml/dom/html2/DomHTMLMetaElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLModElement.java b/gnu/xml/dom/html2/DomHTMLModElement.java
index 78f94011c..493f7242b 100644
--- a/gnu/xml/dom/html2/DomHTMLModElement.java
+++ b/gnu/xml/dom/html2/DomHTMLModElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLOListElement.java b/gnu/xml/dom/html2/DomHTMLOListElement.java
index 85d1b3fcd..fb98cf40d 100644
--- a/gnu/xml/dom/html2/DomHTMLOListElement.java
+++ b/gnu/xml/dom/html2/DomHTMLOListElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLObjectElement.java b/gnu/xml/dom/html2/DomHTMLObjectElement.java
index 8b8abe7ed..fdea9b153 100644
--- a/gnu/xml/dom/html2/DomHTMLObjectElement.java
+++ b/gnu/xml/dom/html2/DomHTMLObjectElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLOptGroupElement.java b/gnu/xml/dom/html2/DomHTMLOptGroupElement.java
index 782deb216..76545e130 100644
--- a/gnu/xml/dom/html2/DomHTMLOptGroupElement.java
+++ b/gnu/xml/dom/html2/DomHTMLOptGroupElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLOptionElement.java b/gnu/xml/dom/html2/DomHTMLOptionElement.java
index 21952e6de..69c059d9d 100644
--- a/gnu/xml/dom/html2/DomHTMLOptionElement.java
+++ b/gnu/xml/dom/html2/DomHTMLOptionElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLParagraphElement.java b/gnu/xml/dom/html2/DomHTMLParagraphElement.java
index 573ddc9db..2a8c4f6fb 100644
--- a/gnu/xml/dom/html2/DomHTMLParagraphElement.java
+++ b/gnu/xml/dom/html2/DomHTMLParagraphElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLParamElement.java b/gnu/xml/dom/html2/DomHTMLParamElement.java
index c8e565d15..81c655952 100644
--- a/gnu/xml/dom/html2/DomHTMLParamElement.java
+++ b/gnu/xml/dom/html2/DomHTMLParamElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLParser.java b/gnu/xml/dom/html2/DomHTMLParser.java
index f1b970e12..7b4456225 100644
--- a/gnu/xml/dom/html2/DomHTMLParser.java
+++ b/gnu/xml/dom/html2/DomHTMLParser.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLPreElement.java b/gnu/xml/dom/html2/DomHTMLPreElement.java
index c8f306fff..9b36a2887 100644
--- a/gnu/xml/dom/html2/DomHTMLPreElement.java
+++ b/gnu/xml/dom/html2/DomHTMLPreElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLQuoteElement.java b/gnu/xml/dom/html2/DomHTMLQuoteElement.java
index 0424ebf3b..678a5ada6 100644
--- a/gnu/xml/dom/html2/DomHTMLQuoteElement.java
+++ b/gnu/xml/dom/html2/DomHTMLQuoteElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLScriptElement.java b/gnu/xml/dom/html2/DomHTMLScriptElement.java
index 2bf6a5579..8f8fff58a 100644
--- a/gnu/xml/dom/html2/DomHTMLScriptElement.java
+++ b/gnu/xml/dom/html2/DomHTMLScriptElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLSelectElement.java b/gnu/xml/dom/html2/DomHTMLSelectElement.java
index b888b57e6..09752e1ff 100644
--- a/gnu/xml/dom/html2/DomHTMLSelectElement.java
+++ b/gnu/xml/dom/html2/DomHTMLSelectElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLStyleElement.java b/gnu/xml/dom/html2/DomHTMLStyleElement.java
index 4d2de8c6b..f6f1fcc68 100644
--- a/gnu/xml/dom/html2/DomHTMLStyleElement.java
+++ b/gnu/xml/dom/html2/DomHTMLStyleElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLTableCaptionElement.java b/gnu/xml/dom/html2/DomHTMLTableCaptionElement.java
index a481f47fa..28ea34188 100644
--- a/gnu/xml/dom/html2/DomHTMLTableCaptionElement.java
+++ b/gnu/xml/dom/html2/DomHTMLTableCaptionElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLTableCellElement.java b/gnu/xml/dom/html2/DomHTMLTableCellElement.java
index 6338b88d0..41d33af26 100644
--- a/gnu/xml/dom/html2/DomHTMLTableCellElement.java
+++ b/gnu/xml/dom/html2/DomHTMLTableCellElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLTableColElement.java b/gnu/xml/dom/html2/DomHTMLTableColElement.java
index 0ed20a07a..799447dc8 100644
--- a/gnu/xml/dom/html2/DomHTMLTableColElement.java
+++ b/gnu/xml/dom/html2/DomHTMLTableColElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLTableElement.java b/gnu/xml/dom/html2/DomHTMLTableElement.java
index 95e295733..ea925400e 100644
--- a/gnu/xml/dom/html2/DomHTMLTableElement.java
+++ b/gnu/xml/dom/html2/DomHTMLTableElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -330,7 +330,12 @@ public class DomHTMLTableElement
for (Node ctx = thead.getFirstChild(); ctx != null;
ctx = ctx.getNextSibling())
{
- if (!"tr".equalsIgnoreCase(ctx.getLocalName()))
+ String ctxName = ctx.getLocalName();
+ if (ctxName == null)
+ {
+ ctxName = ctx.getNodeName();
+ }
+ if (!"tr".equalsIgnoreCase(ctxName))
{
continue;
}
@@ -349,7 +354,12 @@ public class DomHTMLTableElement
for (Node ctx = tbody.getFirstChild(); ctx != null;
ctx = ctx.getNextSibling())
{
- if (!"tr".equalsIgnoreCase(ctx.getLocalName()))
+ String ctxName = ctx.getLocalName();
+ if (ctxName == null)
+ {
+ ctxName = ctx.getNodeName();
+ }
+ if (!"tr".equalsIgnoreCase(ctxName))
{
continue;
}
@@ -365,7 +375,12 @@ public class DomHTMLTableElement
for (Node ctx = tfoot.getFirstChild(); ctx != null;
ctx = ctx.getNextSibling())
{
- if (!"tr".equalsIgnoreCase(ctx.getLocalName()))
+ String ctxName = ctx.getLocalName();
+ if (ctxName == null)
+ {
+ ctxName = ctx.getNodeName();
+ }
+ if (!"tr".equalsIgnoreCase(ctxName))
{
continue;
}
diff --git a/gnu/xml/dom/html2/DomHTMLTableRowElement.java b/gnu/xml/dom/html2/DomHTMLTableRowElement.java
index e21e158b4..ecd07a743 100644
--- a/gnu/xml/dom/html2/DomHTMLTableRowElement.java
+++ b/gnu/xml/dom/html2/DomHTMLTableRowElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -207,6 +207,10 @@ public class DomHTMLTableRowElement
ctx = ctx.getNextSibling())
{
String name = ctx.getLocalName();
+ if (name == null)
+ {
+ name = ctx.getNodeName();
+ }
if (!"td".equalsIgnoreCase(name) &&
!"th".equalsIgnoreCase(name))
{
diff --git a/gnu/xml/dom/html2/DomHTMLTableSectionElement.java b/gnu/xml/dom/html2/DomHTMLTableSectionElement.java
index 45dd67110..da015f1f6 100644
--- a/gnu/xml/dom/html2/DomHTMLTableSectionElement.java
+++ b/gnu/xml/dom/html2/DomHTMLTableSectionElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -141,7 +141,12 @@ public class DomHTMLTableSectionElement
for (Node ctx = getFirstChild(); ctx != null;
ctx = ctx.getNextSibling())
{
- if (!"tr".equalsIgnoreCase(ctx.getLocalName()))
+ String name = ctx.getLocalName();
+ if (name == null)
+ {
+ name = ctx.getNodeName();
+ }
+ if (!"tr".equalsIgnoreCase(name))
{
continue;
}
diff --git a/gnu/xml/dom/html2/DomHTMLTextAreaElement.java b/gnu/xml/dom/html2/DomHTMLTextAreaElement.java
index 93a918ab9..22d610569 100644
--- a/gnu/xml/dom/html2/DomHTMLTextAreaElement.java
+++ b/gnu/xml/dom/html2/DomHTMLTextAreaElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLTitleElement.java b/gnu/xml/dom/html2/DomHTMLTitleElement.java
index 1c1105528..f62342d6f 100644
--- a/gnu/xml/dom/html2/DomHTMLTitleElement.java
+++ b/gnu/xml/dom/html2/DomHTMLTitleElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/html2/DomHTMLUListElement.java b/gnu/xml/dom/html2/DomHTMLUListElement.java
index 9f6b69249..c07adeabf 100644
--- a/gnu/xml/dom/html2/DomHTMLUListElement.java
+++ b/gnu/xml/dom/html2/DomHTMLUListElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/ls/DomLSException.java b/gnu/xml/dom/ls/DomLSException.java
index 6701b3e49..6ac49e669 100644
--- a/gnu/xml/dom/ls/DomLSException.java
+++ b/gnu/xml/dom/ls/DomLSException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/ls/DomLSInput.java b/gnu/xml/dom/ls/DomLSInput.java
index 9b30b4f4e..44274ec47 100644
--- a/gnu/xml/dom/ls/DomLSInput.java
+++ b/gnu/xml/dom/ls/DomLSInput.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/ls/DomLSOutput.java b/gnu/xml/dom/ls/DomLSOutput.java
index 643ae7d65..c2f4d4132 100644
--- a/gnu/xml/dom/ls/DomLSOutput.java
+++ b/gnu/xml/dom/ls/DomLSOutput.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/ls/DomLSParser.java b/gnu/xml/dom/ls/DomLSParser.java
index 489777fc9..eb7c1c49f 100644
--- a/gnu/xml/dom/ls/DomLSParser.java
+++ b/gnu/xml/dom/ls/DomLSParser.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/ls/DomLSSerializer.java b/gnu/xml/dom/ls/DomLSSerializer.java
index ec27c5de6..cedaf151e 100644
--- a/gnu/xml/dom/ls/DomLSSerializer.java
+++ b/gnu/xml/dom/ls/DomLSSerializer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/ls/FilteredSAXEventSink.java b/gnu/xml/dom/ls/FilteredSAXEventSink.java
index 63f32a8c7..1c99ee524 100644
--- a/gnu/xml/dom/ls/FilteredSAXEventSink.java
+++ b/gnu/xml/dom/ls/FilteredSAXEventSink.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/ls/ReaderInputStream.java b/gnu/xml/dom/ls/ReaderInputStream.java
index 633b96817..5b41abd3d 100644
--- a/gnu/xml/dom/ls/ReaderInputStream.java
+++ b/gnu/xml/dom/ls/ReaderInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/ls/SAXEventSink.java b/gnu/xml/dom/ls/SAXEventSink.java
index 2ff41910d..a850460b1 100644
--- a/gnu/xml/dom/ls/SAXEventSink.java
+++ b/gnu/xml/dom/ls/SAXEventSink.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/dom/ls/WriterOutputStream.java b/gnu/xml/dom/ls/WriterOutputStream.java
index 7eddb2e44..2fb206147 100644
--- a/gnu/xml/dom/ls/WriterOutputStream.java
+++ b/gnu/xml/dom/ls/WriterOutputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeAttr.java b/gnu/xml/libxmlj/dom/GnomeAttr.java
index 332b757dd..24088fb81 100644
--- a/gnu/xml/libxmlj/dom/GnomeAttr.java
+++ b/gnu/xml/libxmlj/dom/GnomeAttr.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeCDATASection.java b/gnu/xml/libxmlj/dom/GnomeCDATASection.java
index 9730cada6..8fb89ff4d 100644
--- a/gnu/xml/libxmlj/dom/GnomeCDATASection.java
+++ b/gnu/xml/libxmlj/dom/GnomeCDATASection.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeCharacterData.java b/gnu/xml/libxmlj/dom/GnomeCharacterData.java
index 40d43bd8d..a3200921d 100644
--- a/gnu/xml/libxmlj/dom/GnomeCharacterData.java
+++ b/gnu/xml/libxmlj/dom/GnomeCharacterData.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeComment.java b/gnu/xml/libxmlj/dom/GnomeComment.java
index 00ed6e3f2..a0cad5b3e 100644
--- a/gnu/xml/libxmlj/dom/GnomeComment.java
+++ b/gnu/xml/libxmlj/dom/GnomeComment.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeDOMException.java b/gnu/xml/libxmlj/dom/GnomeDOMException.java
index 8fa9b0f03..eae07876f 100644
--- a/gnu/xml/libxmlj/dom/GnomeDOMException.java
+++ b/gnu/xml/libxmlj/dom/GnomeDOMException.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeDOMStringList.java b/gnu/xml/libxmlj/dom/GnomeDOMStringList.java
index 2149e3651..3456acd99 100644
--- a/gnu/xml/libxmlj/dom/GnomeDOMStringList.java
+++ b/gnu/xml/libxmlj/dom/GnomeDOMStringList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeDocument.java b/gnu/xml/libxmlj/dom/GnomeDocument.java
index 17961ea46..3706fba84 100644
--- a/gnu/xml/libxmlj/dom/GnomeDocument.java
+++ b/gnu/xml/libxmlj/dom/GnomeDocument.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeDocumentBuilder.java b/gnu/xml/libxmlj/dom/GnomeDocumentBuilder.java
index e46cc5389..4decee0d8 100644
--- a/gnu/xml/libxmlj/dom/GnomeDocumentBuilder.java
+++ b/gnu/xml/libxmlj/dom/GnomeDocumentBuilder.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java b/gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java
index 85693a5b9..c4f0ce201 100644
--- a/gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java
+++ b/gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeDocumentFragment.java b/gnu/xml/libxmlj/dom/GnomeDocumentFragment.java
index f32c573cb..e5b355e42 100644
--- a/gnu/xml/libxmlj/dom/GnomeDocumentFragment.java
+++ b/gnu/xml/libxmlj/dom/GnomeDocumentFragment.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeDocumentType.java b/gnu/xml/libxmlj/dom/GnomeDocumentType.java
index 81afcabf5..257fbbceb 100644
--- a/gnu/xml/libxmlj/dom/GnomeDocumentType.java
+++ b/gnu/xml/libxmlj/dom/GnomeDocumentType.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeElement.java b/gnu/xml/libxmlj/dom/GnomeElement.java
index 8fd985d5e..2770cbbfd 100644
--- a/gnu/xml/libxmlj/dom/GnomeElement.java
+++ b/gnu/xml/libxmlj/dom/GnomeElement.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeEntity.java b/gnu/xml/libxmlj/dom/GnomeEntity.java
index 81940efb1..76367f8bd 100644
--- a/gnu/xml/libxmlj/dom/GnomeEntity.java
+++ b/gnu/xml/libxmlj/dom/GnomeEntity.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeEntityReference.java b/gnu/xml/libxmlj/dom/GnomeEntityReference.java
index 1c494edf6..136b3a69d 100644
--- a/gnu/xml/libxmlj/dom/GnomeEntityReference.java
+++ b/gnu/xml/libxmlj/dom/GnomeEntityReference.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeNamedNodeMap.java b/gnu/xml/libxmlj/dom/GnomeNamedNodeMap.java
index e38d329fb..8ca892128 100644
--- a/gnu/xml/libxmlj/dom/GnomeNamedNodeMap.java
+++ b/gnu/xml/libxmlj/dom/GnomeNamedNodeMap.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeNode.java b/gnu/xml/libxmlj/dom/GnomeNode.java
index fb5509ee6..4a2e9ff48 100644
--- a/gnu/xml/libxmlj/dom/GnomeNode.java
+++ b/gnu/xml/libxmlj/dom/GnomeNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeNodeList.java b/gnu/xml/libxmlj/dom/GnomeNodeList.java
index 302051012..efd07acb0 100644
--- a/gnu/xml/libxmlj/dom/GnomeNodeList.java
+++ b/gnu/xml/libxmlj/dom/GnomeNodeList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeNotation.java b/gnu/xml/libxmlj/dom/GnomeNotation.java
index 0d2ff1cc0..ca1560e21 100644
--- a/gnu/xml/libxmlj/dom/GnomeNotation.java
+++ b/gnu/xml/libxmlj/dom/GnomeNotation.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeProcessingInstruction.java b/gnu/xml/libxmlj/dom/GnomeProcessingInstruction.java
index b5e79ac90..a6c47b2e1 100644
--- a/gnu/xml/libxmlj/dom/GnomeProcessingInstruction.java
+++ b/gnu/xml/libxmlj/dom/GnomeProcessingInstruction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeText.java b/gnu/xml/libxmlj/dom/GnomeText.java
index 60a14ed6d..77677a562 100644
--- a/gnu/xml/libxmlj/dom/GnomeText.java
+++ b/gnu/xml/libxmlj/dom/GnomeText.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeTypeInfo.java b/gnu/xml/libxmlj/dom/GnomeTypeInfo.java
index 56ea6e1b9..d365f0d9f 100644
--- a/gnu/xml/libxmlj/dom/GnomeTypeInfo.java
+++ b/gnu/xml/libxmlj/dom/GnomeTypeInfo.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeXPathExpression.java b/gnu/xml/libxmlj/dom/GnomeXPathExpression.java
index 0847bfa77..815804799 100644
--- a/gnu/xml/libxmlj/dom/GnomeXPathExpression.java
+++ b/gnu/xml/libxmlj/dom/GnomeXPathExpression.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeXPathNSResolver.java b/gnu/xml/libxmlj/dom/GnomeXPathNSResolver.java
index 48d292fe5..a9ba85509 100644
--- a/gnu/xml/libxmlj/dom/GnomeXPathNSResolver.java
+++ b/gnu/xml/libxmlj/dom/GnomeXPathNSResolver.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeXPathNodeList.java b/gnu/xml/libxmlj/dom/GnomeXPathNodeList.java
index b38a7d6eb..dde3be2d9 100644
--- a/gnu/xml/libxmlj/dom/GnomeXPathNodeList.java
+++ b/gnu/xml/libxmlj/dom/GnomeXPathNodeList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/dom/GnomeXPathResult.java b/gnu/xml/libxmlj/dom/GnomeXPathResult.java
index 59a3a568f..b384e4ac8 100644
--- a/gnu/xml/libxmlj/dom/GnomeXPathResult.java
+++ b/gnu/xml/libxmlj/dom/GnomeXPathResult.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/sax/GnomeLocator.java b/gnu/xml/libxmlj/sax/GnomeLocator.java
index d55fec0fd..0c812f683 100644
--- a/gnu/xml/libxmlj/sax/GnomeLocator.java
+++ b/gnu/xml/libxmlj/sax/GnomeLocator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/sax/GnomeSAXParser.java b/gnu/xml/libxmlj/sax/GnomeSAXParser.java
index 0026bd397..a5cdc42b7 100644
--- a/gnu/xml/libxmlj/sax/GnomeSAXParser.java
+++ b/gnu/xml/libxmlj/sax/GnomeSAXParser.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/sax/GnomeSAXParserFactory.java b/gnu/xml/libxmlj/sax/GnomeSAXParserFactory.java
index ca5460dbd..5152d540f 100644
--- a/gnu/xml/libxmlj/sax/GnomeSAXParserFactory.java
+++ b/gnu/xml/libxmlj/sax/GnomeSAXParserFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/sax/GnomeXMLReader.java b/gnu/xml/libxmlj/sax/GnomeXMLReader.java
index 66da030f1..846015a1c 100644
--- a/gnu/xml/libxmlj/sax/GnomeXMLReader.java
+++ b/gnu/xml/libxmlj/sax/GnomeXMLReader.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/sax/Namespaces.java b/gnu/xml/libxmlj/sax/Namespaces.java
index 9796566e7..646d7b408 100644
--- a/gnu/xml/libxmlj/sax/Namespaces.java
+++ b/gnu/xml/libxmlj/sax/Namespaces.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/sax/StringArrayAttributes.java b/gnu/xml/libxmlj/sax/StringArrayAttributes.java
index e3ba8726f..f534efbcf 100644
--- a/gnu/xml/libxmlj/sax/StringArrayAttributes.java
+++ b/gnu/xml/libxmlj/sax/StringArrayAttributes.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/sax/XMLName.java b/gnu/xml/libxmlj/sax/XMLName.java
index f81c4b7c7..5950a7996 100644
--- a/gnu/xml/libxmlj/sax/XMLName.java
+++ b/gnu/xml/libxmlj/sax/XMLName.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/transform/ErrorListenerErrorHandler.java b/gnu/xml/libxmlj/transform/ErrorListenerErrorHandler.java
index 1a7368f1d..0601e5e89 100644
--- a/gnu/xml/libxmlj/transform/ErrorListenerErrorHandler.java
+++ b/gnu/xml/libxmlj/transform/ErrorListenerErrorHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/transform/GnomeTransformer.java b/gnu/xml/libxmlj/transform/GnomeTransformer.java
index c153cdae6..37aa05b93 100755
--- a/gnu/xml/libxmlj/transform/GnomeTransformer.java
+++ b/gnu/xml/libxmlj/transform/GnomeTransformer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/transform/GnomeTransformerFactory.java b/gnu/xml/libxmlj/transform/GnomeTransformerFactory.java
index cd3fd5beb..78dfe2148 100755
--- a/gnu/xml/libxmlj/transform/GnomeTransformerFactory.java
+++ b/gnu/xml/libxmlj/transform/GnomeTransformerFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/transform/URIResolverEntityResolver.java b/gnu/xml/libxmlj/transform/URIResolverEntityResolver.java
index 8036e86ab..88a58e1a2 100644
--- a/gnu/xml/libxmlj/transform/URIResolverEntityResolver.java
+++ b/gnu/xml/libxmlj/transform/URIResolverEntityResolver.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/util/EmptyNodeList.java b/gnu/xml/libxmlj/util/EmptyNodeList.java
index 527a3c61b..24a08229c 100644
--- a/gnu/xml/libxmlj/util/EmptyNodeList.java
+++ b/gnu/xml/libxmlj/util/EmptyNodeList.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/util/NamedInputStream.java b/gnu/xml/libxmlj/util/NamedInputStream.java
index 5db77d7de..8d20ec4e5 100644
--- a/gnu/xml/libxmlj/util/NamedInputStream.java
+++ b/gnu/xml/libxmlj/util/NamedInputStream.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/util/StandaloneDocumentType.java b/gnu/xml/libxmlj/util/StandaloneDocumentType.java
index 32ff98357..d47cdb05d 100644
--- a/gnu/xml/libxmlj/util/StandaloneDocumentType.java
+++ b/gnu/xml/libxmlj/util/StandaloneDocumentType.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/util/StandaloneLocator.java b/gnu/xml/libxmlj/util/StandaloneLocator.java
index 559b31fa4..5430330cc 100644
--- a/gnu/xml/libxmlj/util/StandaloneLocator.java
+++ b/gnu/xml/libxmlj/util/StandaloneLocator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/libxmlj/util/XMLJ.java b/gnu/xml/libxmlj/util/XMLJ.java
index c01bd5bc6..0d5f9f689 100644
--- a/gnu/xml/libxmlj/util/XMLJ.java
+++ b/gnu/xml/libxmlj/util/XMLJ.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/pipeline/CallFilter.java b/gnu/xml/pipeline/CallFilter.java
index da1a2e9c1..3b3375173 100644
--- a/gnu/xml/pipeline/CallFilter.java
+++ b/gnu/xml/pipeline/CallFilter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/pipeline/DomConsumer.java b/gnu/xml/pipeline/DomConsumer.java
index e3136093c..389e02bb3 100644
--- a/gnu/xml/pipeline/DomConsumer.java
+++ b/gnu/xml/pipeline/DomConsumer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/pipeline/EventConsumer.java b/gnu/xml/pipeline/EventConsumer.java
index 5f9737314..017bc7f74 100644
--- a/gnu/xml/pipeline/EventConsumer.java
+++ b/gnu/xml/pipeline/EventConsumer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/pipeline/EventFilter.java b/gnu/xml/pipeline/EventFilter.java
index 8587808f3..660027171 100644
--- a/gnu/xml/pipeline/EventFilter.java
+++ b/gnu/xml/pipeline/EventFilter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/pipeline/LinkFilter.java b/gnu/xml/pipeline/LinkFilter.java
index 465103b22..ddb9fda2e 100644
--- a/gnu/xml/pipeline/LinkFilter.java
+++ b/gnu/xml/pipeline/LinkFilter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/pipeline/NSFilter.java b/gnu/xml/pipeline/NSFilter.java
index 63e167361..db875e1de 100644
--- a/gnu/xml/pipeline/NSFilter.java
+++ b/gnu/xml/pipeline/NSFilter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/pipeline/PipelineFactory.java b/gnu/xml/pipeline/PipelineFactory.java
index 5edca73e6..f88ab1643 100644
--- a/gnu/xml/pipeline/PipelineFactory.java
+++ b/gnu/xml/pipeline/PipelineFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/pipeline/TeeConsumer.java b/gnu/xml/pipeline/TeeConsumer.java
index 922e79cf2..8186de4df 100644
--- a/gnu/xml/pipeline/TeeConsumer.java
+++ b/gnu/xml/pipeline/TeeConsumer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/pipeline/TextConsumer.java b/gnu/xml/pipeline/TextConsumer.java
index 1039b3b8c..67bd23b00 100644
--- a/gnu/xml/pipeline/TextConsumer.java
+++ b/gnu/xml/pipeline/TextConsumer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/pipeline/ValidationConsumer.java b/gnu/xml/pipeline/ValidationConsumer.java
index 719270e07..0fbfa9264 100644
--- a/gnu/xml/pipeline/ValidationConsumer.java
+++ b/gnu/xml/pipeline/ValidationConsumer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/pipeline/WellFormednessFilter.java b/gnu/xml/pipeline/WellFormednessFilter.java
index 4f3f200c0..ef4301652 100644
--- a/gnu/xml/pipeline/WellFormednessFilter.java
+++ b/gnu/xml/pipeline/WellFormednessFilter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/pipeline/XIncludeFilter.java b/gnu/xml/pipeline/XIncludeFilter.java
index 042cadda6..02607a4e0 100644
--- a/gnu/xml/pipeline/XIncludeFilter.java
+++ b/gnu/xml/pipeline/XIncludeFilter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/pipeline/XsltFilter.java b/gnu/xml/pipeline/XsltFilter.java
index 9f77f9937..0a1872c5a 100644
--- a/gnu/xml/pipeline/XsltFilter.java
+++ b/gnu/xml/pipeline/XsltFilter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/transform/AbstractNumberNode.java b/gnu/xml/transform/AbstractNumberNode.java
index 097637e6c..91029d6d0 100644
--- a/gnu/xml/transform/AbstractNumberNode.java
+++ b/gnu/xml/transform/AbstractNumberNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -66,12 +66,10 @@ abstract class AbstractNumberNode
final String groupingSeparator;
final int groupingSize;
- AbstractNumberNode(TemplateNode children, TemplateNode next,
- TemplateNode format, String lang,
+ AbstractNumberNode(TemplateNode format, String lang,
int letterValue, String groupingSeparator,
int groupingSize)
{
- super(children, next);
this.format = format;
this.lang = lang;
this.letterValue = letterValue;
@@ -308,6 +306,15 @@ abstract class AbstractNumberNode
abstract int[] compute(Stylesheet stylesheet, Node context, int pos, int len)
throws TransformerException;
+ public boolean references(QName var)
+ {
+ if (format.references(var))
+ {
+ return true;
+ }
+ return super.references(var);
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer(getClass().getName());
diff --git a/gnu/xml/transform/ApplyImportsNode.java b/gnu/xml/transform/ApplyImportsNode.java
index 39d9dea9a..60dec85d3 100644
--- a/gnu/xml/transform/ApplyImportsNode.java
+++ b/gnu/xml/transform/ApplyImportsNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -50,17 +50,18 @@ final class ApplyImportsNode
extends TemplateNode
{
- ApplyImportsNode(TemplateNode children, TemplateNode next)
- {
- super(children, next);
- }
-
TemplateNode clone(Stylesheet stylesheet)
{
- return new ApplyImportsNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet));
+ TemplateNode ret = new ApplyImportsNode();
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
@@ -80,6 +81,6 @@ final class ApplyImportsNode
parent, nextSibling);
}
}
-
+
}
diff --git a/gnu/xml/transform/ApplyTemplatesNode.java b/gnu/xml/transform/ApplyTemplatesNode.java
index 83e7c559e..ab26058bc 100644
--- a/gnu/xml/transform/ApplyTemplatesNode.java
+++ b/gnu/xml/transform/ApplyTemplatesNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -41,6 +41,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
+import java.util.LinkedList;
import java.util.List;
import javax.xml.namespace.QName;
import javax.xml.transform.TransformerException;
@@ -63,11 +64,9 @@ final class ApplyTemplatesNode
final List withParams;
final boolean isDefault;
- ApplyTemplatesNode(TemplateNode children, TemplateNode next,
- Expr select, QName mode,
+ ApplyTemplatesNode(Expr select, QName mode,
List sortKeys, List withParams, boolean isDefault)
{
- super(children, next);
this.select = select;
this.mode = mode;
this.sortKeys = sortKeys;
@@ -89,12 +88,18 @@ final class ApplyTemplatesNode
{
withParams2.add(((WithParam) withParams.get(i)).clone(stylesheet));
}
- return new ApplyTemplatesNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- select.clone(stylesheet),
- mode, sortKeys2, withParams2, isDefault);
+ TemplateNode ret = new ApplyTemplatesNode(select.clone(stylesheet),
+ mode, sortKeys2, withParams2,
+ isDefault);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
@@ -107,14 +112,26 @@ final class ApplyTemplatesNode
{
if (withParams != null)
{
- // push the parameter context
- stylesheet.bindings.push(false);
- // set the parameters
+ // compute the parameter values
+ LinkedList values = new LinkedList();
for (Iterator i = withParams.iterator(); i.hasNext(); )
{
WithParam p = (WithParam) i.next();
Object value = p.getValue(stylesheet, mode, context, pos, len);
- stylesheet.bindings.set(p.name, value, false);
+ Object[] pair = new Object[2];
+ pair[0] = p.name;
+ pair[1] = value;
+ values.add(pair);
+ }
+ // push the parameter context
+ stylesheet.bindings.push(Bindings.WITH_PARAM);
+ // set the parameters
+ for (Iterator i = values.iterator(); i.hasNext(); )
+ {
+ Object[] pair = (Object[]) i.next();
+ QName name = (QName) pair[0];
+ Object value = pair[1];
+ stylesheet.bindings.set(name, value, Bindings.WITH_PARAM);
}
}
Collection ns = (Collection) ret;
@@ -142,10 +159,6 @@ final class ApplyTemplatesNode
false);
if (t != null)
{
- if (stylesheet.debug)
- {
- System.err.println("Applying " + t);
- }
stylesheet.current = node;
t.apply(stylesheet, effectiveMode, node, i + 1, l,
parent, nextSibling);
@@ -154,7 +167,7 @@ final class ApplyTemplatesNode
if (withParams != null)
{
// pop the variable context
- stylesheet.bindings.pop(false);
+ stylesheet.bindings.pop(Bindings.WITH_PARAM);
}
}
// apply-templates doesn't have processable children
@@ -165,6 +178,35 @@ final class ApplyTemplatesNode
parent, nextSibling);
}
}
+
+ public boolean references(QName var)
+ {
+ if (select != null && select.references(var))
+ {
+ return true;
+ }
+ if (withParams != null)
+ {
+ for (Iterator i = withParams.iterator(); i.hasNext(); )
+ {
+ if (((WithParam) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ }
+ if (sortKeys != null)
+ {
+ for (Iterator i = sortKeys.iterator(); i.hasNext(); )
+ {
+ if (((SortKey) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ }
+ return super.references(var);
+ }
public String toString()
{
diff --git a/gnu/xml/transform/AttributeNode.java b/gnu/xml/transform/AttributeNode.java
index c4409dbfc..1e0eb1e96 100644
--- a/gnu/xml/transform/AttributeNode.java
+++ b/gnu/xml/transform/AttributeNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -60,10 +60,9 @@ final class AttributeNode
final TemplateNode namespace;
final Node source;
- AttributeNode(TemplateNode children, TemplateNode next, TemplateNode name,
+ AttributeNode(TemplateNode name,
TemplateNode namespace, Node source)
{
- super(children, next);
this.name = name;
this.namespace = namespace;
this.source = source;
@@ -71,13 +70,19 @@ final class AttributeNode
TemplateNode clone(Stylesheet stylesheet)
{
- return new AttributeNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null : next.clone(stylesheet),
- name.clone(stylesheet),
- (namespace == null) ? null :
- namespace.clone(stylesheet),
- source);
+ TemplateNode ret = new AttributeNode(name.clone(stylesheet),
+ (namespace == null) ? null :
+ namespace.clone(stylesheet),
+ source);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
@@ -232,6 +237,19 @@ final class AttributeNode
}
return ret;
}
+
+ public boolean references(QName var)
+ {
+ if (name != null && name.references(var))
+ {
+ return true;
+ }
+ if (namespace != null && namespace.references(var))
+ {
+ return true;
+ }
+ return super.references(var);
+ }
public String toString()
{
diff --git a/gnu/xml/transform/AttributeSet.java b/gnu/xml/transform/AttributeSet.java
index 92869d192..3ece9c83f 100644
--- a/gnu/xml/transform/AttributeSet.java
+++ b/gnu/xml/transform/AttributeSet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/transform/Bindings.java b/gnu/xml/transform/Bindings.java
index 75a8a1651..c372ea830 100644
--- a/gnu/xml/transform/Bindings.java
+++ b/gnu/xml/transform/Bindings.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -57,6 +57,10 @@ public class Bindings
implements XPathVariableResolver, Cloneable
{
+ static final int VARIABLE = 0;
+ static final int PARAM = 1;
+ static final int WITH_PARAM = 2;
+
final Stylesheet stylesheet;
/**
@@ -69,13 +73,21 @@ public class Bindings
*/
final LinkedList parameters;
+ /**
+ * Argument (with-param) value stack.
+ */
+ final LinkedList withParameters;
+
Bindings(Stylesheet stylesheet)
{
this.stylesheet = stylesheet;
variables = new LinkedList();
parameters = new LinkedList();
- push(true);
- push(false);
+ withParameters = new LinkedList();
+ for (int i = 0; i < 3; i++)
+ {
+ push(i);
+ }
}
public Object clone()
@@ -90,53 +102,87 @@ public class Bindings
}
}
- void push(boolean global)
+ void push(int type)
{
- if (global)
+ switch (type)
{
+ case VARIABLE:
variables.addFirst(new HashMap());
- }
- else
- {
+ break;
+ case PARAM:
parameters.addFirst(new HashMap());
+ break;
+ case WITH_PARAM:
+ withParameters.addFirst(new HashMap());
+ break;
}
}
- void pop(boolean global)
+ void pop(int type)
{
- if (global)
+ switch (type)
{
+ case VARIABLE:
variables.removeFirst();
- }
- else
- {
+ break;
+ case PARAM:
parameters.removeFirst();
+ break;
+ case WITH_PARAM:
+ withParameters.removeFirst();
+ break;
}
}
- public boolean containsKey(String name, boolean global)
+ public boolean containsKey(QName name, int type)
{
- Iterator i = global ? variables.iterator() : parameters.iterator();
- while (i.hasNext())
+ Iterator i = null;
+ switch (type)
{
- Map ctx = (Map) i.next();
- if (ctx.containsKey(name))
+ case VARIABLE:
+ i = variables.iterator();
+ break;
+ case PARAM:
+ i = parameters.iterator();
+ break;
+ case WITH_PARAM:
+ Map ctx = (Map) withParameters.getFirst();
+ return ctx.containsKey(name);
+ }
+ if (i != null)
+ {
+ while (i.hasNext())
{
- return true;
+ Map ctx = (Map) i.next();
+ if (ctx.containsKey(name))
+ {
+ return true;
+ }
}
}
return false;
}
- public Object get(String name, Node context, int pos, int len)
+ public Object get(QName name, Node context, int pos, int len)
{
//System.err.println("bindings.get: "+name);
//System.err.println("\t"+toString());
Object ret = null;
- for (Iterator i = variables.iterator(); i.hasNext() && ret == null; )
+ //if (parameters.size() > 1 && containsKey(name, PARAM))
+ // check that template defines parameter
{
- Map vctx = (Map) i.next();
- ret = vctx.get(name);
+ Map cwp = (Map) withParameters.getFirst();
+ ret = cwp.get(name);
+ //System.err.println("\twith-param: ret="+ret);
+ }
+ if (ret == null)
+ {
+ for (Iterator i = variables.iterator(); i.hasNext() && ret == null; )
+ {
+ Map vctx = (Map) i.next();
+ ret = vctx.get(name);
+ }
+ //System.err.println("\tvariable: ret="+ret);
}
if (ret == null)
{
@@ -145,6 +191,7 @@ public class Bindings
Map pctx = (Map) i.next();
ret = pctx.get(name);
}
+ //System.err.println("\tparam: ret="+ret);
}
/*if (ret instanceof Expr && context != null)
{
@@ -163,23 +210,29 @@ public class Bindings
return ret;
}
- void set(String name, Object value, boolean global)
+ void set(QName name, Object value, int type)
{
- if (global)
- {
- Map context = (Map) variables.getFirst();
- context.put(name, value);
- }
- else
+ switch (type)
{
- Map context = (Map) parameters.getFirst();
- context.put(name, value);
+ case VARIABLE:
+ Map vctx = (Map) variables.getFirst();
+ vctx.put(name, value);
+ break;
+ case PARAM:
+ Map pctx = (Map) parameters.getFirst();
+ pctx.put(name, value);
+ break;
+ case WITH_PARAM:
+ Map wctx = (Map) withParameters.getFirst();
+ wctx.put(name, value);
+ break;
}
+ //System.err.println("Set "+name+"="+value);
}
public Object resolveVariable(QName qName)
{
- return get(qName.toString(), null, 1, 1);
+ return get(qName, null, 1, 1);
}
public String toString()
@@ -187,6 +240,31 @@ public class Bindings
StringBuffer buf = new StringBuffer();
boolean next = false;
Collection seen = new HashSet();
+ Map wctx = (Map) withParameters.getFirst();
+ buf.append('(');
+ for (Iterator i = wctx.entrySet().iterator(); i.hasNext(); )
+ {
+ if (next)
+ {
+ buf.append(',');
+ }
+ else
+ {
+ next = true;
+ }
+ Map.Entry entry = (Map.Entry) i.next();
+ Object key = entry.getKey();
+ if (!seen.contains(key))
+ {
+ buf.append(key);
+ buf.append('=');
+ buf.append(entry.getValue());
+ seen.add(key);
+ }
+ }
+ buf.append(')');
+ next = false;
+ seen.clear();
buf.append('{');
for (Iterator i = variables.iterator(); i.hasNext(); )
{
@@ -212,6 +290,10 @@ public class Bindings
}
}
}
+ buf.append('}');
+ next = false;
+ seen.clear();
+ buf.append('[');
for (Iterator i = parameters.iterator(); i.hasNext(); )
{
Map ctx = (Map) i.next();
@@ -236,7 +318,8 @@ public class Bindings
}
}
}
- buf.append('}');
+ buf.append(']');
return buf.toString();
}
+
}
diff --git a/gnu/xml/transform/CallTemplateNode.java b/gnu/xml/transform/CallTemplateNode.java
index ee64e2eed..b678219d7 100644
--- a/gnu/xml/transform/CallTemplateNode.java
+++ b/gnu/xml/transform/CallTemplateNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ package gnu.xml.transform;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.LinkedList;
import java.util.List;
import javax.xml.namespace.QName;
import javax.xml.transform.TransformerException;
@@ -57,10 +58,8 @@ final class CallTemplateNode
final QName name;
final List withParams;
- CallTemplateNode(TemplateNode children, TemplateNode next,
- QName name, List withParams)
+ CallTemplateNode(QName name, List withParams)
{
- super(children, next);
this.name = name;
this.withParams = withParams;
}
@@ -73,11 +72,16 @@ final class CallTemplateNode
{
withParams2.add(((WithParam) withParams.get(i)).clone(stylesheet));
}
- return new CallTemplateNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- name, withParams2);
+ TemplateNode ret = new CallTemplateNode(name, withParams2);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
@@ -87,14 +91,30 @@ final class CallTemplateNode
{
if (withParams != null)
{
- // push the parameter context
- stylesheet.bindings.push(false);
- // set the parameters
+ // compute the parameter values
+ LinkedList values = new LinkedList();
for (Iterator i = withParams.iterator(); i.hasNext(); )
{
WithParam p = (WithParam) i.next();
Object value = p.getValue(stylesheet, mode, context, pos, len);
- stylesheet.bindings.set(p.name, value, false);
+ Object[] pair = new Object[2];
+ pair[0] = p.name;
+ pair[1] = value;
+ values.add(pair);
+ }
+ // push the parameter context
+ stylesheet.bindings.push(Bindings.WITH_PARAM);
+ // set the parameters
+ for (Iterator i = values.iterator(); i.hasNext(); )
+ {
+ Object[] pair = (Object[]) i.next();
+ QName name = (QName) pair[0];
+ Object value = pair[1];
+ stylesheet.bindings.set(name, value, Bindings.WITH_PARAM);
+ if (stylesheet.debug)
+ {
+ System.err.println("with-param: " + name + " = " + value);
+ }
}
}
TemplateNode t = stylesheet.getTemplate(mode, name);
@@ -106,7 +126,7 @@ final class CallTemplateNode
if (withParams != null)
{
// pop the variable context
- stylesheet.bindings.pop(false);
+ stylesheet.bindings.pop(Bindings.WITH_PARAM);
}
// call-template doesn't have processable children
if (next != null)
@@ -117,6 +137,21 @@ final class CallTemplateNode
}
}
+ public boolean references(QName var)
+ {
+ if (withParams != null)
+ {
+ for (Iterator i = withParams.iterator(); i.hasNext(); )
+ {
+ if (((WithParam) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ }
+ return super.references(var);
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer(getClass().getName());
diff --git a/gnu/xml/transform/ChooseNode.java b/gnu/xml/transform/ChooseNode.java
index 76b0d8dd5..fb1f2c45e 100644
--- a/gnu/xml/transform/ChooseNode.java
+++ b/gnu/xml/transform/ChooseNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -50,17 +50,18 @@ final class ChooseNode
extends TemplateNode
{
- ChooseNode(TemplateNode children, TemplateNode next)
- {
- super(children, next);
- }
-
TemplateNode clone(Stylesheet stylesheet)
{
- return new ChooseNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet));
+ TemplateNode ret = new ChooseNode();
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
diff --git a/gnu/xml/transform/CommentNode.java b/gnu/xml/transform/CommentNode.java
index 99870cd59..1428a46fc 100644
--- a/gnu/xml/transform/CommentNode.java
+++ b/gnu/xml/transform/CommentNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -54,17 +54,18 @@ final class CommentNode
extends TemplateNode
{
- CommentNode(TemplateNode children, TemplateNode next)
- {
- super(children, next);
- }
-
TemplateNode clone(Stylesheet stylesheet)
{
- return new CommentNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet));
+ TemplateNode ret = new CommentNode();
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
diff --git a/gnu/xml/transform/CopyNode.java b/gnu/xml/transform/CopyNode.java
index d06a0af30..3e019445a 100644
--- a/gnu/xml/transform/CopyNode.java
+++ b/gnu/xml/transform/CopyNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -56,19 +56,23 @@ final class CopyNode
final String uas;
- CopyNode(TemplateNode children, TemplateNode next, String uas)
+ CopyNode(String uas)
{
- super(children, next);
this.uas = uas;
}
TemplateNode clone(Stylesheet stylesheet)
{
- return new CopyNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- uas);
+ TemplateNode ret = new CopyNode(uas);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
diff --git a/gnu/xml/transform/CopyOfNode.java b/gnu/xml/transform/CopyOfNode.java
index 7ca1006ad..a43e3ba84 100644
--- a/gnu/xml/transform/CopyOfNode.java
+++ b/gnu/xml/transform/CopyOfNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -61,19 +61,23 @@ final class CopyOfNode
final Expr select;
- CopyOfNode(TemplateNode children, TemplateNode next, Expr select)
+ CopyOfNode(Expr select)
{
- super(children, next);
this.select = select;
}
TemplateNode clone(Stylesheet stylesheet)
{
- return new CopyOfNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- select.clone(stylesheet));
+ TemplateNode ret = new CopyOfNode(select.clone(stylesheet));
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
@@ -166,6 +170,15 @@ final class CopyOfNode
}
}
+ public boolean references(QName var)
+ {
+ if (select != null && select.references(var))
+ {
+ return true;
+ }
+ return super.references(var);
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer(getClass().getName());
diff --git a/gnu/xml/transform/CurrentFunction.java b/gnu/xml/transform/CurrentFunction.java
index 0c901be7f..0395396bc 100644
--- a/gnu/xml/transform/CurrentFunction.java
+++ b/gnu/xml/transform/CurrentFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ package gnu.xml.transform;
import java.util.Collections;
import java.util.List;
+import javax.xml.namespace.QName;
import javax.xml.xpath.XPathFunction;
import javax.xml.xpath.XPathFunctionException;
import org.w3c.dom.Node;
@@ -89,6 +90,11 @@ final class CurrentFunction
return new CurrentFunction(s);
}
+ public boolean references(QName var)
+ {
+ return false;
+ }
+
public String toString()
{
return "current()";
diff --git a/gnu/xml/transform/DOMSourceLocator.java b/gnu/xml/transform/DOMSourceLocator.java
index b9ef7050a..9bc8fb1b6 100644
--- a/gnu/xml/transform/DOMSourceLocator.java
+++ b/gnu/xml/transform/DOMSourceLocator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/transform/DocumentFunction.java b/gnu/xml/transform/DocumentFunction.java
index 78862dc9e..d8f6090be 100644
--- a/gnu/xml/transform/DocumentFunction.java
+++ b/gnu/xml/transform/DocumentFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -43,6 +43,7 @@ import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.TreeSet;
+import javax.xml.namespace.QName;
import javax.xml.transform.TransformerException;
import javax.xml.transform.dom.DOMSource;
import javax.xml.xpath.XPathFunction;
@@ -239,5 +240,17 @@ final class DocumentFunction
f.setArguments(args2);
return f;
}
+
+ public boolean references(QName var)
+ {
+ for (Iterator i = args.iterator(); i.hasNext(); )
+ {
+ if (((Expr) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
}
diff --git a/gnu/xml/transform/ElementAvailableFunction.java b/gnu/xml/transform/ElementAvailableFunction.java
index 0c9ce4450..84cb6207a 100644
--- a/gnu/xml/transform/ElementAvailableFunction.java
+++ b/gnu/xml/transform/ElementAvailableFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,8 +40,10 @@ package gnu.xml.transform;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
+import java.util.Iterator;
import java.util.List;
import java.util.TreeSet;
+import javax.xml.namespace.QName;
import javax.xml.namespace.NamespaceContext;
import javax.xml.xpath.XPathFunction;
import javax.xml.xpath.XPathFunctionException;
@@ -165,5 +167,17 @@ class ElementAvailableFunction
return f;
}
+ public boolean references(QName var)
+ {
+ for (Iterator i = args.iterator(); i.hasNext(); )
+ {
+ if (((Expr) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
}
diff --git a/gnu/xml/transform/ElementNode.java b/gnu/xml/transform/ElementNode.java
index 305989c02..d8f7f6db6 100644
--- a/gnu/xml/transform/ElementNode.java
+++ b/gnu/xml/transform/ElementNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -67,10 +67,9 @@ final class ElementNode
final Node source;
final Collection elementExcludeResultPrefixes;
- ElementNode(TemplateNode children, TemplateNode next, TemplateNode name,
+ ElementNode(TemplateNode name,
TemplateNode namespace, String uas, Node source)
{
- super(children, next);
this.name = name;
this.namespace = namespace;
this.uas = uas;
@@ -95,14 +94,19 @@ final class ElementNode
TemplateNode clone(Stylesheet stylesheet)
{
- return new ElementNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- name.clone(stylesheet),
- (namespace == null) ? null :
- namespace.clone(stylesheet),
- uas, source);
+ TemplateNode ret = new ElementNode(name.clone(stylesheet),
+ (namespace == null) ? null :
+ namespace.clone(stylesheet),
+ uas, source);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
@@ -261,6 +265,19 @@ final class ElementNode
}
}
+ public boolean references(QName var)
+ {
+ if (name != null && name.references(var))
+ {
+ return true;
+ }
+ if (namespace != null && namespace.references(var))
+ {
+ return true;
+ }
+ return super.references(var);
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer(getClass().getName());
diff --git a/gnu/xml/transform/ErrorListenerErrorHandler.java b/gnu/xml/transform/ErrorListenerErrorHandler.java
index 929f7f076..d79bb1546 100644
--- a/gnu/xml/transform/ErrorListenerErrorHandler.java
+++ b/gnu/xml/transform/ErrorListenerErrorHandler.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/transform/ForEachNode.java b/gnu/xml/transform/ForEachNode.java
index af96628ca..8f9220f67 100644
--- a/gnu/xml/transform/ForEachNode.java
+++ b/gnu/xml/transform/ForEachNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -59,10 +59,8 @@ final class ForEachNode
final Expr select;
final List sortKeys;
- ForEachNode(TemplateNode children, TemplateNode next, Expr select,
- List sortKeys)
+ ForEachNode(Expr select, List sortKeys)
{
- super(children, next);
this.select = select;
this.sortKeys = sortKeys;
}
@@ -75,12 +73,17 @@ final class ForEachNode
{
sortKeys2.add(((Key) sortKeys.get(i)).clone(stylesheet));
}
- return new ForEachNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- select.clone(stylesheet),
- sortKeys2);
+ TemplateNode ret = new ForEachNode(select.clone(stylesheet),
+ sortKeys2);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
@@ -136,6 +139,25 @@ final class ForEachNode
}
}
+ public boolean references(QName var)
+ {
+ if (select != null && select.references(var))
+ {
+ return true;
+ }
+ if (sortKeys != null)
+ {
+ for (Iterator i = sortKeys.iterator(); i.hasNext(); )
+ {
+ if (((SortKey) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ }
+ return super.references(var);
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer(getClass().getName());
diff --git a/gnu/xml/transform/FormatNumberFunction.java b/gnu/xml/transform/FormatNumberFunction.java
index 393cb99ff..34717b39c 100644
--- a/gnu/xml/transform/FormatNumberFunction.java
+++ b/gnu/xml/transform/FormatNumberFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,7 +40,9 @@ package gnu.xml.transform;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.Iterator;
import java.util.List;
+import javax.xml.namespace.QName;
import javax.xml.xpath.XPathFunction;
import javax.xml.xpath.XPathFunctionException;
import org.w3c.dom.Node;
@@ -128,5 +130,17 @@ final class FormatNumberFunction
return f;
}
+ public boolean references(QName var)
+ {
+ for (Iterator i = args.iterator(); i.hasNext(); )
+ {
+ if (((Expr) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
}
diff --git a/gnu/xml/transform/FunctionAvailableFunction.java b/gnu/xml/transform/FunctionAvailableFunction.java
index 29310821c..7daf7ea3f 100644
--- a/gnu/xml/transform/FunctionAvailableFunction.java
+++ b/gnu/xml/transform/FunctionAvailableFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,9 +40,11 @@ package gnu.xml.transform;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
+import java.util.Iterator;
import java.util.List;
import java.util.TreeSet;
import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
import javax.xml.xpath.XPathFunction;
import javax.xml.xpath.XPathFunctionException;
import org.w3c.dom.Node;
@@ -171,5 +173,17 @@ class FunctionAvailableFunction
return f;
}
+ public boolean references(QName var)
+ {
+ for (Iterator i = args.iterator(); i.hasNext(); )
+ {
+ if (((Expr) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
}
diff --git a/gnu/xml/transform/GenerateIdFunction.java b/gnu/xml/transform/GenerateIdFunction.java
index 9e48f79b4..f0d3e6dd9 100644
--- a/gnu/xml/transform/GenerateIdFunction.java
+++ b/gnu/xml/transform/GenerateIdFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,7 +40,9 @@ package gnu.xml.transform;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
+import java.util.Iterator;
import java.util.List;
+import javax.xml.namespace.QName;
import javax.xml.xpath.XPathFunction;
import javax.xml.xpath.XPathFunctionException;
import org.w3c.dom.Node;
@@ -122,5 +124,17 @@ final class GenerateIdFunction
return f;
}
+ public boolean references(QName var)
+ {
+ for (Iterator i = args.iterator(); i.hasNext(); )
+ {
+ if (((Expr) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
}
diff --git a/gnu/xml/transform/IfNode.java b/gnu/xml/transform/IfNode.java
index c977348df..17e2486fe 100644
--- a/gnu/xml/transform/IfNode.java
+++ b/gnu/xml/transform/IfNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -53,19 +53,23 @@ final class IfNode
final Expr test;
- IfNode(TemplateNode children, TemplateNode next, Expr test)
+ IfNode(Expr test)
{
- super(children, next);
this.test = test;
}
TemplateNode clone(Stylesheet stylesheet)
{
- return new IfNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- test.clone(stylesheet));
+ TemplateNode ret = new IfNode(test.clone(stylesheet));
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
@@ -94,6 +98,15 @@ final class IfNode
}
}
+ public boolean references(QName var)
+ {
+ if (test != null && test.references(var))
+ {
+ return true;
+ }
+ return super.references(var);
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer(getClass().getName());
diff --git a/gnu/xml/transform/Key.java b/gnu/xml/transform/Key.java
index 008400f3c..72bd90aed 100644
--- a/gnu/xml/transform/Key.java
+++ b/gnu/xml/transform/Key.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/transform/KeyFunction.java b/gnu/xml/transform/KeyFunction.java
index 233c12f92..a705dc6b0 100644
--- a/gnu/xml/transform/KeyFunction.java
+++ b/gnu/xml/transform/KeyFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -212,5 +212,17 @@ final class KeyFunction
return f;
}
+ public boolean references(QName var)
+ {
+ for (Iterator i = args.iterator(); i.hasNext(); )
+ {
+ if (((Expr) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
}
diff --git a/gnu/xml/transform/LiteralNode.java b/gnu/xml/transform/LiteralNode.java
index 1b5af1a28..0be2b35c8 100644
--- a/gnu/xml/transform/LiteralNode.java
+++ b/gnu/xml/transform/LiteralNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -64,9 +64,8 @@ final class LiteralNode
final Collection elementExcludeResultPrefixes;
- LiteralNode(TemplateNode children, TemplateNode next, Node source)
+ LiteralNode(Node source)
{
- super(children, next);
this.source = source;
if (source.getNodeType() == Node.ELEMENT_NODE)
{
@@ -95,11 +94,16 @@ final class LiteralNode
TemplateNode clone(Stylesheet stylesheet)
{
- return new LiteralNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- source);
+ TemplateNode ret = new LiteralNode(source);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
@@ -174,13 +178,15 @@ final class LiteralNode
}
}
}
- result = doc.adoptNode(result);
- if (result == null)
+ Node result2 = doc.adoptNode(result);
+ if (result2 == null)
{
- String msg = "Error adopting node to result tree";
+ String msg = "Error adopting node to result tree: " +
+ result + " (" + result.getClass().getName() + ")";
DOMSourceLocator l = new DOMSourceLocator(context);
throw new TransformerException(msg, l);
}
+ result = result2;
}
if (nextSibling != null)
{
diff --git a/gnu/xml/transform/MessageNode.java b/gnu/xml/transform/MessageNode.java
index c79060a06..1df716836 100644
--- a/gnu/xml/transform/MessageNode.java
+++ b/gnu/xml/transform/MessageNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -55,19 +55,23 @@ final class MessageNode
final boolean terminate;
- MessageNode(TemplateNode children, TemplateNode next, boolean terminate)
+ MessageNode(boolean terminate)
{
- super(children, next);
this.terminate = terminate;
}
TemplateNode clone(Stylesheet stylesheet)
{
- return new MessageNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- terminate);
+ TemplateNode ret = new MessageNode(terminate);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
diff --git a/gnu/xml/transform/NodeNumberNode.java b/gnu/xml/transform/NodeNumberNode.java
index aae86c6f2..0427686de 100644
--- a/gnu/xml/transform/NodeNumberNode.java
+++ b/gnu/xml/transform/NodeNumberNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -68,13 +68,11 @@ final class NodeNumberNode
final Pattern count;
final Pattern from;
- NodeNumberNode(TemplateNode children, TemplateNode next,
- int level, Pattern count, Pattern from,
+ NodeNumberNode(int level, Pattern count, Pattern from,
TemplateNode format, String lang,
int letterValue, String groupingSeparator, int groupingSize)
{
- super(children, next, format, lang, letterValue, groupingSeparator,
- groupingSize);
+ super(format, lang, letterValue, groupingSeparator, groupingSize);
this.level = level;
this.count = count;
this.from = from;
@@ -82,17 +80,22 @@ final class NodeNumberNode
TemplateNode clone(Stylesheet stylesheet)
{
- return new NodeNumberNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- level,
- (count == null) ? null :
- (Pattern) count.clone(stylesheet),
- (from == null) ? from :
- (Pattern) from.clone(stylesheet),
- format, lang, letterValue,
- groupingSeparator, groupingSize);
+ TemplateNode ret = new NodeNumberNode(level,
+ (count == null) ? null :
+ (Pattern) count.clone(stylesheet),
+ (from == null) ? from :
+ (Pattern) from.clone(stylesheet),
+ format, lang, letterValue,
+ groupingSeparator, groupingSize);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
int[] compute(Stylesheet stylesheet, Node context, int pos, int len)
@@ -212,7 +215,15 @@ final class NodeNumberNode
return false;
}
String cn = current.getLocalName();
- String nn = current.getLocalName();
+ if (cn == null)
+ {
+ cn = current.getNodeName();
+ }
+ String nn = node.getLocalName();
+ if (nn == null)
+ {
+ nn = node.getNodeName();
+ }
if (!cn.equals(nn))
{
return false;
diff --git a/gnu/xml/transform/NumberNode.java b/gnu/xml/transform/NumberNode.java
index b01b983df..b19a7b5e9 100644
--- a/gnu/xml/transform/NumberNode.java
+++ b/gnu/xml/transform/NumberNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -53,24 +53,27 @@ final class NumberNode
final Expr value;
- NumberNode(TemplateNode children, TemplateNode next,
- Expr value, TemplateNode format, String lang,
+ NumberNode(Expr value, TemplateNode format, String lang,
int letterValue, String groupingSeparator, int groupingSize)
{
- super(children, next, format, lang, letterValue, groupingSeparator,
- groupingSize);
+ super(format, lang, letterValue, groupingSeparator, groupingSize);
this.value = value;
}
TemplateNode clone(Stylesheet stylesheet)
{
- return new NumberNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- value.clone(stylesheet),
- format, lang, letterValue,
- groupingSeparator, groupingSize);
+ TemplateNode ret = new NumberNode(value.clone(stylesheet),
+ format, lang, letterValue,
+ groupingSeparator, groupingSize);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
int[] compute(Stylesheet stylesheet, Node context, int pos, int len)
diff --git a/gnu/xml/transform/OtherwiseNode.java b/gnu/xml/transform/OtherwiseNode.java
index 1d9590e51..570310f6b 100644
--- a/gnu/xml/transform/OtherwiseNode.java
+++ b/gnu/xml/transform/OtherwiseNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -50,17 +50,18 @@ final class OtherwiseNode
extends TemplateNode
{
- OtherwiseNode(TemplateNode children, TemplateNode next)
- {
- super(children, next);
- }
-
TemplateNode clone(Stylesheet stylesheet)
{
- return new OtherwiseNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet));
+ TemplateNode ret = new OtherwiseNode();
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
diff --git a/gnu/xml/transform/ParameterNode.java b/gnu/xml/transform/ParameterNode.java
index 5b766d5dc..ef09ea5f9 100644
--- a/gnu/xml/transform/ParameterNode.java
+++ b/gnu/xml/transform/ParameterNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -53,47 +53,51 @@ import gnu.xml.xpath.Expr;
*/
final class ParameterNode
extends TemplateNode
+ implements Comparable
{
- final String name;
+ final QName name;
final Expr select;
- final boolean global;
+ final int type;
- ParameterNode(TemplateNode children, TemplateNode next,
- String name, Expr select, boolean global)
+ ParameterNode(QName name, Expr select, int type)
{
- super(children, next);
this.name = name;
this.select = select;
- this.global = global;
+ this.type = type;
}
TemplateNode clone(Stylesheet stylesheet)
{
- return new ParameterNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- name,
- select.clone(stylesheet),
- global);
+ TemplateNode ret = new ParameterNode(name,
+ select.clone(stylesheet),
+ type);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
- Node context, int pos, int len,
- Node parent, Node nextSibling)
+ Node context, int pos, int len,
+ Node parent, Node nextSibling)
throws TransformerException
{
- boolean apply = global || !stylesheet.bindings.containsKey(name, global);
- if (apply)
+ // push the variable context
+ stylesheet.bindings.push(type);
+ // set the variable
+ Object value = getValue(stylesheet, mode, context, pos, len);
+ if (value != null)
{
- // push the variable context
- stylesheet.bindings.push(global);
- // set the variable
- Object value = getValue(stylesheet, mode, context, pos, len);
- if (value != null)
+ stylesheet.bindings.set(name, value, type);
+ if (stylesheet.debug)
{
- stylesheet.bindings.set(name, value, global);
+ System.err.println(this + ": set to " + value);
}
}
// variable and param don't process children as such
@@ -104,11 +108,8 @@ final class ParameterNode
context, pos, len,
parent, nextSibling);
}
- if (apply)
- {
- // pop the variable context
- stylesheet.bindings.pop(global);
- }
+ // pop the variable context
+ stylesheet.bindings.pop(type);
}
Object getValue(Stylesheet stylesheet, QName mode,
@@ -133,6 +134,38 @@ final class ParameterNode
}
}
+ public boolean references(QName var)
+ {
+ if (select != null && select.references(var))
+ {
+ return true;
+ }
+ return super.references(var);
+ }
+
+ public int compareTo(Object other)
+ {
+ if (other instanceof ParameterNode)
+ {
+ ParameterNode pn = (ParameterNode) other;
+ boolean r1 = references(pn.name);
+ boolean r2 = pn.references(name);
+ if (r1 && r2)
+ {
+ throw new IllegalArgumentException("circular definitions");
+ }
+ if (r1)
+ {
+ return 1;
+ }
+ if (r2)
+ {
+ return -1;
+ }
+ }
+ return 0;
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer(getClass().getName());
@@ -144,9 +177,18 @@ final class ParameterNode
buf.append(",select=");
buf.append(select);
}
- if (global)
+ buf.append(",type=");
+ switch (type)
{
- buf.append(",global");
+ case Bindings.VARIABLE:
+ buf.append("variable");
+ break;
+ case Bindings.PARAM:
+ buf.append("param");
+ break;
+ case Bindings.WITH_PARAM:
+ buf.append("with-param");
+ break;
}
buf.append(']');
return buf.toString();
diff --git a/gnu/xml/transform/ProcessingInstructionNode.java b/gnu/xml/transform/ProcessingInstructionNode.java
index 1eb2bd605..d75f69366 100644
--- a/gnu/xml/transform/ProcessingInstructionNode.java
+++ b/gnu/xml/transform/ProcessingInstructionNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -57,20 +57,23 @@ final class ProcessingInstructionNode
final String name;
- ProcessingInstructionNode(TemplateNode children, TemplateNode next,
- String name)
+ ProcessingInstructionNode(String name)
{
- super(children, next);
this.name = name;
}
TemplateNode clone(Stylesheet stylesheet)
{
- return new ProcessingInstructionNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- name);
+ TemplateNode ret = new ProcessingInstructionNode(name);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
diff --git a/gnu/xml/transform/SAXSerializer.java b/gnu/xml/transform/SAXSerializer.java
index c5e382038..9650e3e05 100644
--- a/gnu/xml/transform/SAXSerializer.java
+++ b/gnu/xml/transform/SAXSerializer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/transform/SortKey.java b/gnu/xml/transform/SortKey.java
index 9ecc91934..d4ffb05e2 100644
--- a/gnu/xml/transform/SortKey.java
+++ b/gnu/xml/transform/SortKey.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -151,4 +151,29 @@ final class SortKey
}
}
+ boolean references(QName var)
+ {
+ if (select != null && select.references(var))
+ {
+ return true;
+ }
+ if (langTemplate != null && langTemplate.references(var))
+ {
+ return true;
+ }
+ if (dataTypeTemplate != null && dataTypeTemplate.references(var))
+ {
+ return true;
+ }
+ if (orderTemplate != null && orderTemplate.references(var))
+ {
+ return true;
+ }
+ if (caseOrderTemplate != null && caseOrderTemplate.references(var))
+ {
+ return true;
+ }
+ return false;
+ }
+
}
diff --git a/gnu/xml/transform/StreamSerializer.java b/gnu/xml/transform/StreamSerializer.java
index 46bded37c..eb045393d 100644
--- a/gnu/xml/transform/StreamSerializer.java
+++ b/gnu/xml/transform/StreamSerializer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -48,6 +48,7 @@ import java.nio.charset.CharsetEncoder;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Map;
import javax.xml.XMLConstants;
import org.w3c.dom.Attr;
@@ -72,6 +73,82 @@ public class StreamSerializer
static final int KET = 0x3e; // >
static final int EQ = 0x3d; // =
+ /**
+ * HTML 4.01 boolean attributes
+ */
+ static final Map HTML_BOOLEAN_ATTRIBUTES = new HashMap();
+ static
+ {
+ HashSet set;
+
+ set = new HashSet();
+ set.add("nohref");
+ HTML_BOOLEAN_ATTRIBUTES.put("area", set);
+
+ set = new HashSet();
+ set.add("ismap");
+ HTML_BOOLEAN_ATTRIBUTES.put("img", set);
+
+ set = new HashSet();
+ set.add("declare");
+ HTML_BOOLEAN_ATTRIBUTES.put("object", set);
+
+ set = new HashSet();
+ set.add("noshade");
+ HTML_BOOLEAN_ATTRIBUTES.put("hr", set);
+
+ set = new HashSet();
+ set.add("compact");
+ HTML_BOOLEAN_ATTRIBUTES.put("dl", set);
+ HTML_BOOLEAN_ATTRIBUTES.put("ol", set);
+ HTML_BOOLEAN_ATTRIBUTES.put("ul", set);
+ HTML_BOOLEAN_ATTRIBUTES.put("dir", set);
+ HTML_BOOLEAN_ATTRIBUTES.put("menu", set);
+
+ set = new HashSet();
+ set.add("checked");
+ set.add("disabled");
+ set.add("readonly");
+ set.add("ismap");
+ HTML_BOOLEAN_ATTRIBUTES.put("input", set);
+
+ set = new HashSet();
+ set.add("multiple");
+ set.add("disabled");
+ HTML_BOOLEAN_ATTRIBUTES.put("select", set);
+
+ set = new HashSet();
+ set.add("disabled");
+ HTML_BOOLEAN_ATTRIBUTES.put("optgroup", set);
+
+ set = new HashSet();
+ set.add("selected");
+ set.add("disabled");
+ HTML_BOOLEAN_ATTRIBUTES.put("option", set);
+
+ set = new HashSet();
+ set.add("disabled");
+ set.add("readonly");
+ HTML_BOOLEAN_ATTRIBUTES.put("textarea", set);
+
+ set = new HashSet();
+ set.add("disabled");
+ HTML_BOOLEAN_ATTRIBUTES.put("button", set);
+
+ set = new HashSet();
+ set.add("nowrap");
+ HTML_BOOLEAN_ATTRIBUTES.put("th", set);
+ HTML_BOOLEAN_ATTRIBUTES.put("td", set);
+
+ set = new HashSet();
+ set.add("noresize");
+ HTML_BOOLEAN_ATTRIBUTES.put("frame", set);
+
+ set = new HashSet();
+ set.add("defer");
+ HTML_BOOLEAN_ATTRIBUTES.put("script", set);
+ }
+
protected final String encoding;
final Charset charset;
final CharsetEncoder encoder;
@@ -118,17 +195,28 @@ public class StreamSerializer
serialize(node, out, false);
}
- void serialize(final Node node, final OutputStream out,
+ void serialize(Node node, final OutputStream out,
boolean convertToCdata)
throws IOException
{
+ while (node != null)
+ {
+ Node next = node.getNextSibling();
+ doSerialize(node, out, convertToCdata);
+ node = next;
+ }
+ }
+
+ private void doSerialize(final Node node, final OutputStream out,
+ boolean convertToCdata)
+ throws IOException
+ {
if (out == null)
{
throw new NullPointerException("no output stream");
}
String value, prefix;
Node children;
- Node next = node.getNextSibling();
String uri = node.getNamespaceURI();
boolean defined = false;
short nt = node.getNodeType();
@@ -149,7 +237,12 @@ public class StreamSerializer
{
break;
}
- define(nsuri, node.getLocalName());
+ String name = node.getLocalName();
+ if (name == null)
+ {
+ name = node.getNodeName();
+ }
+ define(nsuri, name);
}
else if (uri != null && !isDefined(uri))
{
@@ -167,7 +260,8 @@ public class StreamSerializer
out.write(encodeText(a_nodeName));
String a_nodeValue = node.getNodeValue();
if (mode == Stylesheet.OUTPUT_HTML &&
- a_nodeName.equals(a_nodeValue))
+ a_nodeName.equals(a_nodeValue) &&
+ isHTMLBoolean((Attr) node, a_nodeName))
{
break;
}
@@ -324,11 +418,18 @@ public class StreamSerializer
for (Node ctx = html.getFirstChild(); ctx != null;
ctx = ctx.getNextSibling())
{
- if (ctx.getNodeType() == Node.ELEMENT_NODE &&
- "head".equalsIgnoreCase(ctx.getLocalName()))
+ if (ctx.getNodeType() == Node.ELEMENT_NODE)
{
- head = ctx;
- break;
+ String name = ctx.getLocalName();
+ if (name == null)
+ {
+ name = ctx.getNodeName();
+ }
+ if ("head".equalsIgnoreCase(name))
+ {
+ head = ctx;
+ break;
+ }
}
}
if (head == null)
@@ -358,32 +459,39 @@ public class StreamSerializer
for (Node ctx = head.getFirstChild(); ctx != null;
ctx = ctx.getNextSibling())
{
- if (ctx.getNodeType() == Node.ELEMENT_NODE &&
- "meta".equalsIgnoreCase(ctx.getLocalName()))
+ if (ctx.getNodeType() == Node.ELEMENT_NODE)
{
- NamedNodeMap metaAttrs = ctx.getAttributes();
- int len = metaAttrs.getLength();
- String httpEquiv = null;
- Node content = null;
- for (int i = 0; i < len; i++)
+ String name = ctx.getLocalName();
+ if (name == null)
{
- Node attr = metaAttrs.item(i);
- String attrName = attr.getNodeName();
- if ("http-equiv".equalsIgnoreCase(attrName))
+ name = ctx.getNodeName();
+ }
+ if ("meta".equalsIgnoreCase(name))
+ {
+ NamedNodeMap metaAttrs = ctx.getAttributes();
+ int len = metaAttrs.getLength();
+ String httpEquiv = null;
+ Node content = null;
+ for (int i = 0; i < len; i++)
{
- httpEquiv = attr.getNodeValue();
+ Node attr = metaAttrs.item(i);
+ String attrName = attr.getNodeName();
+ if ("http-equiv".equalsIgnoreCase(attrName))
+ {
+ httpEquiv = attr.getNodeValue();
+ }
+ else if ("content".equalsIgnoreCase(attrName))
+ {
+ content = attr;
+ }
}
- else if ("content".equalsIgnoreCase(attrName))
+ if ("Content-Type".equalsIgnoreCase(httpEquiv))
{
- content = attr;
+ meta = ctx;
+ metaContent = content;
+ break;
}
}
- if ("Content-Type".equalsIgnoreCase(httpEquiv))
- {
- meta = ctx;
- metaContent = content;
- break;
- }
}
}
if (meta == null)
@@ -466,10 +574,6 @@ public class StreamSerializer
{
undefine(uri);
}
- if (next != null)
- {
- serialize(next, out, convertToCdata);
- }
}
boolean isDefined(String uri)
@@ -523,12 +627,20 @@ public class StreamSerializer
text = buf.toString();
}
ByteBuffer encoded = encoder.encode(CharBuffer.wrap(text));
+ int len = encoded.limit() - encoded.position();
if (encoded.hasArray())
{
- return encoded.array();
+ byte[] ret = encoded.array();
+ if (ret.length > len)
+ {
+ // Why?
+ byte[] ret2 = new byte[len];
+ System.arraycopy(ret, 0, ret2, 0, len);
+ ret = ret2;
+ }
+ return ret;
}
encoded.flip();
- int len = encoded.limit() - encoded.position();
byte[] ret = new byte[len];
encoded.get(ret, 0, len);
return ret;
@@ -632,4 +744,19 @@ public class StreamSerializer
}
}
+ boolean isHTMLBoolean(Attr attr, String attrName)
+ {
+ attrName = attrName.toLowerCase();
+ Node element = attr.getOwnerElement();
+ String elementName = element.getLocalName();
+ if (elementName == null)
+ {
+ elementName = element.getNodeName();
+ }
+ elementName = elementName.toLowerCase();
+ Collection attributes =
+ (Collection) HTML_BOOLEAN_ATTRIBUTES.get(elementName);
+ return (attributes != null && attributes.contains(attrName));
+ }
+
}
diff --git a/gnu/xml/transform/Stylesheet.java b/gnu/xml/transform/Stylesheet.java
index 6250fd542..99431b699 100644
--- a/gnu/xml/transform/Stylesheet.java
+++ b/gnu/xml/transform/Stylesheet.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -123,6 +123,7 @@ class Stylesheet
/**
* Output options.
*/
+ Node output;
int outputMethod;
String outputVersion;
String outputEncoding;
@@ -248,12 +249,10 @@ class Stylesheet
Test anyNode = new NodeTypeTest((short) 0);
List tests = Collections.singletonList(anyNode);
builtInNodeTemplate =
- new ApplyTemplatesNode(null, null,
- new Selector(Selector.CHILD, tests),
+ new ApplyTemplatesNode(new Selector(Selector.CHILD, tests),
null, null, null, true);
builtInTextTemplate =
- new ValueOfNode(null, null,
- new Selector(Selector.SELF, tests),
+ new ValueOfNode(new Selector(Selector.SELF, tests),
false);
parse(doc.getDocumentElement(), true);
@@ -355,13 +354,21 @@ class Stylesheet
void initTopLevelVariables(Node context)
throws TransformerException
{
- for (Iterator i = variables.iterator(); i.hasNext(); )
+ current = context;
+ // Sort the variables into order
+ // See XSLT 11.4: "If the template or expression specifying the value of
+ // a global variable x references a global variable y, then the value
+ // for y must be computed before the value of x."
+ List topLevel = new ArrayList(variables);
+ Collections.sort(topLevel);
+ for (Iterator i = topLevel.iterator(); i.hasNext(); )
{
ParameterNode var = (ParameterNode) i.next();
bindings.set(var.name,
var.getValue(this, null, context, 1, 1),
- var.global);
+ var.type);
}
+ current = null;
}
// -- NamespaceContext --
@@ -381,13 +388,29 @@ class Stylesheet
// TODO
return Collections.singleton(getPrefix(namespaceURI)).iterator();
}
+
+ final QName getQName(String name)
+ {
+ String localName = name, uri = null, prefix = null;
+ int ci = name.indexOf(':');
+ if (ci != -1)
+ {
+ prefix = name.substring(0, ci);
+ localName = name.substring(ci + 1);
+ uri = getNamespaceURI(prefix);
+ }
+ return new QName(uri, localName, prefix);
+ }
// -- Template selection --
TemplateNode getTemplate(QName mode, Node context, boolean applyImports)
throws TransformerException
{
- //System.err.println("getTemplate: mode="+mode+" context="+context);
+ if (debug)
+ {
+ System.err.println("getTemplate: mode="+mode+" context="+context);
+ }
Set candidates = new TreeSet();
for (Iterator j = templates.iterator(); j.hasNext(); )
{
@@ -417,7 +440,10 @@ class Stylesheet
{
// Apply built-in template
// Current template is unchanged
- //System.err.println("\tbuiltInTemplate context="+context);
+ if (debug)
+ {
+ System.err.println("\tbuiltInTemplate context="+context);
+ }
switch (context.getNodeType())
{
case Node.ELEMENT_NODE:
@@ -438,7 +464,10 @@ class Stylesheet
Template t = (Template) candidates.iterator().next();
// Set current template
currentTemplate = t;
- //System.err.println("\ttemplate="+t+" context="+context);
+ if (debug)
+ {
+ System.err.println("\ttemplate="+t+" context="+context);
+ }
return t.node;
}
}
@@ -495,7 +524,8 @@ class Stylesheet
QName mode = (mm == null) ? null : getQName(mm);
double priority = (p == null) ? Template.DEFAULT_PRIORITY :
Double.parseDouble(p);
- return new Template(this, name, match, parse(node.getFirstChild()),
+ Node children = node.getFirstChild();
+ return new Template(this, name, match, parse(children),
precedence, priority, mode);
}
@@ -505,6 +535,7 @@ class Stylesheet
final void parseOutput(Node node, NamedNodeMap attrs)
throws TransformerConfigurationException
{
+ output = node;
String method = getAttribute(attrs, "method");
if ("xml".equals(method) || method == null)
{
@@ -654,11 +685,17 @@ class Stylesheet
void parse(Node node, boolean root)
throws TransformerConfigurationException
{
- if (node == null)
+ while (node != null)
{
- return;
+ current = node;
+ doParse(node, root);
+ node = node.getNextSibling();
}
- current = node;
+ }
+
+ void doParse(Node node, boolean root)
+ throws TransformerConfigurationException
+ {
try
{
String namespaceUri = node.getNamespaceURI();
@@ -689,19 +726,21 @@ class Stylesheet
}
}
parse(node.getFirstChild(), false);
- return;
}
else if ("template".equals(name))
{
- templates.addFirst(parseTemplate(node, attrs));
+ templates.add(parseTemplate(node, attrs));
}
else if ("param".equals(name) ||
"variable".equals(name))
{
- boolean global = "variable".equals(name);
+ int type = "variable".equals(name) ?
+ Bindings.VARIABLE : Bindings.PARAM;
TemplateNode content = parse(node.getFirstChild());
- String paramName = getRequiredAttribute(attrs, "name", node);
+ QName paramName =
+ getQName(getRequiredAttribute(attrs, "name", node));
String select = getAttribute(attrs, "select");
+ ParameterNode param;
if (select != null && select.length() > 0)
{
if (content != null)
@@ -712,17 +751,14 @@ class Stylesheet
throw new TransformerConfigurationException(msg, l);
}
Expr expr = (Expr) xpath.compile(select);
- variables.add(new ParameterNode(null, null,
- paramName,
- expr, global));
+ param = new ParameterNode(paramName, expr, type);
}
else
{
- variables.add(new ParameterNode(content, null,
- paramName,
- null, global));
+ param = new ParameterNode(paramName, null, type);
+ param.children = content;
}
- bindings.set(paramName, content, global);
+ variables.add(param);
}
else if ("include".equals(name) || "import".equals(name))
{
@@ -784,7 +820,6 @@ class Stylesheet
{
parseAttributeSet(node, attrs);
}
- parse(node.getNextSibling(), false);
}
else if (root)
{
@@ -810,7 +845,6 @@ class Stylesheet
else
{
// Skip unknown elements, text, comments, etc
- parse(node.getNextSibling(), false);
}
}
catch (TransformerException e)
@@ -848,20 +882,6 @@ class Stylesheet
}
}
- final QName getQName(String name)
- {
- QName qName = QName.valueOf(name);
- String prefix = qName.getPrefix();
- String uri = qName.getNamespaceURI();
- if (prefix != null && (uri == null || uri.length() == 0))
- {
- uri = getNamespaceURI(prefix);
- String localName = qName.getLocalPart();
- qName = new QName(uri, localName, prefix);
- }
- return qName;
- }
-
final TemplateNode parseAttributeValueTemplate(String value, Node source)
throws TransformerConfigurationException, XPathExpressionException
{
@@ -949,12 +969,16 @@ class Stylesheet
{
// Expression text
Expr select = (Expr) xpath.compile(token);
- ret = new ValueOfNode(null, ret, select, false);
+ TemplateNode ret2 = new ValueOfNode(select, false);
+ ret2.next = ret;
+ ret = ret2;
}
else
{
// Verbatim text
- ret = new LiteralNode(null, ret, doc.createTextNode(token));
+ TemplateNode ret2 = new LiteralNode(doc.createTextNode(token));
+ ret2.next = ret;
+ ret = ret2;
}
}
return ret;
@@ -1095,7 +1119,7 @@ class Stylesheet
/**
* apply-templates
*/
- final TemplateNode parseApplyTemplates(Node node, Node children, Node next)
+ final TemplateNode parseApplyTemplates(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
@@ -1106,32 +1130,32 @@ class Stylesheet
{
s = "child::node()";
}
+ Node children = node.getFirstChild();
List sortKeys = parseSortKeys(children);
List withParams = parseWithParams(children);
Expr select = (Expr) xpath.compile(s);
- return new ApplyTemplatesNode(null, parse(next),
- select, mode,
+ return new ApplyTemplatesNode(select, mode,
sortKeys, withParams, false);
}
/**
* call-template
*/
- final TemplateNode parseCallTemplate(Node node, Node children, Node next)
+ final TemplateNode parseCallTemplate(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
String n = getRequiredAttribute(attrs, "name", node);
QName name = getQName(n);
+ Node children = node.getFirstChild();
List withParams = parseWithParams(children);
- return new CallTemplateNode(null, parse(next), name,
- withParams);
+ return new CallTemplateNode(name, withParams);
}
/**
* value-of
*/
- final TemplateNode parseValueOf(Node node, Node children, Node next)
+ final TemplateNode parseValueOf(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
@@ -1139,50 +1163,59 @@ class Stylesheet
String doe = getAttribute(attrs, "disable-output-escaping");
boolean d = "yes".equals(doe);
Expr select = (Expr) xpath.compile(s);
- return new ValueOfNode(null, parse(next), select, d);
+ return new ValueOfNode(select, d);
}
/**
* for-each
*/
- final TemplateNode parseForEach(Node node, Node children, Node next)
+ final TemplateNode parseForEach(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
String s = getRequiredAttribute(attrs, "select", node);
+ Node children = node.getFirstChild();
List sortKeys = parseSortKeys(children);
Expr select = (Expr) xpath.compile(s);
- return new ForEachNode(parse(children), parse(next), select, sortKeys);
+ ForEachNode ret = new ForEachNode(select, sortKeys);
+ ret.children = parse(children);
+ return ret;
}
/**
* if
*/
- final TemplateNode parseIf(Node node, Node children, Node next)
+ final TemplateNode parseIf(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
String t = getRequiredAttribute(attrs, "test", node);
Expr test = (Expr) xpath.compile(t);
- return new IfNode(parse(children), parse(next), test);
+ Node children = node.getFirstChild();
+ IfNode ret = new IfNode(test);
+ ret.children = parse(children);
+ return ret;
}
/**
* when
*/
- final TemplateNode parseWhen(Node node, Node children, Node next)
+ final TemplateNode parseWhen(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
String t = getRequiredAttribute(attrs, "test", node);
Expr test = (Expr) xpath.compile(t);
- return new WhenNode(parse(children), parse(next), test);
+ Node children = node.getFirstChild();
+ WhenNode ret = new WhenNode(test);
+ ret.children = parse(children);
+ return ret;
}
/**
* element
*/
- final TemplateNode parseElement(Node node, Node children, Node next)
+ final TemplateNode parseElement(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
@@ -1192,13 +1225,16 @@ class Stylesheet
TemplateNode n = parseAttributeValueTemplate(name, node);
TemplateNode ns = (namespace == null) ? null :
parseAttributeValueTemplate(namespace, node);
- return new ElementNode(parse(children), parse(next), n, ns, uas, node);
+ Node children = node.getFirstChild();
+ ElementNode ret = new ElementNode(n, ns, uas, node);
+ ret.children = parse(children);
+ return ret;
}
/**
* attribute
*/
- final TemplateNode parseAttribute(Node node, Node children, Node next)
+ final TemplateNode parseAttribute(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
@@ -1207,49 +1243,59 @@ class Stylesheet
TemplateNode n = parseAttributeValueTemplate(name, node);
TemplateNode ns = (namespace == null) ? null :
parseAttributeValueTemplate(namespace, node);
- return new AttributeNode(parse(children), parse(next), n, ns, node);
+ Node children = node.getFirstChild();
+ AttributeNode ret = new AttributeNode(n, ns, node);
+ ret.children = parse(children);
+ return ret;
}
/**
* text
*/
- final TemplateNode parseText(Node node, Node children, Node next)
+ final TemplateNode parseText(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
String doe = getAttribute(attrs, "disable-output-escaping");
boolean d = "yes".equals(doe);
- return new TextNode(parse(children), parse(next), d);
+ Node children = node.getFirstChild();
+ TextNode ret = new TextNode(d);
+ ret.children = parse(children);
+ return ret;
}
/**
* copy
*/
- final TemplateNode parseCopy(Node node, Node children, Node next)
+ final TemplateNode parseCopy(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
String uas = getAttribute(attrs, "use-attribute-sets");
- return new CopyNode(parse(children), parse(next), uas);
+ Node children = node.getFirstChild();
+ CopyNode ret = new CopyNode(uas);
+ ret.children = parse(children);
+ return ret;
}
/**
* processing-instruction
*/
- final TemplateNode parseProcessingInstruction(Node node, Node children,
- Node next)
+ final TemplateNode parseProcessingInstruction(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
String name = getRequiredAttribute(attrs, "name", node);
- return new ProcessingInstructionNode(parse(children),
- parse(next), name);
+ Node children = node.getFirstChild();
+ ProcessingInstructionNode ret = new ProcessingInstructionNode(name);
+ ret.children = parse(children);
+ return ret;
}
/**
* number
*/
- final TemplateNode parseNumber(Node node, Node children, Node next)
+ final TemplateNode parseNumber(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
@@ -1269,12 +1315,13 @@ class Stylesheet
String gz = getAttribute(attrs, "grouping-size");
int gz2 = (gz != null && gz.length() > 0) ?
Integer.parseInt(gz) : 1;
+ Node children = node.getFirstChild();
+ TemplateNode ret;
if (v != null && v.length() > 0)
{
Expr value = (Expr) xpath.compile(v);
- return new NumberNode(parse(children), parse(next),
- value, format, lang,
- letterValue, gs, gz2);
+ ret = new NumberNode(value, format, lang,
+ letterValue, gs, gz2);
}
else
{
@@ -1311,35 +1358,42 @@ class Stylesheet
throw new TransformerConfigurationException(msg);
}
}
- return new NodeNumberNode(parse(children), parse(next),
- level, count, from,
- format, lang,
- letterValue, gs, gz2);
+ ret = new NodeNumberNode(level, count, from,
+ format, lang,
+ letterValue, gs, gz2);
}
+ ret.children = parse(children);
+ return ret;
}
/**
* copy-of
*/
- final TemplateNode parseCopyOf(Node node, Node children, Node next)
+ final TemplateNode parseCopyOf(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
String s = getRequiredAttribute(attrs, "select", node);
Expr select = (Expr) xpath.compile(s);
- return new CopyOfNode(parse(children), parse(next), select);
+ Node children = node.getFirstChild();
+ CopyOfNode ret = new CopyOfNode(select);
+ ret.children = parse(children);
+ return ret;
}
/**
* message
*/
- final TemplateNode parseMessage(Node node, Node children, Node next)
+ final TemplateNode parseMessage(Node node)
throws TransformerConfigurationException, XPathExpressionException
{
NamedNodeMap attrs = node.getAttributes();
String t = getAttribute(attrs, "terminate");
boolean terminate = "yes".equals(t);
- return new MessageNode(parse(children), parse(next), terminate);
+ Node children = node.getFirstChild();
+ MessageNode ret = new MessageNode(terminate);
+ ret.children = parse(children);
+ return ret;
}
/**
@@ -1348,14 +1402,34 @@ class Stylesheet
final TemplateNode parse(Node node)
throws TransformerConfigurationException
{
- if (node == null)
+ TemplateNode first = null;
+ TemplateNode previous = null;
+ while (node != null)
{
- return null;
+ Node next = node.getNextSibling();
+ TemplateNode tnode = doParse(node);
+ if (tnode != null)
+ {
+ if (first == null)
+ {
+ first = tnode;
+ }
+ if (previous != null)
+ {
+ previous.next = tnode;
+ }
+ previous = tnode;
+ }
+ node = next;
}
+ return first;
+ }
+
+ private final TemplateNode doParse(Node node)
+ throws TransformerConfigurationException
+ {
// Hack to associate the document function with its declaring node
current = node;
- Node children = node.getFirstChild();
- Node next = node.getNextSibling();
try
{
String namespaceUri = node.getNamespaceURI();
@@ -1365,72 +1439,85 @@ class Stylesheet
String name = node.getLocalName();
if ("apply-templates".equals(name))
{
- return parseApplyTemplates(node, children, next);
+ return parseApplyTemplates(node);
}
else if ("call-template".equals(name))
{
- return parseCallTemplate(node, children, next);
+ return parseCallTemplate(node);
}
else if ("value-of".equals(name))
{
- return parseValueOf(node, children, next);
+ return parseValueOf(node);
}
else if ("for-each".equals(name))
{
- return parseForEach(node, children, next);
+ return parseForEach(node);
}
else if ("if".equals(name))
{
- return parseIf(node, children, next);
+ return parseIf(node);
}
else if ("choose".equals(name))
{
- return new ChooseNode(parse(children), parse(next));
+ Node children = node.getFirstChild();
+ ChooseNode ret = new ChooseNode();
+ ret.children = parse(children);
+ return ret;
}
else if ("when".equals(name))
{
- return parseWhen(node, children, next);
+ return parseWhen(node);
}
else if ("otherwise".equals(name))
{
- return new OtherwiseNode(parse(children), parse(next));
+ Node children = node.getFirstChild();
+ OtherwiseNode ret = new OtherwiseNode();
+ ret.children = parse(children);
+ return ret;
}
else if ("element".equals(name))
{
- return parseElement(node, children, next);
+ return parseElement(node);
}
else if ("attribute".equals(name))
{
- return parseAttribute(node, children, next);
+ return parseAttribute(node);
}
else if ("text".equals(name))
{
- return parseText(node, children, next);
+ return parseText(node);
}
else if ("copy".equals(name))
{
- return parseCopy(node, children, next);
+ return parseCopy(node);
}
else if ("processing-instruction".equals(name))
{
- return parseProcessingInstruction(node, children, next);
+ return parseProcessingInstruction(node);
}
else if ("comment".equals(name))
{
- return new CommentNode(parse(children), parse(next));
+ Node children = node.getFirstChild();
+ CommentNode ret = new CommentNode();
+ ret.children = parse(children);
+ return ret;
}
else if ("number".equals(name))
{
- return parseNumber(node, children, next);
+ return parseNumber(node);
}
else if ("param".equals(name) ||
"variable".equals(name))
{
- boolean global = "variable".equals(name);
+ int type = "variable".equals(name) ?
+ Bindings.VARIABLE : Bindings.PARAM;
NamedNodeMap attrs = node.getAttributes();
+ Node children = node.getFirstChild();
TemplateNode content = parse(children);
- String paramName = getRequiredAttribute(attrs, "name", node);
+ QName paramName =
+ getQName(getRequiredAttribute(attrs, "name", node));
String select = getAttribute(attrs, "select");
+ ParameterNode ret;
if (select != null)
{
if (content != null)
@@ -1441,39 +1528,42 @@ class Stylesheet
throw new TransformerConfigurationException(msg, l);
}
Expr expr = (Expr) xpath.compile(select);
- return new ParameterNode(null, parse(next),
- paramName, expr, global);
+ ret = new ParameterNode(paramName, expr, type);
}
else
{
- return new ParameterNode(content, parse(next),
- paramName, null, global);
+ ret = new ParameterNode(paramName, null, type);
+ ret.children = content;
}
+ return ret;
}
else if ("copy-of".equals(name))
{
- return parseCopyOf(node, children, next);
+ return parseCopyOf(node);
}
else if ("message".equals(name))
{
- return parseMessage(node, children, next);
+ return parseMessage(node);
}
else if ("apply-imports".equals(name))
{
- return new ApplyImportsNode(parse(children), parse(next));
+ Node children = node.getFirstChild();
+ ApplyImportsNode ret = new ApplyImportsNode();
+ ret.children = parse(children);
+ return ret;
}
else
{
// xsl:fallback
// Pass over any other XSLT nodes
- return parse(next);
+ return null;
}
}
String prefix = node.getPrefix();
if (extensionElementPrefixes.contains(prefix))
{
// Pass over extension elements
- return parse(next);
+ return null;
}
switch (node.getNodeType())
{
@@ -1483,13 +1573,18 @@ class Stylesheet
if (!isPreserved(text))
{
// Strip
+ /*String data = text.getData().trim();
+ if (data.length() > 0)
+ {
+ text.setData(data);
+ } // else */
text.getParentNode().removeChild(text);
- return parse(next);
+ return null;
}
break;
case Node.COMMENT_NODE:
// Ignore comments
- return parse(next);
+ return null;
case Node.ELEMENT_NODE:
// Check for attribute value templates and use-attribute-sets
NamedNodeMap attrs = node.getAttributes();
@@ -1519,6 +1614,7 @@ class Stylesheet
{
// Create an element-producing template node instead
// with appropriate attribute-producing child template nodes
+ Node children = node.getFirstChild();
TemplateNode child = parse(children);
for (int i = 0; i < len; i++)
{
@@ -1537,15 +1633,19 @@ class Stylesheet
parseAttributeValueTemplate(aname, node);
TemplateNode ns = (ans == null) ? null :
parseAttributeValueTemplate(ans, node);
- child = new AttributeNode(grandchild, child, n, ns, attr);
+ TemplateNode newChild = new AttributeNode(n, ns, attr);
+ newChild.children = grandchild;
+ newChild.next = child;
+ child = newChild;
}
String ename = node.getNodeName();
TemplateNode n = parseAttributeValueTemplate(ename, node);
TemplateNode ns = (namespaceUri == null) ? null :
parseAttributeValueTemplate(namespaceUri, node);
- return new ElementNode(child, parse(next),
- n, ns, useAttributeSets,
- node);
+ ElementNode ret = new ElementNode(n, ns, useAttributeSets,
+ node);
+ ret.children = child;
+ return ret;
}
// Otherwise fall through
break;
@@ -1556,7 +1656,10 @@ class Stylesheet
DOMSourceLocator l = new DOMSourceLocator(node);
throw new TransformerConfigurationException(e.getMessage(), l, e);
}
- return new LiteralNode(parse(children), parse(next), node);
+ Node children = node.getFirstChild();
+ LiteralNode ret = new LiteralNode(node);
+ ret.children = parse(children);
+ return ret;
}
final List parseSortKeys(Node node)
@@ -1609,7 +1712,8 @@ class Stylesheet
{
NamedNodeMap attrs = node.getAttributes();
TemplateNode content = parse(node.getFirstChild());
- String name = getRequiredAttribute(attrs, "name", node);
+ QName name =
+ getQName(getRequiredAttribute(attrs, "name", node));
String select = getAttribute(attrs, "select");
if (select != null)
{
diff --git a/gnu/xml/transform/SystemPropertyFunction.java b/gnu/xml/transform/SystemPropertyFunction.java
index 03518e9cb..038df0169 100644
--- a/gnu/xml/transform/SystemPropertyFunction.java
+++ b/gnu/xml/transform/SystemPropertyFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.transform;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
import javax.xml.namespace.QName;
import javax.xml.xpath.XPathFunction;
@@ -124,5 +125,17 @@ final class SystemPropertyFunction
return f;
}
+ public boolean references(QName var)
+ {
+ for (Iterator i = args.iterator(); i.hasNext(); )
+ {
+ if (((Expr) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
}
diff --git a/gnu/xml/transform/Template.java b/gnu/xml/transform/Template.java
index 0e7c67a7e..e3c172fb5 100644
--- a/gnu/xml/transform/Template.java
+++ b/gnu/xml/transform/Template.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -206,7 +206,7 @@ class Template
Node parent, Node nextSibling)
throws TransformerException
{
- //System.err.println("...applying " + toString() + " to " + context);
+ System.err.println("...applying " + toString() + " to " + context);
if (node != null)
{
node.apply(stylesheet, mode,
diff --git a/gnu/xml/transform/TemplateNode.java b/gnu/xml/transform/TemplateNode.java
index 1fe37c272..36b25cf52 100644
--- a/gnu/xml/transform/TemplateNode.java
+++ b/gnu/xml/transform/TemplateNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -55,14 +55,8 @@ abstract class TemplateNode
static final Comparator documentOrderComparator =
new DocumentOrderComparator();
- final TemplateNode children;
- final TemplateNode next;
-
- TemplateNode(TemplateNode children, TemplateNode next)
- {
- this.children = children;
- this.next = next;
- }
+ TemplateNode children;
+ TemplateNode next;
final void apply(Stylesheet stylesheet, QName mode,
Node context, int pos, int len,
@@ -81,6 +75,8 @@ abstract class TemplateNode
if (stylesheet.debug)
{
System.err.println("Applying " + toString());
+ System.err.println("\twith context=" + context + ", pos=" + pos +
+ ", len=" + len);
}
doApply(stylesheet, mode, context, pos, len, parent, nextSibling);
}
@@ -92,6 +88,19 @@ abstract class TemplateNode
abstract TemplateNode clone(Stylesheet stylesheet);
+ public boolean references(QName var)
+ {
+ if (children != null && children.references(var))
+ {
+ return true;
+ }
+ if (next != null && next.references(var))
+ {
+ return true;
+ }
+ return false;
+ }
+
/**
* Debugging
*/
diff --git a/gnu/xml/transform/TemplatesImpl.java b/gnu/xml/transform/TemplatesImpl.java
index 173fb036f..527bd979d 100644
--- a/gnu/xml/transform/TemplatesImpl.java
+++ b/gnu/xml/transform/TemplatesImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/transform/TextNode.java b/gnu/xml/transform/TextNode.java
index 70a8ce40a..1b581e5ac 100644
--- a/gnu/xml/transform/TextNode.java
+++ b/gnu/xml/transform/TextNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -56,20 +56,23 @@ final class TextNode
final boolean disableOutputEscaping;
- TextNode(TemplateNode children, TemplateNode next,
- boolean disableOutputEscaping)
+ TextNode(boolean disableOutputEscaping)
{
- super(children, next);
this.disableOutputEscaping = disableOutputEscaping;
}
TemplateNode clone(Stylesheet stylesheet)
{
- return new TextNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- disableOutputEscaping);
+ TemplateNode ret = new TextNode(disableOutputEscaping);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
diff --git a/gnu/xml/transform/TransformerFactoryImpl.java b/gnu/xml/transform/TransformerFactoryImpl.java
index 9c4d9da8a..dde2017ff 100644
--- a/gnu/xml/transform/TransformerFactoryImpl.java
+++ b/gnu/xml/transform/TransformerFactoryImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/transform/TransformerImpl.java b/gnu/xml/transform/TransformerImpl.java
index c0af0fca4..a36aa6173 100644
--- a/gnu/xml/transform/TransformerImpl.java
+++ b/gnu/xml/transform/TransformerImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -48,7 +48,12 @@ import java.net.UnknownServiceException;
import java.net.URL;
import java.net.URLConnection;
import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
import java.util.Properties;
+import java.util.StringTokenizer;
+import javax.xml.namespace.QName;
import javax.xml.transform.ErrorListener;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Result;
@@ -101,7 +106,7 @@ class TransformerImpl
if (stylesheet != null)
{
// Set up parameter context for this transformer
- stylesheet.bindings.push(false);
+ stylesheet.bindings.push(Bindings.PARAM);
}
}
@@ -241,8 +246,10 @@ class TransformerImpl
boolean standalone =
"yes".equals(outputProperties.getProperty(OutputKeys.STANDALONE));
String mediaType = outputProperties.getProperty(OutputKeys.MEDIA_TYPE);
- // TODO cdata-section-elements
- // TODO indent
+ String cdataSectionElements =
+ outputProperties.getProperty(OutputKeys.CDATA_SECTION_ELEMENTS);
+ boolean indent =
+ "yes".equals(outputProperties.getProperty(OutputKeys.INDENT));
if (created)
{
// Discover document element
@@ -309,6 +316,44 @@ class TransformerImpl
{
parent.setUserData("media-type", mediaType, stylesheet);
}
+ if (cdataSectionElements != null)
+ {
+ List list = new LinkedList();
+ StringTokenizer st = new StringTokenizer(cdataSectionElements);
+ while (st.hasMoreTokens())
+ {
+ String name = st.nextToken();
+ String localName = name;
+ String uri = null;
+ String prefix = null;
+ int ci = name.indexOf(':');
+ if (ci != -1)
+ {
+ // Use namespaces defined on xsl:output node to resolve
+ // namespaces for QName
+ prefix = name.substring(0, ci);
+ localName = name.substring(ci + 1);
+ uri = stylesheet.output.lookupNamespaceURI(prefix);
+ }
+ list.add(new QName(uri, localName, prefix));
+ }
+ if (!list.isEmpty())
+ {
+ Document resultDoc = (parent instanceof Document) ?
+ (Document) parent :
+ parent.getOwnerDocument();
+ convertCdataSectionElements(resultDoc, parent, list);
+ }
+ }
+ if (indent)
+ {
+ parent.normalize();
+ strip(parent);
+ Document resultDoc = (parent instanceof Document) ?
+ (Document) parent :
+ parent.getOwnerDocument();
+ reindent(resultDoc, parent, 0);
+ }
// Render result to the target device
if (outputTarget instanceof DOMResult)
{
@@ -407,12 +452,21 @@ class TransformerImpl
}
parent.removeChild(node);
}
- if (nt == Node.TEXT_NODE) // CDATA sections ?
+ if (nt == Node.TEXT_NODE || nt == Node.CDATA_SECTION_NODE)
{
if (!stylesheet.isPreserved((Text) node))
{
node.getParentNode().removeChild(node);
}
+ else
+ {
+ String text = node.getNodeValue();
+ String stripped = text.trim();
+ if (!text.equals(stripped))
+ {
+ node.setNodeValue(stripped);
+ }
+ }
}
else
{
@@ -505,7 +559,7 @@ class TransformerImpl
{
if (stylesheet != null)
{
- stylesheet.bindings.set(name, value, false);
+ stylesheet.bindings.set(new QName(null, name), value, Bindings.PARAM);
}
}
@@ -513,7 +567,7 @@ class TransformerImpl
{
if (stylesheet != null)
{
- return stylesheet.bindings.get(name, null, 1, 1);
+ return stylesheet.bindings.get(new QName(null, name), null, 1, 1);
}
return null;
}
@@ -522,8 +576,8 @@ class TransformerImpl
{
if (stylesheet != null)
{
- stylesheet.bindings.pop(false);
- stylesheet.bindings.push(false);
+ stylesheet.bindings.pop(Bindings.PARAM);
+ stylesheet.bindings.push(Bindings.PARAM);
}
}
@@ -577,4 +631,139 @@ class TransformerImpl
return errorListener;
}
+ static final String INDENT_WHITESPACE = " ";
+
+ /*
+ * Apply indent formatting to the given tree.
+ */
+ void reindent(Document doc, Node node, int offset)
+ {
+ if (node.hasChildNodes())
+ {
+ boolean markupContent = false;
+ boolean textContent = false;
+ List children = new LinkedList();
+ Node ctx = node.getFirstChild();
+ while (ctx != null)
+ {
+ switch (ctx.getNodeType())
+ {
+ case Node.ELEMENT_NODE:
+ case Node.PROCESSING_INSTRUCTION_NODE:
+ case Node.DOCUMENT_TYPE_NODE:
+ markupContent = true;
+ break;
+ case Node.TEXT_NODE:
+ case Node.CDATA_SECTION_NODE:
+ case Node.ENTITY_REFERENCE_NODE:
+ case Node.COMMENT_NODE:
+ textContent = true;
+ break;
+ }
+ children.add(ctx);
+ ctx = ctx.getNextSibling();
+ }
+ if (markupContent)
+ {
+ if (textContent)
+ {
+ // XXX handle mixed content differently?
+ }
+ int nodeType = node.getNodeType();
+ if (nodeType == Node.DOCUMENT_NODE)
+ {
+ for (Iterator i = children.iterator(); i.hasNext(); )
+ {
+ ctx = (Node) i.next();
+ reindent(doc, ctx, offset + 1);
+ }
+ }
+ else
+ {
+ StringBuffer buf = new StringBuffer();
+ buf.append('\n');
+ for (int i = 0; i < offset + 1; i++)
+ {
+ buf.append(INDENT_WHITESPACE);
+ }
+ String ws = buf.toString();
+ for (Iterator i = children.iterator(); i.hasNext(); )
+ {
+ ctx = (Node) i.next();
+ node.insertBefore(doc.createTextNode(ws), ctx);
+ reindent(doc, ctx, offset + 1);
+ }
+ buf = new StringBuffer();
+ buf.append('\n');
+ ws = buf.toString();
+ for (int i = 0; i < offset; i++)
+ {
+ buf.append(INDENT_WHITESPACE);
+ }
+ node.appendChild(doc.createTextNode(ws));
+ }
+ }
+ }
+ }
+
+ /**
+ * Converts the text node children of any cdata-section-elements in the
+ * tree to CDATA section nodes.
+ */
+ void convertCdataSectionElements(Document doc, Node node, List list)
+ {
+ if (node.getNodeType() == Node.ELEMENT_NODE)
+ {
+ boolean match = false;
+ for (Iterator i = list.iterator(); i.hasNext(); )
+ {
+ QName qname = (QName) i.next();
+ if (match(qname, node))
+ {
+ match = true;
+ break;
+ }
+ }
+ if (match)
+ {
+ Node ctx = node.getFirstChild();
+ while (ctx != null)
+ {
+ if (ctx.getNodeType() == Node.TEXT_NODE)
+ {
+ Node cdata = doc.createCDATASection(ctx.getNodeValue());
+ node.replaceChild(cdata, ctx);
+ ctx = cdata;
+ }
+ ctx = ctx.getNextSibling();
+ }
+ }
+ }
+ Node ctx = node.getFirstChild();
+ while (ctx != null)
+ {
+ if (ctx.hasChildNodes())
+ {
+ convertCdataSectionElements(doc, ctx, list);
+ }
+ ctx = ctx.getNextSibling();
+ }
+ }
+
+ boolean match(QName qname, Node node)
+ {
+ String ln1 = qname.getLocalPart();
+ String ln2 = node.getLocalName();
+ if (ln2 == null)
+ {
+ return ln1.equals(node.getNodeName());
+ }
+ else
+ {
+ String uri1 = qname.getNamespaceURI();
+ String uri2 = node.getNamespaceURI();
+ return (uri1.equals(uri2) && ln1.equals(ln2));
+ }
+ }
+
}
diff --git a/gnu/xml/transform/TransformerOutputProperties.java b/gnu/xml/transform/TransformerOutputProperties.java
index d56e795f7..cc8593c46 100644
--- a/gnu/xml/transform/TransformerOutputProperties.java
+++ b/gnu/xml/transform/TransformerOutputProperties.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/transform/URIResolverEntityResolver.java b/gnu/xml/transform/URIResolverEntityResolver.java
index ef2901524..762416fde 100644
--- a/gnu/xml/transform/URIResolverEntityResolver.java
+++ b/gnu/xml/transform/URIResolverEntityResolver.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/transform/UnparsedEntityUriFunction.java b/gnu/xml/transform/UnparsedEntityUriFunction.java
index 41a606e6e..92002f1f5 100644
--- a/gnu/xml/transform/UnparsedEntityUriFunction.java
+++ b/gnu/xml/transform/UnparsedEntityUriFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,7 +39,9 @@ package gnu.xml.transform;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.Iterator;
import java.util.List;
+import javax.xml.namespace.QName;
import javax.xml.xpath.XPathFunction;
import javax.xml.xpath.XPathFunctionException;
import org.w3c.dom.DocumentType;
@@ -114,5 +116,17 @@ final class UnparsedEntityUriFunction
return f;
}
+ public boolean references(QName var)
+ {
+ for (Iterator i = args.iterator(); i.hasNext(); )
+ {
+ if (((Expr) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
}
diff --git a/gnu/xml/transform/ValueOfNode.java b/gnu/xml/transform/ValueOfNode.java
index 9eb2fde5d..430598a94 100644
--- a/gnu/xml/transform/ValueOfNode.java
+++ b/gnu/xml/transform/ValueOfNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,8 @@ exception statement from your version. */
package gnu.xml.transform;
+import java.util.Collection;
+import java.util.Iterator;
import javax.xml.namespace.QName;
import javax.xml.transform.TransformerException;
import org.w3c.dom.Document;
@@ -56,22 +58,25 @@ final class ValueOfNode
final Expr select;
final boolean disableOutputEscaping;
- ValueOfNode(TemplateNode children, TemplateNode next, Expr select,
- boolean disableOutputEscaping)
+ ValueOfNode(Expr select, boolean disableOutputEscaping)
{
- super(children, next);
this.select = select;
this.disableOutputEscaping = disableOutputEscaping;
}
TemplateNode clone(Stylesheet stylesheet)
{
- return new ValueOfNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- select.clone(stylesheet),
- disableOutputEscaping);
+ TemplateNode ret = new ValueOfNode(select.clone(stylesheet),
+ disableOutputEscaping);
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
@@ -80,8 +85,29 @@ final class ValueOfNode
throws TransformerException
{
Object ret = select.evaluate(context, pos, len);
- String value = Expr._string(context, ret);
- //System.err.println("value-of: "+context+" "+ select + " -> "+ value);
+ /*if (stylesheet.debug)
+ {
+ System.err.println("value-of: " + select + " -> " + ret);
+ }*/
+ String value;
+ if (ret instanceof Collection)
+ {
+ StringBuffer buf = new StringBuffer();
+ for (Iterator i = ((Collection) ret).iterator(); i.hasNext(); )
+ {
+ Node node = (Node) i.next();
+ buf.append(Expr.stringValue(node));
+ }
+ value = buf.toString();
+ }
+ else
+ {
+ value = Expr._string(context, ret);
+ }
+ if (stylesheet.debug)
+ {
+ System.err.println("value-of: "+context+" "+ select + " -> "+ value);
+ }
if (value != null && value.length() > 0)
{
Document doc = (parent instanceof Document) ?
@@ -109,6 +135,15 @@ final class ValueOfNode
}
}
+ public boolean references(QName var)
+ {
+ if (select != null && select.references(var))
+ {
+ return true;
+ }
+ return super.references(var);
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer(getClass().getName());
diff --git a/gnu/xml/transform/WhenNode.java b/gnu/xml/transform/WhenNode.java
index f2204660a..231f2693b 100644
--- a/gnu/xml/transform/WhenNode.java
+++ b/gnu/xml/transform/WhenNode.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -53,19 +53,23 @@ final class WhenNode
final Expr test;
- WhenNode(TemplateNode children, TemplateNode next, Expr test)
+ WhenNode(Expr test)
{
- super(children, next);
this.test = test;
}
TemplateNode clone(Stylesheet stylesheet)
{
- return new WhenNode((children == null) ? null :
- children.clone(stylesheet),
- (next == null) ? null :
- next.clone(stylesheet),
- test.clone(stylesheet));
+ TemplateNode ret = new WhenNode(test.clone(stylesheet));
+ if (children != null)
+ {
+ ret.children = children.clone(stylesheet);
+ }
+ if (next != null)
+ {
+ ret.next = next.clone(stylesheet);
+ }
+ return ret;
}
void doApply(Stylesheet stylesheet, QName mode,
@@ -97,6 +101,15 @@ final class WhenNode
}
}
+ public boolean references(QName var)
+ {
+ if (test != null && test.references(var))
+ {
+ return true;
+ }
+ return super.references(var);
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer(getClass().getName());
diff --git a/gnu/xml/transform/WithParam.java b/gnu/xml/transform/WithParam.java
index c8804f8b3..0fb09d61e 100644
--- a/gnu/xml/transform/WithParam.java
+++ b/gnu/xml/transform/WithParam.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -55,18 +55,18 @@ import gnu.xml.xpath.Expr;
final class WithParam
{
- final String name;
+ final QName name;
final Expr select;
final TemplateNode content;
- WithParam(String name, Expr select)
+ WithParam(QName name, Expr select)
{
this.name = name;
this.select = select;
content = null;
}
- WithParam(String name, TemplateNode content)
+ WithParam(QName name, TemplateNode content)
{
this.name = name;
this.content = content;
@@ -107,4 +107,17 @@ final class WithParam
}
}
+ boolean references(QName var)
+ {
+ if (select != null && select.references(var))
+ {
+ return true;
+ }
+ if (content != null && content.references(var))
+ {
+ return true;
+ }
+ return false;
+ }
+
}
diff --git a/gnu/xml/transform/XSLComparator.java b/gnu/xml/transform/XSLComparator.java
index 1b76ed6c3..222f370c8 100644
--- a/gnu/xml/transform/XSLComparator.java
+++ b/gnu/xml/transform/XSLComparator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/transform/XSLURIResolver.java b/gnu/xml/transform/XSLURIResolver.java
index b8b7c71d0..6a49caab4 100644
--- a/gnu/xml/transform/XSLURIResolver.java
+++ b/gnu/xml/transform/XSLURIResolver.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/util/DoParse.java b/gnu/xml/util/DoParse.java
index 6f255c804..5da086ed8 100644
--- a/gnu/xml/util/DoParse.java
+++ b/gnu/xml/util/DoParse.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/util/DomParser.java b/gnu/xml/util/DomParser.java
index 0a75d5498..b28b6103b 100644
--- a/gnu/xml/util/DomParser.java
+++ b/gnu/xml/util/DomParser.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/util/Resolver.java b/gnu/xml/util/Resolver.java
index 97256c3c8..e84b5ade1 100644
--- a/gnu/xml/util/Resolver.java
+++ b/gnu/xml/util/Resolver.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/util/SAXNullTransformerFactory.java b/gnu/xml/util/SAXNullTransformerFactory.java
index ef03d42fc..81ad82312 100644
--- a/gnu/xml/util/SAXNullTransformerFactory.java
+++ b/gnu/xml/util/SAXNullTransformerFactory.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/util/XCat.java b/gnu/xml/util/XCat.java
index 269c97bd6..0f1633870 100644
--- a/gnu/xml/util/XCat.java
+++ b/gnu/xml/util/XCat.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/util/XHTMLWriter.java b/gnu/xml/util/XHTMLWriter.java
index c1502b701..272c66cd3 100644
--- a/gnu/xml/util/XHTMLWriter.java
+++ b/gnu/xml/util/XHTMLWriter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/util/XMLWriter.java b/gnu/xml/util/XMLWriter.java
index feb9e4f0a..fd36b7153 100644
--- a/gnu/xml/util/XMLWriter.java
+++ b/gnu/xml/util/XMLWriter.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/xpath/AndExpr.java b/gnu/xml/xpath/AndExpr.java
index 91fb3bc72..dd2e1c9a1 100644
--- a/gnu/xml/xpath/AndExpr.java
+++ b/gnu/xml/xpath/AndExpr.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.xml.xpath;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -73,6 +74,11 @@ public final class AndExpr
return new AndExpr(lhs.clone(context), rhs.clone(context));
}
+ public boolean references(QName var)
+ {
+ return (lhs.references(var) || rhs.references(var));
+ }
+
public String toString()
{
return lhs + " and " + rhs;
diff --git a/gnu/xml/xpath/ArithmeticExpr.java b/gnu/xml/xpath/ArithmeticExpr.java
index ad9da1ee7..3cef4adf3 100644
--- a/gnu/xml/xpath/ArithmeticExpr.java
+++ b/gnu/xml/xpath/ArithmeticExpr.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.xml.xpath;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -117,6 +118,11 @@ final class ArithmeticExpr
return new ArithmeticExpr(lhs.clone(context), rhs.clone(context), op);
}
+ public boolean references(QName var)
+ {
+ return (lhs.references(var) || rhs.references(var));
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer();
diff --git a/gnu/xml/xpath/BooleanFunction.java b/gnu/xml/xpath/BooleanFunction.java
index df54ff52b..256de0382 100644
--- a/gnu/xml/xpath/BooleanFunction.java
+++ b/gnu/xml/xpath/BooleanFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -80,6 +81,11 @@ final class BooleanFunction
{
return new BooleanFunction(arg.clone(context));
}
+
+ public boolean references(QName var)
+ {
+ return arg.references(var);
+ }
public String toString()
{
diff --git a/gnu/xml/xpath/CeilingFunction.java b/gnu/xml/xpath/CeilingFunction.java
index 8c0b8b13b..7db08fc5d 100644
--- a/gnu/xml/xpath/CeilingFunction.java
+++ b/gnu/xml/xpath/CeilingFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -74,6 +75,11 @@ final class CeilingFunction
{
return new CeilingFunction(arg.clone(context));
}
+
+ public boolean references(QName var)
+ {
+ return arg.references(var);
+ }
public String toString()
{
diff --git a/gnu/xml/xpath/ConcatFunction.java b/gnu/xml/xpath/ConcatFunction.java
index 7c51f9d1c..fddd7ae25 100644
--- a/gnu/xml/xpath/ConcatFunction.java
+++ b/gnu/xml/xpath/ConcatFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,6 +40,7 @@ package gnu.xml.xpath;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -81,6 +82,18 @@ final class ConcatFunction
return new ConcatFunction(args2);
}
+ public boolean references(QName var)
+ {
+ for (Iterator i = args.iterator(); i.hasNext(); )
+ {
+ if (((Expr) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer("concat(");
diff --git a/gnu/xml/xpath/Constant.java b/gnu/xml/xpath/Constant.java
index d38f7ea37..d5ca764a1 100644
--- a/gnu/xml/xpath/Constant.java
+++ b/gnu/xml/xpath/Constant.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.xml.xpath;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -65,6 +66,11 @@ public final class Constant
return new Constant(value);
}
+ public boolean references(QName var)
+ {
+ return false;
+ }
+
public String toString()
{
String ret = value.toString();
diff --git a/gnu/xml/xpath/ContainsFunction.java b/gnu/xml/xpath/ContainsFunction.java
index 2a0d76da5..fc2f33faf 100644
--- a/gnu/xml/xpath/ContainsFunction.java
+++ b/gnu/xml/xpath/ContainsFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -78,6 +79,11 @@ final class ContainsFunction
return new ContainsFunction(arg1.clone(context), arg2.clone(context));
}
+ public boolean references(QName var)
+ {
+ return (arg1.references(var) || arg2.references(var));
+ }
+
public String toString()
{
return "contains(" + arg1 + "," + arg2 + ")";
diff --git a/gnu/xml/xpath/CountFunction.java b/gnu/xml/xpath/CountFunction.java
index 33663c95e..cb534bffc 100644
--- a/gnu/xml/xpath/CountFunction.java
+++ b/gnu/xml/xpath/CountFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ package gnu.xml.xpath;
import java.util.Collection;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -74,6 +75,11 @@ final class CountFunction
return new CountFunction(arg.clone(context));
}
+ public boolean references(QName var)
+ {
+ return arg.references(var);
+ }
+
public String toString()
{
return "count(" + arg + ")";
diff --git a/gnu/xml/xpath/DocumentOrderComparator.java b/gnu/xml/xpath/DocumentOrderComparator.java
index 28d97eb84..c7d7de9f7 100644
--- a/gnu/xml/xpath/DocumentOrderComparator.java
+++ b/gnu/xml/xpath/DocumentOrderComparator.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/xpath/EqualityExpr.java b/gnu/xml/xpath/EqualityExpr.java
index bedf1e974..6d00cee89 100644
--- a/gnu/xml/xpath/EqualityExpr.java
+++ b/gnu/xml/xpath/EqualityExpr.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ package gnu.xml.xpath;
import java.util.Collection;
import java.util.Iterator;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -91,6 +92,10 @@ final class EqualityExpr
{
Collection lns = (Collection) left;
Collection rns = (Collection) right;
+ if (lns.isEmpty())
+ {
+ return false;
+ }
boolean all = true;
for (Iterator i = lns.iterator(); i.hasNext(); )
{
@@ -119,7 +124,7 @@ final class EqualityExpr
}
}
}
- return false;
+ return all;
}
/*
* If one object to be compared is a node-set and the other is a number,
@@ -243,6 +248,11 @@ final class EqualityExpr
return new EqualityExpr(lhs.clone(context), rhs.clone(context), invert);
}
+ public boolean references(QName var)
+ {
+ return (lhs.references(var) || rhs.references(var));
+ }
+
public String toString()
{
if (invert)
diff --git a/gnu/xml/xpath/Expr.java b/gnu/xml/xpath/Expr.java
index fcfae52ad..b4b55dcf9 100644
--- a/gnu/xml/xpath/Expr.java
+++ b/gnu/xml/xpath/Expr.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -177,6 +177,8 @@ public abstract class Expr
public abstract Object evaluate(Node context, int pos, int len);
public abstract Expr clone(Object context);
+
+ public abstract boolean references(QName var);
/* -- 4.1 Node Set Functions -- */
diff --git a/gnu/xml/xpath/FalseFunction.java b/gnu/xml/xpath/FalseFunction.java
index 85417a105..87660ec81 100644
--- a/gnu/xml/xpath/FalseFunction.java
+++ b/gnu/xml/xpath/FalseFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.xml.xpath;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -58,6 +59,11 @@ final class FalseFunction
return new FalseFunction();
}
+ public boolean references(QName var)
+ {
+ return false;
+ }
+
public String toString()
{
return "false()";
diff --git a/gnu/xml/xpath/FloorFunction.java b/gnu/xml/xpath/FloorFunction.java
index dd9cd84c6..c03c0e7ed 100644
--- a/gnu/xml/xpath/FloorFunction.java
+++ b/gnu/xml/xpath/FloorFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -75,6 +76,11 @@ final class FloorFunction
return new FloorFunction(arg.clone(context));
}
+ public boolean references(QName var)
+ {
+ return arg.references(var);
+ }
+
public String toString()
{
return "floor(" + arg + ")";
diff --git a/gnu/xml/xpath/Function.java b/gnu/xml/xpath/Function.java
index d40dff610..aecd49d9c 100644
--- a/gnu/xml/xpath/Function.java
+++ b/gnu/xml/xpath/Function.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/xpath/FunctionCall.java b/gnu/xml/xpath/FunctionCall.java
index 35eacb516..669efbf18 100644
--- a/gnu/xml/xpath/FunctionCall.java
+++ b/gnu/xml/xpath/FunctionCall.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ package gnu.xml.xpath;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.Iterator;
import java.util.List;
import javax.xml.namespace.QName;
import javax.xml.xpath.XPathFunction;
@@ -129,6 +130,18 @@ public final class FunctionCall
return new FunctionCall(r, name, args2);
}
+ public boolean references(QName var)
+ {
+ for (Iterator i = args.iterator(); i.hasNext(); )
+ {
+ if (((Expr) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer();
diff --git a/gnu/xml/xpath/IdFunction.java b/gnu/xml/xpath/IdFunction.java
index a32cb8903..749795419 100644
--- a/gnu/xml/xpath/IdFunction.java
+++ b/gnu/xml/xpath/IdFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ package gnu.xml.xpath;
import java.util.Collection;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -88,6 +89,11 @@ public final class IdFunction
return new IdFunction(arg.clone(context));
}
+ public boolean references(QName var)
+ {
+ return arg.references(var);
+ }
+
public String toString()
{
return "id(" + arg + ")";
diff --git a/gnu/xml/xpath/LangFunction.java b/gnu/xml/xpath/LangFunction.java
index d44c72c06..2c2506d1b 100644
--- a/gnu/xml/xpath/LangFunction.java
+++ b/gnu/xml/xpath/LangFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -102,6 +103,11 @@ final class LangFunction
return new IdFunction(arg.clone(context));
}
+ public boolean references(QName var)
+ {
+ return arg.references(var);
+ }
+
public String toString()
{
return "lang(" + arg + ")";
diff --git a/gnu/xml/xpath/LastFunction.java b/gnu/xml/xpath/LastFunction.java
index a7458a34a..751a0a9c1 100644
--- a/gnu/xml/xpath/LastFunction.java
+++ b/gnu/xml/xpath/LastFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.xml.xpath;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -59,6 +60,11 @@ final class LastFunction
return new LastFunction();
}
+ public boolean references(QName var)
+ {
+ return false;
+ }
+
public String toString()
{
return "last()";
diff --git a/gnu/xml/xpath/LocalNameFunction.java b/gnu/xml/xpath/LocalNameFunction.java
index d91f97331..f8ace9cd5 100644
--- a/gnu/xml/xpath/LocalNameFunction.java
+++ b/gnu/xml/xpath/LocalNameFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ package gnu.xml.xpath;
import java.util.Collection;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -79,6 +80,11 @@ final class LocalNameFunction
arg.clone(context));
}
+ public boolean references(QName var)
+ {
+ return (arg == null) ? false : arg.references(var);
+ }
+
public String toString()
{
return (arg == null) ? "local-name()" : "local-name(" + arg + ")";
diff --git a/gnu/xml/xpath/NameFunction.java b/gnu/xml/xpath/NameFunction.java
index a42681dbd..dc5e61203 100644
--- a/gnu/xml/xpath/NameFunction.java
+++ b/gnu/xml/xpath/NameFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ package gnu.xml.xpath;
import java.util.Collection;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -86,6 +87,11 @@ final class NameFunction
return new NameFunction((arg == null) ? null :
arg.clone(context));
}
+
+ public boolean references(QName var)
+ {
+ return (arg == null) ? false : arg.references(var);
+ }
public String toString()
{
diff --git a/gnu/xml/xpath/NameTest.java b/gnu/xml/xpath/NameTest.java
index ececc9297..c89ba4dd1 100644
--- a/gnu/xml/xpath/NameTest.java
+++ b/gnu/xml/xpath/NameTest.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -95,7 +95,9 @@ public final class NameTest
return true;
}
String uri = qName.getNamespaceURI();
- if (!equal(uri, node.getNamespaceURI()))
+ String nodeUri = node.getNamespaceURI();
+ String nodeLocalName = node.getLocalName();
+ if (nodeLocalName != null && !equal(uri, nodeUri))
{
return false;
}
@@ -104,7 +106,11 @@ public final class NameTest
return true;
}
String localName = qName.getLocalPart();
- return (localName.equals(node.getLocalName()));
+ if (nodeLocalName != null)
+ {
+ nodeLocalName = node.getNodeName();
+ }
+ return (localName.equals(nodeLocalName));
}
final boolean equal(String s1, String s2)
@@ -119,6 +125,11 @@ public final class NameTest
return new NameTest(qName, anyLocalName, any);
}
+ public boolean references(QName var)
+ {
+ return false;
+ }
+
public String toString ()
{
if (any)
diff --git a/gnu/xml/xpath/NamespaceTest.java b/gnu/xml/xpath/NamespaceTest.java
index bdfe96150..6d41166bc 100644
--- a/gnu/xml/xpath/NamespaceTest.java
+++ b/gnu/xml/xpath/NamespaceTest.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -98,7 +98,12 @@ public final class NamespaceTest
return true;
}
String localName = qName.getLocalPart();
- return (localName.equals(node.getLocalName()));
+ String nodeLocalName = node.getLocalName();
+ if (nodeLocalName == null)
+ {
+ nodeLocalName = node.getNodeName();
+ }
+ return (localName.equals(nodeLocalName));
}
public Test clone(Object context)
@@ -106,6 +111,11 @@ public final class NamespaceTest
return new NamespaceTest(qName, anyLocalName, any);
}
+ public boolean references(QName var)
+ {
+ return false;
+ }
+
public String toString ()
{
if (any)
diff --git a/gnu/xml/xpath/NamespaceUriFunction.java b/gnu/xml/xpath/NamespaceUriFunction.java
index ee8978ec7..e67ec4206 100644
--- a/gnu/xml/xpath/NamespaceUriFunction.java
+++ b/gnu/xml/xpath/NamespaceUriFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ package gnu.xml.xpath;
import java.util.Collection;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -78,6 +79,11 @@ final class NamespaceUriFunction
return new NamespaceUriFunction((arg == null) ? null :
arg.clone(context));
}
+
+ public boolean references(QName var)
+ {
+ return (arg == null) ? false : arg.references(var);
+ }
public String toString()
{
diff --git a/gnu/xml/xpath/NegativeExpr.java b/gnu/xml/xpath/NegativeExpr.java
index 5d7c00d4d..9e24aff81 100644
--- a/gnu/xml/xpath/NegativeExpr.java
+++ b/gnu/xml/xpath/NegativeExpr.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.xml.xpath;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -67,6 +68,11 @@ final class NegativeExpr
return new NegativeExpr(expr.clone(context));
}
+ public boolean references(QName var)
+ {
+ return expr.references(var);
+ }
+
public String toString()
{
return "-" + expr;
diff --git a/gnu/xml/xpath/NodeTypeTest.java b/gnu/xml/xpath/NodeTypeTest.java
index d7798a266..807374132 100644
--- a/gnu/xml/xpath/NodeTypeTest.java
+++ b/gnu/xml/xpath/NodeTypeTest.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.xml.xpath;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -106,6 +107,11 @@ public final class NodeTypeTest
return new NodeTypeTest(type, data);
}
+ public boolean references(QName var)
+ {
+ return false;
+ }
+
public String toString()
{
switch (type)
diff --git a/gnu/xml/xpath/NormalizeSpaceFunction.java b/gnu/xml/xpath/NormalizeSpaceFunction.java
index 2dabe1e5e..b7358e8d8 100644
--- a/gnu/xml/xpath/NormalizeSpaceFunction.java
+++ b/gnu/xml/xpath/NormalizeSpaceFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ package gnu.xml.xpath;
import java.util.List;
import java.util.StringTokenizer;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -91,6 +92,11 @@ final class NormalizeSpaceFunction
return new NormalizeSpaceFunction(arg.clone(context));
}
+ public boolean references(QName var)
+ {
+ return (arg == null) ? false : arg.references(var);
+ }
+
public String toString()
{
return (arg == null) ? "normalize-space()" : "normalize-space(" + arg + ")";
diff --git a/gnu/xml/xpath/NotFunction.java b/gnu/xml/xpath/NotFunction.java
index d7d1ad1a7..bbed66a73 100644
--- a/gnu/xml/xpath/NotFunction.java
+++ b/gnu/xml/xpath/NotFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -73,6 +74,11 @@ final class NotFunction
return new NotFunction(arg.clone(context));
}
+ public boolean references(QName var)
+ {
+ return arg.references(var);
+ }
+
public String toString()
{
return "not(" + arg + ")";
diff --git a/gnu/xml/xpath/NumberFunction.java b/gnu/xml/xpath/NumberFunction.java
index 943653381..79553ce81 100644
--- a/gnu/xml/xpath/NumberFunction.java
+++ b/gnu/xml/xpath/NumberFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -88,6 +89,11 @@ final class NumberFunction
return new NumberFunction(arg.clone(context));
}
+ public boolean references(QName var)
+ {
+ return arg.references(var);
+ }
+
public String toString()
{
return "number(" + arg + ")";
diff --git a/gnu/xml/xpath/OrExpr.java b/gnu/xml/xpath/OrExpr.java
index 4cfda4aad..1085f5112 100644
--- a/gnu/xml/xpath/OrExpr.java
+++ b/gnu/xml/xpath/OrExpr.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.xml.xpath;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -73,6 +74,11 @@ public final class OrExpr
return new OrExpr(lhs.clone(context), rhs.clone(context));
}
+ public boolean references(QName var)
+ {
+ return (lhs.references(var) || rhs.references(var));
+ }
+
public String toString()
{
return lhs + " or " + rhs;
diff --git a/gnu/xml/xpath/ParenthesizedExpr.java b/gnu/xml/xpath/ParenthesizedExpr.java
index 6c2d5718a..f343857c3 100644
--- a/gnu/xml/xpath/ParenthesizedExpr.java
+++ b/gnu/xml/xpath/ParenthesizedExpr.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -41,6 +41,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -76,6 +77,11 @@ final class ParenthesizedExpr
return new ParenthesizedExpr(expr.clone(context));
}
+ public boolean references(QName var)
+ {
+ return expr.references(var);
+ }
+
public String toString()
{
return "(" + expr + ")";
diff --git a/gnu/xml/xpath/Path.java b/gnu/xml/xpath/Path.java
index 488215e51..4b01f0918 100644
--- a/gnu/xml/xpath/Path.java
+++ b/gnu/xml/xpath/Path.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/xpath/Pattern.java b/gnu/xml/xpath/Pattern.java
index dcce68f52..859ab5692 100644
--- a/gnu/xml/xpath/Pattern.java
+++ b/gnu/xml/xpath/Pattern.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,7 +40,7 @@ package gnu.xml.xpath;
import org.w3c.dom.Node;
/**
- * Interface implemented by expressions that can for part of XSL patterns.
+ * Interface implemented by expressions that can form part of XSL patterns.
*
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
*/
diff --git a/gnu/xml/xpath/PositionFunction.java b/gnu/xml/xpath/PositionFunction.java
index 6d6f7ad54..3060eeaed 100644
--- a/gnu/xml/xpath/PositionFunction.java
+++ b/gnu/xml/xpath/PositionFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.xml.xpath;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -59,6 +60,11 @@ final class PositionFunction
return new PositionFunction();
}
+ public boolean references(QName var)
+ {
+ return false;
+ }
+
public String toString()
{
return "position()";
diff --git a/gnu/xml/xpath/Predicate.java b/gnu/xml/xpath/Predicate.java
index a857c16bb..5538c55aa 100644
--- a/gnu/xml/xpath/Predicate.java
+++ b/gnu/xml/xpath/Predicate.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.xml.xpath;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -70,6 +71,11 @@ class Predicate
{
return new Predicate(expr.clone(context));
}
+
+ public boolean references(QName var)
+ {
+ return expr.references(var);
+ }
public String toString()
{
diff --git a/gnu/xml/xpath/RelationalExpr.java b/gnu/xml/xpath/RelationalExpr.java
index fcdc932ab..5cbb6bb22 100644
--- a/gnu/xml/xpath/RelationalExpr.java
+++ b/gnu/xml/xpath/RelationalExpr.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.xml.xpath;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -93,6 +94,11 @@ final class RelationalExpr
return new RelationalExpr(lhs.clone(context), rhs.clone(context), lt, eq);
}
+ public boolean references(QName var)
+ {
+ return (lhs.references(var) || rhs.references(var));
+ }
+
public String toString()
{
return lhs + " " + (lt ? "<" : ">") + (eq ? "=" : "") + " " + rhs;
diff --git a/gnu/xml/xpath/Root.java b/gnu/xml/xpath/Root.java
index b8fe5df29..1f79b3958 100644
--- a/gnu/xml/xpath/Root.java
+++ b/gnu/xml/xpath/Root.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -39,6 +39,7 @@ package gnu.xml.xpath;
import java.util.Collection;
import java.util.Collections;
+import javax.xml.namespace.QName;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
@@ -73,6 +74,11 @@ public final class Root
return new Root();
}
+ public boolean references(QName var)
+ {
+ return false;
+ }
+
public String toString()
{
return "/";
diff --git a/gnu/xml/xpath/RoundFunction.java b/gnu/xml/xpath/RoundFunction.java
index 76f5d8a80..bfbfd357d 100644
--- a/gnu/xml/xpath/RoundFunction.java
+++ b/gnu/xml/xpath/RoundFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -82,6 +83,11 @@ final class RoundFunction
return new RoundFunction(arg.clone(context));
}
+ public boolean references(QName var)
+ {
+ return arg.references(var);
+ }
+
public String toString()
{
return "round(" + arg + ")";
diff --git a/gnu/xml/xpath/Selector.java b/gnu/xml/xpath/Selector.java
index 5fd45b911..598038064 100644
--- a/gnu/xml/xpath/Selector.java
+++ b/gnu/xml/xpath/Selector.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -44,6 +44,7 @@ import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import javax.xml.XMLConstants;
+import javax.xml.namespace.QName;
import org.w3c.dom.Attr;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
@@ -424,6 +425,18 @@ public final class Selector
return new Selector(axis, tests2);
}
+ public boolean references(QName var)
+ {
+ for (int i = 0; i < tests.length; i++)
+ {
+ if (tests[i].references(var))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer();
@@ -436,7 +449,15 @@ public final class Selector
buf.append("ancestor-or-self::");
break;
case ATTRIBUTE:
- buf.append("attribute::");
+ if (tests.length == 0 ||
+ (tests[0] instanceof NameTest))
+ {
+ buf.append('@');
+ }
+ else
+ {
+ buf.append("attribute::");
+ }
break;
case CHILD:
//buf.append("child::");
diff --git a/gnu/xml/xpath/StartsWithFunction.java b/gnu/xml/xpath/StartsWithFunction.java
index c748295db..ec021551e 100644
--- a/gnu/xml/xpath/StartsWithFunction.java
+++ b/gnu/xml/xpath/StartsWithFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -78,6 +79,11 @@ final class StartsWithFunction
return new StartsWithFunction(arg1.clone(context), arg2.clone(context));
}
+ public boolean references(QName var)
+ {
+ return (arg1.references(var) || arg2.references(var));
+ }
+
public String toString()
{
return "starts-with(" + arg1 + "," + arg2 + ")";
diff --git a/gnu/xml/xpath/Steps.java b/gnu/xml/xpath/Steps.java
index abd30e449..9ef6cd35f 100644
--- a/gnu/xml/xpath/Steps.java
+++ b/gnu/xml/xpath/Steps.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -43,6 +43,7 @@ import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.Set;
+import javax.xml.namespace.QName;
import org.w3c.dom.Attr;
import org.w3c.dom.Node;
@@ -219,6 +220,18 @@ public final class Steps
return new Steps(path2);
}
+ public boolean references(QName var)
+ {
+ for (Iterator i = path.iterator(); i.hasNext(); )
+ {
+ if (((Expr) i.next()).references(var))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
public String toString()
{
StringBuffer buf = new StringBuffer();
diff --git a/gnu/xml/xpath/StringFunction.java b/gnu/xml/xpath/StringFunction.java
index 658995c05..0a4c681d1 100644
--- a/gnu/xml/xpath/StringFunction.java
+++ b/gnu/xml/xpath/StringFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -105,6 +106,11 @@ final class StringFunction
arg.clone(context));
}
+ public boolean references(QName var)
+ {
+ return (arg == null) ? false : arg.references(var);
+ }
+
public String toString()
{
return (arg == null) ? "string()" : "string(" + arg + ")";
diff --git a/gnu/xml/xpath/StringLengthFunction.java b/gnu/xml/xpath/StringLengthFunction.java
index 7ed0463ae..7f5ceafee 100644
--- a/gnu/xml/xpath/StringLengthFunction.java
+++ b/gnu/xml/xpath/StringLengthFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -77,6 +78,11 @@ final class StringLengthFunction
arg.clone(context));
}
+ public boolean references(QName var)
+ {
+ return (arg == null) ? false : arg.references(var);
+ }
+
public String toString()
{
return (arg == null) ? "string-length()" : "string-length(" + arg + ")";
diff --git a/gnu/xml/xpath/SubstringAfterFunction.java b/gnu/xml/xpath/SubstringAfterFunction.java
index 90b6060b0..8144cf844 100644
--- a/gnu/xml/xpath/SubstringAfterFunction.java
+++ b/gnu/xml/xpath/SubstringAfterFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -84,6 +85,11 @@ final class SubstringAfterFunction
arg2.clone(context));
}
+ public boolean references(QName var)
+ {
+ return (arg1.references(var) || arg2.references(var));
+ }
+
public String toString()
{
return "substring-after(" + arg1 + "," + arg2 + ")";
diff --git a/gnu/xml/xpath/SubstringBeforeFunction.java b/gnu/xml/xpath/SubstringBeforeFunction.java
index cadb77cad..2d92a3e03 100644
--- a/gnu/xml/xpath/SubstringBeforeFunction.java
+++ b/gnu/xml/xpath/SubstringBeforeFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -83,6 +84,11 @@ final class SubstringBeforeFunction
arg2.clone(context));
}
+ public boolean references(QName var)
+ {
+ return (arg1.references(var) || arg2.references(var));
+ }
+
public String toString()
{
return "substring-before(" + arg1 + "," + arg2 + ")";
diff --git a/gnu/xml/xpath/SubstringFunction.java b/gnu/xml/xpath/SubstringFunction.java
index fdbbd06dd..d65c4facb 100644
--- a/gnu/xml/xpath/SubstringFunction.java
+++ b/gnu/xml/xpath/SubstringFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -113,6 +114,12 @@ final class SubstringFunction
(arg3 == null) ? null : arg3.clone(context));
}
+ public boolean references(QName var)
+ {
+ return (arg1.references(var) || arg2.references(var) ||
+ (arg3 == null) ? false : arg3.references(var));
+ }
+
public String toString()
{
return (arg3 == null) ? "substring(" + arg1 + "," + arg2 + ")" :
diff --git a/gnu/xml/xpath/SumFunction.java b/gnu/xml/xpath/SumFunction.java
index 1501b46a0..93c2e806d 100644
--- a/gnu/xml/xpath/SumFunction.java
+++ b/gnu/xml/xpath/SumFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -40,6 +40,7 @@ package gnu.xml.xpath;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -86,6 +87,11 @@ final class SumFunction
return new SumFunction(arg.clone(context));
}
+ public boolean references(QName var)
+ {
+ return arg.references(var);
+ }
+
public String toString()
{
return "sum(" + arg + ")";
diff --git a/gnu/xml/xpath/Test.java b/gnu/xml/xpath/Test.java
index 865461c72..94837ffac 100644
--- a/gnu/xml/xpath/Test.java
+++ b/gnu/xml/xpath/Test.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.xml.xpath;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -52,4 +53,6 @@ public abstract class Test
public abstract Test clone(Object context);
+ public abstract boolean references(QName var);
+
}
diff --git a/gnu/xml/xpath/TranslateFunction.java b/gnu/xml/xpath/TranslateFunction.java
index b92ec3137..54e8b9c37 100644
--- a/gnu/xml/xpath/TranslateFunction.java
+++ b/gnu/xml/xpath/TranslateFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.xml.xpath;
import java.util.List;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -117,6 +118,12 @@ final class TranslateFunction
return new TranslateFunction(arg1.clone(context), arg2.clone(context),
arg3.clone(context));
}
+
+ public boolean references(QName var)
+ {
+ return (arg1.references(var) || arg2.references(var) ||
+ arg3.references(var));
+ }
public String toString()
{
diff --git a/gnu/xml/xpath/TrueFunction.java b/gnu/xml/xpath/TrueFunction.java
index 2d47ed37a..6ad42d726 100644
--- a/gnu/xml/xpath/TrueFunction.java
+++ b/gnu/xml/xpath/TrueFunction.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -37,6 +37,7 @@ exception statement from your version. */
package gnu.xml.xpath;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -58,6 +59,11 @@ final class TrueFunction
return new TrueFunction();
}
+ public boolean references(QName var)
+ {
+ return false;
+ }
+
public String toString()
{
return "true()";
diff --git a/gnu/xml/xpath/UnionExpr.java b/gnu/xml/xpath/UnionExpr.java
index 1b1344e1e..5078713b6 100644
--- a/gnu/xml/xpath/UnionExpr.java
+++ b/gnu/xml/xpath/UnionExpr.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -43,6 +43,7 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
+import javax.xml.namespace.QName;
import org.w3c.dom.Node;
/**
@@ -94,6 +95,11 @@ public final class UnionExpr
return new UnionExpr(lhs.clone(context), rhs.clone(context));
}
+ public boolean references(QName var)
+ {
+ return (lhs.references(var) || rhs.references(var));
+ }
+
public String toString()
{
return lhs + " | " + rhs;
diff --git a/gnu/xml/xpath/VariableReference.java b/gnu/xml/xpath/VariableReference.java
index faa5bfa26..813a37f96 100644
--- a/gnu/xml/xpath/VariableReference.java
+++ b/gnu/xml/xpath/VariableReference.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
@@ -47,9 +47,9 @@ public class VariableReference
{
final XPathVariableResolver resolver;
- final String name;
+ final QName name;
- public VariableReference(XPathVariableResolver resolver, String name)
+ public VariableReference(XPathVariableResolver resolver, QName name)
{
this.resolver = resolver;
this.name = name;
@@ -64,8 +64,7 @@ public class VariableReference
// Needs context to operate properly
return ((Bindings) resolver).get(name, context, pos, len);
}
- QName qname = QName.valueOf(name);
- return resolver.resolveVariable(qname);
+ return resolver.resolveVariable(name);
}
throw new IllegalStateException("no variable resolver");
}
@@ -80,9 +79,22 @@ public class VariableReference
return new VariableReference(r, name);
}
+ public boolean references(QName var)
+ {
+ return name.equals(var);
+ }
+
public String toString()
{
- return "$" + name;
+ StringBuffer buf = new StringBuffer("$");
+ String prefix = name.getPrefix();
+ if (prefix != null && !"".equals(prefix))
+ {
+ buf.append(prefix);
+ buf.append(':');
+ }
+ buf.append(name.getLocalPart());
+ return buf.toString();
}
}
diff --git a/gnu/xml/xpath/XPathFactoryImpl.java b/gnu/xml/xpath/XPathFactoryImpl.java
index f9f70a3b7..45dc57ed1 100644
--- a/gnu/xml/xpath/XPathFactoryImpl.java
+++ b/gnu/xml/xpath/XPathFactoryImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/xpath/XPathImpl.java b/gnu/xml/xpath/XPathImpl.java
index 218936417..3511834ca 100644
--- a/gnu/xml/xpath/XPathImpl.java
+++ b/gnu/xml/xpath/XPathImpl.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
diff --git a/gnu/xml/xpath/XPathParser.java b/gnu/xml/xpath/XPathParser.java
index 188cfb5bf..624dcd8d4 100644
--- a/gnu/xml/xpath/XPathParser.java
+++ b/gnu/xml/xpath/XPathParser.java
@@ -1,48 +1,50 @@
// created by jay 0.8 (c) 1998 Axel.Schreiner@informatik.uni-osnabrueck.de
// line 2 "XPathParser.y"
-/* XPathParser.java -- An XPath 1.0 parser.
- Copyright (C) 2004 Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. */
+/*
+ * XPathParser.java
+ * Copyright (C) 2004 The Free Software Foundation
+ *
+ * This file is part of GNU JAXP, a library.
+ *
+ * GNU JAXP is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GNU JAXP is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Linking this library statically or dynamically with other modules is
+ * making a combined work based on this library. Thus, the terms and
+ * conditions of the GNU General Public License cover the whole
+ * combination.
+ *
+ * As a special exception, the copyright holders of this library give you
+ * permission to link this library with independent modules to produce an
+ * executable, regardless of the license terms of these independent
+ * modules, and to copy and distribute the resulting executable under
+ * terms of your choice, provided that you also meet, for each linked
+ * independent module, the terms and conditions of the license of that
+ * module. An independent module is a module which is not derived from
+ * or based on this library. If you modify this library, you may extend
+ * this exception to your version of the library, but you are not
+ * obliged to do so. If you do not wish to do so, delete this
+ * exception statement from your version.
+ */
package gnu.xml.xpath;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import java.util.Map;
import javax.xml.namespace.NamespaceContext;
import javax.xml.namespace.QName;
import javax.xml.xpath.XPathFunctionResolver;
@@ -205,7 +207,7 @@ public class XPathParser
return new FunctionCall(functionResolver, name, args);
}
- // line 210 "-"
+ // line 211 "-"
// %token constants
public static final int LITERAL = 257;
@@ -474,13 +476,13 @@ public class XPathParser
yyVal = yyDefault(yyV > yyTop ? null : yyVals[yyV]);
switch (yyN) {
case 4:
- // line 276 "XPathParser.y"
+ // line 277 "XPathParser.y"
{
yyVal = new Root();
}
break;
case 5:
- // line 280 "XPathParser.y"
+ // line 281 "XPathParser.y"
{
Steps steps;
if (yyVals[0+yyTop] instanceof Steps)
@@ -498,7 +500,7 @@ case 5:
}
break;
case 6:
- // line 296 "XPathParser.y"
+ // line 297 "XPathParser.y"
{
Test nt = new NodeTypeTest((short) 0);
Selector s = new Selector(Selector.DESCENDANT_OR_SELF,
@@ -521,7 +523,7 @@ case 6:
}
break;
case 8:
- // line 321 "XPathParser.y"
+ // line 322 "XPathParser.y"
{
Steps steps;
if (yyVals[-2+yyTop] instanceof Steps)
@@ -539,7 +541,7 @@ case 8:
}
break;
case 9:
- // line 337 "XPathParser.y"
+ // line 338 "XPathParser.y"
{
Test nt = new NodeTypeTest((short) 0);
Selector s = new Selector(Selector.DESCENDANT_OR_SELF,
@@ -562,37 +564,37 @@ case 9:
}
break;
case 10:
- // line 361 "XPathParser.y"
+ // line 362 "XPathParser.y"
{
yyVal = new Selector (Selector.CHILD, (List) yyVals[0+yyTop]);
}
break;
case 11:
- // line 365 "XPathParser.y"
+ // line 366 "XPathParser.y"
{
yyVal = new Selector (Selector.ATTRIBUTE, (List) yyVals[0+yyTop]);
}
break;
case 12:
- // line 369 "XPathParser.y"
+ // line 370 "XPathParser.y"
{
yyVal = new Selector (((Integer) yyVals[-2+yyTop]).intValue (), (List) yyVals[0+yyTop]);
}
break;
case 13:
- // line 373 "XPathParser.y"
+ // line 374 "XPathParser.y"
{
yyVal = new Selector (Selector.SELF, Collections.EMPTY_LIST);
}
break;
case 14:
- // line 377 "XPathParser.y"
+ // line 378 "XPathParser.y"
{
yyVal = new Selector (Selector.PARENT, Collections.EMPTY_LIST);
}
break;
case 15:
- // line 384 "XPathParser.y"
+ // line 385 "XPathParser.y"
{
List list = new ArrayList();
list.add(yyVals[0+yyTop]);
@@ -600,7 +602,7 @@ case 15:
}
break;
case 16:
- // line 390 "XPathParser.y"
+ // line 391 "XPathParser.y"
{
List list = (List)yyVals[-1+yyTop];
list.add(yyVals[0+yyTop]);
@@ -608,133 +610,133 @@ case 16:
}
break;
case 17:
- // line 414 "XPathParser.y"
+ // line 415 "XPathParser.y"
{
yyVal = new Integer(Selector.ANCESTOR);
}
break;
case 18:
- // line 418 "XPathParser.y"
+ // line 419 "XPathParser.y"
{
yyVal = new Integer(Selector.ANCESTOR_OR_SELF);
}
break;
case 19:
- // line 422 "XPathParser.y"
+ // line 423 "XPathParser.y"
{
yyVal = new Integer(Selector.ATTRIBUTE);
}
break;
case 20:
- // line 426 "XPathParser.y"
+ // line 427 "XPathParser.y"
{
yyVal = new Integer(Selector.CHILD);
}
break;
case 21:
- // line 430 "XPathParser.y"
+ // line 431 "XPathParser.y"
{
yyVal = new Integer(Selector.DESCENDANT);
}
break;
case 22:
- // line 434 "XPathParser.y"
+ // line 435 "XPathParser.y"
{
yyVal = new Integer(Selector.DESCENDANT_OR_SELF);
}
break;
case 23:
- // line 438 "XPathParser.y"
+ // line 439 "XPathParser.y"
{
yyVal = new Integer(Selector.FOLLOWING);
}
break;
case 24:
- // line 442 "XPathParser.y"
+ // line 443 "XPathParser.y"
{
yyVal = new Integer(Selector.FOLLOWING_SIBLING);
}
break;
case 25:
- // line 446 "XPathParser.y"
+ // line 447 "XPathParser.y"
{
yyVal = new Integer(Selector.NAMESPACE);
}
break;
case 26:
- // line 450 "XPathParser.y"
+ // line 451 "XPathParser.y"
{
yyVal = new Integer(Selector.PARENT);
}
break;
case 27:
- // line 454 "XPathParser.y"
+ // line 455 "XPathParser.y"
{
yyVal = new Integer(Selector.PRECEDING);
}
break;
case 28:
- // line 458 "XPathParser.y"
+ // line 459 "XPathParser.y"
{
yyVal = new Integer(Selector.PRECEDING_SIBLING);
}
break;
case 29:
- // line 462 "XPathParser.y"
+ // line 463 "XPathParser.y"
{
yyVal = new Integer(Selector.SELF);
}
break;
case 31:
- // line 471 "XPathParser.y"
+ // line 472 "XPathParser.y"
{
yyVal = new NodeTypeTest(Node.PROCESSING_INSTRUCTION_NODE, (String) yyVals[-1+yyTop]);
}
break;
case 32:
- // line 476 "XPathParser.y"
+ // line 477 "XPathParser.y"
{
yyVal = new NodeTypeTest(((Short) yyVals[-1+yyTop]).shortValue());
}
break;
case 33:
- // line 483 "XPathParser.y"
+ // line 484 "XPathParser.y"
{
yyVal = new Predicate((Expr) yyVals[-1+yyTop]);
}
break;
case 35:
- // line 491 "XPathParser.y"
+ // line 492 "XPathParser.y"
{
yyVal = new ParenthesizedExpr((Expr) yyVals[-1+yyTop]);
}
break;
case 36:
- // line 495 "XPathParser.y"
+ // line 496 "XPathParser.y"
{
yyVal = new Constant(yyVals[0+yyTop]);
}
break;
case 37:
- // line 499 "XPathParser.y"
+ // line 500 "XPathParser.y"
{
yyVal = new Constant(yyVals[0+yyTop]);
}
break;
case 39:
- // line 507 "XPathParser.y"
+ // line 508 "XPathParser.y"
{
yyVal = lookupFunction((String) yyVals[-2+yyTop], Collections.EMPTY_LIST);
}
break;
case 40:
- // line 511 "XPathParser.y"
+ // line 512 "XPathParser.y"
{
yyVal = lookupFunction((String) yyVals[-3+yyTop], (List) yyVals[-1+yyTop]);
}
break;
case 41:
- // line 518 "XPathParser.y"
+ // line 519 "XPathParser.y"
{
List list = new ArrayList();
list.add(yyVals[0+yyTop]);
@@ -742,7 +744,7 @@ case 41:
}
break;
case 42:
- // line 524 "XPathParser.y"
+ // line 525 "XPathParser.y"
{
List list = (List) yyVals[0+yyTop];
list.add(0, yyVals[-2+yyTop]);
@@ -750,13 +752,13 @@ case 42:
}
break;
case 44:
- // line 534 "XPathParser.y"
+ // line 535 "XPathParser.y"
{
yyVal = new UnionExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop]);
}
break;
case 47:
- // line 543 "XPathParser.y"
+ // line 544 "XPathParser.y"
{
Steps steps;
if (yyVals[0+yyTop] instanceof Steps)
@@ -774,7 +776,7 @@ case 47:
}
break;
case 48:
- // line 559 "XPathParser.y"
+ // line 560 "XPathParser.y"
{
Test nt = new NodeTypeTest((short) 0);
Selector s = new Selector(Selector.DESCENDANT_OR_SELF,
@@ -797,7 +799,7 @@ case 48:
}
break;
case 50:
- // line 584 "XPathParser.y"
+ // line 585 "XPathParser.y"
{
Predicate filter = (Predicate) yyVals[0+yyTop];
Selector s = new Selector(Selector.SELF,
@@ -818,170 +820,171 @@ case 50:
}
break;
case 52:
- // line 607 "XPathParser.y"
+ // line 608 "XPathParser.y"
{
yyVal = new OrExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop]);
}
break;
case 54:
- // line 615 "XPathParser.y"
+ // line 616 "XPathParser.y"
{
yyVal = new AndExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop]);
}
break;
case 56:
- // line 623 "XPathParser.y"
+ // line 624 "XPathParser.y"
{
yyVal = new EqualityExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], false);
}
break;
case 57:
- // line 627 "XPathParser.y"
+ // line 628 "XPathParser.y"
{
yyVal = new EqualityExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], true);
}
break;
case 59:
- // line 635 "XPathParser.y"
+ // line 636 "XPathParser.y"
{
yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], true, false);
}
break;
case 60:
- // line 639 "XPathParser.y"
+ // line 640 "XPathParser.y"
{
yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], false, false);
}
break;
case 61:
- // line 643 "XPathParser.y"
+ // line 644 "XPathParser.y"
{
yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], true, true);
}
break;
case 62:
- // line 647 "XPathParser.y"
+ // line 648 "XPathParser.y"
{
yyVal = new RelationalExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], false, true);
}
break;
case 64:
- // line 655 "XPathParser.y"
+ // line 656 "XPathParser.y"
{
yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.ADD);
}
break;
case 65:
- // line 659 "XPathParser.y"
+ // line 660 "XPathParser.y"
{
yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.SUBTRACT);
}
break;
case 67:
- // line 667 "XPathParser.y"
+ // line 668 "XPathParser.y"
{
yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.MULTIPLY);
}
break;
case 68:
- // line 671 "XPathParser.y"
+ // line 672 "XPathParser.y"
{
yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.DIVIDE);
}
break;
case 69:
- // line 675 "XPathParser.y"
+ // line 676 "XPathParser.y"
{
yyVal = new ArithmeticExpr((Expr) yyVals[-2+yyTop], (Expr) yyVals[0+yyTop], ArithmeticExpr.MODULO);
}
break;
case 71:
- // line 683 "XPathParser.y"
+ // line 684 "XPathParser.y"
{
yyVal = new NegativeExpr((Expr) yyVals[0+yyTop]);
}
break;
case 72:
- // line 690 "XPathParser.y"
+ // line 691 "XPathParser.y"
{
yyVal = new Double((String) yyVals[0+yyTop] + ".0");
}
break;
case 73:
- // line 694 "XPathParser.y"
+ // line 695 "XPathParser.y"
{
yyVal = new Double((String) yyVals[-1+yyTop] + ".0");
}
break;
case 74:
- // line 698 "XPathParser.y"
+ // line 699 "XPathParser.y"
{
yyVal = new Double((String) yyVals[-2+yyTop] + "." + (String) yyVals[0+yyTop]);
}
break;
case 75:
- // line 702 "XPathParser.y"
+ // line 703 "XPathParser.y"
{
yyVal = new Double("0." + (String) yyVals[0+yyTop]);
}
break;
case 77:
- // line 731 "XPathParser.y"
+ // line 732 "XPathParser.y"
{
- yyVal = new VariableReference(variableResolver, (String) yyVals[0+yyTop]);
+ String name = (String) yyVals[0+yyTop];
+ yyVal = new VariableReference(variableResolver, getQName(name));
}
break;
case 78:
- // line 738 "XPathParser.y"
+ // line 740 "XPathParser.y"
{
yyVal = new NameTest(null, true, true);
}
break;
case 79:
- // line 742 "XPathParser.y"
+ // line 744 "XPathParser.y"
{
QName qName = getQName((String) yyVals[-2+yyTop]);
yyVal = new NameTest(qName, true, false);
}
break;
case 80:
- // line 747 "XPathParser.y"
+ // line 749 "XPathParser.y"
{
QName qName = getQName((String) yyVals[0+yyTop]);
yyVal = new NameTest(qName, false, false);
}
break;
case 82:
- // line 756 "XPathParser.y"
+ // line 758 "XPathParser.y"
{
yyVal = (String) yyVals[-2+yyTop] + ':' + (String) yyVals[0+yyTop];
}
break;
case 83:
- // line 763 "XPathParser.y"
+ // line 765 "XPathParser.y"
{
yyVal = new Short(Node.COMMENT_NODE);
}
break;
case 84:
- // line 767 "XPathParser.y"
+ // line 769 "XPathParser.y"
{
yyVal = new Short(Node.TEXT_NODE);
}
break;
case 85:
- // line 771 "XPathParser.y"
+ // line 773 "XPathParser.y"
{
yyVal = new Short(Node.PROCESSING_INSTRUCTION_NODE);
}
break;
case 86:
- // line 775 "XPathParser.y"
+ // line 777 "XPathParser.y"
{
yyVal = new Short((short) 0);
}
break;
- // line 986 "-"
+ // line 988 "-"
}
yyTop -= YyLenClass.yyLen[yyN];
yyState = yyStates[yyTop];
@@ -1455,7 +1458,7 @@ case 86:
} /* End of class YyNameClass */
- // line 781 "XPathParser.y"
+ // line 783 "XPathParser.y"
}
- // line 1461 "-"
+ // line 1463 "-"
diff --git a/gnu/xml/xpath/XPathParser.y b/gnu/xml/xpath/XPathParser.y
index 8af7cb83d..d7dc4f1e8 100644
--- a/gnu/xml/xpath/XPathParser.y
+++ b/gnu/xml/xpath/XPathParser.y
@@ -1,40 +1,41 @@
%{
-/* XPathParser.java -- An XPath 1.0 parser.
- Copyright (C) 2004 Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. */
+/*
+ * XPathParser.java
+ * Copyright (C) 2004 The Free Software Foundation
+ *
+ * This file is part of GNU JAXP, a library.
+ *
+ * GNU JAXP is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GNU JAXP is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Linking this library statically or dynamically with other modules is
+ * making a combined work based on this library. Thus, the terms and
+ * conditions of the GNU General Public License cover the whole
+ * combination.
+ *
+ * As a special exception, the copyright holders of this library give you
+ * permission to link this library with independent modules to produce an
+ * executable, regardless of the license terms of these independent
+ * modules, and to copy and distribute the resulting executable under
+ * terms of your choice, provided that you also meet, for each linked
+ * independent module, the terms and conditions of the license of that
+ * module. An independent module is a module which is not derived from
+ * or based on this library. If you modify this library, you may extend
+ * this exception to your version of the library, but you are not
+ * obliged to do so. If you do not wish to do so, delete this
+ * exception statement from your version.
+ */
package gnu.xml.xpath;
@@ -729,7 +730,8 @@ function_name:
variable_reference:
DOLLAR qname
{
- $$ = new VariableReference(variableResolver, (String) $2);
+ String name = (String) $2;
+ $$ = new VariableReference(variableResolver, getQName(name));
}
;
diff --git a/gnu/xml/xpath/XPathTokenizer.java b/gnu/xml/xpath/XPathTokenizer.java
index 6bf31fdbc..a28713782 100644
--- a/gnu/xml/xpath/XPathTokenizer.java
+++ b/gnu/xml/xpath/XPathTokenizer.java
@@ -15,8 +15,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and