diff options
author | Andrew John Hughes <ahughes@redhat.com> | 2011-01-11 19:46:05 +0000 |
---|---|---|
committer | Andrew John Hughes <gandalf@gcc.gnu.org> | 2011-01-11 19:46:05 +0000 |
commit | dc6715320db92089b3c1b046157b56b5680738a5 (patch) | |
tree | 0da7dbb2f6c016ebe1a6d0bf012840bd76da9170 /libjava/classpath/java/util | |
parent | 9a270ad3c0ba0eb21d09657f8fb3a7786a69ec5d (diff) | |
download | gcc-dc6715320db92089b3c1b046157b56b5680738a5.zip gcc-dc6715320db92089b3c1b046157b56b5680738a5.tar.gz gcc-dc6715320db92089b3c1b046157b56b5680738a5.tar.bz2 |
Normalise whitespace in GNU Classpath.
2010-06-03 Andrew John Hughes <ahughes@redhat.com>
* examples/gnu/classpath/examples/CORBA/NamingService/Demo.java,
* examples/gnu/classpath/examples/CORBA/SimpleCommunication/Demo.java,
* examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToPass.java,
* examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/StructureToReturn.java,
* examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/TreeNode.java,
* examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/WeThrowThisException.java,
* examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/WeThrowThisExceptionHelper.java,
* examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_DemoTesterImplBase.java,
* examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/_DemoTesterStub.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/CanvasWorld.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/ChatConstants.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/ClientFrame.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/Demo.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/GameManager.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/GameManagerImpl.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/IorReader.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/OrbStarter.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/Player.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/PlayerImpl.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/PlayingDesk.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/State.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/X5Server.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/_GameManagerImpl_Tie.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/_GameManager_Stub.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/_PlayerImpl_Tie.java,
* examples/gnu/classpath/examples/CORBA/swing/x5/_Player_Stub.java,
* examples/gnu/classpath/examples/awt/AicasGraphicsBenchmark.java,
* examples/gnu/classpath/examples/awt/Demo.java,
* examples/gnu/classpath/examples/awt/HintingDemo.java,
* examples/gnu/classpath/examples/datatransfer/Demo.java,
* examples/gnu/classpath/examples/html/Demo.java,
* examples/gnu/classpath/examples/java2d/J2dBenchmark.java,
* examples/gnu/classpath/examples/java2d/J2dBenchmarkGUI.java,
* examples/gnu/classpath/examples/java2d/JNIOverhead.java,
* examples/gnu/classpath/examples/jawt/DemoJAWT.java,
* examples/gnu/classpath/examples/management/TestClassLoading.java,
* examples/gnu/classpath/examples/management/TestCompilation.java,
* examples/gnu/classpath/examples/management/TestGarbageCollector.java,
* examples/gnu/classpath/examples/management/TestMemory.java,
* examples/gnu/classpath/examples/management/TestMemoryManager.java,
* examples/gnu/classpath/examples/management/TestMemoryPool.java,
* examples/gnu/classpath/examples/management/TestThread.java,
* examples/gnu/classpath/examples/midi/Demo.java,
* examples/gnu/classpath/examples/print/Demo.java,
* examples/gnu/classpath/examples/sound/AudioPlayerSample.java,
* examples/gnu/classpath/examples/swing/BrowserEditorKit.java,
* examples/gnu/classpath/examples/swing/ButtonDemo.java,
* examples/gnu/classpath/examples/swing/ComboBoxDemo.java,
* examples/gnu/classpath/examples/swing/Demo.java,
* examples/gnu/classpath/examples/swing/DemoFactory.java,
* examples/gnu/classpath/examples/swing/DocumentFilterDemo.java,
* examples/gnu/classpath/examples/swing/FileChooserDemo.java,
* examples/gnu/classpath/examples/swing/HtmlDemo.java,
* examples/gnu/classpath/examples/swing/ListDemo.java,
* examples/gnu/classpath/examples/swing/MetalThemeEditor.java,
* examples/gnu/classpath/examples/swing/NavigationFilterDemo.java,
* examples/gnu/classpath/examples/swing/ScrollBarDemo.java,
* examples/gnu/classpath/examples/swing/SliderDemo.java,
* examples/gnu/classpath/examples/swing/SpinnerDemo.java,
* examples/gnu/classpath/examples/swing/TabbedPaneDemo.java,
* examples/gnu/classpath/examples/swing/TableDemo.java,
* examples/gnu/classpath/examples/swing/TextAreaDemo.java,
* examples/gnu/classpath/examples/swing/TextFieldDemo.java,
* examples/gnu/classpath/examples/swing/TreeDemo.java,
* external/jsr166/java/util/ArrayDeque.java,
* external/jsr166/java/util/concurrent/ArrayBlockingQueue.java,
* external/jsr166/java/util/concurrent/ConcurrentHashMap.java,
* external/jsr166/java/util/concurrent/ConcurrentSkipListMap.java,
* external/jsr166/java/util/concurrent/ConcurrentSkipListSet.java,
* external/jsr166/java/util/concurrent/CopyOnWriteArraySet.java,
* external/jsr166/java/util/concurrent/CyclicBarrier.java,
* external/jsr166/java/util/concurrent/DelayQueue.java,
* external/jsr166/java/util/concurrent/Executors.java,
* external/jsr166/java/util/concurrent/FutureTask.java,
* external/jsr166/java/util/concurrent/LinkedBlockingDeque.java,
* external/jsr166/java/util/concurrent/LinkedBlockingQueue.java,
* external/jsr166/java/util/concurrent/PriorityBlockingQueue.java,
* external/jsr166/java/util/concurrent/ScheduledExecutorService.java,
* external/jsr166/java/util/concurrent/ScheduledThreadPoolExecutor.java,
* external/jsr166/java/util/concurrent/Semaphore.java,
* external/jsr166/java/util/concurrent/SynchronousQueue.java,
* external/jsr166/java/util/concurrent/ThreadPoolExecutor.java,
* external/jsr166/java/util/concurrent/atomic/AtomicInteger.java,
* external/jsr166/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java,
* external/jsr166/java/util/concurrent/atomic/AtomicLong.java,
* external/jsr166/java/util/concurrent/atomic/AtomicLongFieldUpdater.java,
* external/jsr166/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java,
* external/jsr166/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java,
* external/jsr166/java/util/concurrent/locks/AbstractQueuedSynchronizer.java,
* external/jsr166/java/util/concurrent/locks/ReentrantReadWriteLock.java,
* external/relaxngDatatype/org/relaxng/datatype/Datatype.java,
* external/relaxngDatatype/org/relaxng/datatype/DatatypeBuilder.java,
* external/relaxngDatatype/org/relaxng/datatype/DatatypeException.java,
* external/relaxngDatatype/org/relaxng/datatype/DatatypeLibrary.java,
* external/relaxngDatatype/org/relaxng/datatype/DatatypeLibraryFactory.java,
* external/relaxngDatatype/org/relaxng/datatype/DatatypeStreamingValidator.java,
* external/relaxngDatatype/org/relaxng/datatype/ValidationContext.java,
* external/relaxngDatatype/org/relaxng/datatype/helpers/DatatypeLibraryLoader.java,
* external/relaxngDatatype/org/relaxng/datatype/helpers/ParameterlessDatatypeBuilder.java,
* external/relaxngDatatype/org/relaxng/datatype/helpers/StreamingValidatorImpl.java,
* external/sax/org/xml/sax/AttributeList.java,
* external/sax/org/xml/sax/Attributes.java,
* external/sax/org/xml/sax/ContentHandler.java,
* external/sax/org/xml/sax/DTDHandler.java,
* external/sax/org/xml/sax/DocumentHandler.java,
* external/sax/org/xml/sax/EntityResolver.java,
* external/sax/org/xml/sax/ErrorHandler.java,
* external/sax/org/xml/sax/HandlerBase.java,
* external/sax/org/xml/sax/InputSource.java,
* external/sax/org/xml/sax/Locator.java,
* external/sax/org/xml/sax/Parser.java,
* external/sax/org/xml/sax/SAXException.java,
* external/sax/org/xml/sax/SAXNotRecognizedException.java,
* external/sax/org/xml/sax/SAXNotSupportedException.java,
* external/sax/org/xml/sax/SAXParseException.java,
* external/sax/org/xml/sax/XMLReader.java,
* external/sax/org/xml/sax/ext/Attributes2.java,
* external/sax/org/xml/sax/ext/Attributes2Impl.java,
* external/sax/org/xml/sax/ext/DeclHandler.java,
* external/sax/org/xml/sax/ext/DefaultHandler2.java,
* external/sax/org/xml/sax/ext/EntityResolver2.java,
* external/sax/org/xml/sax/ext/LexicalHandler.java,
* external/sax/org/xml/sax/ext/Locator2.java,
* external/sax/org/xml/sax/ext/Locator2Impl.java,
* external/sax/org/xml/sax/helpers/AttributeListImpl.java,
* external/sax/org/xml/sax/helpers/AttributesImpl.java,
* external/sax/org/xml/sax/helpers/DefaultHandler.java,
* external/sax/org/xml/sax/helpers/LocatorImpl.java,
* external/sax/org/xml/sax/helpers/NamespaceSupport.java,
* external/sax/org/xml/sax/helpers/NewInstance.java,
* external/sax/org/xml/sax/helpers/ParserAdapter.java,
* external/sax/org/xml/sax/helpers/ParserFactory.java,
* external/sax/org/xml/sax/helpers/XMLFilterImpl.java,
* external/sax/org/xml/sax/helpers/XMLReaderAdapter.java,
* external/sax/org/xml/sax/helpers/XMLReaderFactory.java,
* external/w3c_dom/org/w3c/dom/Attr.java,
* external/w3c_dom/org/w3c/dom/CDATASection.java,
* external/w3c_dom/org/w3c/dom/CharacterData.java,
* external/w3c_dom/org/w3c/dom/Comment.java,
* external/w3c_dom/org/w3c/dom/DOMConfiguration.java,
* external/w3c_dom/org/w3c/dom/DOMError.java,
* external/w3c_dom/org/w3c/dom/DOMErrorHandler.java,
* external/w3c_dom/org/w3c/dom/DOMException.java,
* external/w3c_dom/org/w3c/dom/DOMImplementation.java,
* external/w3c_dom/org/w3c/dom/DOMImplementationList.java,
* external/w3c_dom/org/w3c/dom/DOMImplementationSource.java,
* external/w3c_dom/org/w3c/dom/DOMLocator.java,
* external/w3c_dom/org/w3c/dom/DOMStringList.java,
* external/w3c_dom/org/w3c/dom/Document.java,
* external/w3c_dom/org/w3c/dom/DocumentFragment.java,
* external/w3c_dom/org/w3c/dom/DocumentType.java,
* external/w3c_dom/org/w3c/dom/Element.java,
* external/w3c_dom/org/w3c/dom/Entity.java,
* external/w3c_dom/org/w3c/dom/EntityReference.java,
* external/w3c_dom/org/w3c/dom/NameList.java,
* external/w3c_dom/org/w3c/dom/NamedNodeMap.java,
* external/w3c_dom/org/w3c/dom/Node.java,
* external/w3c_dom/org/w3c/dom/NodeList.java,
* external/w3c_dom/org/w3c/dom/Notation.java,
* external/w3c_dom/org/w3c/dom/ProcessingInstruction.java,
* external/w3c_dom/org/w3c/dom/Text.java,
* external/w3c_dom/org/w3c/dom/TypeInfo.java,
* external/w3c_dom/org/w3c/dom/UserDataHandler.java,
* external/w3c_dom/org/w3c/dom/bootstrap/DOMImplementationRegistry.java,
* external/w3c_dom/org/w3c/dom/css/CSS2Properties.java,
* external/w3c_dom/org/w3c/dom/css/CSSCharsetRule.java,
* external/w3c_dom/org/w3c/dom/css/CSSFontFaceRule.java,
* external/w3c_dom/org/w3c/dom/css/CSSImportRule.java,
* external/w3c_dom/org/w3c/dom/css/CSSMediaRule.java,
* external/w3c_dom/org/w3c/dom/css/CSSPageRule.java,
* external/w3c_dom/org/w3c/dom/css/CSSPrimitiveValue.java,
* external/w3c_dom/org/w3c/dom/css/CSSRule.java,
* external/w3c_dom/org/w3c/dom/css/CSSRuleList.java,
* external/w3c_dom/org/w3c/dom/css/CSSStyleDeclaration.java,
* external/w3c_dom/org/w3c/dom/css/CSSStyleRule.java,
* external/w3c_dom/org/w3c/dom/css/CSSStyleSheet.java,
* external/w3c_dom/org/w3c/dom/css/CSSUnknownRule.java,
* external/w3c_dom/org/w3c/dom/css/CSSValue.java,
* external/w3c_dom/org/w3c/dom/css/CSSValueList.java,
* external/w3c_dom/org/w3c/dom/css/Counter.java,
* external/w3c_dom/org/w3c/dom/css/DOMImplementationCSS.java,
* external/w3c_dom/org/w3c/dom/css/DocumentCSS.java,
* external/w3c_dom/org/w3c/dom/css/ElementCSSInlineStyle.java,
* external/w3c_dom/org/w3c/dom/css/RGBColor.java,
* external/w3c_dom/org/w3c/dom/css/Rect.java,
* external/w3c_dom/org/w3c/dom/css/ViewCSS.java,
* external/w3c_dom/org/w3c/dom/events/DocumentEvent.java,
* external/w3c_dom/org/w3c/dom/events/Event.java,
* external/w3c_dom/org/w3c/dom/events/EventException.java,
* external/w3c_dom/org/w3c/dom/events/EventListener.java,
* external/w3c_dom/org/w3c/dom/events/EventTarget.java,
* external/w3c_dom/org/w3c/dom/events/MouseEvent.java,
* external/w3c_dom/org/w3c/dom/events/MutationEvent.java,
* external/w3c_dom/org/w3c/dom/events/UIEvent.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLAnchorElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLAppletElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLAreaElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLBRElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLBaseElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLBaseFontElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLBodyElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLButtonElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLCollection.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLDListElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLDirectoryElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLDivElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLDocument.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLFieldSetElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLFontElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLFormElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLFrameElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLFrameSetElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLHRElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLHeadElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLHeadingElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLHtmlElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLIFrameElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLImageElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLInputElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLIsIndexElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLLIElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLLabelElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLLegendElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLLinkElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLMapElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLMenuElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLMetaElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLModElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLOListElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLObjectElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLOptGroupElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLOptionElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLOptionsCollection.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLParagraphElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLParamElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLPreElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLQuoteElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLScriptElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLSelectElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLStyleElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLTableCaptionElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLTableCellElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLTableColElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLTableElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLTableRowElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLTableSectionElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLTextAreaElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLTitleElement.java,
* external/w3c_dom/org/w3c/dom/html2/HTMLUListElement.java,
* external/w3c_dom/org/w3c/dom/ls/DOMImplementationLS.java,
* external/w3c_dom/org/w3c/dom/ls/LSException.java,
* external/w3c_dom/org/w3c/dom/ls/LSInput.java,
* external/w3c_dom/org/w3c/dom/ls/LSLoadEvent.java,
* external/w3c_dom/org/w3c/dom/ls/LSOutput.java,
* external/w3c_dom/org/w3c/dom/ls/LSParser.java,
* external/w3c_dom/org/w3c/dom/ls/LSParserFilter.java,
* external/w3c_dom/org/w3c/dom/ls/LSProgressEvent.java,
* external/w3c_dom/org/w3c/dom/ls/LSResourceResolver.java,
* external/w3c_dom/org/w3c/dom/ls/LSSerializer.java,
* external/w3c_dom/org/w3c/dom/ls/LSSerializerFilter.java,
* external/w3c_dom/org/w3c/dom/ranges/DocumentRange.java,
* external/w3c_dom/org/w3c/dom/ranges/Range.java,
* external/w3c_dom/org/w3c/dom/ranges/RangeException.java,
* external/w3c_dom/org/w3c/dom/stylesheets/DocumentStyle.java,
* external/w3c_dom/org/w3c/dom/stylesheets/LinkStyle.java,
* external/w3c_dom/org/w3c/dom/stylesheets/MediaList.java,
* external/w3c_dom/org/w3c/dom/stylesheets/StyleSheet.java,
* external/w3c_dom/org/w3c/dom/stylesheets/StyleSheetList.java,
* external/w3c_dom/org/w3c/dom/traversal/DocumentTraversal.java,
* external/w3c_dom/org/w3c/dom/traversal/NodeFilter.java,
* external/w3c_dom/org/w3c/dom/traversal/NodeIterator.java,
* external/w3c_dom/org/w3c/dom/traversal/TreeWalker.java,
* external/w3c_dom/org/w3c/dom/views/AbstractView.java,
* external/w3c_dom/org/w3c/dom/views/DocumentView.java,
* external/w3c_dom/org/w3c/dom/xpath/XPathEvaluator.java,
* external/w3c_dom/org/w3c/dom/xpath/XPathException.java,
* external/w3c_dom/org/w3c/dom/xpath/XPathExpression.java,
* external/w3c_dom/org/w3c/dom/xpath/XPathNSResolver.java,
* external/w3c_dom/org/w3c/dom/xpath/XPathNamespace.java,
* external/w3c_dom/org/w3c/dom/xpath/XPathResult.java,
* gnu/CORBA/BigDecimalHelper.java,
* gnu/CORBA/CDR/AbstractCdrInput.java,
* gnu/CORBA/CDR/AbstractCdrOutput.java,
* gnu/CORBA/CDR/AbstractDataInput.java,
* gnu/CORBA/CDR/AbstractDataOutput.java,
* gnu/CORBA/CDR/AligningInput.java,
* gnu/CORBA/CDR/AligningOutput.java,
* gnu/CORBA/CDR/ArrayValueHelper.java,
* gnu/CORBA/CDR/BigEndianInputStream.java,
* gnu/CORBA/CDR/BigEndianOutputStream.java,
* gnu/CORBA/CDR/BufferedCdrOutput.java,
* gnu/CORBA/CDR/BufferredCdrInput.java,
* gnu/CORBA/CDR/HeadlessInput.java,
* gnu/CORBA/CDR/IDLTypeHelper.java,
* gnu/CORBA/CDR/LittleEndianOutputStream.java,
* gnu/CORBA/CDR/UnknownExceptionCtxHandler.java,
* gnu/CORBA/CDR/VMVio.java,
* gnu/CORBA/CDR/Vio.java,
* gnu/CORBA/CDR/gnuRuntime.java,
* gnu/CORBA/CDR/gnuValueStream.java,
* gnu/CORBA/CdrEncapsCodecImpl.java,
* gnu/CORBA/CollocatedOrbs.java,
* gnu/CORBA/Connected_objects.java,
* gnu/CORBA/DefaultSocketFactory.java,
* gnu/CORBA/DuplicateNameHolder.java,
* gnu/CORBA/DynAn/AbstractAny.java,
* gnu/CORBA/DynAn/DivideableAny.java,
* gnu/CORBA/DynAn/NameValuePairHolder.java,
* gnu/CORBA/DynAn/RecordAny.java,
* gnu/CORBA/DynAn/ValueChangeListener.java,
* gnu/CORBA/DynAn/gnuDynAny.java,
* gnu/CORBA/DynAn/gnuDynAnyFactory.java,
* gnu/CORBA/DynAn/gnuDynArray.java,
* gnu/CORBA/DynAn/gnuDynEnum.java,
* gnu/CORBA/DynAn/gnuDynFixed.java,
* gnu/CORBA/DynAn/gnuDynSequence.java,
* gnu/CORBA/DynAn/gnuDynUnion.java,
* gnu/CORBA/DynAn/gnuDynValue.java,
* gnu/CORBA/DynAn/gnuDynValueBox.java,
* gnu/CORBA/DynAnySeqHolder.java,
* gnu/CORBA/EmptyExceptionHolder.java,
* gnu/CORBA/ForwardRequestHelper.java,
* gnu/CORBA/GIOP/CharSets_OSF.java,
* gnu/CORBA/GIOP/CloseMessage.java,
* gnu/CORBA/GIOP/ErrorMessage.java,
* gnu/CORBA/GIOP/MessageHeader.java,
* gnu/CORBA/GIOP/ServiceContext.java,
* gnu/CORBA/GIOP/v1_2/RequestHeader.java,
* gnu/CORBA/GeneralHolder.java,
* gnu/CORBA/IOR.java,
* gnu/CORBA/Interceptor/ClientRequestInterceptors.java,
* gnu/CORBA/Interceptor/ForwardRequestHolder.java,
* gnu/CORBA/Interceptor/IORInterceptors.java,
* gnu/CORBA/Interceptor/Registrator.java,
* gnu/CORBA/Interceptor/ServerRequestInterceptors.java,
* gnu/CORBA/Interceptor/gnuClientRequestInfo.java,
* gnu/CORBA/Interceptor/gnuIcCurrent.java,
* gnu/CORBA/Interceptor/gnuIorInfo.java,
* gnu/CORBA/Interceptor/gnuServerRequestInfo.java,
* gnu/CORBA/IorDelegate.java,
* gnu/CORBA/IorObject.java,
* gnu/CORBA/Minor.java,
* gnu/CORBA/NameDynAnyPairHolder.java,
* gnu/CORBA/NameDynAnyPairSeqHolder.java,
* gnu/CORBA/NameValuePairHolder.java,
* gnu/CORBA/NameValuePairSeqHolder.java,
* gnu/CORBA/NamingService/NameParser.java,
* gnu/CORBA/NamingService/NamingMap.java,
* gnu/CORBA/NamingService/NamingServiceTransient.java,
* gnu/CORBA/NamingService/TransientContext.java,
* gnu/CORBA/ObjectCreator.java,
* gnu/CORBA/OrbFocused.java,
* gnu/CORBA/OrbFunctional.java,
* gnu/CORBA/OrbRestricted.java,
* gnu/CORBA/Poa/AOM.java,
* gnu/CORBA/Poa/AccessiblePolicy.java,
* gnu/CORBA/Poa/DynamicImpHandler.java,
* gnu/CORBA/Poa/ForwardRequestHolder.java,
* gnu/CORBA/Poa/ForwardedServant.java,
* gnu/CORBA/Poa/InvalidPolicyHolder.java,
* gnu/CORBA/Poa/LocalDelegate.java,
* gnu/CORBA/Poa/LocalRequest.java,
* gnu/CORBA/Poa/LocalServerRequest.java,
* gnu/CORBA/Poa/ORB_1_4.java,
* gnu/CORBA/Poa/ServantDelegateImpl.java,
* gnu/CORBA/Poa/StandardPolicies.java,
* gnu/CORBA/Poa/gnuAdapterActivator.java,
* gnu/CORBA/Poa/gnuForwardRequest.java,
* gnu/CORBA/Poa/gnuIdAssignmentPolicy.java,
* gnu/CORBA/Poa/gnuIdUniquenessPolicy.java,
* gnu/CORBA/Poa/gnuImplicitActivationPolicy.java,
* gnu/CORBA/Poa/gnuLifespanPolicy.java,
* gnu/CORBA/Poa/gnuPOA.java,
* gnu/CORBA/Poa/gnuPOAManager.java,
* gnu/CORBA/Poa/gnuPoaCurrent.java,
* gnu/CORBA/Poa/gnuRequestProcessingPolicy.java,
* gnu/CORBA/Poa/gnuServantObject.java,
* gnu/CORBA/Poa/gnuServantRetentionPolicy.java,
* gnu/CORBA/Poa/gnuThreadPolicy.java,
* gnu/CORBA/ServiceRequestAdapter.java,
* gnu/CORBA/SetOverrideTypeHolder.java,
* gnu/CORBA/SimpleDelegate.java,
* gnu/CORBA/SocketRepository.java,
* gnu/CORBA/StreamHolder.java,
* gnu/CORBA/TypeCodeHelper.java,
* gnu/CORBA/TypeKindNamer.java,
* gnu/CORBA/Version.java,
* gnu/CORBA/_PolicyImplBase.java,
* gnu/CORBA/gnuAny.java,
* gnu/CORBA/gnuCodecFactory.java,
* gnu/CORBA/gnuEnvironment.java,
* gnu/CORBA/gnuRequest.java,
* gnu/CORBA/gnuValueHolder.java,
* gnu/CORBA/interfaces/SocketFactory.java,
* gnu/CORBA/typecodes/AliasTypeCode.java,
* gnu/CORBA/typecodes/ArrayTypeCode.java,
* gnu/CORBA/typecodes/FixedTypeCode.java,
* gnu/CORBA/typecodes/GeneralTypeCode.java,
* gnu/CORBA/typecodes/PrimitiveTypeCode.java,
* gnu/CORBA/typecodes/RecordTypeCode.java,
* gnu/CORBA/typecodes/RecursiveTypeCode.java,
* gnu/CORBA/typecodes/StringTypeCode.java,
* gnu/classpath/Pair.java,
* gnu/classpath/Pointer.java,
* gnu/classpath/Pointer32.java,
* gnu/classpath/Pointer64.java,
* gnu/classpath/ServiceFactory.java,
* gnu/classpath/ServiceProviderLoadingAction.java,
* gnu/classpath/SystemProperties.java,
* gnu/classpath/debug/Component.java,
* gnu/classpath/debug/PreciseFilter.java,
* gnu/classpath/debug/SystemLogger.java,
* gnu/classpath/debug/TeeInputStream.java,
* gnu/classpath/debug/TeeReader.java,
* gnu/classpath/jdwp/Jdwp.java,
* gnu/classpath/jdwp/JdwpConstants.java,
* gnu/classpath/jdwp/event/BreakpointEvent.java,
* gnu/classpath/jdwp/event/ClassPrepareEvent.java,
* gnu/classpath/jdwp/event/ClassUnloadEvent.java,
* gnu/classpath/jdwp/event/Event.java,
* gnu/classpath/jdwp/event/EventManager.java,
* gnu/classpath/jdwp/event/EventRequest.java,
* gnu/classpath/jdwp/event/ExceptionEvent.java,
* gnu/classpath/jdwp/event/MethodEntryEvent.java,
* gnu/classpath/jdwp/event/MethodExitEvent.java,
* gnu/classpath/jdwp/event/SingleStepEvent.java,
* gnu/classpath/jdwp/event/ThreadEndEvent.java,
* gnu/classpath/jdwp/event/VmDeathEvent.java,
* gnu/classpath/jdwp/event/VmInitEvent.java,
* gnu/classpath/jdwp/event/filters/ClassExcludeFilter.java,
* gnu/classpath/jdwp/event/filters/ClassMatchFilter.java,
* gnu/classpath/jdwp/event/filters/ClassOnlyFilter.java,
* gnu/classpath/jdwp/event/filters/ExceptionOnlyFilter.java,
* gnu/classpath/jdwp/event/filters/FieldOnlyFilter.java,
* gnu/classpath/jdwp/event/filters/InstanceOnlyFilter.java,
* gnu/classpath/jdwp/event/filters/StepFilter.java,
* gnu/classpath/jdwp/event/filters/ThreadOnlyFilter.java,
* gnu/classpath/jdwp/exception/InvalidClassException.java,
* gnu/classpath/jdwp/exception/InvalidClassLoaderException.java,
* gnu/classpath/jdwp/exception/InvalidEventTypeException.java,
* gnu/classpath/jdwp/exception/InvalidFieldException.java,
* gnu/classpath/jdwp/exception/InvalidFrameException.java,
* gnu/classpath/jdwp/exception/InvalidLocationException.java,
* gnu/classpath/jdwp/exception/InvalidMethodException.java,
* gnu/classpath/jdwp/exception/InvalidObjectException.java,
* gnu/classpath/jdwp/exception/InvalidSlotException.java,
* gnu/classpath/jdwp/exception/InvalidStringException.java,
* gnu/classpath/jdwp/exception/InvalidThreadException.java,
* gnu/classpath/jdwp/exception/InvalidThreadGroupException.java,
* gnu/classpath/jdwp/exception/NativeMethodException.java,
* gnu/classpath/jdwp/exception/NotImplementedException.java,
* gnu/classpath/jdwp/id/JdwpId.java,
* gnu/classpath/jdwp/id/NullObjectId.java,
* gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java,
* gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java,
* gnu/classpath/jdwp/processor/ClassLoaderReferenceCommandSet.java,
* gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java,
* gnu/classpath/jdwp/processor/ClassTypeCommandSet.java,
* gnu/classpath/jdwp/processor/CommandSet.java,
* gnu/classpath/jdwp/processor/EventRequestCommandSet.java,
* gnu/classpath/jdwp/processor/FieldCommandSet.java,
* gnu/classpath/jdwp/processor/InterfaceTypeCommandSet.java,
* gnu/classpath/jdwp/processor/MethodCommandSet.java,
* gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java,
* gnu/classpath/jdwp/processor/PacketProcessor.java,
* gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java,
* gnu/classpath/jdwp/processor/StackFrameCommandSet.java,
* gnu/classpath/jdwp/processor/StringReferenceCommandSet.java,
* gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java,
* gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java,
* gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java,
* gnu/classpath/jdwp/transport/JdwpCommandPacket.java,
* gnu/classpath/jdwp/transport/JdwpConnection.java,
* gnu/classpath/jdwp/transport/JdwpPacket.java,
* gnu/classpath/jdwp/transport/JdwpReplyPacket.java,
* gnu/classpath/jdwp/transport/SocketTransport.java,
* gnu/classpath/jdwp/transport/TransportFactory.java,
* gnu/classpath/jdwp/util/JdwpString.java,
* gnu/classpath/jdwp/util/LineTable.java,
* gnu/classpath/jdwp/util/Location.java,
* gnu/classpath/jdwp/util/MethodResult.java,
* gnu/classpath/jdwp/util/MonitorInfo.java,
* gnu/classpath/jdwp/util/Signature.java,
* gnu/classpath/jdwp/util/VariableTable.java,
* gnu/classpath/jdwp/value/ArrayValue.java,
* gnu/classpath/jdwp/value/BooleanValue.java,
* gnu/classpath/jdwp/value/ByteValue.java,
* gnu/classpath/jdwp/value/CharValue.java,
* gnu/classpath/jdwp/value/DoubleValue.java,
* gnu/classpath/jdwp/value/FloatValue.java,
* gnu/classpath/jdwp/value/IntValue.java,
* gnu/classpath/jdwp/value/LongValue.java,
* gnu/classpath/jdwp/value/ObjectValue.java,
* gnu/classpath/jdwp/value/ShortValue.java,
* gnu/classpath/jdwp/value/StringValue.java,
* gnu/classpath/jdwp/value/Value.java,
* gnu/classpath/jdwp/value/ValueFactory.java,
* gnu/classpath/jdwp/value/VoidValue.java,
* gnu/classpath/toolkit/DefaultDaemonThreadFactory.java,
* gnu/java/awt/AWTUtilities.java,
* gnu/java/awt/BitMaskExtent.java,
* gnu/java/awt/BitwiseXORComposite.java,
* gnu/java/awt/Buffers.java,
* gnu/java/awt/ClasspathGraphicsEnvironment.java,
* gnu/java/awt/ClasspathToolkit.java,
* gnu/java/awt/ComponentDataBlitOp.java,
* gnu/java/awt/EmbeddedWindow.java,
* gnu/java/awt/GradientPaintContext.java,
* gnu/java/awt/color/CieXyzConverter.java,
* gnu/java/awt/color/ClutProfileConverter.java,
* gnu/java/awt/color/ColorLookUpTable.java,
* gnu/java/awt/color/GrayProfileConverter.java,
* gnu/java/awt/color/GrayScaleConverter.java,
* gnu/java/awt/color/LinearRGBConverter.java,
* gnu/java/awt/color/ProfileHeader.java,
* gnu/java/awt/color/RgbProfileConverter.java,
* gnu/java/awt/color/SrgbConverter.java,
* gnu/java/awt/color/ToneReproductionCurve.java,
* gnu/java/awt/dnd/GtkMouseDragGestureRecognizer.java,
* gnu/java/awt/dnd/peer/gtk/GtkDragSourceContextPeer.java,
* gnu/java/awt/dnd/peer/gtk/GtkDropTargetContextPeer.java,
* gnu/java/awt/dnd/peer/gtk/GtkDropTargetPeer.java,
* gnu/java/awt/font/FontDelegate.java,
* gnu/java/awt/font/FontFactory.java,
* gnu/java/awt/font/GNUGlyphVector.java,
* gnu/java/awt/font/OpenTypeFontPeer.java,
* gnu/java/awt/font/autofit/GlyphHints.java,
* gnu/java/awt/font/autofit/Latin.java,
* gnu/java/awt/font/autofit/Utils.java,
* gnu/java/awt/font/opentype/CharGlyphMap.java,
* gnu/java/awt/font/opentype/GlyphNamer.java,
* gnu/java/awt/font/opentype/MacResourceFork.java,
* gnu/java/awt/font/opentype/NameDecoder.java,
* gnu/java/awt/font/opentype/OpenTypeFont.java,
* gnu/java/awt/font/opentype/OpenTypeFontFactory.java,
* gnu/java/awt/font/opentype/truetype/GlyphLoader.java,
* gnu/java/awt/font/opentype/truetype/GlyphLocator.java,
* gnu/java/awt/font/opentype/truetype/GlyphMeasurer.java,
* gnu/java/awt/font/opentype/truetype/Point.java,
* gnu/java/awt/font/opentype/truetype/TrueTypeScaler.java,
* gnu/java/awt/font/opentype/truetype/VirtualMachine.java,
* gnu/java/awt/font/opentype/truetype/Zone.java,
* gnu/java/awt/font/opentype/truetype/ZonePathIterator.java,
* gnu/java/awt/image/AsyncImage.java,
* gnu/java/awt/image/ImageConverter.java,
* gnu/java/awt/image/ImageDecoder.java,
* gnu/java/awt/image/XBMDecoder.java,
* gnu/java/awt/java2d/AbstractGraphics2D.java,
* gnu/java/awt/java2d/AlphaCompositeContext.java,
* gnu/java/awt/java2d/CubicSegment.java,
* gnu/java/awt/java2d/LineSegment.java,
* gnu/java/awt/java2d/PixelCoverage.java,
* gnu/java/awt/java2d/QuadSegment.java,
* gnu/java/awt/java2d/RasterGraphics.java,
* gnu/java/awt/java2d/ScanlineConverter.java,
* gnu/java/awt/java2d/ScanlineCoverage.java,
* gnu/java/awt/java2d/Segment.java,
* gnu/java/awt/java2d/TexturePaintContext.java,
* gnu/java/awt/peer/ClasspathDesktopPeer.java,
* gnu/java/awt/peer/ClasspathFontPeer.java,
* gnu/java/awt/peer/GLightweightPeer.java,
* gnu/java/awt/peer/GnomeDesktopPeer.java,
* gnu/java/awt/peer/KDEDesktopPeer.java,
* gnu/java/awt/peer/gtk/AsyncImage.java,
* gnu/java/awt/peer/gtk/BufferedImageGraphics.java,
* gnu/java/awt/peer/gtk/CairoGraphics2D.java,
* gnu/java/awt/peer/gtk/CairoSurface.java,
* gnu/java/awt/peer/gtk/CairoSurfaceGraphics.java,
* gnu/java/awt/peer/gtk/ComponentGraphics.java,
* gnu/java/awt/peer/gtk/ComponentGraphicsCopy.java,
* gnu/java/awt/peer/gtk/FreetypeGlyphVector.java,
* gnu/java/awt/peer/gtk/GdkFontPeer.java,
* gnu/java/awt/peer/gtk/GdkGraphicsConfiguration.java,
* gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java,
* gnu/java/awt/peer/gtk/GdkPixbufDecoder.java,
* gnu/java/awt/peer/gtk/GdkRobotPeer.java,
* gnu/java/awt/peer/gtk/GdkScreenGraphicsDevice.java,
* gnu/java/awt/peer/gtk/GtkButtonPeer.java,
* gnu/java/awt/peer/gtk/GtkCheckboxPeer.java,
* gnu/java/awt/peer/gtk/GtkChoicePeer.java,
* gnu/java/awt/peer/gtk/GtkClipboard.java,
* gnu/java/awt/peer/gtk/GtkComponentPeer.java,
* gnu/java/awt/peer/gtk/GtkContainerPeer.java,
* gnu/java/awt/peer/gtk/GtkCursor.java,
* gnu/java/awt/peer/gtk/GtkDialogPeer.java,
* gnu/java/awt/peer/gtk/GtkFileDialogPeer.java,
* gnu/java/awt/peer/gtk/GtkFramePeer.java,
* gnu/java/awt/peer/gtk/GtkGenericPeer.java,
* gnu/java/awt/peer/gtk/GtkImage.java,
* gnu/java/awt/peer/gtk/GtkImageConsumer.java,
* gnu/java/awt/peer/gtk/GtkLabelPeer.java,
* gnu/java/awt/peer/gtk/GtkListPeer.java,
* gnu/java/awt/peer/gtk/GtkMenuComponentPeer.java,
* gnu/java/awt/peer/gtk/GtkMenuPeer.java,
* gnu/java/awt/peer/gtk/GtkMouseInfoPeer.java,
* gnu/java/awt/peer/gtk/GtkPanelPeer.java,
* gnu/java/awt/peer/gtk/GtkPopupMenuPeer.java,
* gnu/java/awt/peer/gtk/GtkScrollbarPeer.java,
* gnu/java/awt/peer/gtk/GtkSelection.java,
* gnu/java/awt/peer/gtk/GtkToolkit.java,
* gnu/java/awt/peer/gtk/GtkVolatileImage.java,
* gnu/java/awt/peer/gtk/GtkWindowPeer.java,
* gnu/java/awt/peer/gtk/VolatileImageGraphics.java,
* gnu/java/awt/peer/headless/HeadlessGraphicsEnvironment.java,
* gnu/java/awt/peer/qt/MainQtThread.java,
* gnu/java/awt/peer/qt/QMatrix.java,
* gnu/java/awt/peer/qt/QPainterPath.java,
* gnu/java/awt/peer/qt/QPen.java,
* gnu/java/awt/peer/qt/QtAudioClip.java,
* gnu/java/awt/peer/qt/QtButtonPeer.java,
* gnu/java/awt/peer/qt/QtCheckboxPeer.java,
* gnu/java/awt/peer/qt/QtChoicePeer.java,
* gnu/java/awt/peer/qt/QtComponentGraphics.java,
* gnu/java/awt/peer/qt/QtComponentPeer.java,
* gnu/java/awt/peer/qt/QtContainerPeer.java,
* gnu/java/awt/peer/qt/QtDialogPeer.java,
* gnu/java/awt/peer/qt/QtEmbeddedWindowPeer.java,
* gnu/java/awt/peer/qt/QtFileDialogPeer.java,
* gnu/java/awt/peer/qt/QtFontMetrics.java,
* gnu/java/awt/peer/qt/QtFontPeer.java,
* gnu/java/awt/peer/qt/QtFramePeer.java,
* gnu/java/awt/peer/qt/QtGraphics.java,
* gnu/java/awt/peer/qt/QtGraphicsEnvironment.java,
* gnu/java/awt/peer/qt/QtImage.java,
* gnu/java/awt/peer/qt/QtImageConsumer.java,
* gnu/java/awt/peer/qt/QtImageDirectGraphics.java,
* gnu/java/awt/peer/qt/QtImageGraphics.java,
* gnu/java/awt/peer/qt/QtLabelPeer.java,
* gnu/java/awt/peer/qt/QtListPeer.java,
* gnu/java/awt/peer/qt/QtMenuBarPeer.java,
* gnu/java/awt/peer/qt/QtMenuComponentPeer.java,
* gnu/java/awt/peer/qt/QtMenuItemPeer.java,
* gnu/java/awt/peer/qt/QtMenuPeer.java,
* gnu/java/awt/peer/qt/QtPanelPeer.java,
* gnu/java/awt/peer/qt/QtPopupMenuPeer.java,
* gnu/java/awt/peer/qt/QtRepaintThread.java,
* gnu/java/awt/peer/qt/QtScreenDevice.java,
* gnu/java/awt/peer/qt/QtScreenDeviceConfiguration.java,
* gnu/java/awt/peer/qt/QtScrollPanePeer.java,
* gnu/java/awt/peer/qt/QtScrollbarPeer.java,
* gnu/java/awt/peer/qt/QtTextAreaPeer.java,
* gnu/java/awt/peer/qt/QtTextFieldPeer.java,
* gnu/java/awt/peer/qt/QtToolkit.java,
* gnu/java/awt/peer/qt/QtVolatileImage.java,
* gnu/java/awt/peer/qt/QtWindowPeer.java,
* gnu/java/awt/peer/swing/SwingButtonPeer.java,
* gnu/java/awt/peer/swing/SwingCheckboxPeer.java,
* gnu/java/awt/peer/swing/SwingComponent.java,
* gnu/java/awt/peer/swing/SwingComponentPeer.java,
* gnu/java/awt/peer/swing/SwingContainerPeer.java,
* gnu/java/awt/peer/swing/SwingLabelPeer.java,
* gnu/java/awt/peer/swing/SwingListPeer.java,
* gnu/java/awt/peer/swing/SwingMenuItemPeer.java,
* gnu/java/awt/peer/swing/SwingMenuPeer.java,
* gnu/java/awt/peer/swing/SwingTextAreaPeer.java,
* gnu/java/awt/peer/swing/SwingTextFieldPeer.java,
* gnu/java/awt/peer/x/GLGraphics.java,
* gnu/java/awt/peer/x/KeyboardMapping.java,
* gnu/java/awt/peer/x/XEventPump.java,
* gnu/java/awt/peer/x/XFontPeer.java,
* gnu/java/awt/peer/x/XFramePeer.java,
* gnu/java/awt/peer/x/XGraphics2D.java,
* gnu/java/awt/peer/x/XGraphicsConfiguration.java,
* gnu/java/awt/peer/x/XGraphicsDevice.java,
* gnu/java/awt/peer/x/XGraphicsEnvironment.java,
* gnu/java/awt/peer/x/XImage.java,
* gnu/java/awt/peer/x/XToolkit.java,
* gnu/java/awt/peer/x/XWindowPeer.java,
* gnu/java/awt/print/JavaPrinterGraphics.java,
* gnu/java/awt/print/JavaPrinterJob.java,
* gnu/java/awt/print/PostScriptGraphics2D.java,
* gnu/java/awt/print/SpooledDocument.java,
* gnu/java/beans/BeanInfoEmbryo.java,
* gnu/java/beans/DefaultExceptionListener.java,
* gnu/java/beans/ExplicitBeanInfo.java,
* gnu/java/beans/IntrospectionIncubator.java,
* gnu/java/beans/decoder/AbstractContext.java,
* gnu/java/beans/decoder/AbstractCreatableObjectContext.java,
* gnu/java/beans/decoder/AbstractElementHandler.java,
* gnu/java/beans/decoder/AbstractObjectContext.java,
* gnu/java/beans/decoder/ArrayContext.java,
* gnu/java/beans/decoder/ArrayHandler.java,
* gnu/java/beans/decoder/AssemblyException.java,
* gnu/java/beans/decoder/BooleanHandler.java,
* gnu/java/beans/decoder/ByteHandler.java,
* gnu/java/beans/decoder/CharHandler.java,
* gnu/java/beans/decoder/ClassHandler.java,
* gnu/java/beans/decoder/ConstructorContext.java,
* gnu/java/beans/decoder/Context.java,
* gnu/java/beans/decoder/DecoderContext.java,
* gnu/java/beans/decoder/DoubleHandler.java,
* gnu/java/beans/decoder/DummyContext.java,
* gnu/java/beans/decoder/DummyHandler.java,
* gnu/java/beans/decoder/ElementHandler.java,
* gnu/java/beans/decoder/FloatHandler.java,
* gnu/java/beans/decoder/GrowableArrayContext.java,
* gnu/java/beans/decoder/IndexContext.java,
* gnu/java/beans/decoder/IntHandler.java,
* gnu/java/beans/decoder/JavaHandler.java,
* gnu/java/beans/decoder/LongHandler.java,
* gnu/java/beans/decoder/MethodContext.java,
* gnu/java/beans/decoder/MethodFinder.java,
* gnu/java/beans/decoder/NullHandler.java,
* gnu/java/beans/decoder/ObjectContext.java,
* gnu/java/beans/decoder/ObjectHandler.java,
* gnu/java/beans/decoder/PersistenceParser.java,
* gnu/java/beans/decoder/PropertyContext.java,
* gnu/java/beans/decoder/ShortHandler.java,
* gnu/java/beans/decoder/SimpleHandler.java,
* gnu/java/beans/decoder/StaticMethodContext.java,
* gnu/java/beans/decoder/StringHandler.java,
* gnu/java/beans/decoder/VoidHandler.java,
* gnu/java/beans/editors/ColorEditor.java,
* gnu/java/beans/editors/FontEditor.java,
* gnu/java/beans/editors/NativeBooleanEditor.java,
* gnu/java/beans/editors/NativeByteEditor.java,
* gnu/java/beans/editors/NativeDoubleEditor.java,
* gnu/java/beans/editors/NativeFloatEditor.java,
* gnu/java/beans/editors/NativeIntEditor.java,
* gnu/java/beans/editors/NativeLongEditor.java,
* gnu/java/beans/editors/NativeShortEditor.java,
* gnu/java/beans/editors/StringEditor.java,
* gnu/java/beans/encoder/ArrayPersistenceDelegate.java,
* gnu/java/beans/encoder/ClassPersistenceDelegate.java,
* gnu/java/beans/encoder/CollectionPersistenceDelegate.java,
* gnu/java/beans/encoder/Context.java,
* gnu/java/beans/encoder/GenericScannerState.java,
* gnu/java/beans/encoder/IgnoringScannerState.java,
* gnu/java/beans/encoder/MapPersistenceDelegate.java,
* gnu/java/beans/encoder/ObjectId.java,
* gnu/java/beans/encoder/PrimitivePersistenceDelegate.java,
* gnu/java/beans/encoder/ReportingScannerState.java,
* gnu/java/beans/encoder/Root.java,
* gnu/java/beans/encoder/ScanEngine.java,
* gnu/java/beans/encoder/ScannerState.java,
* gnu/java/beans/encoder/StAXWriter.java,
* gnu/java/beans/encoder/Writer.java,
* gnu/java/beans/encoder/elements/ArrayInstantiation.java,
* gnu/java/beans/encoder/elements/Array_Get.java,
* gnu/java/beans/encoder/elements/ClassResolution.java,
* gnu/java/beans/encoder/elements/Element.java,
* gnu/java/beans/encoder/elements/List_Get.java,
* gnu/java/beans/encoder/elements/List_Set.java,
* gnu/java/beans/encoder/elements/MethodInvocation.java,
* gnu/java/beans/encoder/elements/NullObject.java,
* gnu/java/beans/encoder/elements/ObjectInstantiation.java,
* gnu/java/beans/encoder/elements/ObjectReference.java,
* gnu/java/beans/encoder/elements/PrimitiveInstantiation.java,
* gnu/java/beans/encoder/elements/StaticFieldAccess.java,
* gnu/java/beans/encoder/elements/StaticMethodInvocation.java,
* gnu/java/beans/encoder/elements/StringReference.java,
* gnu/java/io/ASN1ParsingException.java,
* gnu/java/io/Base64InputStream.java,
* gnu/java/io/ClassLoaderObjectInputStream.java,
* gnu/java/io/NullOutputStream.java,
* gnu/java/io/ObjectIdentityMap2Int.java,
* gnu/java/io/ObjectIdentityWrapper.java,
* gnu/java/io/PlatformHelper.java,
* gnu/java/lang/CPStringBuilder.java,
* gnu/java/lang/CharData.java,
* gnu/java/lang/InstrumentationImpl.java,
* gnu/java/lang/MainThread.java,
* gnu/java/lang/management/BeanImpl.java,
* gnu/java/lang/management/ClassLoadingMXBeanImpl.java,
* gnu/java/lang/management/CompilationMXBeanImpl.java,
* gnu/java/lang/management/GarbageCollectorMXBeanImpl.java,
* gnu/java/lang/management/MemoryMXBeanImpl.java,
* gnu/java/lang/management/MemoryManagerMXBeanImpl.java,
* gnu/java/lang/management/MemoryPoolMXBeanImpl.java,
* gnu/java/lang/management/OperatingSystemMXBeanImpl.java,
* gnu/java/lang/management/RuntimeMXBeanImpl.java,
* gnu/java/lang/management/ThreadMXBeanImpl.java,
* gnu/java/lang/reflect/TypeSignature.java,
* gnu/java/locale/LocaleHelper.java,
* gnu/java/math/Fixed.java,
* gnu/java/math/GMP.java,
* gnu/java/math/MPN.java,
* gnu/java/net/CRLFInputStream.java,
* gnu/java/net/CRLFOutputStream.java,
* gnu/java/net/DefaultContentHandlerFactory.java,
* gnu/java/net/DefaultProxySelector.java,
* gnu/java/net/EmptyX509TrustManager.java,
* gnu/java/net/GetLocalHostAction.java,
* gnu/java/net/HeaderFieldHelper.java,
* gnu/java/net/IndexListParser.java,
* gnu/java/net/LineInputStream.java,
* gnu/java/net/PlainDatagramSocketImpl.java,
* gnu/java/net/PlainSocketImpl.java,
* gnu/java/net/loader/FileResource.java,
* gnu/java/net/loader/FileURLLoader.java,
* gnu/java/net/loader/JarURLLoader.java,
* gnu/java/net/loader/JarURLResource.java,
* gnu/java/net/loader/RemoteResource.java,
* gnu/java/net/loader/RemoteURLLoader.java,
* gnu/java/net/loader/Resource.java,
* gnu/java/net/loader/URLLoader.java,
* gnu/java/net/protocol/file/Connection.java,
* gnu/java/net/protocol/file/Handler.java,
* gnu/java/net/protocol/ftp/ActiveModeDTP.java,
* gnu/java/net/protocol/ftp/BlockInputStream.java,
* gnu/java/net/protocol/ftp/BlockOutputStream.java,
* gnu/java/net/protocol/ftp/CompressedInputStream.java,
* gnu/java/net/protocol/ftp/CompressedOutputStream.java,
* gnu/java/net/protocol/ftp/DTP.java,
* gnu/java/net/protocol/ftp/DTPInputStream.java,
* gnu/java/net/protocol/ftp/DTPOutputStream.java,
* gnu/java/net/protocol/ftp/FTPConnection.java,
* gnu/java/net/protocol/ftp/FTPException.java,
* gnu/java/net/protocol/ftp/FTPResponse.java,
* gnu/java/net/protocol/ftp/FTPURLConnection.java,
* gnu/java/net/protocol/ftp/Handler.java,
* gnu/java/net/protocol/ftp/PassiveModeDTP.java,
* gnu/java/net/protocol/ftp/StreamInputStream.java,
* gnu/java/net/protocol/ftp/StreamOutputStream.java,
* gnu/java/net/protocol/http/Authenticator.java,
* gnu/java/net/protocol/http/ByteArrayRequestBodyWriter.java,
* gnu/java/net/protocol/http/ChunkedInputStream.java,
* gnu/java/net/protocol/http/Cookie.java,
* gnu/java/net/protocol/http/CookieManager.java,
* gnu/java/net/protocol/http/Credentials.java,
* gnu/java/net/protocol/http/HTTPConnection.java,
* gnu/java/net/protocol/http/HTTPDateFormat.java,
* gnu/java/net/protocol/http/HTTPURLConnection.java,
* gnu/java/net/protocol/http/Handler.java,
* gnu/java/net/protocol/http/Headers.java,
* gnu/java/net/protocol/http/Request.java,
* gnu/java/net/protocol/http/RequestBodyWriter.java,
* gnu/java/net/protocol/http/Response.java,
* gnu/java/net/protocol/http/ResponseHeaderHandler.java,
* gnu/java/net/protocol/http/SimpleCookieManager.java,
* gnu/java/net/protocol/https/Handler.java,
* gnu/java/net/protocol/jar/Connection.java,
* gnu/java/net/protocol/jar/Handler.java,
* gnu/java/nio/ChannelInputStream.java,
* gnu/java/nio/ChannelOutputStream.java,
* gnu/java/nio/ChannelReader.java,
* gnu/java/nio/ChannelWriter.java,
* gnu/java/nio/DatagramChannelImpl.java,
* gnu/java/nio/DatagramChannelSelectionKey.java,
* gnu/java/nio/EpollSelectionKeyImpl.java,
* gnu/java/nio/EpollSelectorImpl.java,
* gnu/java/nio/FileChannelImpl.java,
* gnu/java/nio/FileLockImpl.java,
* gnu/java/nio/InputStreamChannel.java,
* gnu/java/nio/KqueueSelectionKeyImpl.java,
* gnu/java/nio/KqueueSelectorImpl.java,
* gnu/java/nio/NIODatagramSocket.java,
* gnu/java/nio/NIOServerSocket.java,
* gnu/java/nio/NIOSocket.java,
* gnu/java/nio/NIOSocketImpl.java,
* gnu/java/nio/OutputStreamChannel.java,
* gnu/java/nio/PipeImpl.java,
* gnu/java/nio/SelectionKeyImpl.java,
* gnu/java/nio/SelectorImpl.java,
* gnu/java/nio/SelectorProviderImpl.java,
* gnu/java/nio/ServerSocketChannelImpl.java,
* gnu/java/nio/ServerSocketChannelSelectionKey.java,
* gnu/java/nio/SocketChannelImpl.java,
* gnu/java/nio/SocketChannelSelectionKey.java,
* gnu/java/nio/SocketChannelSelectionKeyImpl.java,
* gnu/java/nio/VMChannelOwner.java,
* gnu/java/nio/charset/ByteCharset.java,
* gnu/java/nio/charset/ByteDecodeLoopHelper.java,
* gnu/java/nio/charset/ByteEncodeLoopHelper.java,
* gnu/java/nio/charset/Cp424.java,
* gnu/java/nio/charset/Cp437.java,
* gnu/java/nio/charset/Cp737.java,
* gnu/java/nio/charset/Cp775.java,
* gnu/java/nio/charset/Cp850.java,
* gnu/java/nio/charset/Cp852.java,
* gnu/java/nio/charset/Cp855.java,
* gnu/java/nio/charset/Cp857.java,
* gnu/java/nio/charset/Cp860.java,
* gnu/java/nio/charset/Cp861.java,
* gnu/java/nio/charset/Cp862.java,
* gnu/java/nio/charset/Cp863.java,
* gnu/java/nio/charset/Cp864.java,
* gnu/java/nio/charset/Cp865.java,
* gnu/java/nio/charset/Cp866.java,
* gnu/java/nio/charset/Cp869.java,
* gnu/java/nio/charset/Cp874.java,
* gnu/java/nio/charset/EncodingHelper.java,
* gnu/java/nio/charset/ISO_8859_1.java,
* gnu/java/nio/charset/ISO_8859_13.java,
* gnu/java/nio/charset/ISO_8859_15.java,
* gnu/java/nio/charset/ISO_8859_2.java,
* gnu/java/nio/charset/ISO_8859_3.java,
* gnu/java/nio/charset/ISO_8859_4.java,
* gnu/java/nio/charset/ISO_8859_5.java,
* gnu/java/nio/charset/ISO_8859_6.java,
* gnu/java/nio/charset/ISO_8859_7.java,
* gnu/java/nio/charset/ISO_8859_8.java,
* gnu/java/nio/charset/ISO_8859_9.java,
* gnu/java/nio/charset/KOI_8.java,
* gnu/java/nio/charset/MS874.java,
* gnu/java/nio/charset/MacCentralEurope.java,
* gnu/java/nio/charset/MacCroatian.java,
* gnu/java/nio/charset/MacCyrillic.java,
* gnu/java/nio/charset/MacDingbat.java,
* gnu/java/nio/charset/MacGreek.java,
* gnu/java/nio/charset/MacIceland.java,
* gnu/java/nio/charset/MacRoman.java,
* gnu/java/nio/charset/MacRomania.java,
* gnu/java/nio/charset/MacSymbol.java,
* gnu/java/nio/charset/MacThai.java,
* gnu/java/nio/charset/MacTurkish.java,
* gnu/java/nio/charset/Provider.java,
* gnu/java/nio/charset/US_ASCII.java,
* gnu/java/nio/charset/UTF_16.java,
* gnu/java/nio/charset/UTF_16BE.java,
* gnu/java/nio/charset/UTF_16Decoder.java,
* gnu/java/nio/charset/UTF_16Encoder.java,
* gnu/java/nio/charset/UTF_16LE.java,
* gnu/java/nio/charset/UTF_8.java,
* gnu/java/nio/charset/UnicodeLittle.java,
* gnu/java/nio/charset/Windows1250.java,
* gnu/java/nio/charset/Windows1251.java,
* gnu/java/nio/charset/Windows1252.java,
* gnu/java/nio/charset/Windows1253.java,
* gnu/java/nio/charset/Windows1254.java,
* gnu/java/nio/charset/Windows1255.java,
* gnu/java/nio/charset/Windows1256.java,
* gnu/java/nio/charset/Windows1257.java,
* gnu/java/nio/charset/Windows1258.java,
* gnu/java/nio/charset/iconv/IconvCharset.java,
* gnu/java/nio/charset/iconv/IconvDecoder.java,
* gnu/java/nio/charset/iconv/IconvEncoder.java,
* gnu/java/nio/charset/iconv/IconvProvider.java,
* gnu/java/rmi/RMIMarshalledObjectInputStream.java,
* gnu/java/rmi/RMIMarshalledObjectOutputStream.java,
* gnu/java/rmi/activation/ActivationSystemTransient.java,
* gnu/java/rmi/activation/BidiTable.java,
* gnu/java/rmi/activation/DefaultActivationGroup.java,
* gnu/java/rmi/activation/DefaultActivationSystem.java,
* gnu/java/rmi/dgc/DGCImpl.java,
* gnu/java/rmi/dgc/DGCImpl_Skel.java,
* gnu/java/rmi/dgc/DGCImpl_Stub.java,
* gnu/java/rmi/dgc/LeaseRenewingTask.java,
* gnu/java/rmi/registry/RegistryImpl.java,
* gnu/java/rmi/registry/RegistryImpl_Skel.java,
* gnu/java/rmi/registry/RegistryImpl_Stub.java,
* gnu/java/rmi/server/ActivatableRef.java,
* gnu/java/rmi/server/ActivatableServerRef.java,
* gnu/java/rmi/server/CombinedClassLoader.java,
* gnu/java/rmi/server/ConnectionRunnerPool.java,
* gnu/java/rmi/server/ProtocolConstants.java,
* gnu/java/rmi/server/RMIClassLoaderImpl.java,
* gnu/java/rmi/server/RMIDefaultSocketFactory.java,
* gnu/java/rmi/server/RMIHashes.java,
* gnu/java/rmi/server/RMIIncomingThread.java,
* gnu/java/rmi/server/RMIObjectInputStream.java,
* gnu/java/rmi/server/RMIObjectOutputStream.java,
* gnu/java/rmi/server/UnicastConnection.java,
* gnu/java/rmi/server/UnicastConnectionManager.java,
* gnu/java/rmi/server/UnicastRef.java,
* gnu/java/rmi/server/UnicastRemoteCall.java,
* gnu/java/rmi/server/UnicastRemoteStub.java,
* gnu/java/rmi/server/UnicastServer.java,
* gnu/java/rmi/server/UnicastServerRef.java,
* gnu/java/security/Engine.java,
* gnu/java/security/OID.java,
* gnu/java/security/PolicyFile.java,
* gnu/java/security/Properties.java,
* gnu/java/security/Registry.java,
* gnu/java/security/Requires.java,
* gnu/java/security/action/GetPropertyAction.java,
* gnu/java/security/action/SetAccessibleAction.java,
* gnu/java/security/der/DERValue.java,
* gnu/java/security/hash/BaseHash.java,
* gnu/java/security/hash/HashFactory.java,
* gnu/java/security/hash/Haval.java,
* gnu/java/security/hash/IMessageDigest.java,
* gnu/java/security/hash/MD2.java,
* gnu/java/security/hash/MD4.java,
* gnu/java/security/hash/MD5.java,
* gnu/java/security/hash/RipeMD128.java,
* gnu/java/security/hash/RipeMD160.java,
* gnu/java/security/hash/Sha160.java,
* gnu/java/security/hash/Sha256.java,
* gnu/java/security/hash/Sha384.java,
* gnu/java/security/hash/Sha512.java,
* gnu/java/security/hash/Tiger.java,
* gnu/java/security/hash/Whirlpool.java,
* gnu/java/security/jce/hash/HavalSpi.java,
* gnu/java/security/jce/hash/MD2Spi.java,
* gnu/java/security/jce/hash/MD4Spi.java,
* gnu/java/security/jce/hash/MD5Spi.java,
* gnu/java/security/jce/hash/MessageDigestAdapter.java,
* gnu/java/security/jce/hash/RipeMD128Spi.java,
* gnu/java/security/jce/hash/RipeMD160Spi.java,
* gnu/java/security/jce/hash/Sha160Spi.java,
* gnu/java/security/jce/hash/Sha256Spi.java,
* gnu/java/security/jce/hash/Sha384Spi.java,
* gnu/java/security/jce/hash/Sha512Spi.java,
* gnu/java/security/jce/hash/TigerSpi.java,
* gnu/java/security/jce/hash/WhirlpoolSpi.java,
* gnu/java/security/jce/prng/HavalRandomSpi.java,
* gnu/java/security/jce/prng/MD2RandomSpi.java,
* gnu/java/security/jce/prng/MD4RandomSpi.java,
* gnu/java/security/jce/prng/MD5RandomSpi.java,
* gnu/java/security/jce/prng/RipeMD128RandomSpi.java,
* gnu/java/security/jce/prng/RipeMD160RandomSpi.java,
* gnu/java/security/jce/prng/SecureRandomAdapter.java,
* gnu/java/security/jce/prng/Sha160RandomSpi.java,
* gnu/java/security/jce/prng/Sha256RandomSpi.java,
* gnu/java/security/jce/prng/Sha384RandomSpi.java,
* gnu/java/security/jce/prng/Sha512RandomSpi.java,
* gnu/java/security/jce/prng/TigerRandomSpi.java,
* gnu/java/security/jce/prng/WhirlpoolRandomSpi.java,
* gnu/java/security/jce/sig/DSSKeyFactory.java,
* gnu/java/security/jce/sig/DSSKeyPairGeneratorSpi.java,
* gnu/java/security/jce/sig/DSSParameters.java,
* gnu/java/security/jce/sig/DSSRawSignatureSpi.java,
* gnu/java/security/jce/sig/KeyPairGeneratorAdapter.java,
* gnu/java/security/jce/sig/RSAPSSRawSignatureSpi.java,
* gnu/java/security/jce/sig/SignatureAdapter.java,
* gnu/java/security/key/IKeyPairCodec.java,
* gnu/java/security/key/IKeyPairGenerator.java,
* gnu/java/security/key/KeyPairCodecFactory.java,
* gnu/java/security/key/KeyPairGeneratorFactory.java,
* gnu/java/security/key/dss/DSSKey.java,
* gnu/java/security/key/dss/DSSKeyPairGenerator.java,
* gnu/java/security/key/dss/DSSKeyPairPKCS8Codec.java,
* gnu/java/security/key/dss/DSSKeyPairRawCodec.java,
* gnu/java/security/key/dss/DSSKeyPairX509Codec.java,
* gnu/java/security/key/dss/DSSPrivateKey.java,
* gnu/java/security/key/dss/DSSPublicKey.java,
* gnu/java/security/key/dss/FIPS186.java,
* gnu/java/security/key/rsa/GnuRSAKey.java,
* gnu/java/security/key/rsa/GnuRSAPrivateKey.java,
* gnu/java/security/key/rsa/GnuRSAPublicKey.java,
* gnu/java/security/key/rsa/RSAKeyPairGenerator.java,
* gnu/java/security/key/rsa/RSAKeyPairPKCS8Codec.java,
* gnu/java/security/key/rsa/RSAKeyPairRawCodec.java,
* gnu/java/security/key/rsa/RSAKeyPairX509Codec.java,
* gnu/java/security/pkcs/PKCS7Data.java,
* gnu/java/security/pkcs/PKCS7SignedData.java,
* gnu/java/security/pkcs/SignerInfo.java,
* gnu/java/security/prng/BasePRNG.java,
* gnu/java/security/prng/EntropySource.java,
* gnu/java/security/prng/IRandom.java,
* gnu/java/security/prng/LimitReachedException.java,
* gnu/java/security/prng/MDGenerator.java,
* gnu/java/security/prng/PRNGFactory.java,
* gnu/java/security/prng/RandomEventListener.java,
* gnu/java/security/provider/DefaultPolicy.java,
* gnu/java/security/provider/PKIXCertPathValidatorImpl.java,
* gnu/java/security/sig/BaseSignature.java,
* gnu/java/security/sig/ISignature.java,
* gnu/java/security/sig/ISignatureCodec.java,
* gnu/java/security/sig/SignatureCodecFactory.java,
* gnu/java/security/sig/SignatureFactory.java,
* gnu/java/security/sig/dss/DSSSignature.java,
* gnu/java/security/sig/dss/DSSSignatureRawCodec.java,
* gnu/java/security/sig/dss/DSSSignatureX509Codec.java,
* gnu/java/security/sig/rsa/EME_PKCS1_V1_5.java,
* gnu/java/security/sig/rsa/EMSA_PKCS1_V1_5.java,
* gnu/java/security/sig/rsa/EMSA_PSS.java,
* gnu/java/security/sig/rsa/RSA.java,
* gnu/java/security/sig/rsa/RSAPKCS1V1_5Signature.java,
* gnu/java/security/sig/rsa/RSAPKCS1V1_5SignatureRawCodec.java,
* gnu/java/security/sig/rsa/RSAPKCS1V1_5SignatureX509Codec.java,
* gnu/java/security/sig/rsa/RSAPSSSignature.java,
* gnu/java/security/sig/rsa/RSAPSSSignatureRawCodec.java,
* gnu/java/security/sig/rsa/RSASignatureFactory.java,
* gnu/java/security/util/ByteArray.java,
* gnu/java/security/util/ByteBufferOutputStream.java,
* gnu/java/security/util/ExpirableObject.java,
* gnu/java/security/util/FormatUtil.java,
* gnu/java/security/util/IntegerUtil.java,
* gnu/java/security/util/PRNG.java,
* gnu/java/security/util/Prime.java,
* gnu/java/security/util/Sequence.java,
* gnu/java/security/util/SimpleList.java,
* gnu/java/security/util/Util.java,
* gnu/java/security/x509/X509CRLSelectorImpl.java,
* gnu/java/security/x509/X509CertSelectorImpl.java,
* gnu/java/security/x509/ext/CertificatePolicies.java,
* gnu/java/security/x509/ext/GeneralName.java,
* gnu/java/security/x509/ext/GeneralSubtree.java,
* gnu/java/security/x509/ext/NameConstraints.java,
* gnu/java/text/AttributedFormatBuffer.java,
* gnu/java/text/BaseBreakIterator.java,
* gnu/java/text/CharacterBreakIterator.java,
* gnu/java/text/FormatBuffer.java,
* gnu/java/text/FormatCharacterIterator.java,
* gnu/java/text/LineBreakIterator.java,
* gnu/java/text/SentenceBreakIterator.java,
* gnu/java/text/StringFormatBuffer.java,
* gnu/java/text/WordBreakIterator.java,
* gnu/java/util/Base64.java,
* gnu/java/util/DoubleEnumeration.java,
* gnu/java/util/EmptyEnumeration.java,
* gnu/java/util/WeakIdentityHashMap.java,
* gnu/java/util/ZoneInfo.java,
* gnu/java/util/jar/JarUtils.java,
* gnu/java/util/prefs/FileBasedFactory.java,
* gnu/java/util/prefs/FileBasedPreferences.java,
* gnu/java/util/prefs/GConfBasedFactory.java,
* gnu/java/util/prefs/GConfBasedPreferences.java,
* gnu/java/util/prefs/MemoryBasedFactory.java,
* gnu/java/util/prefs/MemoryBasedPreferences.java,
* gnu/java/util/prefs/NodeReader.java,
* gnu/java/util/prefs/NodeWriter.java,
* gnu/java/util/prefs/gconf/GConfNativePeer.java,
* gnu/java/util/regex/BacktrackStack.java,
* gnu/java/util/regex/CharIndexed.java,
* gnu/java/util/regex/CharIndexedInputStream.java,
* gnu/java/util/regex/RE.java,
* gnu/java/util/regex/REFilterInputStream.java,
* gnu/java/util/regex/REMatch.java,
* gnu/java/util/regex/REMatchEnumeration.java,
* gnu/java/util/regex/RESyntax.java,
* gnu/java/util/regex/REToken.java,
* gnu/java/util/regex/RETokenAny.java,
* gnu/java/util/regex/RETokenBackRef.java,
* gnu/java/util/regex/RETokenChar.java,
* gnu/java/util/regex/RETokenEnd.java,
* gnu/java/util/regex/RETokenEndOfPreviousMatch.java,
* gnu/java/util/regex/RETokenIndependent.java,
* gnu/java/util/regex/RETokenLookAhead.java,
* gnu/java/util/regex/RETokenLookBehind.java,
* gnu/java/util/regex/RETokenNamedProperty.java,
* gnu/java/util/regex/RETokenOneOf.java,
* gnu/java/util/regex/RETokenPOSIX.java,
* gnu/java/util/regex/RETokenRange.java,
* gnu/java/util/regex/RETokenRepeated.java,
* gnu/java/util/regex/RETokenStart.java,
* gnu/java/util/regex/RETokenWordBoundary.java,
* gnu/java/util/regex/UncheckedRE.java,
* gnu/javax/activation/viewers/ImageViewer.java,
* gnu/javax/activation/viewers/TextEditor.java,
* gnu/javax/activation/viewers/TextViewer.java,
* gnu/javax/crypto/assembly/Assembly.java,
* gnu/javax/crypto/assembly/Cascade.java,
* gnu/javax/crypto/assembly/CascadeStage.java,
* gnu/javax/crypto/assembly/CascadeTransformer.java,
* gnu/javax/crypto/assembly/DeflateTransformer.java,
* gnu/javax/crypto/assembly/Direction.java,
* gnu/javax/crypto/assembly/LoopbackTransformer.java,
* gnu/javax/crypto/assembly/ModeStage.java,
* gnu/javax/crypto/assembly/Operation.java,
* gnu/javax/crypto/assembly/PaddingTransformer.java,
* gnu/javax/crypto/assembly/Stage.java,
* gnu/javax/crypto/assembly/Transformer.java,
* gnu/javax/crypto/assembly/TransformerException.java,
* gnu/javax/crypto/cipher/Anubis.java,
* gnu/javax/crypto/cipher/BaseCipher.java,
* gnu/javax/crypto/cipher/Blowfish.java,
* gnu/javax/crypto/cipher/Cast5.java,
* gnu/javax/crypto/cipher/CipherFactory.java,
* gnu/javax/crypto/cipher/DES.java,
* gnu/javax/crypto/cipher/IBlockCipher.java,
* gnu/javax/crypto/cipher/IBlockCipherSpi.java,
* gnu/javax/crypto/cipher/Khazad.java,
* gnu/javax/crypto/cipher/NullCipher.java,
* gnu/javax/crypto/cipher/Rijndael.java,
* gnu/javax/crypto/cipher/Serpent.java,
* gnu/javax/crypto/cipher/Square.java,
* gnu/javax/crypto/cipher/TripleDES.java,
* gnu/javax/crypto/cipher/Twofish.java,
* gnu/javax/crypto/cipher/WeakKeyException.java,
* gnu/javax/crypto/jce/DiffieHellmanImpl.java,
* gnu/javax/crypto/jce/GnuCrypto.java,
* gnu/javax/crypto/jce/GnuSasl.java,
* gnu/javax/crypto/jce/PBKDF2SecretKeyFactory.java,
* gnu/javax/crypto/jce/cipher/AESKeyWrapSpi.java,
* gnu/javax/crypto/jce/cipher/AESSpi.java,
* gnu/javax/crypto/jce/cipher/ARCFourSpi.java,
* gnu/javax/crypto/jce/cipher/AnubisSpi.java,
* gnu/javax/crypto/jce/cipher/BlowfishSpi.java,
* gnu/javax/crypto/jce/cipher/Cast5Spi.java,
* gnu/javax/crypto/jce/cipher/CipherAdapter.java,
* gnu/javax/crypto/jce/cipher/DESSpi.java,
* gnu/javax/crypto/jce/cipher/KeyWrappingAlgorithmAdapter.java,
* gnu/javax/crypto/jce/cipher/KhazadSpi.java,
* gnu/javax/crypto/jce/cipher/NullCipherSpi.java,
* gnu/javax/crypto/jce/cipher/PBES2.java,
* gnu/javax/crypto/jce/cipher/RijndaelSpi.java,
* gnu/javax/crypto/jce/cipher/SerpentSpi.java,
* gnu/javax/crypto/jce/cipher/SquareSpi.java,
* gnu/javax/crypto/jce/cipher/TripleDESSpi.java,
* gnu/javax/crypto/jce/cipher/TwofishSpi.java,
* gnu/javax/crypto/jce/key/AnubisSecretKeyFactoryImpl.java,
* gnu/javax/crypto/jce/key/BlowfishSecretKeyFactoryImpl.java,
* gnu/javax/crypto/jce/key/Cast5SecretKeyFactoryImpl.java,
* gnu/javax/crypto/jce/key/SecretKeyGeneratorImpl.java,
* gnu/javax/crypto/jce/keyring/GnuKeyring.java,
* gnu/javax/crypto/jce/mac/HMacHavalSpi.java,
* gnu/javax/crypto/jce/mac/HMacMD2Spi.java,
* gnu/javax/crypto/jce/mac/HMacMD4Spi.java,
* gnu/javax/crypto/jce/mac/HMacMD5Spi.java,
* gnu/javax/crypto/jce/mac/HMacRipeMD128Spi.java,
* gnu/javax/crypto/jce/mac/HMacRipeMD160Spi.java,
* gnu/javax/crypto/jce/mac/HMacSHA160Spi.java,
* gnu/javax/crypto/jce/mac/HMacSHA256Spi.java,
* gnu/javax/crypto/jce/mac/HMacSHA384Spi.java,
* gnu/javax/crypto/jce/mac/HMacSHA512Spi.java,
* gnu/javax/crypto/jce/mac/HMacTigerSpi.java,
* gnu/javax/crypto/jce/mac/HMacWhirlpoolSpi.java,
* gnu/javax/crypto/jce/mac/MacAdapter.java,
* gnu/javax/crypto/jce/mac/TMMH16Spi.java,
* gnu/javax/crypto/jce/mac/UHash32Spi.java,
* gnu/javax/crypto/jce/mac/UMac32Spi.java,
* gnu/javax/crypto/jce/params/BlockCipherParameters.java,
* gnu/javax/crypto/jce/params/DEREncodingException.java,
* gnu/javax/crypto/jce/params/DERReader.java,
* gnu/javax/crypto/jce/params/DERWriter.java,
* gnu/javax/crypto/jce/prng/ARCFourRandomSpi.java,
* gnu/javax/crypto/jce/prng/CSPRNGSpi.java,
* gnu/javax/crypto/jce/prng/FortunaImpl.java,
* gnu/javax/crypto/jce/prng/ICMRandomSpi.java,
* gnu/javax/crypto/jce/prng/UMacRandomSpi.java,
* gnu/javax/crypto/jce/sig/DHParameters.java,
* gnu/javax/crypto/jce/spec/BlockCipherParameterSpec.java,
* gnu/javax/crypto/jce/spec/TMMHParameterSpec.java,
* gnu/javax/crypto/jce/spec/UMac32ParameterSpec.java,
* gnu/javax/crypto/key/BaseKeyAgreementParty.java,
* gnu/javax/crypto/key/GnuPBEKey.java,
* gnu/javax/crypto/key/GnuSecretKey.java,
* gnu/javax/crypto/key/IKeyAgreementParty.java,
* gnu/javax/crypto/key/IncomingMessage.java,
* gnu/javax/crypto/key/KeyAgreementException.java,
* gnu/javax/crypto/key/KeyAgreementFactory.java,
* gnu/javax/crypto/key/OutgoingMessage.java,
* gnu/javax/crypto/key/dh/DHKeyPairPKCS8Codec.java,
* gnu/javax/crypto/key/dh/DHKeyPairRawCodec.java,
* gnu/javax/crypto/key/dh/DHKeyPairX509Codec.java,
* gnu/javax/crypto/key/dh/DiffieHellmanKeyAgreement.java,
* gnu/javax/crypto/key/dh/DiffieHellmanReceiver.java,
* gnu/javax/crypto/key/dh/DiffieHellmanSender.java,
* gnu/javax/crypto/key/dh/ElGamalKeyAgreement.java,
* gnu/javax/crypto/key/dh/ElGamalReceiver.java,
* gnu/javax/crypto/key/dh/ElGamalSender.java,
* gnu/javax/crypto/key/dh/GnuDHKey.java,
* gnu/javax/crypto/key/dh/GnuDHKeyPairGenerator.java,
* gnu/javax/crypto/key/dh/GnuDHPrivateKey.java,
* gnu/javax/crypto/key/dh/GnuDHPublicKey.java,
* gnu/javax/crypto/key/dh/RFC2631.java,
* gnu/javax/crypto/key/srp6/SRP6Host.java,
* gnu/javax/crypto/key/srp6/SRP6KeyAgreement.java,
* gnu/javax/crypto/key/srp6/SRP6SaslClient.java,
* gnu/javax/crypto/key/srp6/SRP6SaslServer.java,
* gnu/javax/crypto/key/srp6/SRP6TLSClient.java,
* gnu/javax/crypto/key/srp6/SRP6TLSServer.java,
* gnu/javax/crypto/key/srp6/SRP6User.java,
* gnu/javax/crypto/key/srp6/SRPAlgorithm.java,
* gnu/javax/crypto/key/srp6/SRPKey.java,
* gnu/javax/crypto/key/srp6/SRPKeyPairGenerator.java,
* gnu/javax/crypto/key/srp6/SRPKeyPairRawCodec.java,
* gnu/javax/crypto/key/srp6/SRPPrivateKey.java,
* gnu/javax/crypto/key/srp6/SRPPublicKey.java,
* gnu/javax/crypto/keyring/AuthenticatedEntry.java,
* gnu/javax/crypto/keyring/BaseKeyring.java,
* gnu/javax/crypto/keyring/BinaryDataEntry.java,
* gnu/javax/crypto/keyring/CertPathEntry.java,
* gnu/javax/crypto/keyring/CertificateEntry.java,
* gnu/javax/crypto/keyring/CompressedEntry.java,
* gnu/javax/crypto/keyring/EncryptedEntry.java,
* gnu/javax/crypto/keyring/Entry.java,
* gnu/javax/crypto/keyring/EnvelopeEntry.java,
* gnu/javax/crypto/keyring/GnuPrivateKeyring.java,
* gnu/javax/crypto/keyring/GnuPublicKeyring.java,
* gnu/javax/crypto/keyring/IKeyring.java,
* gnu/javax/crypto/keyring/IPrivateKeyring.java,
* gnu/javax/crypto/keyring/IPublicKeyring.java,
* gnu/javax/crypto/keyring/MalformedKeyringException.java,
* gnu/javax/crypto/keyring/MaskableEnvelopeEntry.java,
* gnu/javax/crypto/keyring/MeteredInputStream.java,
* gnu/javax/crypto/keyring/PasswordAuthenticatedEntry.java,
* gnu/javax/crypto/keyring/PasswordEncryptedEntry.java,
* gnu/javax/crypto/keyring/PasswordProtectedEntry.java,
* gnu/javax/crypto/keyring/PrimitiveEntry.java,
* gnu/javax/crypto/keyring/PrivateKeyEntry.java,
* gnu/javax/crypto/keyring/Properties.java,
* gnu/javax/crypto/keyring/PublicKeyEntry.java,
* gnu/javax/crypto/kwa/BaseKeyWrappingAlgorithm.java,
* gnu/javax/crypto/kwa/IKeyWrappingAlgorithm.java,
* gnu/javax/crypto/kwa/KeyWrappingAlgorithmFactory.java,
* gnu/javax/crypto/kwa/TripleDESKeyWrap.java,
* gnu/javax/crypto/mac/BaseMac.java,
* gnu/javax/crypto/mac/HMac.java,
* gnu/javax/crypto/mac/HMacFactory.java,
* gnu/javax/crypto/mac/IMac.java,
* gnu/javax/crypto/mac/MacFactory.java,
* gnu/javax/crypto/mac/MacInputStream.java,
* gnu/javax/crypto/mac/MacOutputStream.java,
* gnu/javax/crypto/mac/OMAC.java,
* gnu/javax/crypto/mac/TMMH16.java,
* gnu/javax/crypto/mac/UHash32.java,
* gnu/javax/crypto/mac/UMac32.java,
* gnu/javax/crypto/mode/BaseMode.java,
* gnu/javax/crypto/mode/CBC.java,
* gnu/javax/crypto/mode/CFB.java,
* gnu/javax/crypto/mode/CTR.java,
* gnu/javax/crypto/mode/EAX.java,
* gnu/javax/crypto/mode/ECB.java,
* gnu/javax/crypto/mode/IAuthenticatedMode.java,
* gnu/javax/crypto/mode/ICM.java,
* gnu/javax/crypto/mode/IMode.java,
* gnu/javax/crypto/mode/ModeFactory.java,
* gnu/javax/crypto/mode/OFB.java,
* gnu/javax/crypto/pad/BasePad.java,
* gnu/javax/crypto/pad/IPad.java,
* gnu/javax/crypto/pad/PKCS1_V1_5.java,
* gnu/javax/crypto/pad/PKCS7.java,
* gnu/javax/crypto/pad/PadFactory.java,
* gnu/javax/crypto/pad/TBC.java,
* gnu/javax/crypto/pad/WrongPaddingException.java,
* gnu/javax/crypto/prng/ARCFour.java,
* gnu/javax/crypto/prng/CSPRNG.java,
* gnu/javax/crypto/prng/ICMGenerator.java,
* gnu/javax/crypto/prng/IPBE.java,
* gnu/javax/crypto/prng/PBKDF2.java,
* gnu/javax/crypto/prng/PRNGFactory.java,
* gnu/javax/crypto/prng/UMacGenerator.java,
* gnu/javax/crypto/sasl/AuthInfo.java,
* gnu/javax/crypto/sasl/AuthInfoProviderFactory.java,
* gnu/javax/crypto/sasl/ClientFactory.java,
* gnu/javax/crypto/sasl/ClientMechanism.java,
* gnu/javax/crypto/sasl/ConfidentialityException.java,
* gnu/javax/crypto/sasl/IAuthInfoProvider.java,
* gnu/javax/crypto/sasl/IAuthInfoProviderFactory.java,
* gnu/javax/crypto/sasl/IllegalMechanismStateException.java,
* gnu/javax/crypto/sasl/InputBuffer.java,
* gnu/javax/crypto/sasl/IntegrityException.java,
* gnu/javax/crypto/sasl/NoSuchMechanismException.java,
* gnu/javax/crypto/sasl/NoSuchUserException.java,
* gnu/javax/crypto/sasl/OutputBuffer.java,
* gnu/javax/crypto/sasl/SaslEncodingException.java,
* gnu/javax/crypto/sasl/SaslInputStream.java,
* gnu/javax/crypto/sasl/SaslOutputStream.java,
* gnu/javax/crypto/sasl/SaslUtil.java,
* gnu/javax/crypto/sasl/ServerFactory.java,
* gnu/javax/crypto/sasl/ServerMechanism.java,
* gnu/javax/crypto/sasl/UserAlreadyExistsException.java,
* gnu/javax/crypto/sasl/anonymous/AnonymousClient.java,
* gnu/javax/crypto/sasl/anonymous/AnonymousServer.java,
* gnu/javax/crypto/sasl/anonymous/AnonymousUtil.java,
* gnu/javax/crypto/sasl/crammd5/CramMD5AuthInfoProvider.java,
* gnu/javax/crypto/sasl/crammd5/CramMD5Client.java,
* gnu/javax/crypto/sasl/crammd5/CramMD5Registry.java,
* gnu/javax/crypto/sasl/crammd5/CramMD5Server.java,
* gnu/javax/crypto/sasl/crammd5/CramMD5Util.java,
* gnu/javax/crypto/sasl/crammd5/PasswordFile.java,
* gnu/javax/crypto/sasl/plain/PasswordFile.java,
* gnu/javax/crypto/sasl/plain/PlainAuthInfoProvider.java,
* gnu/javax/crypto/sasl/plain/PlainClient.java,
* gnu/javax/crypto/sasl/plain/PlainRegistry.java,
* gnu/javax/crypto/sasl/plain/PlainServer.java,
* gnu/javax/crypto/sasl/srp/CALG.java,
* gnu/javax/crypto/sasl/srp/ClientStore.java,
* gnu/javax/crypto/sasl/srp/IALG.java,
* gnu/javax/crypto/sasl/srp/KDF.java,
* gnu/javax/crypto/sasl/srp/PasswordFile.java,
* gnu/javax/crypto/sasl/srp/SRP.java,
* gnu/javax/crypto/sasl/srp/SRPAuthInfoProvider.java,
* gnu/javax/crypto/sasl/srp/SRPClient.java,
* gnu/javax/crypto/sasl/srp/SRPRegistry.java,
* gnu/javax/crypto/sasl/srp/SRPServer.java,
* gnu/javax/crypto/sasl/srp/SecurityContext.java,
* gnu/javax/crypto/sasl/srp/ServerStore.java,
* gnu/javax/crypto/sasl/srp/StoreEntry.java,
* gnu/javax/imageio/IIOInputStream.java,
* gnu/javax/imageio/bmp/BMPDecoder.java,
* gnu/javax/imageio/bmp/BMPEncoder.java,
* gnu/javax/imageio/bmp/BMPException.java,
* gnu/javax/imageio/bmp/BMPFileHeader.java,
* gnu/javax/imageio/bmp/BMPImageReader.java,
* gnu/javax/imageio/bmp/BMPImageReaderSpi.java,
* gnu/javax/imageio/bmp/BMPImageWriter.java,
* gnu/javax/imageio/bmp/BMPImageWriterSpi.java,
* gnu/javax/imageio/bmp/BMPInfoHeader.java,
* gnu/javax/imageio/bmp/DecodeBF16.java,
* gnu/javax/imageio/bmp/DecodeBF32.java,
* gnu/javax/imageio/bmp/DecodeRGB1.java,
* gnu/javax/imageio/bmp/DecodeRGB24.java,
* gnu/javax/imageio/bmp/DecodeRGB4.java,
* gnu/javax/imageio/bmp/DecodeRGB8.java,
* gnu/javax/imageio/bmp/DecodeRLE4.java,
* gnu/javax/imageio/bmp/DecodeRLE8.java,
* gnu/javax/imageio/bmp/EncodeRGB1.java,
* gnu/javax/imageio/bmp/EncodeRGB16.java,
* gnu/javax/imageio/bmp/EncodeRGB24.java,
* gnu/javax/imageio/bmp/EncodeRGB32.java,
* gnu/javax/imageio/bmp/EncodeRGB4.java,
* gnu/javax/imageio/bmp/EncodeRGB8.java,
* gnu/javax/imageio/bmp/EncodeRLE4.java,
* gnu/javax/imageio/bmp/EncodeRLE8.java,
* gnu/javax/imageio/gif/GIFFile.java,
* gnu/javax/imageio/gif/GIFImageReader.java,
* gnu/javax/imageio/gif/GIFImageReaderSpi.java,
* gnu/javax/imageio/jpeg/DCT.java,
* gnu/javax/imageio/jpeg/JPEGComponent.java,
* gnu/javax/imageio/jpeg/JPEGDecoder.java,
* gnu/javax/imageio/jpeg/JPEGImageInputStream.java,
* gnu/javax/imageio/jpeg/JPEGImageReader.java,
* gnu/javax/imageio/jpeg/JPEGImageReaderSpi.java,
* gnu/javax/imageio/jpeg/JPEGMarker.java,
* gnu/javax/imageio/jpeg/ZigZag.java,
* gnu/javax/imageio/png/PNGChunk.java,
* gnu/javax/imageio/png/PNGData.java,
* gnu/javax/imageio/png/PNGDecoder.java,
* gnu/javax/imageio/png/PNGEncoder.java,
* gnu/javax/imageio/png/PNGException.java,
* gnu/javax/imageio/png/PNGFile.java,
* gnu/javax/imageio/png/PNGFilter.java,
* gnu/javax/imageio/png/PNGGamma.java,
* gnu/javax/imageio/png/PNGHeader.java,
* gnu/javax/imageio/png/PNGICCProfile.java,
* gnu/javax/imageio/png/PNGImageReader.java,
* gnu/javax/imageio/png/PNGPalette.java,
* gnu/javax/imageio/png/PNGPhys.java,
* gnu/javax/imageio/png/PNGTime.java,
* gnu/javax/management/ListenerData.java,
* gnu/javax/management/Server.java,
* gnu/javax/management/Translator.java,
* gnu/javax/naming/giop/ContextContinuation.java,
* gnu/javax/naming/giop/CorbalocParser.java,
* gnu/javax/naming/giop/GiopNamingEnumeration.java,
* gnu/javax/naming/giop/GiopNamingServiceFactory.java,
* gnu/javax/naming/giop/GiopNamingServiceURLContext.java,
* gnu/javax/naming/giop/ListBindingsEnumeration.java,
* gnu/javax/naming/giop/ListEnumeration.java,
* gnu/javax/naming/ictxImpl/trans/GnuName.java,
* gnu/javax/naming/jndi/url/corbaname/corbanameURLContextFactory.java,
* gnu/javax/naming/jndi/url/rmi/ContextContinuation.java,
* gnu/javax/naming/jndi/url/rmi/ListBindingsEnumeration.java,
* gnu/javax/naming/jndi/url/rmi/ListEnumeration.java,
* gnu/javax/naming/jndi/url/rmi/RmiContinuation.java,
* gnu/javax/naming/jndi/url/rmi/RmiNamingEnumeration.java,
* gnu/javax/naming/jndi/url/rmi/rmiURLContext.java,
* gnu/javax/naming/jndi/url/rmi/rmiURLContextFactory.java,
* gnu/javax/net/ssl/AbstractSessionContext.java,
* gnu/javax/net/ssl/PreSharedKeyManager.java,
* gnu/javax/net/ssl/PreSharedKeyManagerParameters.java,
* gnu/javax/net/ssl/SSLCipherSuite.java,
* gnu/javax/net/ssl/SSLRecordHandler.java,
* gnu/javax/net/ssl/Session.java,
* gnu/javax/net/ssl/SessionStoreException.java,
* gnu/javax/net/ssl/provider/AbstractHandshake.java,
* gnu/javax/net/ssl/provider/Alert.java,
* gnu/javax/net/ssl/provider/AlertException.java,
* gnu/javax/net/ssl/provider/Builder.java,
* gnu/javax/net/ssl/provider/Certificate.java,
* gnu/javax/net/ssl/provider/CertificateBuilder.java,
* gnu/javax/net/ssl/provider/CertificateRequest.java,
* gnu/javax/net/ssl/provider/CertificateRequestBuilder.java,
* gnu/javax/net/ssl/provider/CertificateStatusRequest.java,
* gnu/javax/net/ssl/provider/CertificateStatusType.java,
* gnu/javax/net/ssl/provider/CertificateURL.java,
* gnu/javax/net/ssl/provider/CertificateVerify.java,
* gnu/javax/net/ssl/provider/CipherSuite.java,
* gnu/javax/net/ssl/provider/CipherSuiteList.java,
* gnu/javax/net/ssl/provider/ClientCertificateTypeList.java,
* gnu/javax/net/ssl/provider/ClientDHE_PSKParameters.java,
* gnu/javax/net/ssl/provider/ClientDiffieHellmanPublic.java,
* gnu/javax/net/ssl/provider/ClientHandshake.java,
* gnu/javax/net/ssl/provider/ClientHello.java,
* gnu/javax/net/ssl/provider/ClientHelloBuilder.java,
* gnu/javax/net/ssl/provider/ClientHelloV2.java,
* gnu/javax/net/ssl/provider/ClientKeyExchangeBuilder.java,
* gnu/javax/net/ssl/provider/ClientPSKParameters.java,
* gnu/javax/net/ssl/provider/ClientRSA_PSKParameters.java,
* gnu/javax/net/ssl/provider/CompressionMethod.java,
* gnu/javax/net/ssl/provider/CompressionMethodList.java,
* gnu/javax/net/ssl/provider/Constructed.java,
* gnu/javax/net/ssl/provider/Debug.java,
* gnu/javax/net/ssl/provider/DelegatedTask.java,
* gnu/javax/net/ssl/provider/EmptyExchangeKeys.java,
* gnu/javax/net/ssl/provider/EncryptedPreMasterSecret.java,
* gnu/javax/net/ssl/provider/ExchangeKeys.java,
* gnu/javax/net/ssl/provider/Extension.java,
* gnu/javax/net/ssl/provider/ExtensionList.java,
* gnu/javax/net/ssl/provider/Handshake.java,
* gnu/javax/net/ssl/provider/InputSecurityParameters.java,
* gnu/javax/net/ssl/provider/Jessie.java,
* gnu/javax/net/ssl/provider/MaxFragmentLength.java,
* gnu/javax/net/ssl/provider/OutputSecurityParameters.java,
* gnu/javax/net/ssl/provider/PreSharedKeyManagerFactoryImpl.java,
* gnu/javax/net/ssl/provider/Random.java,
* gnu/javax/net/ssl/provider/SSLContextImpl.java,
* gnu/javax/net/ssl/provider/SSLEngineImpl.java,
* gnu/javax/net/ssl/provider/SSLRSASignatureImpl.java,
* gnu/javax/net/ssl/provider/SSLServerSocketFactoryImpl.java,
* gnu/javax/net/ssl/provider/SSLServerSocketImpl.java,
* gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.java,
* gnu/javax/net/ssl/provider/SSLSocketImpl.java,
* gnu/javax/net/ssl/provider/SSLv3HMacMD5Impl.java,
* gnu/javax/net/ssl/provider/SSLv3HMacSHAImpl.java,
* gnu/javax/net/ssl/provider/ServerDHE_PSKParameters.java,
* gnu/javax/net/ssl/provider/ServerDHParams.java,
* gnu/javax/net/ssl/provider/ServerHandshake.java,
* gnu/javax/net/ssl/provider/ServerHello.java,
* gnu/javax/net/ssl/provider/ServerHelloBuilder.java,
* gnu/javax/net/ssl/provider/ServerHelloDone.java,
* gnu/javax/net/ssl/provider/ServerKeyExchangeBuilder.java,
* gnu/javax/net/ssl/provider/ServerNameList.java,
* gnu/javax/net/ssl/provider/ServerPSKParameters.java,
* gnu/javax/net/ssl/provider/ServerRSA_PSKParameters.java,
* gnu/javax/net/ssl/provider/SessionImpl.java,
* gnu/javax/net/ssl/provider/Signature.java,
* gnu/javax/net/ssl/provider/SignatureAlgorithm.java,
* gnu/javax/net/ssl/provider/SimpleSessionContext.java,
* gnu/javax/net/ssl/provider/TruncatedHMAC.java,
* gnu/javax/net/ssl/provider/TrustedAuthorities.java,
* gnu/javax/net/ssl/provider/UnresolvedExtensionValue.java,
* gnu/javax/net/ssl/provider/Util.java,
* gnu/javax/net/ssl/provider/X500PrincipalList.java,
* gnu/javax/net/ssl/provider/X509KeyManagerFactory.java,
* gnu/javax/net/ssl/provider/X509TrustManagerFactory.java,
* gnu/javax/print/ipp/IppRequest.java,
* gnu/javax/rmi/CORBA/CorbaInput.java,
* gnu/javax/rmi/CORBA/CorbaOutput.java,
* gnu/javax/rmi/CORBA/DefaultWriteObjectTester.java,
* gnu/javax/rmi/CORBA/DelegateFactory.java,
* gnu/javax/rmi/CORBA/GetDelegateInstanceException.java,
* gnu/javax/rmi/CORBA/PortableRemoteObjectDelegateImpl.java,
* gnu/javax/rmi/CORBA/RmiUtilities.java,
* gnu/javax/rmi/CORBA/StubDelegateImpl.java,
* gnu/javax/rmi/CORBA/TieTargetRecord.java,
* gnu/javax/rmi/CORBA/UtilDelegateImpl.java,
* gnu/javax/rmi/CORBA/ValueHandlerDelegateImpl.java,
* gnu/javax/security/auth/callback/AWTCallbackHandler.java,
* gnu/javax/security/auth/callback/AbstractCallbackHandler.java,
* gnu/javax/security/auth/callback/CertificateCallback.java,
* gnu/javax/security/auth/callback/ConsoleCallbackHandler.java,
* gnu/javax/security/auth/callback/DefaultCallbackHandler.java,
* gnu/javax/security/auth/callback/SwingCallbackHandler.java,
* gnu/javax/security/auth/login/ConfigFileParser.java,
* gnu/javax/security/auth/login/ConfigFileTokenizer.java,
* gnu/javax/security/auth/login/GnuConfiguration.java,
* gnu/javax/sound/AudioSecurityManager.java,
* gnu/javax/sound/midi/alsa/AlsaInputPortDevice.java,
* gnu/javax/sound/midi/alsa/AlsaMidiDeviceProvider.java,
* gnu/javax/sound/midi/alsa/AlsaMidiSequencerDevice.java,
* gnu/javax/sound/midi/alsa/AlsaOutputPortDevice.java,
* gnu/javax/sound/midi/alsa/AlsaPortDevice.java,
* gnu/javax/sound/midi/dssi/DSSIMidiDeviceProvider.java,
* gnu/javax/sound/midi/dssi/DSSISynthesizer.java,
* gnu/javax/sound/midi/file/ExtendedMidiFileFormat.java,
* gnu/javax/sound/midi/file/MidiDataInputStream.java,
* gnu/javax/sound/midi/file/MidiDataOutputStream.java,
* gnu/javax/sound/midi/file/MidiFileReader.java,
* gnu/javax/sound/midi/file/MidiFileWriter.java,
* gnu/javax/sound/sampled/AU/AUReader.java,
* gnu/javax/sound/sampled/WAV/WAVReader.java,
* gnu/javax/sound/sampled/gstreamer/GStreamerMixer.java,
* gnu/javax/sound/sampled/gstreamer/GStreamerMixerProvider.java,
* gnu/javax/sound/sampled/gstreamer/io/GstAudioFileReader.java,
* gnu/javax/sound/sampled/gstreamer/io/GstAudioFileReaderNativePeer.java,
* gnu/javax/sound/sampled/gstreamer/io/GstInputStream.java,
* gnu/javax/sound/sampled/gstreamer/lines/GstDataLine.java,
* gnu/javax/sound/sampled/gstreamer/lines/GstNativeDataLine.java,
* gnu/javax/sound/sampled/gstreamer/lines/GstPipeline.java,
* gnu/javax/sound/sampled/gstreamer/lines/GstSourceDataLine.java,
* gnu/javax/swing/plaf/gnu/GNULookAndFeel.java,
* gnu/javax/swing/text/html/CharacterAttributeTranslator.java,
* gnu/javax/swing/text/html/CombinedAttributes.java,
* gnu/javax/swing/text/html/ImageViewIconFactory.java,
* gnu/javax/swing/text/html/css/BorderStyle.java,
* gnu/javax/swing/text/html/css/CSSParser.java,
* gnu/javax/swing/text/html/css/CSSScanner.java,
* gnu/javax/swing/text/html/css/Selector.java,
* gnu/javax/swing/text/html/parser/GnuParserDelegator.java,
* gnu/javax/swing/text/html/parser/HTML_401F.java,
* gnu/javax/swing/text/html/parser/SmallHtmlAttributeSet.java,
* gnu/javax/swing/text/html/parser/htmlAttributeSet.java,
* gnu/javax/swing/text/html/parser/htmlValidator.java,
* gnu/javax/swing/text/html/parser/models/list.java,
* gnu/javax/swing/text/html/parser/support/Parser.java,
* gnu/javax/swing/text/html/parser/support/low/ReaderTokenizer.java,
* gnu/javax/swing/text/html/parser/support/textPreProcessor.java,
* gnu/javax/swing/tree/GnuPath.java,
* gnu/test/Fail.java,
* gnu/test/Pass.java,
* gnu/test/Test.java,
* gnu/test/Unsupported.java,
* gnu/xml/aelfred2/JAXPFactory.java,
* gnu/xml/aelfred2/SAXDriver.java,
* gnu/xml/aelfred2/XmlParser.java,
* gnu/xml/aelfred2/XmlReader.java,
* gnu/xml/dom/Consumer.java,
* gnu/xml/dom/DTDAttributeTypeInfo.java,
* gnu/xml/dom/DTDElementTypeInfo.java,
* gnu/xml/dom/DomAttr.java,
* gnu/xml/dom/DomCDATASection.java,
* gnu/xml/dom/DomCharacterData.java,
* gnu/xml/dom/DomComment.java,
* gnu/xml/dom/DomDOMException.java,
* gnu/xml/dom/DomDoctype.java,
* gnu/xml/dom/DomDocument.java,
* gnu/xml/dom/DomDocumentBuilder.java,
* gnu/xml/dom/DomDocumentBuilderFactory.java,
* gnu/xml/dom/DomDocumentConfiguration.java,
* gnu/xml/dom/DomDocumentFragment.java,
* gnu/xml/dom/DomElement.java,
* gnu/xml/dom/DomEntity.java,
* gnu/xml/dom/DomEntityReference.java,
* gnu/xml/dom/DomEvent.java,
* gnu/xml/dom/DomExtern.java,
* gnu/xml/dom/DomImpl.java,
* gnu/xml/dom/DomIterator.java,
* gnu/xml/dom/DomNSResolverContext.java,
* gnu/xml/dom/DomNamedNodeMap.java,
* gnu/xml/dom/DomNode.java,
* gnu/xml/dom/DomNodeIterator.java,
* gnu/xml/dom/DomNotation.java,
* gnu/xml/dom/DomNsNode.java,
* gnu/xml/dom/DomProcessingInstruction.java,
* gnu/xml/dom/DomText.java,
* gnu/xml/dom/DomXPathExpression.java,
* gnu/xml/dom/DomXPathNSResolver.java,
* gnu/xml/dom/DomXPathResult.java,
* gnu/xml/dom/ImplementationList.java,
* gnu/xml/dom/ImplementationSource.java,
* gnu/xml/dom/JAXPFactory.java,
* gnu/xml/dom/html2/DomHTMLAnchorElement.java,
* gnu/xml/dom/html2/DomHTMLAppletElement.java,
* gnu/xml/dom/html2/DomHTMLAreaElement.java,
* gnu/xml/dom/html2/DomHTMLBRElement.java,
* gnu/xml/dom/html2/DomHTMLBaseElement.java,
* gnu/xml/dom/html2/DomHTMLBaseFontElement.java,
* gnu/xml/dom/html2/DomHTMLBodyElement.java,
* gnu/xml/dom/html2/DomHTMLButtonElement.java,
* gnu/xml/dom/html2/DomHTMLCollection.java,
* gnu/xml/dom/html2/DomHTMLDListElement.java,
* gnu/xml/dom/html2/DomHTMLDirectoryElement.java,
* gnu/xml/dom/html2/DomHTMLDivElement.java,
* gnu/xml/dom/html2/DomHTMLDocument.java,
* gnu/xml/dom/html2/DomHTMLElement.java,
* gnu/xml/dom/html2/DomHTMLEmbedElement.java,
* gnu/xml/dom/html2/DomHTMLFieldSetElement.java,
* gnu/xml/dom/html2/DomHTMLFontElement.java,
* gnu/xml/dom/html2/DomHTMLFormElement.java,
* gnu/xml/dom/html2/DomHTMLFrameElement.java,
* gnu/xml/dom/html2/DomHTMLFrameSetElement.java,
* gnu/xml/dom/html2/DomHTMLHRElement.java,
* gnu/xml/dom/html2/DomHTMLHeadElement.java,
* gnu/xml/dom/html2/DomHTMLHeadingElement.java,
* gnu/xml/dom/html2/DomHTMLHtmlElement.java,
* gnu/xml/dom/html2/DomHTMLIFrameElement.java,
* gnu/xml/dom/html2/DomHTMLImageElement.java,
* gnu/xml/dom/html2/DomHTMLImpl.java,
* gnu/xml/dom/html2/DomHTMLInputElement.java,
* gnu/xml/dom/html2/DomHTMLIsIndexElement.java,
* gnu/xml/dom/html2/DomHTMLLIElement.java,
* gnu/xml/dom/html2/DomHTMLLabelElement.java,
* gnu/xml/dom/html2/DomHTMLLegendElement.java,
* gnu/xml/dom/html2/DomHTMLLinkElement.java,
* gnu/xml/dom/html2/DomHTMLMapElement.java,
* gnu/xml/dom/html2/DomHTMLMenuElement.java,
* gnu/xml/dom/html2/DomHTMLMetaElement.java,
* gnu/xml/dom/html2/DomHTMLModElement.java,
* gnu/xml/dom/html2/DomHTMLOListElement.java,
* gnu/xml/dom/html2/DomHTMLObjectElement.java,
* gnu/xml/dom/html2/DomHTMLOptGroupElement.java,
* gnu/xml/dom/html2/DomHTMLOptionElement.java,
* gnu/xml/dom/html2/DomHTMLParagraphElement.java,
* gnu/xml/dom/html2/DomHTMLParamElement.java,
* gnu/xml/dom/html2/DomHTMLParser.java,
* gnu/xml/dom/html2/DomHTMLPreElement.java,
* gnu/xml/dom/html2/DomHTMLQuoteElement.java,
* gnu/xml/dom/html2/DomHTMLScriptElement.java,
* gnu/xml/dom/html2/DomHTMLSelectElement.java,
* gnu/xml/dom/html2/DomHTMLStyleElement.java,
* gnu/xml/dom/html2/DomHTMLTableCaptionElement.java,
* gnu/xml/dom/html2/DomHTMLTableCellElement.java,
* gnu/xml/dom/html2/DomHTMLTableColElement.java,
* gnu/xml/dom/html2/DomHTMLTableElement.java,
* gnu/xml/dom/html2/DomHTMLTableRowElement.java,
* gnu/xml/dom/html2/DomHTMLTableSectionElement.java,
* gnu/xml/dom/html2/DomHTMLTextAreaElement.java,
* gnu/xml/dom/html2/DomHTMLTitleElement.java,
* gnu/xml/dom/html2/DomHTMLUListElement.java,
* gnu/xml/dom/ls/DomLSException.java,
* gnu/xml/dom/ls/DomLSInput.java,
* gnu/xml/dom/ls/DomLSOutput.java,
* gnu/xml/dom/ls/DomLSParser.java,
* gnu/xml/dom/ls/DomLSSerializer.java,
* gnu/xml/dom/ls/FilteredSAXEventSink.java,
* gnu/xml/dom/ls/ReaderInputStream.java,
* gnu/xml/dom/ls/SAXEventSink.java,
* gnu/xml/dom/ls/WriterOutputStream.java,
* gnu/xml/libxmlj/dom/GnomeAttr.java,
* gnu/xml/libxmlj/dom/GnomeCDATASection.java,
* gnu/xml/libxmlj/dom/GnomeCharacterData.java,
* gnu/xml/libxmlj/dom/GnomeComment.java,
* gnu/xml/libxmlj/dom/GnomeDOMException.java,
* gnu/xml/libxmlj/dom/GnomeDOMStringList.java,
* gnu/xml/libxmlj/dom/GnomeDocument.java,
* gnu/xml/libxmlj/dom/GnomeDocumentBuilder.java,
* gnu/xml/libxmlj/dom/GnomeDocumentBuilderFactory.java,
* gnu/xml/libxmlj/dom/GnomeDocumentFragment.java,
* gnu/xml/libxmlj/dom/GnomeDocumentType.java,
* gnu/xml/libxmlj/dom/GnomeElement.java,
* gnu/xml/libxmlj/dom/GnomeEntity.java,
* gnu/xml/libxmlj/dom/GnomeEntityReference.java,
* gnu/xml/libxmlj/dom/GnomeNamedNodeMap.java,
* gnu/xml/libxmlj/dom/GnomeNode.java,
* gnu/xml/libxmlj/dom/GnomeNodeList.java,
* gnu/xml/libxmlj/dom/GnomeNotation.java,
* gnu/xml/libxmlj/dom/GnomeProcessingInstruction.java,
* gnu/xml/libxmlj/dom/GnomeText.java,
* gnu/xml/libxmlj/dom/GnomeTypeInfo.java,
* gnu/xml/libxmlj/dom/GnomeXPathExpression.java,
* gnu/xml/libxmlj/dom/GnomeXPathNSResolver.java,
* gnu/xml/libxmlj/dom/GnomeXPathNodeList.java,
* gnu/xml/libxmlj/dom/GnomeXPathResult.java,
* gnu/xml/libxmlj/sax/GnomeLocator.java,
* gnu/xml/libxmlj/sax/GnomeSAXParser.java,
* gnu/xml/libxmlj/sax/GnomeSAXParserFactory.java,
* gnu/xml/libxmlj/sax/GnomeXMLReader.java,
* gnu/xml/libxmlj/sax/Namespaces.java,
* gnu/xml/libxmlj/sax/StringArrayAttributes.java,
* gnu/xml/libxmlj/sax/XMLName.java,
* gnu/xml/libxmlj/transform/ErrorListenerErrorHandler.java,
* gnu/xml/libxmlj/transform/GnomeTransformer.java,
* gnu/xml/libxmlj/transform/GnomeTransformerFactory.java,
* gnu/xml/libxmlj/transform/URIResolverEntityResolver.java,
* gnu/xml/libxmlj/util/EmptyNodeList.java,
* gnu/xml/libxmlj/util/NamedInputStream.java,
* gnu/xml/libxmlj/util/StandaloneDocumentType.java,
* gnu/xml/libxmlj/util/StandaloneLocator.java,
* gnu/xml/libxmlj/util/XMLJ.java,
* gnu/xml/pipeline/CallFilter.java,
* gnu/xml/pipeline/DomConsumer.java,
* gnu/xml/pipeline/EventConsumer.java,
* gnu/xml/pipeline/EventFilter.java,
* gnu/xml/pipeline/LinkFilter.java,
* gnu/xml/pipeline/NSFilter.java,
* gnu/xml/pipeline/PipelineFactory.java,
* gnu/xml/pipeline/TeeConsumer.java,
* gnu/xml/pipeline/TextConsumer.java,
* gnu/xml/pipeline/ValidationConsumer.java,
* gnu/xml/pipeline/WellFormednessFilter.java,
* gnu/xml/pipeline/XIncludeFilter.java,
* gnu/xml/pipeline/XsltFilter.java,
* gnu/xml/stream/AttributeImpl.java,
* gnu/xml/stream/BufferedReader.java,
* gnu/xml/stream/CRLFReader.java,
* gnu/xml/stream/CharactersImpl.java,
* gnu/xml/stream/CommentImpl.java,
* gnu/xml/stream/DTDImpl.java,
* gnu/xml/stream/EndDocumentImpl.java,
* gnu/xml/stream/EndElementImpl.java,
* gnu/xml/stream/EntityDeclarationImpl.java,
* gnu/xml/stream/EntityReferenceImpl.java,
* gnu/xml/stream/FilteredEventReader.java,
* gnu/xml/stream/FilteredStreamReader.java,
* gnu/xml/stream/NamespaceImpl.java,
* gnu/xml/stream/NotationDeclarationImpl.java,
* gnu/xml/stream/ProcessingInstructionImpl.java,
* gnu/xml/stream/SAXParser.java,
* gnu/xml/stream/SAXParserFactory.java,
* gnu/xml/stream/StartDocumentImpl.java,
* gnu/xml/stream/StartElementImpl.java,
* gnu/xml/stream/UnicodeReader.java,
* gnu/xml/stream/XIncludeFilter.java,
* gnu/xml/stream/XMLEventAllocatorImpl.java,
* gnu/xml/stream/XMLEventFactoryImpl.java,
* gnu/xml/stream/XMLEventImpl.java,
* gnu/xml/stream/XMLEventReaderImpl.java,
* gnu/xml/stream/XMLEventWriterImpl.java,
* gnu/xml/stream/XMLInputFactoryImpl.java,
* gnu/xml/stream/XMLOutputFactoryImpl.java,
* gnu/xml/stream/XMLParser.java,
* gnu/xml/stream/XMLStreamWriterImpl.java,
* gnu/xml/transform/AbstractNumberNode.java,
* gnu/xml/transform/ApplyImportsNode.java,
* gnu/xml/transform/ApplyTemplatesNode.java,
* gnu/xml/transform/AttributeNode.java,
* gnu/xml/transform/AttributeSet.java,
* gnu/xml/transform/Bindings.java,
* gnu/xml/transform/CallTemplateNode.java,
* gnu/xml/transform/ChooseNode.java,
* gnu/xml/transform/CommentNode.java,
* gnu/xml/transform/CopyNode.java,
* gnu/xml/transform/CopyOfNode.java,
* gnu/xml/transform/CurrentFunction.java,
* gnu/xml/transform/DOMSourceLocator.java,
* gnu/xml/transform/DocumentFunction.java,
* gnu/xml/transform/ElementAvailableFunction.java,
* gnu/xml/transform/ElementNode.java,
* gnu/xml/transform/ErrorListenerErrorHandler.java,
* gnu/xml/transform/ForEachNode.java,
* gnu/xml/transform/FormatNumberFunction.java,
* gnu/xml/transform/FunctionAvailableFunction.java,
* gnu/xml/transform/GenerateIdFunction.java,
* gnu/xml/transform/IfNode.java,
* gnu/xml/transform/Key.java,
* gnu/xml/transform/KeyFunction.java,
* gnu/xml/transform/LiteralNode.java,
* gnu/xml/transform/MessageNode.java,
* gnu/xml/transform/NamespaceProxy.java,
* gnu/xml/transform/NodeNumberNode.java,
* gnu/xml/transform/NumberNode.java,
* gnu/xml/transform/OtherwiseNode.java,
* gnu/xml/transform/ParameterNode.java,
* gnu/xml/transform/ProcessingInstructionNode.java,
* gnu/xml/transform/SAXSerializer.java,
* gnu/xml/transform/SAXTemplatesHandler.java,
* gnu/xml/transform/SAXTransformerHandler.java,
* gnu/xml/transform/SortKey.java,
* gnu/xml/transform/StreamSerializer.java,
* gnu/xml/transform/StrippingInstruction.java,
* gnu/xml/transform/Stylesheet.java,
* gnu/xml/transform/SystemPropertyFunction.java,
* gnu/xml/transform/Template.java,
* gnu/xml/transform/TemplateNode.java,
* gnu/xml/transform/TemplatesImpl.java,
* gnu/xml/transform/TextNode.java,
* gnu/xml/transform/TransformerFactoryImpl.java,
* gnu/xml/transform/TransformerImpl.java,
* gnu/xml/transform/TransformerOutputProperties.java,
* gnu/xml/transform/URIResolverEntityResolver.java,
* gnu/xml/transform/UnparsedEntityUriFunction.java,
* gnu/xml/transform/ValueOfNode.java,
* gnu/xml/transform/WhenNode.java,
* gnu/xml/transform/WithParam.java,
* gnu/xml/transform/XSLComparator.java,
* gnu/xml/transform/XSLURIResolver.java,
* gnu/xml/util/DoParse.java,
* gnu/xml/util/DomParser.java,
* gnu/xml/util/Resolver.java,
* gnu/xml/util/SAXNullTransformerFactory.java,
* gnu/xml/util/XCat.java,
* gnu/xml/util/XHTMLWriter.java,
* gnu/xml/util/XMLWriter.java,
* gnu/xml/validation/datatype/Annotation.java,
* gnu/xml/validation/datatype/AnySimpleType.java,
* gnu/xml/validation/datatype/AnyType.java,
* gnu/xml/validation/datatype/AnyURIType.java,
* gnu/xml/validation/datatype/AtomicSimpleType.java,
* gnu/xml/validation/datatype/Base64BinaryType.java,
* gnu/xml/validation/datatype/BooleanType.java,
* gnu/xml/validation/datatype/ByteType.java,
* gnu/xml/validation/datatype/DateTimeType.java,
* gnu/xml/validation/datatype/DateType.java,
* gnu/xml/validation/datatype/DecimalType.java,
* gnu/xml/validation/datatype/DoubleType.java,
* gnu/xml/validation/datatype/DurationType.java,
* gnu/xml/validation/datatype/EntitiesType.java,
* gnu/xml/validation/datatype/EntityType.java,
* gnu/xml/validation/datatype/EnumerationFacet.java,
* gnu/xml/validation/datatype/Facet.java,
* gnu/xml/validation/datatype/FloatType.java,
* gnu/xml/validation/datatype/FractionDigitsFacet.java,
* gnu/xml/validation/datatype/GDayType.java,
* gnu/xml/validation/datatype/GMonthDayType.java,
* gnu/xml/validation/datatype/GMonthType.java,
* gnu/xml/validation/datatype/GYearMonthType.java,
* gnu/xml/validation/datatype/GYearType.java,
* gnu/xml/validation/datatype/HexBinaryType.java,
* gnu/xml/validation/datatype/IDRefType.java,
* gnu/xml/validation/datatype/IDRefsType.java,
* gnu/xml/validation/datatype/IDType.java,
* gnu/xml/validation/datatype/IntType.java,
* gnu/xml/validation/datatype/IntegerType.java,
* gnu/xml/validation/datatype/LanguageType.java,
* gnu/xml/validation/datatype/LengthFacet.java,
* gnu/xml/validation/datatype/ListSimpleType.java,
* gnu/xml/validation/datatype/LongType.java,
* gnu/xml/validation/datatype/MaxExclusiveFacet.java,
* gnu/xml/validation/datatype/MaxInclusiveFacet.java,
* gnu/xml/validation/datatype/MaxLengthFacet.java,
* gnu/xml/validation/datatype/MinExclusiveFacet.java,
* gnu/xml/validation/datatype/MinInclusiveFacet.java,
* gnu/xml/validation/datatype/MinLengthFacet.java,
* gnu/xml/validation/datatype/NCNameType.java,
* gnu/xml/validation/datatype/NMTokenType.java,
* gnu/xml/validation/datatype/NMTokensType.java,
* gnu/xml/validation/datatype/NameType.java,
* gnu/xml/validation/datatype/NegativeIntegerType.java,
* gnu/xml/validation/datatype/NonNegativeIntegerType.java,
* gnu/xml/validation/datatype/NonPositiveIntegerType.java,
* gnu/xml/validation/datatype/NormalizedStringType.java,
* gnu/xml/validation/datatype/NotationType.java,
* gnu/xml/validation/datatype/PatternFacet.java,
* gnu/xml/validation/datatype/PositiveIntegerType.java,
* gnu/xml/validation/datatype/QNameType.java,
* gnu/xml/validation/datatype/ShortType.java,
* gnu/xml/validation/datatype/SimpleType.java,
* gnu/xml/validation/datatype/StringType.java,
* gnu/xml/validation/datatype/TimeType.java,
* gnu/xml/validation/datatype/TokenType.java,
* gnu/xml/validation/datatype/TotalDigitsFacet.java,
* gnu/xml/validation/datatype/Type.java,
* gnu/xml/validation/datatype/TypeBuilder.java,
* gnu/xml/validation/datatype/TypeLibrary.java,
* gnu/xml/validation/datatype/TypeLibraryFactory.java,
* gnu/xml/validation/datatype/UnionSimpleType.java,
* gnu/xml/validation/datatype/UnsignedByteType.java,
* gnu/xml/validation/datatype/UnsignedIntType.java,
* gnu/xml/validation/datatype/UnsignedLongType.java,
* gnu/xml/validation/datatype/UnsignedShortType.java,
* gnu/xml/validation/datatype/WhiteSpaceFacet.java,
* gnu/xml/validation/relaxng/AnyNameNameClass.java,
* gnu/xml/validation/relaxng/AttributePattern.java,
* gnu/xml/validation/relaxng/ChoiceNameClass.java,
* gnu/xml/validation/relaxng/ChoicePattern.java,
* gnu/xml/validation/relaxng/DataPattern.java,
* gnu/xml/validation/relaxng/Define.java,
* gnu/xml/validation/relaxng/ElementPattern.java,
* gnu/xml/validation/relaxng/EmptyPattern.java,
* gnu/xml/validation/relaxng/FullSyntaxBuilder.java,
* gnu/xml/validation/relaxng/Grammar.java,
* gnu/xml/validation/relaxng/GrammarException.java,
* gnu/xml/validation/relaxng/GrammarValidator.java,
* gnu/xml/validation/relaxng/GroupPattern.java,
* gnu/xml/validation/relaxng/InterleavePattern.java,
* gnu/xml/validation/relaxng/ListPattern.java,
* gnu/xml/validation/relaxng/NSNameNameClass.java,
* gnu/xml/validation/relaxng/NameClass.java,
* gnu/xml/validation/relaxng/NameNameClass.java,
* gnu/xml/validation/relaxng/NotAllowedPattern.java,
* gnu/xml/validation/relaxng/OneOrMorePattern.java,
* gnu/xml/validation/relaxng/Param.java,
* gnu/xml/validation/relaxng/Pattern.java,
* gnu/xml/validation/relaxng/RELAXNGSchemaFactory.java,
* gnu/xml/validation/relaxng/RefPattern.java,
* gnu/xml/validation/relaxng/TextPattern.java,
* gnu/xml/validation/relaxng/ValuePattern.java,
* gnu/xml/validation/xmlschema/AnyAttribute.java,
* gnu/xml/validation/xmlschema/AttributeDeclaration.java,
* gnu/xml/validation/xmlschema/AttributeUse.java,
* gnu/xml/validation/xmlschema/ComplexType.java,
* gnu/xml/validation/xmlschema/ElementDeclaration.java,
* gnu/xml/validation/xmlschema/Particle.java,
* gnu/xml/validation/xmlschema/ValidationException.java,
* gnu/xml/validation/xmlschema/XMLSchema.java,
* gnu/xml/validation/xmlschema/XMLSchemaAttributeTypeInfo.java,
* gnu/xml/validation/xmlschema/XMLSchemaBuilder.java,
* gnu/xml/validation/xmlschema/XMLSchemaElementTypeInfo.java,
* gnu/xml/validation/xmlschema/XMLSchemaSchemaFactory.java,
* gnu/xml/validation/xmlschema/XMLSchemaTypeInfo.java,
* gnu/xml/validation/xmlschema/XMLSchemaTypeInfoProvider.java,
* gnu/xml/validation/xmlschema/XMLSchemaValidator.java,
* gnu/xml/validation/xmlschema/XMLSchemaValidatorHandler.java,
* gnu/xml/xpath/AndExpr.java,
* gnu/xml/xpath/ArithmeticExpr.java,
* gnu/xml/xpath/BooleanFunction.java,
* gnu/xml/xpath/CeilingFunction.java,
* gnu/xml/xpath/ConcatFunction.java,
* gnu/xml/xpath/Constant.java,
* gnu/xml/xpath/ContainsFunction.java,
* gnu/xml/xpath/CountFunction.java,
* gnu/xml/xpath/DocumentOrderComparator.java,
* gnu/xml/xpath/EqualityExpr.java,
* gnu/xml/xpath/Expr.java,
* gnu/xml/xpath/FalseFunction.java,
* gnu/xml/xpath/FloorFunction.java,
* gnu/xml/xpath/Function.java,
* gnu/xml/xpath/FunctionCall.java,
* gnu/xml/xpath/IdFunction.java,
* gnu/xml/xpath/LangFunction.java,
* gnu/xml/xpath/LastFunction.java,
* gnu/xml/xpath/LocalNameFunction.java,
* gnu/xml/xpath/NameFunction.java,
* gnu/xml/xpath/NameTest.java,
* gnu/xml/xpath/NamespaceTest.java,
* gnu/xml/xpath/NamespaceUriFunction.java,
* gnu/xml/xpath/NegativeExpr.java,
* gnu/xml/xpath/NodeTypeTest.java,
* gnu/xml/xpath/NormalizeSpaceFunction.java,
* gnu/xml/xpath/NotFunction.java,
* gnu/xml/xpath/NumberFunction.java,
* gnu/xml/xpath/OrExpr.java,
* gnu/xml/xpath/ParenthesizedExpr.java,
* gnu/xml/xpath/Path.java,
* gnu/xml/xpath/Pattern.java,
* gnu/xml/xpath/PositionFunction.java,
* gnu/xml/xpath/Predicate.java,
* gnu/xml/xpath/RelationalExpr.java,
* gnu/xml/xpath/Root.java,
* gnu/xml/xpath/RoundFunction.java,
* gnu/xml/xpath/Selector.java,
* gnu/xml/xpath/StartsWithFunction.java,
* gnu/xml/xpath/Steps.java,
* gnu/xml/xpath/StringFunction.java,
* gnu/xml/xpath/StringLengthFunction.java,
* gnu/xml/xpath/SubstringAfterFunction.java,
* gnu/xml/xpath/SubstringBeforeFunction.java,
* gnu/xml/xpath/SubstringFunction.java,
* gnu/xml/xpath/SumFunction.java,
* gnu/xml/xpath/Test.java,
* gnu/xml/xpath/TranslateFunction.java,
* gnu/xml/xpath/TrueFunction.java,
* gnu/xml/xpath/UnionExpr.java,
* gnu/xml/xpath/VariableReference.java,
* gnu/xml/xpath/XPathFactoryImpl.java,
* gnu/xml/xpath/XPathImpl.java,
* gnu/xml/xpath/XPathParser.java,
* gnu/xml/xpath/XPathTokenizer.java,
* java/applet/Applet.java,
* java/awt/AWTEvent.java,
* java/awt/AWTEventMulticaster.java,
* java/awt/AWTKeyStroke.java,
* java/awt/AlphaComposite.java,
* java/awt/BasicStroke.java,
* java/awt/BorderLayout.java,
* java/awt/BufferCapabilities.java,
* java/awt/Button.java,
* java/awt/Canvas.java,
* java/awt/CardLayout.java,
* java/awt/Checkbox.java,
* java/awt/CheckboxGroup.java,
* java/awt/CheckboxMenuItem.java,
* java/awt/Choice.java,
* java/awt/Color.java,
* java/awt/ColorPaintContext.java,
* java/awt/Component.java,
* java/awt/Container.java,
* java/awt/ContainerOrderFocusTraversalPolicy.java,
* java/awt/Cursor.java,
* java/awt/DefaultFocusTraversalPolicy.java,
* java/awt/DefaultKeyboardFocusManager.java,
* java/awt/Desktop.java,
* java/awt/Dialog.java,
* java/awt/DisplayMode.java,
* java/awt/Event.java,
* java/awt/EventDispatchThread.java,
* java/awt/EventQueue.java,
* java/awt/FileDialog.java,
* java/awt/FlowLayout.java,
* java/awt/FocusTraversalPolicy.java,
* java/awt/Font.java,
* java/awt/FontMetrics.java,
* java/awt/Frame.java,
* java/awt/GradientPaint.java,
* java/awt/Graphics.java,
* java/awt/Graphics2D.java,
* java/awt/GraphicsConfiguration.java,
* java/awt/GraphicsDevice.java,
* java/awt/GridBagConstraints.java,
* java/awt/GridBagLayout.java,
* java/awt/GridLayout.java,
* java/awt/Image.java,
* java/awt/Insets.java,
* java/awt/JobAttributes.java,
* java/awt/KeyboardFocusManager.java,
* java/awt/Label.java,
* java/awt/LightweightDispatcher.java,
* java/awt/List.java,
* java/awt/MediaTracker.java,
* java/awt/Menu.java,
* java/awt/MenuBar.java,
* java/awt/MenuComponent.java,
* java/awt/MenuItem.java,
* java/awt/MenuShortcut.java,
* java/awt/MouseInfo.java,
* java/awt/PageAttributes.java,
* java/awt/Point.java,
* java/awt/PointerInfo.java,
* java/awt/Polygon.java,
* java/awt/PopupMenu.java,
* java/awt/Rectangle.java,
* java/awt/RenderingHints.java,
* java/awt/Robot.java,
* java/awt/ScrollPane.java,
* java/awt/ScrollPaneAdjustable.java,
* java/awt/Scrollbar.java,
* java/awt/Shape.java,
* java/awt/SystemColor.java,
* java/awt/TextArea.java,
* java/awt/TextComponent.java,
* java/awt/TextField.java,
* java/awt/TexturePaint.java,
* java/awt/Toolkit.java,
* java/awt/Window.java,
* java/awt/color/ICC_ColorSpace.java,
* java/awt/color/ICC_Profile.java,
* java/awt/color/ICC_ProfileGray.java,
* java/awt/color/ICC_ProfileRGB.java,
* java/awt/datatransfer/Clipboard.java,
* java/awt/datatransfer/ClipboardOwner.java,
* java/awt/datatransfer/DataFlavor.java,
* java/awt/datatransfer/FlavorEvent.java,
* java/awt/datatransfer/FlavorListener.java,
* java/awt/datatransfer/MimeType.java,
* java/awt/datatransfer/StringSelection.java,
* java/awt/datatransfer/SystemFlavorMap.java,
* java/awt/datatransfer/Transferable.java,
* java/awt/datatransfer/UnsupportedFlavorException.java,
* java/awt/dnd/Autoscroll.java,
* java/awt/dnd/DnDEventMulticaster.java,
* java/awt/dnd/DragGestureEvent.java,
* java/awt/dnd/DragGestureRecognizer.java,
* java/awt/dnd/DragSource.java,
* java/awt/dnd/DragSourceContext.java,
* java/awt/dnd/DragSourceDropEvent.java,
* java/awt/dnd/DragSourceEvent.java,
* java/awt/dnd/DropTarget.java,
* java/awt/dnd/DropTargetContext.java,
* java/awt/dnd/DropTargetDragEvent.java,
* java/awt/dnd/DropTargetDropEvent.java,
* java/awt/dnd/DropTargetEvent.java,
* java/awt/dnd/MouseDragGestureRecognizer.java,
* java/awt/dnd/peer/DropTargetContextPeer.java,
* java/awt/event/AWTEventListener.java,
* java/awt/event/ActionEvent.java,
* java/awt/event/ComponentAdapter.java,
* java/awt/event/ComponentEvent.java,
* java/awt/event/InputEvent.java,
* java/awt/event/InputMethodEvent.java,
* java/awt/event/InvocationEvent.java,
* java/awt/event/KeyEvent.java,
* java/awt/event/MouseEvent.java,
* java/awt/event/MouseListener.java,
* java/awt/event/MouseWheelEvent.java,
* java/awt/event/WindowEvent.java,
* java/awt/font/FontRenderContext.java,
* java/awt/font/GlyphJustificationInfo.java,
* java/awt/font/GlyphMetrics.java,
* java/awt/font/GlyphVector.java,
* java/awt/font/GraphicAttribute.java,
* java/awt/font/ImageGraphicAttribute.java,
* java/awt/font/LineBreakMeasurer.java,
* java/awt/font/LineMetrics.java,
* java/awt/font/MultipleMaster.java,
* java/awt/font/OpenType.java,
* java/awt/font/ShapeGraphicAttribute.java,
* java/awt/font/TextAttribute.java,
* java/awt/font/TextHitInfo.java,
* java/awt/font/TextLayout.java,
* java/awt/font/TextMeasurer.java,
* java/awt/font/TransformAttribute.java,
* java/awt/geom/AffineTransform.java,
* java/awt/geom/Arc2D.java,
* java/awt/geom/Area.java,
* java/awt/geom/CubicCurve2D.java,
* java/awt/geom/Ellipse2D.java,
* java/awt/geom/FlatteningPathIterator.java,
* java/awt/geom/GeneralPath.java,
* java/awt/geom/Line2D.java,
* java/awt/geom/QuadCurve2D.java,
* java/awt/geom/RectangularShape.java,
* java/awt/geom/RoundRectangle2D.java,
* java/awt/im/InputContext.java,
* java/awt/im/spi/InputMethodDescriptor.java,
* java/awt/image/AffineTransformOp.java,
* java/awt/image/AreaAveragingScaleFilter.java,
* java/awt/image/BandCombineOp.java,
* java/awt/image/BandedSampleModel.java,
* java/awt/image/BufferedImage.java,
* java/awt/image/BufferedImageFilter.java,
* java/awt/image/BufferedImageOp.java,
* java/awt/image/ByteLookupTable.java,
* java/awt/image/ColorConvertOp.java,
* java/awt/image/ColorModel.java,
* java/awt/image/ComponentColorModel.java,
* java/awt/image/ComponentSampleModel.java,
* java/awt/image/ConvolveOp.java,
* java/awt/image/CropImageFilter.java,
* java/awt/image/DataBuffer.java,
* java/awt/image/DataBufferByte.java,
* java/awt/image/DataBufferDouble.java,
* java/awt/image/DataBufferFloat.java,
* java/awt/image/DataBufferInt.java,
* java/awt/image/DataBufferShort.java,
* java/awt/image/DataBufferUShort.java,
* java/awt/image/DirectColorModel.java,
* java/awt/image/FilteredImageSource.java,
* java/awt/image/ImageConsumer.java,
* java/awt/image/ImageFilter.java,
* java/awt/image/ImageObserver.java,
* java/awt/image/ImageProducer.java,
* java/awt/image/IndexColorModel.java,
* java/awt/image/Kernel.java,
* java/awt/image/LookupOp.java,
* java/awt/image/LookupTable.java,
* java/awt/image/MemoryImageSource.java,
* java/awt/image/MultiPixelPackedSampleModel.java,
* java/awt/image/PackedColorModel.java,
* java/awt/image/PixelGrabber.java,
* java/awt/image/PixelInterleavedSampleModel.java,
* java/awt/image/RGBImageFilter.java,
* java/awt/image/Raster.java,
* java/awt/image/RasterOp.java,
* java/awt/image/RenderedImage.java,
* java/awt/image/ReplicateScaleFilter.java,
* java/awt/image/RescaleOp.java,
* java/awt/image/SampleModel.java,
* java/awt/image/ShortLookupTable.java,
* java/awt/image/SinglePixelPackedSampleModel.java,
* java/awt/image/TileObserver.java,
* java/awt/image/WritableRaster.java,
* java/awt/image/WritableRenderedImage.java,
* java/awt/image/renderable/ContextualRenderedImageFactory.java,
* java/awt/image/renderable/ParameterBlock.java,
* java/awt/image/renderable/RenderContext.java,
* java/awt/image/renderable/RenderableImage.java,
* java/awt/image/renderable/RenderableImageOp.java,
* java/awt/image/renderable/RenderableImageProducer.java,
* java/awt/image/renderable/RenderedImageFactory.java,
* java/awt/peer/ButtonPeer.java,
* java/awt/peer/CanvasPeer.java,
* java/awt/peer/CheckboxMenuItemPeer.java,
* java/awt/peer/CheckboxPeer.java,
* java/awt/peer/ChoicePeer.java,
* java/awt/peer/ComponentPeer.java,
* java/awt/peer/ContainerPeer.java,
* java/awt/peer/DesktopPeer.java,
* java/awt/peer/DialogPeer.java,
* java/awt/peer/FileDialogPeer.java,
* java/awt/peer/FontPeer.java,
* java/awt/peer/FramePeer.java,
* java/awt/peer/LabelPeer.java,
* java/awt/peer/LightweightPeer.java,
* java/awt/peer/ListPeer.java,
* java/awt/peer/MenuBarPeer.java,
* java/awt/peer/MenuComponentPeer.java,
* java/awt/peer/MenuItemPeer.java,
* java/awt/peer/MenuPeer.java,
* java/awt/peer/MouseInfoPeer.java,
* java/awt/peer/PanelPeer.java,
* java/awt/peer/PopupMenuPeer.java,
* java/awt/peer/RobotPeer.java,
* java/awt/peer/ScrollPanePeer.java,
* java/awt/peer/ScrollbarPeer.java,
* java/awt/peer/TextComponentPeer.java,
* java/awt/peer/TextFieldPeer.java,
* java/awt/peer/WindowPeer.java,
* java/awt/print/Book.java,
* java/awt/print/PageFormat.java,
* java/awt/print/Pageable.java,
* java/awt/print/Paper.java,
* java/awt/print/PrinterGraphics.java,
* java/awt/print/PrinterIOException.java,
* java/awt/print/PrinterJob.java,
* java/beans/AppletInitializer.java,
* java/beans/BeanDescriptor.java,
* java/beans/BeanInfo.java,
* java/beans/Beans.java,
* java/beans/Customizer.java,
* java/beans/DefaultPersistenceDelegate.java,
* java/beans/DesignMode.java,
* java/beans/Encoder.java,
* java/beans/EventHandler.java,
* java/beans/EventSetDescriptor.java,
* java/beans/Expression.java,
* java/beans/FeatureDescriptor.java,
* java/beans/IndexedPropertyChangeEvent.java,
* java/beans/IndexedPropertyDescriptor.java,
* java/beans/Introspector.java,
* java/beans/MethodDescriptor.java,
* java/beans/ParameterDescriptor.java,
* java/beans/PersistenceDelegate.java,
* java/beans/PropertyChangeSupport.java,
* java/beans/PropertyDescriptor.java,
* java/beans/PropertyEditor.java,
* java/beans/PropertyEditorManager.java,
* java/beans/SimpleBeanInfo.java,
* java/beans/Statement.java,
* java/beans/VetoableChangeSupport.java,
* java/beans/Visibility.java,
* java/beans/XMLDecoder.java,
* java/beans/XMLEncoder.java,
* java/beans/beancontext/BeanContext.java,
* java/beans/beancontext/BeanContextChild.java,
* java/beans/beancontext/BeanContextChildComponentProxy.java,
* java/beans/beancontext/BeanContextChildSupport.java,
* java/beans/beancontext/BeanContextContainerProxy.java,
* java/beans/beancontext/BeanContextEvent.java,
* java/beans/beancontext/BeanContextMembershipEvent.java,
* java/beans/beancontext/BeanContextMembershipListener.java,
* java/beans/beancontext/BeanContextProxy.java,
* java/beans/beancontext/BeanContextServiceAvailableEvent.java,
* java/beans/beancontext/BeanContextServiceProvider.java,
* java/beans/beancontext/BeanContextServiceProviderBeanInfo.java,
* java/beans/beancontext/BeanContextServiceRevokedEvent.java,
* java/beans/beancontext/BeanContextServiceRevokedListener.java,
* java/beans/beancontext/BeanContextServices.java,
* java/beans/beancontext/BeanContextServicesListener.java,
* java/beans/beancontext/BeanContextServicesSupport.java,
* java/beans/beancontext/BeanContextSupport.java,
* java/io/BufferedInputStream.java,
* java/io/BufferedOutputStream.java,
* java/io/BufferedReader.java,
* java/io/BufferedWriter.java,
* java/io/ByteArrayInputStream.java,
* java/io/ByteArrayOutputStream.java,
* java/io/CharArrayReader.java,
* java/io/CharArrayWriter.java,
* java/io/DataInput.java,
* java/io/DataInputStream.java,
* java/io/DataOutput.java,
* java/io/DataOutputStream.java,
* java/io/DeleteFileHelper.java,
* java/io/EOFException.java,
* java/io/Externalizable.java,
* java/io/File.java,
* java/io/FileDescriptor.java,
* java/io/FileFilter.java,
* java/io/FileInputStream.java,
* java/io/FileOutputStream.java,
* java/io/FilePermission.java,
* java/io/FileReader.java,
* java/io/FileWriter.java,
* java/io/FilenameFilter.java,
* java/io/FilterInputStream.java,
* java/io/FilterOutputStream.java,
* java/io/FilterReader.java,
* java/io/FilterWriter.java,
* java/io/InputStream.java,
* java/io/InputStreamReader.java,
* java/io/InvalidClassException.java,
* java/io/LineNumberInputStream.java,
* java/io/LineNumberReader.java,
* java/io/ObjectInput.java,
* java/io/ObjectInputStream.java,
* java/io/ObjectInputValidation.java,
* java/io/ObjectOutput.java,
* java/io/ObjectOutputStream.java,
* java/io/ObjectStreamClass.java,
* java/io/ObjectStreamConstants.java,
* java/io/ObjectStreamField.java,
* java/io/OutputStream.java,
* java/io/OutputStreamWriter.java,
* java/io/PipedInputStream.java,
* java/io/PipedOutputStream.java,
* java/io/PipedReader.java,
* java/io/PipedWriter.java,
* java/io/PrintStream.java,
* java/io/PrintWriter.java,
* java/io/PushbackInputStream.java,
* java/io/PushbackReader.java,
* java/io/RandomAccessFile.java,
* java/io/Reader.java,
* java/io/SequenceInputStream.java,
* java/io/Serializable.java,
* java/io/SerializablePermission.java,
* java/io/StreamTokenizer.java,
* java/io/StringBufferInputStream.java,
* java/io/StringReader.java,
* java/io/StringWriter.java,
* java/io/UnsupportedEncodingException.java,
* java/io/Writer.java,
* java/lang/AbstractStringBuffer.java,
* java/lang/Boolean.java,
* java/lang/Character.java,
* java/lang/Class.java,
* java/lang/ClassLoader.java,
* java/lang/Comparable.java,
* java/lang/Double.java,
* java/lang/Enum.java,
* java/lang/EnumConstantNotPresentException.java,
* java/lang/Float.java,
* java/lang/IllegalArgumentException.java,
* java/lang/IllegalStateException.java,
* java/lang/IndexOutOfBoundsException.java,
* java/lang/Integer.java,
* java/lang/Long.java,
* java/lang/Math.java,
* java/lang/NoClassDefFoundError.java,
* java/lang/Object.java,
* java/lang/Package.java,
* java/lang/ProcessBuilder.java,
* java/lang/Runtime.java,
* java/lang/SecurityException.java,
* java/lang/SecurityManager.java,
* java/lang/StackTraceElement.java,
* java/lang/StrictMath.java,
* java/lang/String.java,
* java/lang/StringBuffer.java,
* java/lang/StringBuilder.java,
* java/lang/System.java,
* java/lang/Thread.java,
* java/lang/ThreadLocal.java,
* java/lang/Throwable.java,
* java/lang/TypeNotPresentException.java,
* java/lang/UnsupportedOperationException.java,
* java/lang/annotation/Annotation.java,
* java/lang/annotation/AnnotationTypeMismatchException.java,
* java/lang/annotation/IncompleteAnnotationException.java,
* java/lang/instrument/ClassFileTransformer.java,
* java/lang/instrument/Instrumentation.java,
* java/lang/management/ClassLoadingMXBean.java,
* java/lang/management/CompilationMXBean.java,
* java/lang/management/GarbageCollectorMXBean.java,
* java/lang/management/ManagementFactory.java,
* java/lang/management/ManagementPermission.java,
* java/lang/management/MemoryMXBean.java,
* java/lang/management/MemoryManagerMXBean.java,
* java/lang/management/MemoryNotificationInfo.java,
* java/lang/management/MemoryPoolMXBean.java,
* java/lang/management/MemoryType.java,
* java/lang/management/MemoryUsage.java,
* java/lang/management/MonitorInfo.java,
* java/lang/management/OperatingSystemMXBean.java,
* java/lang/management/RuntimeMXBean.java,
* java/lang/management/ThreadInfo.java,
* java/lang/management/ThreadMXBean.java,
* java/lang/ref/PhantomReference.java,
* java/lang/ref/Reference.java,
* java/lang/ref/ReferenceQueue.java,
* java/lang/ref/SoftReference.java,
* java/lang/ref/WeakReference.java,
* java/lang/reflect/AccessibleObject.java,
* java/lang/reflect/AnnotatedElement.java,
* java/lang/reflect/Array.java,
* java/lang/reflect/Constructor.java,
* java/lang/reflect/Field.java,
* java/lang/reflect/GenericArrayType.java,
* java/lang/reflect/GenericDeclaration.java,
* java/lang/reflect/InvocationHandler.java,
* java/lang/reflect/MalformedParameterizedTypeException.java,
* java/lang/reflect/Method.java,
* java/lang/reflect/Modifier.java,
* java/lang/reflect/Proxy.java,
* java/lang/reflect/Type.java,
* java/lang/reflect/TypeVariable.java,
* java/lang/reflect/WildcardType.java,
* java/math/BigDecimal.java,
* java/math/BigInteger.java,
* java/math/MathContext.java,
* java/math/RoundingMode.java,
* java/net/ContentHandler.java,
* java/net/DatagramSocket.java,
* java/net/DatagramSocketImpl.java,
* java/net/HttpURLConnection.java,
* java/net/Inet4Address.java,
* java/net/Inet6Address.java,
* java/net/InetAddress.java,
* java/net/InetSocketAddress.java,
* java/net/MimeTypeMapper.java,
* java/net/MulticastSocket.java,
* java/net/NetworkInterface.java,
* java/net/Proxy.java,
* java/net/ProxySelector.java,
* java/net/ResolverCache.java,
* java/net/ServerSocket.java,
* java/net/Socket.java,
* java/net/SocketPermission.java,
* java/net/URI.java,
* java/net/URL.java,
* java/net/URLClassLoader.java,
* java/net/URLConnection.java,
* java/net/URLDecoder.java,
* java/net/URLEncoder.java,
* java/net/URLStreamHandler.java,
* java/nio/Buffer.java,
* java/nio/BufferOverflowException.java,
* java/nio/BufferUnderflowException.java,
* java/nio/ByteBuffer.java,
* java/nio/ByteBufferHelper.java,
* java/nio/ByteBufferImpl.java,
* java/nio/ByteOrder.java,
* java/nio/CharBuffer.java,
* java/nio/CharBufferImpl.java,
* java/nio/CharSequenceBuffer.java,
* java/nio/CharViewBufferImpl.java,
* java/nio/DirectByteBufferImpl.java,
* java/nio/DoubleBuffer.java,
* java/nio/DoubleBufferImpl.java,
* java/nio/DoubleViewBufferImpl.java,
* java/nio/FloatBuffer.java,
* java/nio/FloatBufferImpl.java,
* java/nio/FloatViewBufferImpl.java,
* java/nio/IntBuffer.java,
* java/nio/IntBufferImpl.java,
* java/nio/IntViewBufferImpl.java,
* java/nio/InvalidMarkException.java,
* java/nio/LongBuffer.java,
* java/nio/LongBufferImpl.java,
* java/nio/LongViewBufferImpl.java,
* java/nio/MappedByteBuffer.java,
* java/nio/MappedByteBufferImpl.java,
* java/nio/ReadOnlyBufferException.java,
* java/nio/ShortBuffer.java,
* java/nio/ShortBufferImpl.java,
* java/nio/ShortViewBufferImpl.java,
* java/nio/channels/FileChannel.java,
* java/nio/channels/SocketChannel.java,
* java/nio/channels/spi/AbstractInterruptibleChannel.java,
* java/nio/channels/spi/AbstractSelectableChannel.java,
* java/nio/channels/spi/AbstractSelectionKey.java,
* java/nio/channels/spi/AbstractSelector.java,
* java/nio/channels/spi/SelectorProvider.java,
* java/nio/charset/CharacterCodingException.java,
* java/nio/charset/Charset.java,
* java/nio/charset/CharsetDecoder.java,
* java/nio/charset/CharsetEncoder.java,
* java/nio/charset/CoderMalfunctionError.java,
* java/nio/charset/CoderResult.java,
* java/nio/charset/CodingErrorAction.java,
* java/nio/charset/IllegalCharsetNameException.java,
* java/nio/charset/MalformedInputException.java,
* java/nio/charset/UnmappableCharacterException.java,
* java/nio/charset/UnsupportedCharsetException.java,
* java/rmi/AccessException.java,
* java/rmi/AlreadyBoundException.java,
* java/rmi/MarshalledObject.java,
* java/rmi/Naming.java,
* java/rmi/NoSuchObjectException.java,
* java/rmi/NotBoundException.java,
* java/rmi/RMISecurityException.java,
* java/rmi/RMISecurityManager.java,
* java/rmi/Remote.java,
* java/rmi/RemoteException.java,
* java/rmi/StubNotFoundException.java,
* java/rmi/UnknownHostException.java,
* java/rmi/activation/Activatable.java,
* java/rmi/activation/ActivationDesc.java,
* java/rmi/activation/ActivationGroup.java,
* java/rmi/activation/ActivationGroupDesc.java,
* java/rmi/activation/ActivationGroupID.java,
* java/rmi/activation/ActivationID.java,
* java/rmi/activation/ActivationInstantiator.java,
* java/rmi/activation/ActivationMonitor.java,
* java/rmi/activation/ActivationSystem.java,
* java/rmi/activation/Activator.java,
* java/rmi/activation/UnknownGroupException.java,
* java/rmi/dgc/DGC.java,
* java/rmi/dgc/Lease.java,
* java/rmi/dgc/VMID.java,
* java/rmi/registry/LocateRegistry.java,
* java/rmi/registry/Registry.java,
* java/rmi/registry/RegistryHandler.java,
* java/rmi/server/LoaderHandler.java,
* java/rmi/server/LogStream.java,
* java/rmi/server/ObjID.java,
* java/rmi/server/Operation.java,
* java/rmi/server/RMIClassLoader.java,
* java/rmi/server/RMIClientSocketFactory.java,
* java/rmi/server/RMIFailureHandler.java,
* java/rmi/server/RMIServerSocketFactory.java,
* java/rmi/server/RMISocketFactory.java,
* java/rmi/server/RemoteCall.java,
* java/rmi/server/RemoteObject.java,
* java/rmi/server/RemoteObjectInvocationHandler.java,
* java/rmi/server/RemoteRef.java,
* java/rmi/server/RemoteServer.java,
* java/rmi/server/RemoteStub.java,
* java/rmi/server/ServerRef.java,
* java/rmi/server/Skeleton.java,
* java/rmi/server/UID.java,
* java/rmi/server/UnicastRemoteObject.java,
* java/rmi/server/Unreferenced.java,
* java/security/AccessControlContext.java,
* java/security/AccessController.java,
* java/security/AlgorithmParameterGenerator.java,
* java/security/AlgorithmParameterGeneratorSpi.java,
* java/security/AlgorithmParameters.java,
* java/security/AlgorithmParametersSpi.java,
* java/security/CodeSource.java,
* java/security/DigestInputStream.java,
* java/security/DigestOutputStream.java,
* java/security/GeneralSecurityException.java,
* java/security/Identity.java,
* java/security/IdentityScope.java,
* java/security/KeyFactory.java,
* java/security/KeyFactorySpi.java,
* java/security/KeyPairGenerator.java,
* java/security/KeyPairGeneratorSpi.java,
* java/security/KeyStore.java,
* java/security/KeyStoreSpi.java,
* java/security/MessageDigest.java,
* java/security/MessageDigestSpi.java,
* java/security/Permission.java,
* java/security/Permissions.java,
* java/security/Policy.java,
* java/security/ProtectionDomain.java,
* java/security/Provider.java,
* java/security/ProviderException.java,
* java/security/SecureClassLoader.java,
* java/security/SecureRandom.java,
* java/security/SecureRandomSpi.java,
* java/security/Security.java,
* java/security/Signature.java,
* java/security/SignatureSpi.java,
* java/security/SignedObject.java,
* java/security/Signer.java,
* java/security/acl/Acl.java,
* java/security/acl/AclEntry.java,
* java/security/acl/Group.java,
* java/security/acl/Owner.java,
* java/security/cert/CRL.java,
* java/security/cert/CRLSelector.java,
* java/security/cert/CertPathBuilder.java,
* java/security/cert/CertPathBuilderResult.java,
* java/security/cert/CertPathValidator.java,
* java/security/cert/CertPathValidatorResult.java,
* java/security/cert/CertPathValidatorSpi.java,
* java/security/cert/CertSelector.java,
* java/security/cert/CertStore.java,
* java/security/cert/CertStoreParameters.java,
* java/security/cert/CertStoreSpi.java,
* java/security/cert/Certificate.java,
* java/security/cert/CertificateFactory.java,
* java/security/cert/CertificateFactorySpi.java,
* java/security/cert/CollectionCertStoreParameters.java,
* java/security/cert/LDAPCertStoreParameters.java,
* java/security/cert/PKIXBuilderParameters.java,
* java/security/cert/PKIXCertPathBuilderResult.java,
* java/security/cert/PKIXCertPathChecker.java,
* java/security/cert/PKIXCertPathValidatorResult.java,
* java/security/cert/PKIXParameters.java,
* java/security/cert/PolicyNode.java,
* java/security/cert/PolicyQualifierInfo.java,
* java/security/cert/X509CRL.java,
* java/security/cert/X509CRLEntry.java,
* java/security/cert/X509CertSelector.java,
* java/security/cert/X509Certificate.java,
* java/security/cert/X509Extension.java,
* java/security/spec/AlgorithmParameterSpec.java,
* java/security/spec/DSAParameterSpec.java,
* java/security/spec/DSAPrivateKeySpec.java,
* java/security/spec/DSAPublicKeySpec.java,
* java/security/spec/EncodedKeySpec.java,
* java/security/spec/InvalidParameterSpecException.java,
* java/security/spec/KeySpec.java,
* java/security/spec/PKCS8EncodedKeySpec.java,
* java/security/spec/PSSParameterSpec.java,
* java/security/spec/RSAKeyGenParameterSpec.java,
* java/security/spec/RSAMultiPrimePrivateCrtKeySpec.java,
* java/security/spec/RSAOtherPrimeInfo.java,
* java/security/spec/RSAPrivateCrtKeySpec.java,
* java/security/spec/RSAPrivateKeySpec.java,
* java/security/spec/RSAPublicKeySpec.java,
* java/security/spec/X509EncodedKeySpec.java,
* java/sql/Array.java,
* java/sql/BatchUpdateException.java,
* java/sql/Blob.java,
* java/sql/CallableStatement.java,
* java/sql/Clob.java,
* java/sql/Connection.java,
* java/sql/DataTruncation.java,
* java/sql/DatabaseMetaData.java,
* java/sql/Date.java,
* java/sql/Driver.java,
* java/sql/DriverManager.java,
* java/sql/DriverPropertyInfo.java,
* java/sql/ParameterMetaData.java,
* java/sql/PreparedStatement.java,
* java/sql/Ref.java,
* java/sql/ResultSet.java,
* java/sql/ResultSetMetaData.java,
* java/sql/SQLData.java,
* java/sql/SQLException.java,
* java/sql/SQLInput.java,
* java/sql/SQLOutput.java,
* java/sql/SQLPermission.java,
* java/sql/SQLWarning.java,
* java/sql/Savepoint.java,
* java/sql/Statement.java,
* java/sql/Struct.java,
* java/sql/Time.java,
* java/sql/Timestamp.java,
* java/sql/Types.java,
* java/text/Annotation.java,
* java/text/AttributedCharacterIterator.java,
* java/text/AttributedString.java,
* java/text/AttributedStringIterator.java,
* java/text/Bidi.java,
* java/text/BreakIterator.java,
* java/text/CharacterIterator.java,
* java/text/ChoiceFormat.java,
* java/text/CollationElementIterator.java,
* java/text/CollationKey.java,
* java/text/Collator.java,
* java/text/DateFormat.java,
* java/text/DateFormatSymbols.java,
* java/text/DecimalFormat.java,
* java/text/DecimalFormatSymbols.java,
* java/text/FieldPosition.java,
* java/text/Format.java,
* java/text/MessageFormat.java,
* java/text/NumberFormat.java,
* java/text/ParsePosition.java,
* java/text/RuleBasedCollator.java,
* java/text/SimpleDateFormat.java,
* java/text/StringCharacterIterator.java,
* java/text/spi/DateFormatProvider.java,
* java/text/spi/NumberFormatProvider.java,
* java/util/AbstractCollection.java,
* java/util/AbstractList.java,
* java/util/AbstractMap.java,
* java/util/AbstractSet.java,
* java/util/ArrayList.java,
* java/util/Arrays.java,
* java/util/BitSet.java,
* java/util/Calendar.java,
* java/util/Collections.java,
* java/util/Currency.java,
* java/util/Date.java,
* java/util/Dictionary.java,
* java/util/DuplicateFormatFlagsException.java,
* java/util/EnumMap.java,
* java/util/EnumSet.java,
* java/util/FormatFlagsConversionMismatchException.java,
* java/util/Formattable.java,
* java/util/FormattableFlags.java,
* java/util/Formatter.java,
* java/util/FormatterClosedException.java,
* java/util/GregorianCalendar.java,
* java/util/HashMap.java,
* java/util/Hashtable.java,
* java/util/IdentityHashMap.java,
* java/util/IllegalFormatCodePointException.java,
* java/util/IllegalFormatConversionException.java,
* java/util/IllegalFormatException.java,
* java/util/IllegalFormatFlagsException.java,
* java/util/IllegalFormatPrecisionException.java,
* java/util/IllegalFormatWidthException.java,
* java/util/InputMismatchException.java,
* java/util/LinkedHashMap.java,
* java/util/LinkedHashSet.java,
* java/util/LinkedList.java,
* java/util/List.java,
* java/util/Locale.java,
* java/util/Map.java,
* java/util/MissingFormatArgumentException.java,
* java/util/MissingFormatWidthException.java,
* java/util/PriorityQueue.java,
* java/util/Properties.java,
* java/util/PropertyPermission.java,
* java/util/PropertyPermissionCollection.java,
* java/util/Random.java,
* java/util/ResourceBundle.java,
* java/util/ServiceConfigurationError.java,
* java/util/ServiceLoader.java,
* java/util/SimpleTimeZone.java,
* java/util/StringTokenizer.java,
* java/util/TimeZone.java,
* java/util/Timer.java,
* java/util/TreeMap.java,
* java/util/TreeSet.java,
* java/util/UUID.java,
* java/util/UnknownFormatConversionException.java,
* java/util/UnknownFormatFlagsException.java,
* java/util/Vector.java,
* java/util/WeakHashMap.java,
* java/util/concurrent/CopyOnWriteArrayList.java,
* java/util/jar/Attributes.java,
* java/util/jar/JarEntry.java,
* java/util/jar/JarFile.java,
* java/util/jar/JarInputStream.java,
* java/util/jar/JarOutputStream.java,
* java/util/jar/Manifest.java,
* java/util/logging/ConsoleHandler.java,
* java/util/logging/ErrorManager.java,
* java/util/logging/FileHandler.java,
* java/util/logging/Formatter.java,
* java/util/logging/Handler.java,
* java/util/logging/Level.java,
* java/util/logging/LogManager.java,
* java/util/logging/LogRecord.java,
* java/util/logging/Logger.java,
* java/util/logging/LoggingMXBean.java,
* java/util/logging/LoggingPermission.java,
* java/util/logging/MemoryHandler.java,
* java/util/logging/SocketHandler.java,
* java/util/logging/StreamHandler.java,
* java/util/logging/XMLFormatter.java,
* java/util/prefs/AbstractPreferences.java,
* java/util/prefs/NodeChangeEvent.java,
* java/util/prefs/NodeChangeListener.java,
* java/util/prefs/PreferenceChangeEvent.java,
* java/util/prefs/PreferenceChangeListener.java,
* java/util/prefs/Preferences.java,
* java/util/prefs/PreferencesFactory.java,
* java/util/regex/MatchResult.java,
* java/util/regex/Pattern.java,
* java/util/regex/PatternSyntaxException.java,
* java/util/spi/LocaleNameProvider.java,
* java/util/spi/TimeZoneNameProvider.java,
* java/util/zip/Adler32.java,
* java/util/zip/CRC32.java,
* java/util/zip/CheckedInputStream.java,
* java/util/zip/CheckedOutputStream.java,
* java/util/zip/Deflater.java,
* java/util/zip/DeflaterEngine.java,
* java/util/zip/DeflaterHuffman.java,
* java/util/zip/DeflaterOutputStream.java,
* java/util/zip/DeflaterPending.java,
* java/util/zip/GZIPInputStream.java,
* java/util/zip/GZIPOutputStream.java,
* java/util/zip/Inflater.java,
* java/util/zip/InflaterDynHeader.java,
* java/util/zip/InflaterHuffmanTree.java,
* java/util/zip/InflaterInputStream.java,
* java/util/zip/OutputWindow.java,
* java/util/zip/PendingBuffer.java,
* java/util/zip/StreamManipulator.java,
* java/util/zip/ZipConstants.java,
* java/util/zip/ZipEntry.java,
* java/util/zip/ZipFile.java,
* java/util/zip/ZipInputStream.java,
* java/util/zip/ZipOutputStream.java,
* javax/accessibility/AccessibleExtendedText.java,
* javax/accessibility/AccessibleRelation.java,
* javax/accessibility/AccessibleRole.java,
* javax/accessibility/AccessibleState.java,
* javax/activation/ActivationDataFlavor.java,
* javax/activation/CommandInfo.java,
* javax/activation/CommandMap.java,
* javax/activation/CommandObject.java,
* javax/activation/DataContentHandler.java,
* javax/activation/DataContentHandlerFactory.java,
* javax/activation/DataHandler.java,
* javax/activation/DataHandlerDataSource.java,
* javax/activation/DataSource.java,
* javax/activation/DataSourceDataContentHandler.java,
* javax/activation/FileDataSource.java,
* javax/activation/FileTypeMap.java,
* javax/activation/MailcapCommandMap.java,
* javax/activation/MimeType.java,
* javax/activation/MimeTypeParameterList.java,
* javax/activation/MimeTypeParseException.java,
* javax/activation/MimetypesFileTypeMap.java,
* javax/activation/ObjectDataContentHandler.java,
* javax/activation/URLDataSource.java,
* javax/activation/UnsupportedDataTypeException.java,
* javax/crypto/Cipher.java,
* javax/crypto/CipherOutputStream.java,
* javax/crypto/ExemptionMechanism.java,
* javax/crypto/KeyAgreement.java,
* javax/crypto/KeyGenerator.java,
* javax/crypto/Mac.java,
* javax/crypto/MacSpi.java,
* javax/crypto/SecretKeyFactory.java,
* javax/crypto/spec/PBEKeySpec.java,
* javax/imageio/IIOImage.java,
* javax/imageio/IIOParam.java,
* javax/imageio/IIOParamController.java,
* javax/imageio/ImageIO.java,
* javax/imageio/ImageReadParam.java,
* javax/imageio/ImageReader.java,
* javax/imageio/ImageTranscoder.java,
* javax/imageio/ImageTypeSpecifier.java,
* javax/imageio/ImageWriteParam.java,
* javax/imageio/ImageWriter.java,
* javax/imageio/event/IIOReadProgressListener.java,
* javax/imageio/event/IIOReadUpdateListener.java,
* javax/imageio/event/IIOWriteProgressListener.java,
* javax/imageio/metadata/IIOInvalidTreeException.java,
* javax/imageio/metadata/IIOMetadata.java,
* javax/imageio/metadata/IIOMetadataFormatImpl.java,
* javax/imageio/metadata/IIOMetadataNode.java,
* javax/imageio/plugins/bmp/BMPImageWriteParam.java,
* javax/imageio/plugins/jpeg/JPEGHuffmanTable.java,
* javax/imageio/spi/IIORegistry.java,
* javax/imageio/spi/ImageReaderSpi.java,
* javax/imageio/spi/ImageWriterSpi.java,
* javax/imageio/spi/RegisterableService.java,
* javax/imageio/spi/ServiceRegistry.java,
* javax/imageio/stream/FileCacheImageInputStream.java,
* javax/imageio/stream/FileCacheImageOutputStream.java,
* javax/imageio/stream/FileImageInputStream.java,
* javax/imageio/stream/FileImageOutputStream.java,
* javax/imageio/stream/ImageInputStream.java,
* javax/imageio/stream/ImageInputStreamImpl.java,
* javax/imageio/stream/ImageOutputStreamImpl.java,
* javax/imageio/stream/MemoryCacheImageInputStream.java,
* javax/imageio/stream/MemoryCacheImageOutputStream.java,
* javax/management/Attribute.java,
* javax/management/AttributeChangeNotification.java,
* javax/management/AttributeChangeNotificationFilter.java,
* javax/management/AttributeList.java,
* javax/management/AttributeNotFoundException.java,
* javax/management/AttributeValueExp.java,
* javax/management/BadAttributeValueExpException.java,
* javax/management/BadBinaryOpValueExpException.java,
* javax/management/BadStringOperationException.java,
* javax/management/DefaultLoaderRepository.java,
* javax/management/Descriptor.java,
* javax/management/DynamicMBean.java,
* javax/management/InstanceAlreadyExistsException.java,
* javax/management/InstanceNotFoundException.java,
* javax/management/IntrospectionException.java,
* javax/management/InvalidApplicationException.java,
* javax/management/InvalidAttributeValueException.java,
* javax/management/JMException.java,
* javax/management/JMRuntimeException.java,
* javax/management/JMX.java,
* javax/management/ListenerNotFoundException.java,
* javax/management/MBeanAttributeInfo.java,
* javax/management/MBeanConstructorInfo.java,
* javax/management/MBeanException.java,
* javax/management/MBeanFeatureInfo.java,
* javax/management/MBeanInfo.java,
* javax/management/MBeanNotificationInfo.java,
* javax/management/MBeanOperationInfo.java,
* javax/management/MBeanParameterInfo.java,
* javax/management/MBeanPermission.java,
* javax/management/MBeanRegistrationException.java,
* javax/management/MBeanServer.java,
* javax/management/MBeanServerBuilder.java,
* javax/management/MBeanServerConnection.java,
* javax/management/MBeanServerDelegate.java,
* javax/management/MBeanServerFactory.java,
* javax/management/MBeanServerInvocationHandler.java,
* javax/management/MBeanServerNotification.java,
* javax/management/MBeanServerPermission.java,
* javax/management/MBeanTrustPermission.java,
* javax/management/MalformedObjectNameException.java,
* javax/management/NotCompliantMBeanException.java,
* javax/management/Notification.java,
* javax/management/NotificationBroadcaster.java,
* javax/management/NotificationBroadcasterSupport.java,
* javax/management/NotificationEmitter.java,
* javax/management/NotificationFilter.java,
* javax/management/NotificationFilterSupport.java,
* javax/management/NotificationListener.java,
* javax/management/ObjectInstance.java,
* javax/management/ObjectName.java,
* javax/management/OperationsException.java,
* javax/management/PersistentMBean.java,
* javax/management/Query.java,
* javax/management/QueryEval.java,
* javax/management/QueryExp.java,
* javax/management/ReflectionException.java,
* javax/management/RuntimeErrorException.java,
* javax/management/RuntimeMBeanException.java,
* javax/management/RuntimeOperationsException.java,
* javax/management/ServiceNotFoundException.java,
* javax/management/StandardMBean.java,
* javax/management/StringValueExp.java,
* javax/management/ValueExp.java,
* javax/management/loading/ClassLoaderRepository.java,
* javax/management/openmbean/ArrayType.java,
* javax/management/openmbean/CompositeData.java,
* javax/management/openmbean/CompositeDataInvocationHandler.java,
* javax/management/openmbean/CompositeDataSupport.java,
* javax/management/openmbean/CompositeType.java,
* javax/management/openmbean/InvalidKeyException.java,
* javax/management/openmbean/InvalidOpenTypeException.java,
* javax/management/openmbean/KeyAlreadyExistsException.java,
* javax/management/openmbean/OpenDataException.java,
* javax/management/openmbean/OpenMBeanAttributeInfo.java,
* javax/management/openmbean/OpenMBeanAttributeInfoSupport.java,
* javax/management/openmbean/OpenMBeanConstructorInfo.java,
* javax/management/openmbean/OpenMBeanConstructorInfoSupport.java,
* javax/management/openmbean/OpenMBeanInfo.java,
* javax/management/openmbean/OpenMBeanInfoSupport.java,
* javax/management/openmbean/OpenMBeanOperationInfo.java,
* javax/management/openmbean/OpenMBeanOperationInfoSupport.java,
* javax/management/openmbean/OpenMBeanParameterInfo.java,
* javax/management/openmbean/OpenMBeanParameterInfoSupport.java,
* javax/management/openmbean/OpenType.java,
* javax/management/openmbean/SimpleType.java,
* javax/management/openmbean/TabularData.java,
* javax/management/openmbean/TabularDataSupport.java,
* javax/management/openmbean/TabularType.java,
* javax/management/remote/NotificationResult.java,
* javax/management/remote/TargetedNotification.java,
* javax/management/remote/rmi/RMIConnection.java,
* javax/naming/AuthenticationException.java,
* javax/naming/AuthenticationNotSupportedException.java,
* javax/naming/BinaryRefAddr.java,
* javax/naming/Binding.java,
* javax/naming/CannotProceedException.java,
* javax/naming/CommunicationException.java,
* javax/naming/CompositeName.java,
* javax/naming/CompoundName.java,
* javax/naming/ConfigurationException.java,
* javax/naming/Context.java,
* javax/naming/ContextNotEmptyException.java,
* javax/naming/InitialContext.java,
* javax/naming/InsufficientResourcesException.java,
* javax/naming/InterruptedNamingException.java,
* javax/naming/InvalidNameException.java,
* javax/naming/LimitExceededException.java,
* javax/naming/LinkException.java,
* javax/naming/LinkLoopException.java,
* javax/naming/MalformedLinkException.java,
* javax/naming/Name.java,
* javax/naming/NameAlreadyBoundException.java,
* javax/naming/NameClassPair.java,
* javax/naming/NameNotFoundException.java,
* javax/naming/NameParser.java,
* javax/naming/NamingEnumeration.java,
* javax/naming/NamingException.java,
* javax/naming/NamingSecurityException.java,
* javax/naming/NoInitialContextException.java,
* javax/naming/NoPermissionException.java,
* javax/naming/NotContextException.java,
* javax/naming/PartialResultException.java,
* javax/naming/RefAddr.java,
* javax/naming/Reference.java,
* javax/naming/Referenceable.java,
* javax/naming/ReferralException.java,
* javax/naming/ServiceUnavailableException.java,
* javax/naming/SizeLimitExceededException.java,
* javax/naming/StringRefAddr.java,
* javax/naming/TimeLimitExceededException.java,
* javax/naming/directory/AttributeInUseException.java,
* javax/naming/directory/Attributes.java,
* javax/naming/directory/BasicAttribute.java,
* javax/naming/directory/BasicAttributes.java,
* javax/naming/directory/InitialDirContext.java,
* javax/naming/directory/ModificationItem.java,
* javax/naming/directory/SearchControls.java,
* javax/naming/directory/SearchResult.java,
* javax/naming/event/EventContext.java,
* javax/naming/event/NamespaceChangeListener.java,
* javax/naming/event/NamingEvent.java,
* javax/naming/event/NamingExceptionEvent.java,
* javax/naming/event/NamingListener.java,
* javax/naming/event/ObjectChangeListener.java,
* javax/naming/ldap/Control.java,
* javax/naming/ldap/ControlFactory.java,
* javax/naming/ldap/ExtendedRequest.java,
* javax/naming/ldap/ExtendedResponse.java,
* javax/naming/ldap/HasControls.java,
* javax/naming/ldap/InitialLdapContext.java,
* javax/naming/ldap/LdapContext.java,
* javax/naming/ldap/LdapReferralException.java,
* javax/naming/ldap/StartTlsRequest.java,
* javax/naming/ldap/UnsolicitedNotification.java,
* javax/naming/ldap/UnsolicitedNotificationEvent.java,
* javax/naming/ldap/UnsolicitedNotificationListener.java,
* javax/naming/spi/DirObjectFactory.java,
* javax/naming/spi/DirStateFactory.java,
* javax/naming/spi/DirectoryManager.java,
* javax/naming/spi/InitialContextFactory.java,
* javax/naming/spi/InitialContextFactoryBuilder.java,
* javax/naming/spi/NamingManager.java,
* javax/naming/spi/ObjectFactory.java,
* javax/naming/spi/ObjectFactoryBuilder.java,
* javax/naming/spi/ResolveResult.java,
* javax/naming/spi/Resolver.java,
* javax/naming/spi/StateFactory.java,
* javax/net/ssl/CertPathTrustManagerParameters.java,
* javax/net/ssl/KeyManagerFactory.java,
* javax/net/ssl/KeyStoreBuilderParameters.java,
* javax/net/ssl/SSLContext.java,
* javax/net/ssl/SSLEngine.java,
* javax/net/ssl/SSLEngineResult.java,
* javax/net/ssl/SSLException.java,
* javax/net/ssl/TrustManagerFactory.java,
* javax/net/ssl/X509ExtendedKeyManager.java,
* javax/print/AttributeException.java,
* javax/print/CancelablePrintJob.java,
* javax/print/Doc.java,
* javax/print/DocFlavor.java,
* javax/print/DocPrintJob.java,
* javax/print/FlavorException.java,
* javax/print/MultiDoc.java,
* javax/print/MultiDocPrintJob.java,
* javax/print/MultiDocPrintService.java,
* javax/print/PrintException.java,
* javax/print/PrintService.java,
* javax/print/PrintServiceLookup.java,
* javax/print/ServiceUI.java,
* javax/print/ServiceUIFactory.java,
* javax/print/SimpleDoc.java,
* javax/print/StreamPrintService.java,
* javax/print/StreamPrintServiceFactory.java,
* javax/print/URIException.java,
* javax/print/attribute/Attribute.java,
* javax/print/attribute/AttributeSet.java,
* javax/print/attribute/AttributeSetUtilities.java,
* javax/print/attribute/DateTimeSyntax.java,
* javax/print/attribute/DocAttribute.java,
* javax/print/attribute/DocAttributeSet.java,
* javax/print/attribute/EnumSyntax.java,
* javax/print/attribute/HashAttributeSet.java,
* javax/print/attribute/HashDocAttributeSet.java,
* javax/print/attribute/HashPrintJobAttributeSet.java,
* javax/print/attribute/HashPrintRequestAttributeSet.java,
* javax/print/attribute/HashPrintServiceAttributeSet.java,
* javax/print/attribute/IntegerSyntax.java,
* javax/print/attribute/PrintJobAttribute.java,
* javax/print/attribute/PrintJobAttributeSet.java,
* javax/print/attribute/PrintRequestAttribute.java,
* javax/print/attribute/PrintRequestAttributeSet.java,
* javax/print/attribute/PrintServiceAttribute.java,
* javax/print/attribute/PrintServiceAttributeSet.java,
* javax/print/attribute/ResolutionSyntax.java,
* javax/print/attribute/SetOfIntegerSyntax.java,
* javax/print/attribute/Size2DSyntax.java,
* javax/print/attribute/SupportedValuesAttribute.java,
* javax/print/attribute/TextSyntax.java,
* javax/print/attribute/URISyntax.java,
* javax/print/attribute/UnmodifiableSetException.java,
* javax/print/attribute/standard/Chromaticity.java,
* javax/print/attribute/standard/ColorSupported.java,
* javax/print/attribute/standard/Compression.java,
* javax/print/attribute/standard/Copies.java,
* javax/print/attribute/standard/CopiesSupported.java,
* javax/print/attribute/standard/DateTimeAtCompleted.java,
* javax/print/attribute/standard/DateTimeAtCreation.java,
* javax/print/attribute/standard/DateTimeAtProcessing.java,
* javax/print/attribute/standard/Destination.java,
* javax/print/attribute/standard/DocumentName.java,
* javax/print/attribute/standard/Fidelity.java,
* javax/print/attribute/standard/Finishings.java,
* javax/print/attribute/standard/JobHoldUntil.java,
* javax/print/attribute/standard/JobImpressions.java,
* javax/print/attribute/standard/JobImpressionsCompleted.java,
* javax/print/attribute/standard/JobImpressionsSupported.java,
* javax/print/attribute/standard/JobKOctets.java,
* javax/print/attribute/standard/JobKOctetsProcessed.java,
* javax/print/attribute/standard/JobKOctetsSupported.java,
* javax/print/attribute/standard/JobMediaSheets.java,
* javax/print/attribute/standard/JobMediaSheetsCompleted.java,
* javax/print/attribute/standard/JobMediaSheetsSupported.java,
* javax/print/attribute/standard/JobMessageFromOperator.java,
* javax/print/attribute/standard/JobName.java,
* javax/print/attribute/standard/JobOriginatingUserName.java,
* javax/print/attribute/standard/JobPriority.java,
* javax/print/attribute/standard/JobPrioritySupported.java,
* javax/print/attribute/standard/JobSheets.java,
* javax/print/attribute/standard/JobState.java,
* javax/print/attribute/standard/JobStateReason.java,
* javax/print/attribute/standard/JobStateReasons.java,
* javax/print/attribute/standard/Media.java,
* javax/print/attribute/standard/MediaName.java,
* javax/print/attribute/standard/MediaPrintableArea.java,
* javax/print/attribute/standard/MediaSize.java,
* javax/print/attribute/standard/MediaSizeName.java,
* javax/print/attribute/standard/MediaTray.java,
* javax/print/attribute/standard/MultipleDocumentHandling.java,
* javax/print/attribute/standard/NumberOfDocuments.java,
* javax/print/attribute/standard/NumberOfInterveningJobs.java,
* javax/print/attribute/standard/NumberUp.java,
* javax/print/attribute/standard/NumberUpSupported.java,
* javax/print/attribute/standard/OrientationRequested.java,
* javax/print/attribute/standard/OutputDeviceAssigned.java,
* javax/print/attribute/standard/PDLOverrideSupported.java,
* javax/print/attribute/standard/PageRanges.java,
* javax/print/attribute/standard/PagesPerMinute.java,
* javax/print/attribute/standard/PagesPerMinuteColor.java,
* javax/print/attribute/standard/PresentationDirection.java,
* javax/print/attribute/standard/PrintQuality.java,
* javax/print/attribute/standard/PrinterInfo.java,
* javax/print/attribute/standard/PrinterIsAcceptingJobs.java,
* javax/print/attribute/standard/PrinterLocation.java,
* javax/print/attribute/standard/PrinterMakeAndModel.java,
* javax/print/attribute/standard/PrinterMessageFromOperator.java,
* javax/print/attribute/standard/PrinterMoreInfo.java,
* javax/print/attribute/standard/PrinterMoreInfoManufacturer.java,
* javax/print/attribute/standard/PrinterName.java,
* javax/print/attribute/standard/PrinterResolution.java,
* javax/print/attribute/standard/PrinterState.java,
* javax/print/attribute/standard/PrinterStateReason.java,
* javax/print/attribute/standard/PrinterStateReasons.java,
* javax/print/attribute/standard/PrinterURI.java,
* javax/print/attribute/standard/QueuedJobCount.java,
* javax/print/attribute/standard/ReferenceUriSchemesSupported.java,
* javax/print/attribute/standard/RequestingUserName.java,
* javax/print/attribute/standard/Severity.java,
* javax/print/attribute/standard/SheetCollate.java,
* javax/print/attribute/standard/Sides.java,
* javax/print/event/PrintEvent.java,
* javax/print/event/PrintJobAdapter.java,
* javax/print/event/PrintJobAttributeEvent.java,
* javax/print/event/PrintJobAttributeListener.java,
* javax/print/event/PrintJobEvent.java,
* javax/print/event/PrintJobListener.java,
* javax/print/event/PrintServiceAttributeEvent.java,
* javax/print/event/PrintServiceAttributeListener.java,
* javax/rmi/CORBA/ClassDesc.java,
* javax/rmi/CORBA/PortableRemoteObjectDelegate.java,
* javax/rmi/CORBA/Stub.java,
* javax/rmi/CORBA/StubDelegate.java,
* javax/rmi/CORBA/Tie.java,
* javax/rmi/CORBA/Util.java,
* javax/rmi/CORBA/UtilDelegate.java,
* javax/rmi/CORBA/ValueHandler.java,
* javax/rmi/CORBA/ValueHandlerMultiFormat.java,
* javax/rmi/PortableRemoteObject.java,
* javax/rmi/ssl/SslRMIClientSocketFactory.java,
* javax/rmi/ssl/SslRMIServerSocketFactory.java,
* javax/security/auth/Subject.java,
* javax/security/auth/callback/ChoiceCallback.java,
* javax/security/auth/callback/ConfirmationCallback.java,
* javax/security/auth/callback/NameCallback.java,
* javax/security/auth/callback/PasswordCallback.java,
* javax/security/auth/callback/TextInputCallback.java,
* javax/security/auth/callback/TextOutputCallback.java,
* javax/security/auth/kerberos/DelegationPermission.java,
* javax/security/auth/kerberos/KerberosKey.java,
* javax/security/auth/kerberos/KerberosPrincipal.java,
* javax/security/auth/kerberos/ServicePermission.java,
* javax/security/auth/login/AccountNotFoundException.java,
* javax/security/auth/login/AppConfigurationEntry.java,
* javax/security/auth/login/LoginContext.java,
* javax/security/sasl/Sasl.java,
* javax/sound/midi/ControllerEventListener.java,
* javax/sound/midi/Instrument.java,
* javax/sound/midi/InvalidMidiDataException.java,
* javax/sound/midi/MetaEventListener.java,
* javax/sound/midi/MetaMessage.java,
* javax/sound/midi/MidiChannel.java,
* javax/sound/midi/MidiDevice.java,
* javax/sound/midi/MidiEvent.java,
* javax/sound/midi/MidiFileFormat.java,
* javax/sound/midi/MidiMessage.java,
* javax/sound/midi/MidiSystem.java,
* javax/sound/midi/MidiUnavailableException.java,
* javax/sound/midi/Patch.java,
* javax/sound/midi/Receiver.java,
* javax/sound/midi/Sequence.java,
* javax/sound/midi/Sequencer.java,
* javax/sound/midi/ShortMessage.java,
* javax/sound/midi/Soundbank.java,
* javax/sound/midi/SoundbankResource.java,
* javax/sound/midi/Synthesizer.java,
* javax/sound/midi/SysexMessage.java,
* javax/sound/midi/Track.java,
* javax/sound/midi/Transmitter.java,
* javax/sound/midi/VoiceStatus.java,
* javax/sound/midi/spi/MidiDeviceProvider.java,
* javax/sound/midi/spi/MidiFileReader.java,
* javax/sound/midi/spi/MidiFileWriter.java,
* javax/sound/midi/spi/SoundbankReader.java,
* javax/sound/sampled/AudioFileFormat.java,
* javax/sound/sampled/AudioFormat.java,
* javax/sound/sampled/AudioInputStream.java,
* javax/sound/sampled/AudioPermission.java,
* javax/sound/sampled/AudioSystem.java,
* javax/sound/sampled/BooleanControl.java,
* javax/sound/sampled/Clip.java,
* javax/sound/sampled/CompoundControl.java,
* javax/sound/sampled/DataLine.java,
* javax/sound/sampled/EnumControl.java,
* javax/sound/sampled/FloatControl.java,
* javax/sound/sampled/Line.java,
* javax/sound/sampled/LineEvent.java,
* javax/sound/sampled/LineUnavailableException.java,
* javax/sound/sampled/Mixer.java,
* javax/sound/sampled/Port.java,
* javax/sound/sampled/ReverbType.java,
* javax/sound/sampled/UnsupportedAudioFileException.java,
* javax/sound/sampled/spi/AudioFileReader.java,
* javax/sound/sampled/spi/AudioFileWriter.java,
* javax/sound/sampled/spi/FormatConversionProvider.java,
* javax/sql/ConnectionEvent.java,
* javax/sql/ConnectionEventListener.java,
* javax/sql/ConnectionPoolDataSource.java,
* javax/sql/DataSource.java,
* javax/sql/PooledConnection.java,
* javax/sql/RowSet.java,
* javax/sql/RowSetEvent.java,
* javax/sql/RowSetInternal.java,
* javax/sql/RowSetListener.java,
* javax/sql/RowSetMetaData.java,
* javax/sql/RowSetReader.java,
* javax/sql/RowSetWriter.java,
* javax/sql/XAConnection.java,
* javax/sql/XADataSource.java,
* javax/swing/AbstractAction.java,
* javax/swing/AbstractButton.java,
* javax/swing/AbstractCellEditor.java,
* javax/swing/AbstractListModel.java,
* javax/swing/AbstractSpinnerModel.java,
* javax/swing/Action.java,
* javax/swing/BorderFactory.java,
* javax/swing/BoundedRangeModel.java,
* javax/swing/Box.java,
* javax/swing/BoxLayout.java,
* javax/swing/ButtonGroup.java,
* javax/swing/ButtonModel.java,
* javax/swing/CellEditor.java,
* javax/swing/CellRendererPane.java,
* javax/swing/ComboBoxModel.java,
* javax/swing/ComponentInputMap.java,
* javax/swing/DebugGraphics.java,
* javax/swing/DefaultBoundedRangeModel.java,
* javax/swing/DefaultButtonModel.java,
* javax/swing/DefaultCellEditor.java,
* javax/swing/DefaultComboBoxModel.java,
* javax/swing/DefaultDesktopManager.java,
* javax/swing/DefaultFocusManager.java,
* javax/swing/DefaultListModel.java,
* javax/swing/DefaultListSelectionModel.java,
* javax/swing/DefaultSingleSelectionModel.java,
* javax/swing/FocusManager.java,
* javax/swing/GrayFilter.java,
* javax/swing/Icon.java,
* javax/swing/ImageIcon.java,
* javax/swing/InputMap.java,
* javax/swing/InternalFrameFocusTraversalPolicy.java,
* javax/swing/JApplet.java,
* javax/swing/JButton.java,
* javax/swing/JCheckBox.java,
* javax/swing/JCheckBoxMenuItem.java,
* javax/swing/JComboBox.java,
* javax/swing/JComponent.java,
* javax/swing/JDesktopPane.java,
* javax/swing/JDialog.java,
* javax/swing/JEditorPane.java,
* javax/swing/JFileChooser.java,
* javax/swing/JFormattedTextField.java,
* javax/swing/JFrame.java,
* javax/swing/JInternalFrame.java,
* javax/swing/JLabel.java,
* javax/swing/JLayeredPane.java,
* javax/swing/JList.java,
* javax/swing/JMenu.java,
* javax/swing/JMenuBar.java,
* javax/swing/JMenuItem.java,
* javax/swing/JOptionPane.java,
* javax/swing/JPanel.java,
* javax/swing/JPasswordField.java,
* javax/swing/JPopupMenu.java,
* javax/swing/JProgressBar.java,
* javax/swing/JRadioButton.java,
* javax/swing/JRadioButtonMenuItem.java,
* javax/swing/JRootPane.java,
* javax/swing/JScrollBar.java,
* javax/swing/JScrollPane.java,
* javax/swing/JSeparator.java,
* javax/swing/JSlider.java,
* javax/swing/JSpinner.java,
* javax/swing/JSplitPane.java,
* javax/swing/JTabbedPane.java,
* javax/swing/JTable.java,
* javax/swing/JTextArea.java,
* javax/swing/JTextField.java,
* javax/swing/JTextPane.java,
* javax/swing/JToggleButton.java,
* javax/swing/JToolBar.java,
* javax/swing/JToolTip.java,
* javax/swing/JTree.java,
* javax/swing/JViewport.java,
* javax/swing/JWindow.java,
* javax/swing/KeyStroke.java,
* javax/swing/KeyboardManager.java,
* javax/swing/LayoutFocusTraversalPolicy.java,
* javax/swing/ListCellRenderer.java,
* javax/swing/ListSelectionModel.java,
* javax/swing/LookAndFeel.java,
* javax/swing/MenuSelectionManager.java,
* javax/swing/OverlayLayout.java,
* javax/swing/Popup.java,
* javax/swing/PopupFactory.java,
* javax/swing/ProgressMonitor.java,
* javax/swing/ProgressMonitorInputStream.java,
* javax/swing/Renderer.java,
* javax/swing/RepaintManager.java,
* javax/swing/ScrollPaneLayout.java,
* javax/swing/Scrollable.java,
* javax/swing/SingleSelectionModel.java,
* javax/swing/SizeRequirements.java,
* javax/swing/SizeSequence.java,
* javax/swing/SortingFocusTraversalPolicy.java,
* javax/swing/SpinnerDateModel.java,
* javax/swing/SpinnerListModel.java,
* javax/swing/SpinnerModel.java,
* javax/swing/SpinnerNumberModel.java,
* javax/swing/Spring.java,
* javax/swing/SpringLayout.java,
* javax/swing/SwingConstants.java,
* javax/swing/SwingUtilities.java,
* javax/swing/Timer.java,
* javax/swing/ToolTipManager.java,
* javax/swing/TransferHandler.java,
* javax/swing/UIDefaults.java,
* javax/swing/UIManager.java,
* javax/swing/UnsupportedLookAndFeelException.java,
* javax/swing/ViewportLayout.java,
* javax/swing/WindowConstants.java,
* javax/swing/border/AbstractBorder.java,
* javax/swing/border/BevelBorder.java,
* javax/swing/border/Border.java,
* javax/swing/border/CompoundBorder.java,
* javax/swing/border/EmptyBorder.java,
* javax/swing/border/EtchedBorder.java,
* javax/swing/border/LineBorder.java,
* javax/swing/border/MatteBorder.java,
* javax/swing/border/SoftBevelBorder.java,
* javax/swing/border/TitledBorder.java,
* javax/swing/colorchooser/AbstractColorChooserPanel.java,
* javax/swing/colorchooser/ColorChooserComponentFactory.java,
* javax/swing/colorchooser/ColorSelectionModel.java,
* javax/swing/colorchooser/DefaultColorSelectionModel.java,
* javax/swing/colorchooser/DefaultHSBChooserPanel.java,
* javax/swing/colorchooser/DefaultRGBChooserPanel.java,
* javax/swing/colorchooser/DefaultSwatchChooserPanel.java,
* javax/swing/event/AncestorEvent.java,
* javax/swing/event/AncestorListener.java,
* javax/swing/event/CaretEvent.java,
* javax/swing/event/CaretListener.java,
* javax/swing/event/CellEditorListener.java,
* javax/swing/event/ChangeEvent.java,
* javax/swing/event/ChangeListener.java,
* javax/swing/event/DocumentEvent.java,
* javax/swing/event/DocumentListener.java,
* javax/swing/event/EventListenerList.java,
* javax/swing/event/HyperlinkEvent.java,
* javax/swing/event/HyperlinkListener.java,
* javax/swing/event/InternalFrameAdapter.java,
* javax/swing/event/InternalFrameEvent.java,
* javax/swing/event/InternalFrameListener.java,
* javax/swing/event/ListDataEvent.java,
* javax/swing/event/ListDataListener.java,
* javax/swing/event/ListSelectionEvent.java,
* javax/swing/event/ListSelectionListener.java,
* javax/swing/event/MenuDragMouseEvent.java,
* javax/swing/event/MenuDragMouseListener.java,
* javax/swing/event/MenuEvent.java,
* javax/swing/event/MenuKeyEvent.java,
* javax/swing/event/MenuKeyListener.java,
* javax/swing/event/MenuListener.java,
* javax/swing/event/MouseInputListener.java,
* javax/swing/event/PopupMenuEvent.java,
* javax/swing/event/PopupMenuListener.java,
* javax/swing/event/SwingPropertyChangeSupport.java,
* javax/swing/event/TableColumnModelEvent.java,
* javax/swing/event/TableColumnModelListener.java,
* javax/swing/event/TableModelEvent.java,
* javax/swing/event/TableModelListener.java,
* javax/swing/event/TreeExpansionEvent.java,
* javax/swing/event/TreeExpansionListener.java,
* javax/swing/event/TreeModelEvent.java,
* javax/swing/event/TreeModelListener.java,
* javax/swing/event/TreeSelectionEvent.java,
* javax/swing/event/TreeSelectionListener.java,
* javax/swing/event/TreeWillExpandListener.java,
* javax/swing/event/UndoableEditEvent.java,
* javax/swing/filechooser/FileFilter.java,
* javax/swing/filechooser/FileSystemView.java,
* javax/swing/filechooser/FileView.java,
* javax/swing/filechooser/UnixFileSystemView.java,
* javax/swing/plaf/BorderUIResource.java,
* javax/swing/plaf/ColorChooserUI.java,
* javax/swing/plaf/ColorUIResource.java,
* javax/swing/plaf/ComboBoxUI.java,
* javax/swing/plaf/ComponentInputMapUIResource.java,
* javax/swing/plaf/ComponentUI.java,
* javax/swing/plaf/FileChooserUI.java,
* javax/swing/plaf/IconUIResource.java,
* javax/swing/plaf/SplitPaneUI.java,
* javax/swing/plaf/TabbedPaneUI.java,
* javax/swing/plaf/TextUI.java,
* javax/swing/plaf/UIResource.java,
* javax/swing/plaf/basic/BasicArrowButton.java,
* javax/swing/plaf/basic/BasicBorders.java,
* javax/swing/plaf/basic/BasicButtonListener.java,
* javax/swing/plaf/basic/BasicButtonUI.java,
* javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java,
* javax/swing/plaf/basic/BasicCheckBoxUI.java,
* javax/swing/plaf/basic/BasicColorChooserUI.java,
* javax/swing/plaf/basic/BasicComboBoxEditor.java,
* javax/swing/plaf/basic/BasicComboBoxRenderer.java,
* javax/swing/plaf/basic/BasicComboBoxUI.java,
* javax/swing/plaf/basic/BasicComboPopup.java,
* javax/swing/plaf/basic/BasicDesktopIconUI.java,
* javax/swing/plaf/basic/BasicDesktopPaneUI.java,
* javax/swing/plaf/basic/BasicDirectoryModel.java,
* javax/swing/plaf/basic/BasicEditorPaneUI.java,
* javax/swing/plaf/basic/BasicFileChooserUI.java,
* javax/swing/plaf/basic/BasicFormattedTextFieldUI.java,
* javax/swing/plaf/basic/BasicGraphicsUtils.java,
* javax/swing/plaf/basic/BasicHTML.java,
* javax/swing/plaf/basic/BasicIconFactory.java,
* javax/swing/plaf/basic/BasicInternalFrameTitlePane.java,
* javax/swing/plaf/basic/BasicInternalFrameUI.java,
* javax/swing/plaf/basic/BasicLabelUI.java,
* javax/swing/plaf/basic/BasicListUI.java,
* javax/swing/plaf/basic/BasicLookAndFeel.java,
* javax/swing/plaf/basic/BasicMenuBarUI.java,
* javax/swing/plaf/basic/BasicMenuItemUI.java,
* javax/swing/plaf/basic/BasicMenuUI.java,
* javax/swing/plaf/basic/BasicOptionPaneUI.java,
* javax/swing/plaf/basic/BasicPanelUI.java,
* javax/swing/plaf/basic/BasicPasswordFieldUI.java,
* javax/swing/plaf/basic/BasicPopupMenuUI.java,
* javax/swing/plaf/basic/BasicProgressBarUI.java,
* javax/swing/plaf/basic/BasicRadioButtonUI.java,
* javax/swing/plaf/basic/BasicRootPaneUI.java,
* javax/swing/plaf/basic/BasicScrollBarUI.java,
* javax/swing/plaf/basic/BasicScrollPaneUI.java,
* javax/swing/plaf/basic/BasicSeparatorUI.java,
* javax/swing/plaf/basic/BasicSliderUI.java,
* javax/swing/plaf/basic/BasicSpinnerUI.java,
* javax/swing/plaf/basic/BasicSplitPaneDivider.java,
* javax/swing/plaf/basic/BasicSplitPaneUI.java,
* javax/swing/plaf/basic/BasicTabbedPaneUI.java,
* javax/swing/plaf/basic/BasicTableHeaderUI.java,
* javax/swing/plaf/basic/BasicTableUI.java,
* javax/swing/plaf/basic/BasicTextAreaUI.java,
* javax/swing/plaf/basic/BasicTextFieldUI.java,
* javax/swing/plaf/basic/BasicTextPaneUI.java,
* javax/swing/plaf/basic/BasicTextUI.java,
* javax/swing/plaf/basic/BasicToggleButtonUI.java,
* javax/swing/plaf/basic/BasicToolBarUI.java,
* javax/swing/plaf/basic/BasicToolTipUI.java,
* javax/swing/plaf/basic/BasicTreeUI.java,
* javax/swing/plaf/basic/BasicViewportUI.java,
* javax/swing/plaf/metal/DefaultMetalTheme.java,
* javax/swing/plaf/metal/MetalBorders.java,
* javax/swing/plaf/metal/MetalButtonListener.java,
* javax/swing/plaf/metal/MetalButtonUI.java,
* javax/swing/plaf/metal/MetalCheckBoxIcon.java,
* javax/swing/plaf/metal/MetalCheckBoxUI.java,
* javax/swing/plaf/metal/MetalComboBoxButton.java,
* javax/swing/plaf/metal/MetalComboBoxEditor.java,
* javax/swing/plaf/metal/MetalComboBoxIcon.java,
* javax/swing/plaf/metal/MetalComboBoxUI.java,
* javax/swing/plaf/metal/MetalFileChooserUI.java,
* javax/swing/plaf/metal/MetalIconFactory.java,
* javax/swing/plaf/metal/MetalInternalFrameTitlePane.java,
* javax/swing/plaf/metal/MetalInternalFrameUI.java,
* javax/swing/plaf/metal/MetalLabelUI.java,
* javax/swing/plaf/metal/MetalLookAndFeel.java,
* javax/swing/plaf/metal/MetalMenuBarUI.java,
* javax/swing/plaf/metal/MetalProgressBarUI.java,
* javax/swing/plaf/metal/MetalRadioButtonUI.java,
* javax/swing/plaf/metal/MetalRootPaneUI.java,
* javax/swing/plaf/metal/MetalScrollBarUI.java,
* javax/swing/plaf/metal/MetalScrollButton.java,
* javax/swing/plaf/metal/MetalScrollPaneUI.java,
* javax/swing/plaf/metal/MetalSeparatorUI.java,
* javax/swing/plaf/metal/MetalSliderUI.java,
* javax/swing/plaf/metal/MetalSplitPaneDivider.java,
* javax/swing/plaf/metal/MetalSplitPaneUI.java,
* javax/swing/plaf/metal/MetalTabbedPaneUI.java,
* javax/swing/plaf/metal/MetalTextFieldUI.java,
* javax/swing/plaf/metal/MetalTheme.java,
* javax/swing/plaf/metal/MetalToggleButtonUI.java,
* javax/swing/plaf/metal/MetalToolBarUI.java,
* javax/swing/plaf/metal/MetalToolTipUI.java,
* javax/swing/plaf/metal/MetalTreeUI.java,
* javax/swing/plaf/metal/MetalUtils.java,
* javax/swing/plaf/metal/OceanTheme.java,
* javax/swing/plaf/multi/MultiButtonUI.java,
* javax/swing/plaf/multi/MultiColorChooserUI.java,
* javax/swing/plaf/multi/MultiComboBoxUI.java,
* javax/swing/plaf/multi/MultiDesktopIconUI.java,
* javax/swing/plaf/multi/MultiDesktopPaneUI.java,
* javax/swing/plaf/multi/MultiFileChooserUI.java,
* javax/swing/plaf/multi/MultiInternalFrameUI.java,
* javax/swing/plaf/multi/MultiLabelUI.java,
* javax/swing/plaf/multi/MultiListUI.java,
* javax/swing/plaf/multi/MultiLookAndFeel.java,
* javax/swing/plaf/multi/MultiMenuBarUI.java,
* javax/swing/plaf/multi/MultiMenuItemUI.java,
* javax/swing/plaf/multi/MultiOptionPaneUI.java,
* javax/swing/plaf/multi/MultiPanelUI.java,
* javax/swing/plaf/multi/MultiPopupMenuUI.java,
* javax/swing/plaf/multi/MultiProgressBarUI.java,
* javax/swing/plaf/multi/MultiRootPaneUI.java,
* javax/swing/plaf/multi/MultiScrollBarUI.java,
* javax/swing/plaf/multi/MultiScrollPaneUI.java,
* javax/swing/plaf/multi/MultiSeparatorUI.java,
* javax/swing/plaf/multi/MultiSliderUI.java,
* javax/swing/plaf/multi/MultiSpinnerUI.java,
* javax/swing/plaf/multi/MultiSplitPaneUI.java,
* javax/swing/plaf/multi/MultiTabbedPaneUI.java,
* javax/swing/plaf/multi/MultiTableHeaderUI.java,
* javax/swing/plaf/multi/MultiTableUI.java,
* javax/swing/plaf/multi/MultiTextUI.java,
* javax/swing/plaf/multi/MultiToolBarUI.java,
* javax/swing/plaf/multi/MultiToolTipUI.java,
* javax/swing/plaf/multi/MultiTreeUI.java,
* javax/swing/plaf/multi/MultiViewportUI.java,
* javax/swing/plaf/synth/SynthGraphicsUtils.java,
* javax/swing/plaf/synth/SynthLookAndFeel.java,
* javax/swing/plaf/synth/SynthPainter.java,
* javax/swing/table/AbstractTableModel.java,
* javax/swing/table/DefaultTableCellRenderer.java,
* javax/swing/table/DefaultTableColumnModel.java,
* javax/swing/table/DefaultTableModel.java,
* javax/swing/table/JTableHeader.java,
* javax/swing/table/TableCellEditor.java,
* javax/swing/table/TableCellRenderer.java,
* javax/swing/table/TableColumn.java,
* javax/swing/table/TableColumnModel.java,
* javax/swing/table/TableModel.java,
* javax/swing/text/AbstractDocument.java,
* javax/swing/text/AbstractWriter.java,
* javax/swing/text/AsyncBoxView.java,
* javax/swing/text/AttributeSet.java,
* javax/swing/text/BoxView.java,
* javax/swing/text/Caret.java,
* javax/swing/text/ComponentView.java,
* javax/swing/text/CompositeView.java,
* javax/swing/text/DefaultCaret.java,
* javax/swing/text/DefaultEditorKit.java,
* javax/swing/text/DefaultFormatter.java,
* javax/swing/text/DefaultFormatterFactory.java,
* javax/swing/text/DefaultHighlighter.java,
* javax/swing/text/DefaultStyledDocument.java,
* javax/swing/text/DocumentFilter.java,
* javax/swing/text/EditorKit.java,
* javax/swing/text/Element.java,
* javax/swing/text/ElementIterator.java,
* javax/swing/text/EmptyAttributeSet.java,
* javax/swing/text/FieldView.java,
* javax/swing/text/FlowView.java,
* javax/swing/text/GapContent.java,
* javax/swing/text/GlyphView.java,
* javax/swing/text/Highlighter.java,
* javax/swing/text/InternationalFormatter.java,
* javax/swing/text/JTextComponent.java,
* javax/swing/text/Keymap.java,
* javax/swing/text/LayeredHighlighter.java,
* javax/swing/text/LayoutQueue.java,
* javax/swing/text/MaskFormatter.java,
* javax/swing/text/MutableAttributeSet.java,
* javax/swing/text/NavigationFilter.java,
* javax/swing/text/NumberFormatter.java,
* javax/swing/text/ParagraphView.java,
* javax/swing/text/PasswordView.java,
* javax/swing/text/PlainDocument.java,
* javax/swing/text/PlainView.java,
* javax/swing/text/Position.java,
* javax/swing/text/Segment.java,
* javax/swing/text/SimpleAttributeSet.java,
* javax/swing/text/StringContent.java,
* javax/swing/text/Style.java,
* javax/swing/text/StyleConstants.java,
* javax/swing/text/StyleContext.java,
* javax/swing/text/StyledDocument.java,
* javax/swing/text/StyledEditorKit.java,
* javax/swing/text/TabExpander.java,
* javax/swing/text/TabSet.java,
* javax/swing/text/TabStop.java,
* javax/swing/text/TabableView.java,
* javax/swing/text/TableView.java,
* javax/swing/text/TextAction.java,
* javax/swing/text/Utilities.java,
* javax/swing/text/View.java,
* javax/swing/text/ViewFactory.java,
* javax/swing/text/WrappedPlainView.java,
* javax/swing/text/html/BRView.java,
* javax/swing/text/html/BlockView.java,
* javax/swing/text/html/CSS.java,
* javax/swing/text/html/CSSBorder.java,
* javax/swing/text/html/CSSParser.java,
* javax/swing/text/html/FormView.java,
* javax/swing/text/html/HRuleView.java,
* javax/swing/text/html/HTMLDocument.java,
* javax/swing/text/html/HTMLEditorKit.java,
* javax/swing/text/html/HTMLWriter.java,
* javax/swing/text/html/ImageView.java,
* javax/swing/text/html/InlineView.java,
* javax/swing/text/html/ListView.java,
* javax/swing/text/html/MinimalHTMLWriter.java,
* javax/swing/text/html/MultiAttributeSet.java,
* javax/swing/text/html/MultiStyle.java,
* javax/swing/text/html/ParagraphView.java,
* javax/swing/text/html/StyleSheet.java,
* javax/swing/text/html/TableView.java,
* javax/swing/text/html/ViewAttributeSet.java,
* javax/swing/text/html/parser/Entity.java,
* javax/swing/text/html/parser/Parser.java,
* javax/swing/text/rtf/RTFParser.java,
* javax/swing/text/rtf/RTFScanner.java,
* javax/swing/tree/AbstractLayoutCache.java,
* javax/swing/tree/DefaultMutableTreeNode.java,
* javax/swing/tree/DefaultTreeCellEditor.java,
* javax/swing/tree/DefaultTreeCellRenderer.java,
* javax/swing/tree/DefaultTreeModel.java,
* javax/swing/tree/DefaultTreeSelectionModel.java,
* javax/swing/tree/ExpandVetoException.java,
* javax/swing/tree/FixedHeightLayoutCache.java,
* javax/swing/tree/MutableTreeNode.java,
* javax/swing/tree/RowMapper.java,
* javax/swing/tree/TreeCellEditor.java,
* javax/swing/tree/TreeCellRenderer.java,
* javax/swing/tree/TreeNode.java,
* javax/swing/tree/TreePath.java,
* javax/swing/tree/TreeSelectionModel.java,
* javax/swing/tree/VariableHeightLayoutCache.java,
* javax/swing/undo/AbstractUndoableEdit.java,
* javax/swing/undo/CompoundEdit.java,
* javax/swing/undo/StateEdit.java,
* javax/swing/undo/UndoManager.java,
* javax/swing/undo/UndoableEdit.java,
* javax/tools/FileObject.java,
* javax/transaction/HeuristicCommitException.java,
* javax/transaction/HeuristicMixedException.java,
* javax/transaction/HeuristicRollbackException.java,
* javax/transaction/InvalidTransactionException.java,
* javax/transaction/NotSupportedException.java,
* javax/transaction/RollbackException.java,
* javax/transaction/Status.java,
* javax/transaction/Synchronization.java,
* javax/transaction/SystemException.java,
* javax/transaction/Transaction.java,
* javax/transaction/TransactionManager.java,
* javax/transaction/TransactionRequiredException.java,
* javax/transaction/TransactionRolledbackException.java,
* javax/transaction/UserTransaction.java,
* javax/transaction/xa/XAException.java,
* javax/transaction/xa/XAResource.java,
* javax/transaction/xa/Xid.java,
* javax/xml/XMLConstants.java,
* javax/xml/datatype/DatatypeConfigurationException.java,
* javax/xml/datatype/DatatypeConstants.java,
* javax/xml/datatype/DatatypeFactory.java,
* javax/xml/datatype/Duration.java,
* javax/xml/datatype/XMLGregorianCalendar.java,
* javax/xml/namespace/NamespaceContext.java,
* javax/xml/namespace/QName.java,
* javax/xml/parsers/DocumentBuilder.java,
* javax/xml/parsers/DocumentBuilderFactory.java,
* javax/xml/parsers/FactoryConfigurationError.java,
* javax/xml/parsers/ParserConfigurationException.java,
* javax/xml/parsers/SAXParser.java,
* javax/xml/parsers/SAXParserFactory.java,
* javax/xml/stream/EventFilter.java,
* javax/xml/stream/FactoryConfigurationError.java,
* javax/xml/stream/Location.java,
* javax/xml/stream/StreamFilter.java,
* javax/xml/stream/XMLEventFactory.java,
* javax/xml/stream/XMLEventReader.java,
* javax/xml/stream/XMLEventWriter.java,
* javax/xml/stream/XMLInputFactory.java,
* javax/xml/stream/XMLOutputFactory.java,
* javax/xml/stream/XMLReporter.java,
* javax/xml/stream/XMLResolver.java,
* javax/xml/stream/XMLStreamConstants.java,
* javax/xml/stream/XMLStreamException.java,
* javax/xml/stream/XMLStreamReader.java,
* javax/xml/stream/XMLStreamWriter.java,
* javax/xml/stream/events/Attribute.java,
* javax/xml/stream/events/Characters.java,
* javax/xml/stream/events/Comment.java,
* javax/xml/stream/events/DTD.java,
* javax/xml/stream/events/EndDocument.java,
* javax/xml/stream/events/EndElement.java,
* javax/xml/stream/events/EntityDeclaration.java,
* javax/xml/stream/events/EntityReference.java,
* javax/xml/stream/events/Namespace.java,
* javax/xml/stream/events/NotationDeclaration.java,
* javax/xml/stream/events/ProcessingInstruction.java,
* javax/xml/stream/events/StartDocument.java,
* javax/xml/stream/events/StartElement.java,
* javax/xml/stream/events/XMLEvent.java,
* javax/xml/stream/util/EventReaderDelegate.java,
* javax/xml/stream/util/StreamReaderDelegate.java,
* javax/xml/stream/util/XMLEventAllocator.java,
* javax/xml/stream/util/XMLEventConsumer.java,
* javax/xml/transform/ErrorListener.java,
* javax/xml/transform/OutputKeys.java,
* javax/xml/transform/Result.java,
* javax/xml/transform/Source.java,
* javax/xml/transform/SourceLocator.java,
* javax/xml/transform/Templates.java,
* javax/xml/transform/Transformer.java,
* javax/xml/transform/TransformerConfigurationException.java,
* javax/xml/transform/TransformerException.java,
* javax/xml/transform/TransformerFactory.java,
* javax/xml/transform/TransformerFactoryConfigurationError.java,
* javax/xml/transform/URIResolver.java,
* javax/xml/transform/dom/DOMLocator.java,
* javax/xml/transform/dom/DOMResult.java,
* javax/xml/transform/dom/DOMSource.java,
* javax/xml/transform/sax/SAXResult.java,
* javax/xml/transform/sax/SAXSource.java,
* javax/xml/transform/sax/SAXTransformerFactory.java,
* javax/xml/transform/sax/TemplatesHandler.java,
* javax/xml/transform/sax/TransformerHandler.java,
* javax/xml/transform/stream/StreamResult.java,
* javax/xml/transform/stream/StreamSource.java,
* javax/xml/validation/Schema.java,
* javax/xml/validation/SchemaFactory.java,
* javax/xml/validation/SchemaFactoryLoader.java,
* javax/xml/validation/TypeInfoProvider.java,
* javax/xml/validation/Validator.java,
* javax/xml/validation/ValidatorHandler.java,
* javax/xml/xpath/XPath.java,
* javax/xml/xpath/XPathConstants.java,
* javax/xml/xpath/XPathException.java,
* javax/xml/xpath/XPathExpression.java,
* javax/xml/xpath/XPathExpressionException.java,
* javax/xml/xpath/XPathFactory.java,
* javax/xml/xpath/XPathFactoryConfigurationException.java,
* javax/xml/xpath/XPathFunction.java,
* javax/xml/xpath/XPathFunctionException.java,
* javax/xml/xpath/XPathFunctionResolver.java,
* javax/xml/xpath/XPathVariableResolver.java,
* org/omg/CORBA/ARG_IN.java,
* org/omg/CORBA/ARG_INOUT.java,
* org/omg/CORBA/ARG_OUT.java,
* org/omg/CORBA/AnySeqHolder.java,
* org/omg/CORBA/BAD_CONTEXT.java,
* org/omg/CORBA/BAD_INV_ORDER.java,
* org/omg/CORBA/BAD_OPERATION.java,
* org/omg/CORBA/BAD_PARAM.java,
* org/omg/CORBA/BAD_POLICY.java,
* org/omg/CORBA/BAD_POLICY_TYPE.java,
* org/omg/CORBA/BAD_POLICY_VALUE.java,
* org/omg/CORBA/BAD_TYPECODE.java,
* org/omg/CORBA/COMM_FAILURE.java,
* org/omg/CORBA/CTX_RESTRICT_SCOPE.java,
* org/omg/CORBA/CompletionStatus.java,
* org/omg/CORBA/CompletionStatusHelper.java,
* org/omg/CORBA/Context.java,
* org/omg/CORBA/Current.java,
* org/omg/CORBA/CurrentHelper.java,
* org/omg/CORBA/CurrentHolder.java,
* org/omg/CORBA/CustomMarshal.java,
* org/omg/CORBA/CustomValue.java,
* org/omg/CORBA/DATA_CONVERSION.java,
* org/omg/CORBA/DataInputStream.java,
* org/omg/CORBA/DataOutputStream.java,
* org/omg/CORBA/DefinitionKind.java,
* org/omg/CORBA/DefinitionKindHelper.java,
* org/omg/CORBA/DynamicImplementation.java,
* org/omg/CORBA/FREE_MEM.java,
* org/omg/CORBA/FieldNameHelper.java,
* org/omg/CORBA/IDLTypeHelper.java,
* org/omg/CORBA/IMP_LIMIT.java,
* org/omg/CORBA/INITIALIZE.java,
* org/omg/CORBA/INTERNAL.java,
* org/omg/CORBA/INTF_REPOS.java,
* org/omg/CORBA/INVALID_TRANSACTION.java,
* org/omg/CORBA/INV_FLAG.java,
* org/omg/CORBA/INV_IDENT.java,
* org/omg/CORBA/INV_OBJREF.java,
* org/omg/CORBA/INV_POLICY.java,
* org/omg/CORBA/IRObject.java,
* org/omg/CORBA/IRObjectOperations.java,
* org/omg/CORBA/IdentifierHelper.java,
* org/omg/CORBA/LocalObject.java,
* org/omg/CORBA/LongSeqHolder.java,
* org/omg/CORBA/MARSHAL.java,
* org/omg/CORBA/NO_IMPLEMENT.java,
* org/omg/CORBA/NO_MEMORY.java,
* org/omg/CORBA/NO_PERMISSION.java,
* org/omg/CORBA/NO_RESOURCES.java,
* org/omg/CORBA/NO_RESPONSE.java,
* org/omg/CORBA/NVList.java,
* org/omg/CORBA/OBJECT_NOT_EXIST.java,
* org/omg/CORBA/OBJ_ADAPTER.java,
* org/omg/CORBA/OMGVMCID.java,
* org/omg/CORBA/ORB.java,
* org/omg/CORBA/ObjectHelper.java,
* org/omg/CORBA/ObjectHolder.java,
* org/omg/CORBA/PERSIST_STORE.java,
* org/omg/CORBA/ParameterMode.java,
* org/omg/CORBA/ParameterModeHelper.java,
* org/omg/CORBA/PolicyErrorCodeHelper.java,
* org/omg/CORBA/PolicyErrorHelper.java,
* org/omg/CORBA/PolicyErrorHolder.java,
* org/omg/CORBA/PolicyHelper.java,
* org/omg/CORBA/PolicyHolder.java,
* org/omg/CORBA/PolicyListHelper.java,
* org/omg/CORBA/PolicyListHolder.java,
* org/omg/CORBA/PolicyOperations.java,
* org/omg/CORBA/PolicyTypeHelper.java,
* org/omg/CORBA/RepositoryIdHelper.java,
* org/omg/CORBA/Request.java,
* org/omg/CORBA/ServiceDetailHelper.java,
* org/omg/CORBA/ServiceInformationHelper.java,
* org/omg/CORBA/SetOverrideTypeHelper.java,
* org/omg/CORBA/StringValueHelper.java,
* org/omg/CORBA/StructMember.java,
* org/omg/CORBA/StructMemberHelper.java,
* org/omg/CORBA/SystemException.java,
* org/omg/CORBA/TCKind.java,
* org/omg/CORBA/TRANSACTION_REQUIRED.java,
* org/omg/CORBA/TRANSACTION_ROLLEDBACK.java,
* org/omg/CORBA/TRANSIENT.java,
* org/omg/CORBA/TypeCode.java,
* org/omg/CORBA/TypeCodePackage/BadKind.java,
* org/omg/CORBA/TypeCodePackage/Bounds.java,
* org/omg/CORBA/UNSUPPORTED_POLICY.java,
* org/omg/CORBA/UNSUPPORTED_POLICY_VALUE.java,
* org/omg/CORBA/UnionMemberHelper.java,
* org/omg/CORBA/UnknownUserException.java,
* org/omg/CORBA/UnknownUserExceptionHolder.java,
* org/omg/CORBA/ValueBaseHelper.java,
* org/omg/CORBA/ValueBaseHolder.java,
* org/omg/CORBA/ValueMemberHelper.java,
* org/omg/CORBA/VersionSpecHelper.java,
* org/omg/CORBA/VisibilityHelper.java,
* org/omg/CORBA/WStringValueHelper.java,
* org/omg/CORBA/WrongTransactionHelper.java,
* org/omg/CORBA/WrongTransactionHolder.java,
* org/omg/CORBA/_IDLTypeStub.java,
* org/omg/CORBA/_PolicyStub.java,
* org/omg/CORBA/portable/CustomValue.java,
* org/omg/CORBA/portable/Delegate.java,
* org/omg/CORBA/portable/ObjectImpl.java,
* org/omg/CORBA/portable/StreamableValue.java,
* org/omg/CORBA/portable/ValueBase.java,
* org/omg/CORBA_2_3/ORB.java,
* org/omg/CORBA_2_3/portable/Delegate.java,
* org/omg/CORBA_2_3/portable/InputStream.java,
* org/omg/CORBA_2_3/portable/ObjectImpl.java,
* org/omg/CORBA_2_3/portable/OutputStream.java,
* org/omg/CosNaming/BindingHelper.java,
* org/omg/CosNaming/BindingIterator.java,
* org/omg/CosNaming/BindingIteratorHelper.java,
* org/omg/CosNaming/BindingIteratorOperations.java,
* org/omg/CosNaming/BindingIteratorPOA.java,
* org/omg/CosNaming/BindingType.java,
* org/omg/CosNaming/BindingTypeHelper.java,
* org/omg/CosNaming/IstringHelper.java,
* org/omg/CosNaming/NameComponentHelper.java,
* org/omg/CosNaming/NameHelper.java,
* org/omg/CosNaming/NamingContext.java,
* org/omg/CosNaming/NamingContextExtHelper.java,
* org/omg/CosNaming/NamingContextExtPOA.java,
* org/omg/CosNaming/NamingContextExtPackage/InvalidAddress.java,
* org/omg/CosNaming/NamingContextHelper.java,
* org/omg/CosNaming/NamingContextPOA.java,
* org/omg/CosNaming/NamingContextPackage/AlreadyBound.java,
* org/omg/CosNaming/NamingContextPackage/CannotProceed.java,
* org/omg/CosNaming/NamingContextPackage/CannotProceedHelper.java,
* org/omg/CosNaming/NamingContextPackage/InvalidName.java,
* org/omg/CosNaming/NamingContextPackage/InvalidNameHelper.java,
* org/omg/CosNaming/NamingContextPackage/NotEmptyHelper.java,
* org/omg/CosNaming/NamingContextPackage/NotFound.java,
* org/omg/CosNaming/NamingContextPackage/NotFoundHelper.java,
* org/omg/CosNaming/NamingContextPackage/NotFoundReason.java,
* org/omg/CosNaming/NamingContextPackage/NotFoundReasonHelper.java,
* org/omg/CosNaming/NamingContextPackage/NotFoundReasonHolder.java,
* org/omg/CosNaming/_BindingIteratorImplBase.java,
* org/omg/CosNaming/_BindingIteratorStub.java,
* org/omg/CosNaming/_NamingContextExtStub.java,
* org/omg/CosNaming/_NamingContextStub.java,
* org/omg/Dynamic/Parameter.java,
* org/omg/DynamicAny/AnySeqHelper.java,
* org/omg/DynamicAny/DynAny.java,
* org/omg/DynamicAny/DynAnyFactoryHelper.java,
* org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCode.java,
* org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCodeHelper.java,
* org/omg/DynamicAny/DynAnyHelper.java,
* org/omg/DynamicAny/DynAnyPackage/InvalidValue.java,
* org/omg/DynamicAny/DynAnyPackage/InvalidValueHelper.java,
* org/omg/DynamicAny/DynAnyPackage/TypeMismatch.java,
* org/omg/DynamicAny/DynAnyPackage/TypeMismatchHelper.java,
* org/omg/DynamicAny/DynAnySeqHelper.java,
* org/omg/DynamicAny/DynArrayHelper.java,
* org/omg/DynamicAny/DynEnumHelper.java,
* org/omg/DynamicAny/DynFixedHelper.java,
* org/omg/DynamicAny/DynSequenceHelper.java,
* org/omg/DynamicAny/DynStructHelper.java,
* org/omg/DynamicAny/DynUnionHelper.java,
* org/omg/DynamicAny/DynValueBox.java,
* org/omg/DynamicAny/DynValueCommonOperations.java,
* org/omg/DynamicAny/DynValueHelper.java,
* org/omg/DynamicAny/FieldNameHelper.java,
* org/omg/DynamicAny/NameDynAnyPairHelper.java,
* org/omg/DynamicAny/NameDynAnyPairSeqHelper.java,
* org/omg/DynamicAny/NameValuePair.java,
* org/omg/DynamicAny/NameValuePairHelper.java,
* org/omg/DynamicAny/NameValuePairSeqHelper.java,
* org/omg/DynamicAny/_DynAnyFactoryStub.java,
* org/omg/DynamicAny/_DynAnyStub.java,
* org/omg/DynamicAny/_DynArrayStub.java,
* org/omg/DynamicAny/_DynEnumStub.java,
* org/omg/DynamicAny/_DynFixedStub.java,
* org/omg/DynamicAny/_DynSequenceStub.java,
* org/omg/DynamicAny/_DynStructStub.java,
* org/omg/DynamicAny/_DynUnionStub.java,
* org/omg/DynamicAny/_DynValueStub.java,
* org/omg/IOP/Codec.java,
* org/omg/IOP/CodecFactory.java,
* org/omg/IOP/CodecFactoryHelper.java,
* org/omg/IOP/CodecFactoryOperations.java,
* org/omg/IOP/CodecFactoryPackage/UnknownEncoding.java,
* org/omg/IOP/CodecFactoryPackage/UnknownEncodingHelper.java,
* org/omg/IOP/CodecOperations.java,
* org/omg/IOP/CodecPackage/FormatMismatch.java,
* org/omg/IOP/CodecPackage/FormatMismatchHelper.java,
* org/omg/IOP/CodecPackage/InvalidTypeForEncoding.java,
* org/omg/IOP/CodecPackage/InvalidTypeForEncodingHelper.java,
* org/omg/IOP/CodecPackage/TypeMismatch.java,
* org/omg/IOP/CodecPackage/TypeMismatchHelper.java,
* org/omg/IOP/ComponentIdHelper.java,
* org/omg/IOP/Encoding.java,
* org/omg/IOP/IOR.java,
* org/omg/IOP/IORHelper.java,
* org/omg/IOP/IORHolder.java,
* org/omg/IOP/MultipleComponentProfileHelper.java,
* org/omg/IOP/MultipleComponentProfileHolder.java,
* org/omg/IOP/ProfileIdHelper.java,
* org/omg/IOP/ServiceContext.java,
* org/omg/IOP/ServiceContextHelper.java,
* org/omg/IOP/ServiceContextHolder.java,
* org/omg/IOP/ServiceContextListHelper.java,
* org/omg/IOP/ServiceContextListHolder.java,
* org/omg/IOP/ServiceIdHelper.java,
* org/omg/IOP/TaggedComponent.java,
* org/omg/IOP/TaggedComponentHelper.java,
* org/omg/IOP/TaggedComponentHolder.java,
* org/omg/IOP/TaggedProfile.java,
* org/omg/IOP/TaggedProfileHelper.java,
* org/omg/IOP/TaggedProfileHolder.java,
* org/omg/IOP/TransactionService.java,
* org/omg/Messaging/SYNC_WITH_TRANSPORT.java,
* org/omg/Messaging/SyncScopeHelper.java,
* org/omg/PortableInterceptor/AdapterManagerIdHelper.java,
* org/omg/PortableInterceptor/AdapterNameHelper.java,
* org/omg/PortableInterceptor/AdapterStateHelper.java,
* org/omg/PortableInterceptor/ClientRequestInfo.java,
* org/omg/PortableInterceptor/ClientRequestInfoOperations.java,
* org/omg/PortableInterceptor/ClientRequestInterceptor.java,
* org/omg/PortableInterceptor/ClientRequestInterceptorOperations.java,
* org/omg/PortableInterceptor/Current.java,
* org/omg/PortableInterceptor/CurrentHelper.java,
* org/omg/PortableInterceptor/CurrentOperations.java,
* org/omg/PortableInterceptor/ForwardRequest.java,
* org/omg/PortableInterceptor/ForwardRequestHelper.java,
* org/omg/PortableInterceptor/IORInfo.java,
* org/omg/PortableInterceptor/IORInfoOperations.java,
* org/omg/PortableInterceptor/IORInterceptor.java,
* org/omg/PortableInterceptor/IORInterceptorOperations.java,
* org/omg/PortableInterceptor/IORInterceptor_3_0.java,
* org/omg/PortableInterceptor/IORInterceptor_3_0Helper.java,
* org/omg/PortableInterceptor/IORInterceptor_3_0Holder.java,
* org/omg/PortableInterceptor/IORInterceptor_3_0Operations.java,
* org/omg/PortableInterceptor/Interceptor.java,
* org/omg/PortableInterceptor/InterceptorOperations.java,
* org/omg/PortableInterceptor/InvalidSlot.java,
* org/omg/PortableInterceptor/InvalidSlotHelper.java,
* org/omg/PortableInterceptor/LOCATION_FORWARD.java,
* org/omg/PortableInterceptor/ORBIdHelper.java,
* org/omg/PortableInterceptor/ORBInitInfo.java,
* org/omg/PortableInterceptor/ORBInitInfoOperations.java,
* org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateName.java,
* org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateNameHelper.java,
* org/omg/PortableInterceptor/ORBInitInfoPackage/InvalidName.java,
* org/omg/PortableInterceptor/ORBInitInfoPackage/InvalidNameHelper.java,
* org/omg/PortableInterceptor/ORBInitInfoPackage/ObjectIdHelper.java,
* org/omg/PortableInterceptor/ORBInitializer.java,
* org/omg/PortableInterceptor/ORBInitializerOperations.java,
* org/omg/PortableInterceptor/ObjectIdHelper.java,
* org/omg/PortableInterceptor/ObjectReferenceFactory.java,
* org/omg/PortableInterceptor/ObjectReferenceFactoryHelper.java,
* org/omg/PortableInterceptor/ObjectReferenceFactoryHolder.java,
* org/omg/PortableInterceptor/ObjectReferenceTemplate.java,
* org/omg/PortableInterceptor/ObjectReferenceTemplateHelper.java,
* org/omg/PortableInterceptor/ObjectReferenceTemplateHolder.java,
* org/omg/PortableInterceptor/ObjectReferenceTemplateSeqHelper.java,
* org/omg/PortableInterceptor/ObjectReferenceTemplateSeqHolder.java,
* org/omg/PortableInterceptor/PolicyFactory.java,
* org/omg/PortableInterceptor/PolicyFactoryOperations.java,
* org/omg/PortableInterceptor/RequestInfo.java,
* org/omg/PortableInterceptor/RequestInfoOperations.java,
* org/omg/PortableInterceptor/SUCCESSFUL.java,
* org/omg/PortableInterceptor/SYSTEM_EXCEPTION.java,
* org/omg/PortableInterceptor/ServerIdHelper.java,
* org/omg/PortableInterceptor/ServerRequestInfo.java,
* org/omg/PortableInterceptor/ServerRequestInfoOperations.java,
* org/omg/PortableInterceptor/ServerRequestInterceptor.java,
* org/omg/PortableInterceptor/ServerRequestInterceptorOperations.java,
* org/omg/PortableInterceptor/TRANSPORT_RETRY.java,
* org/omg/PortableInterceptor/USER_EXCEPTION.java,
* org/omg/PortableInterceptor/_IORInterceptor_3_0Stub.java,
* org/omg/PortableServer/AdapterActivator.java,
* org/omg/PortableServer/AdapterActivatorOperations.java,
* org/omg/PortableServer/Current.java,
* org/omg/PortableServer/CurrentHelper.java,
* org/omg/PortableServer/CurrentOperations.java,
* org/omg/PortableServer/CurrentPackage/NoContext.java,
* org/omg/PortableServer/CurrentPackage/NoContextHelper.java,
* org/omg/PortableServer/DynamicImplementation.java,
* org/omg/PortableServer/ForwardRequest.java,
* org/omg/PortableServer/ForwardRequestHelper.java,
* org/omg/PortableServer/ID_ASSIGNMENT_POLICY_ID.java,
* org/omg/PortableServer/ID_UNIQUENESS_POLICY_ID.java,
* org/omg/PortableServer/IMPLICIT_ACTIVATION_POLICY_ID.java,
* org/omg/PortableServer/IdAssignmentPolicy.java,
* org/omg/PortableServer/IdAssignmentPolicyOperations.java,
* org/omg/PortableServer/IdAssignmentPolicyValue.java,
* org/omg/PortableServer/IdUniquenessPolicy.java,
* org/omg/PortableServer/IdUniquenessPolicyOperations.java,
* org/omg/PortableServer/IdUniquenessPolicyValue.java,
* org/omg/PortableServer/ImplicitActivationPolicy.java,
* org/omg/PortableServer/ImplicitActivationPolicyOperations.java,
* org/omg/PortableServer/ImplicitActivationPolicyValue.java,
* org/omg/PortableServer/LifespanPolicy.java,
* org/omg/PortableServer/LifespanPolicyOperations.java,
* org/omg/PortableServer/LifespanPolicyValue.java,
* org/omg/PortableServer/POA.java,
* org/omg/PortableServer/POAHelper.java,
* org/omg/PortableServer/POAManager.java,
* org/omg/PortableServer/POAManagerOperations.java,
* org/omg/PortableServer/POAManagerPackage/AdapterInactive.java,
* org/omg/PortableServer/POAManagerPackage/AdapterInactiveHelper.java,
* org/omg/PortableServer/POAManagerPackage/State.java,
* org/omg/PortableServer/POAOperations.java,
* org/omg/PortableServer/POAPackage/AdapterAlreadyExists.java,
* org/omg/PortableServer/POAPackage/AdapterAlreadyExistsHelper.java,
* org/omg/PortableServer/POAPackage/AdapterNonExistent.java,
* org/omg/PortableServer/POAPackage/AdapterNonExistentHelper.java,
* org/omg/PortableServer/POAPackage/InvalidPolicy.java,
* org/omg/PortableServer/POAPackage/InvalidPolicyHelper.java,
* org/omg/PortableServer/POAPackage/NoServant.java,
* org/omg/PortableServer/POAPackage/NoServantHelper.java,
* org/omg/PortableServer/POAPackage/ObjectAlreadyActive.java,
* org/omg/PortableServer/POAPackage/ObjectAlreadyActiveHelper.java,
* org/omg/PortableServer/POAPackage/ObjectNotActive.java,
* org/omg/PortableServer/POAPackage/ObjectNotActiveHelper.java,
* org/omg/PortableServer/POAPackage/ServantAlreadyActive.java,
* org/omg/PortableServer/POAPackage/ServantAlreadyActiveHelper.java,
* org/omg/PortableServer/POAPackage/ServantNotActive.java,
* org/omg/PortableServer/POAPackage/ServantNotActiveHelper.java,
* org/omg/PortableServer/POAPackage/WrongAdapter.java,
* org/omg/PortableServer/POAPackage/WrongAdapterHelper.java,
* org/omg/PortableServer/POAPackage/WrongPolicy.java,
* org/omg/PortableServer/POAPackage/WrongPolicyHelper.java,
* org/omg/PortableServer/RequestProcessingPolicy.java,
* org/omg/PortableServer/RequestProcessingPolicyOperations.java,
* org/omg/PortableServer/RequestProcessingPolicyValue.java,
* org/omg/PortableServer/Servant.java,
* org/omg/PortableServer/ServantActivator.java,
* org/omg/PortableServer/ServantActivatorHelper.java,
* org/omg/PortableServer/ServantActivatorOperations.java,
* org/omg/PortableServer/ServantActivatorPOA.java,
* org/omg/PortableServer/ServantLocator.java,
* org/omg/PortableServer/ServantLocatorHelper.java,
* org/omg/PortableServer/ServantLocatorOperations.java,
* org/omg/PortableServer/ServantLocatorPOA.java,
* org/omg/PortableServer/ServantLocatorPackage/CookieHolder.java,
* org/omg/PortableServer/ServantManager.java,
* org/omg/PortableServer/ServantManagerOperations.java,
* org/omg/PortableServer/ServantRetentionPolicy.java,
* org/omg/PortableServer/ServantRetentionPolicyOperations.java,
* org/omg/PortableServer/ServantRetentionPolicyValue.java,
* org/omg/PortableServer/ThreadPolicy.java,
* org/omg/PortableServer/ThreadPolicyOperations.java,
* org/omg/PortableServer/ThreadPolicyValue.java,
* org/omg/PortableServer/_ServantActivatorStub.java,
* org/omg/PortableServer/_ServantLocatorStub.java,
* org/omg/PortableServer/portable/Delegate.java,
* org/omg/SendingContext/RunTime.java,
* org/omg/SendingContext/RunTimeOperations.java,
* sun/misc/Service.java,
* sun/misc/ServiceConfigurationError.java,
* sun/reflect/annotation/AnnotationInvocationHandler.java,
* sun/reflect/annotation/AnnotationParser.java,
* sun/reflect/annotation/AnnotationType.java,
* sun/reflect/annotation/EnumConstantNotPresentExceptionProxy.java,
* sun/reflect/annotation/ExceptionProxy.java,
* tools/com/sun/javadoc/ClassDoc.java,
* tools/com/sun/javadoc/ConstructorDoc.java,
* tools/com/sun/javadoc/Doc.java,
* tools/com/sun/javadoc/DocErrorReporter.java,
* tools/com/sun/javadoc/Doclet.java,
* tools/com/sun/javadoc/ExecutableMemberDoc.java,
* tools/com/sun/javadoc/FieldDoc.java,
* tools/com/sun/javadoc/MemberDoc.java,
* tools/com/sun/javadoc/MethodDoc.java,
* tools/com/sun/javadoc/PackageDoc.java,
* tools/com/sun/javadoc/ParamTag.java,
* tools/com/sun/javadoc/Parameter.java,
* tools/com/sun/javadoc/ProgramElementDoc.java,
* tools/com/sun/javadoc/RootDoc.java,
* tools/com/sun/javadoc/SeeTag.java,
* tools/com/sun/javadoc/SerialFieldTag.java,
* tools/com/sun/javadoc/Tag.java,
* tools/com/sun/javadoc/ThrowsTag.java,
* tools/com/sun/javadoc/Type.java,
* tools/com/sun/javadoc/TypeVariable.java,
* tools/com/sun/tools/javadoc/Main.java,
* tools/com/sun/tools/javah/Main.java,
* tools/external/asm/org/objectweb/asm/AnnotationVisitor.java,
* tools/external/asm/org/objectweb/asm/AnnotationWriter.java,
* tools/external/asm/org/objectweb/asm/Attribute.java,
* tools/external/asm/org/objectweb/asm/ByteVector.java,
* tools/external/asm/org/objectweb/asm/ClassAdapter.java,
* tools/external/asm/org/objectweb/asm/ClassReader.java,
* tools/external/asm/org/objectweb/asm/ClassVisitor.java,
* tools/external/asm/org/objectweb/asm/ClassWriter.java,
* tools/external/asm/org/objectweb/asm/Edge.java,
* tools/external/asm/org/objectweb/asm/FieldVisitor.java,
* tools/external/asm/org/objectweb/asm/FieldWriter.java,
* tools/external/asm/org/objectweb/asm/Handler.java,
* tools/external/asm/org/objectweb/asm/Item.java,
* tools/external/asm/org/objectweb/asm/Label.java,
* tools/external/asm/org/objectweb/asm/MethodAdapter.java,
* tools/external/asm/org/objectweb/asm/MethodVisitor.java,
* tools/external/asm/org/objectweb/asm/MethodWriter.java,
* tools/external/asm/org/objectweb/asm/Opcodes.java,
* tools/external/asm/org/objectweb/asm/Type.java,
* tools/external/asm/org/objectweb/asm/attrs/StackMapAttribute.java,
* tools/external/asm/org/objectweb/asm/attrs/StackMapFrame.java,
* tools/external/asm/org/objectweb/asm/attrs/StackMapTableAttribute.java,
* tools/external/asm/org/objectweb/asm/attrs/StackMapType.java,
* tools/external/asm/org/objectweb/asm/commons/AdviceAdapter.java,
* tools/external/asm/org/objectweb/asm/commons/EmptyVisitor.java,
* tools/external/asm/org/objectweb/asm/commons/GeneratorAdapter.java,
* tools/external/asm/org/objectweb/asm/commons/LocalVariablesSorter.java,
* tools/external/asm/org/objectweb/asm/commons/Method.java,
* tools/external/asm/org/objectweb/asm/commons/SerialVersionUIDAdder.java,
* tools/external/asm/org/objectweb/asm/commons/StaticInitMerger.java,
* tools/external/asm/org/objectweb/asm/commons/TableSwitchGenerator.java,
* tools/external/asm/org/objectweb/asm/optimizer/AnnotationConstantsCollector.java,
* tools/external/asm/org/objectweb/asm/optimizer/ClassConstantsCollector.java,
* tools/external/asm/org/objectweb/asm/optimizer/ClassOptimizer.java,
* tools/external/asm/org/objectweb/asm/optimizer/Constant.java,
* tools/external/asm/org/objectweb/asm/optimizer/ConstantPool.java,
* tools/external/asm/org/objectweb/asm/optimizer/FieldConstantsCollector.java,
* tools/external/asm/org/objectweb/asm/optimizer/JarOptimizer.java,
* tools/external/asm/org/objectweb/asm/optimizer/MethodConstantsCollector.java,
* tools/external/asm/org/objectweb/asm/optimizer/MethodOptimizer.java,
* tools/external/asm/org/objectweb/asm/optimizer/NameMapping.java,
* tools/external/asm/org/objectweb/asm/optimizer/Shrinker.java,
* tools/external/asm/org/objectweb/asm/signature/SignatureReader.java,
* tools/external/asm/org/objectweb/asm/signature/SignatureVisitor.java,
* tools/external/asm/org/objectweb/asm/signature/SignatureWriter.java,
* tools/external/asm/org/objectweb/asm/tree/AbstractInsnNode.java,
* tools/external/asm/org/objectweb/asm/tree/AnnotationNode.java,
* tools/external/asm/org/objectweb/asm/tree/ClassNode.java,
* tools/external/asm/org/objectweb/asm/tree/FieldInsnNode.java,
* tools/external/asm/org/objectweb/asm/tree/FieldNode.java,
* tools/external/asm/org/objectweb/asm/tree/IincInsnNode.java,
* tools/external/asm/org/objectweb/asm/tree/InnerClassNode.java,
* tools/external/asm/org/objectweb/asm/tree/InsnNode.java,
* tools/external/asm/org/objectweb/asm/tree/IntInsnNode.java,
* tools/external/asm/org/objectweb/asm/tree/JumpInsnNode.java,
* tools/external/asm/org/objectweb/asm/tree/LabelNode.java,
* tools/external/asm/org/objectweb/asm/tree/LdcInsnNode.java,
* tools/external/asm/org/objectweb/asm/tree/LineNumberNode.java,
* tools/external/asm/org/objectweb/asm/tree/LocalVariableNode.java,
* tools/external/asm/org/objectweb/asm/tree/LookupSwitchInsnNode.java,
* tools/external/asm/org/objectweb/asm/tree/MemberNode.java,
* tools/external/asm/org/objectweb/asm/tree/MethodInsnNode.java,
* tools/external/asm/org/objectweb/asm/tree/MethodNode.java,
* tools/external/asm/org/objectweb/asm/tree/MultiANewArrayInsnNode.java,
* tools/external/asm/org/objectweb/asm/tree/TableSwitchInsnNode.java,
* tools/external/asm/org/objectweb/asm/tree/TryCatchBlockNode.java,
* tools/external/asm/org/objectweb/asm/tree/TypeInsnNode.java,
* tools/external/asm/org/objectweb/asm/tree/VarInsnNode.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/Analyzer.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/AnalyzerException.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/BasicInterpreter.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/BasicValue.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/BasicVerifier.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/DataflowInterpreter.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/DataflowValue.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/Frame.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/IntMap.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/Interpreter.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/SimpleVerifier.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/SmallSet.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/Subroutine.java,
* tools/external/asm/org/objectweb/asm/tree/analysis/Value.java,
* tools/external/asm/org/objectweb/asm/util/ASMifierAbstractVisitor.java,
* tools/external/asm/org/objectweb/asm/util/ASMifierAnnotationVisitor.java,
* tools/external/asm/org/objectweb/asm/util/ASMifierClassVisitor.java,
* tools/external/asm/org/objectweb/asm/util/ASMifierFieldVisitor.java,
* tools/external/asm/org/objectweb/asm/util/ASMifierMethodVisitor.java,
* tools/external/asm/org/objectweb/asm/util/AbstractVisitor.java,
* tools/external/asm/org/objectweb/asm/util/CheckAnnotationAdapter.java,
* tools/external/asm/org/objectweb/asm/util/CheckClassAdapter.java,
* tools/external/asm/org/objectweb/asm/util/CheckMethodAdapter.java,
* tools/external/asm/org/objectweb/asm/util/TraceAbstractVisitor.java,
* tools/external/asm/org/objectweb/asm/util/TraceAnnotationVisitor.java,
* tools/external/asm/org/objectweb/asm/util/TraceClassVisitor.java,
* tools/external/asm/org/objectweb/asm/util/TraceFieldVisitor.java,
* tools/external/asm/org/objectweb/asm/util/TraceMethodVisitor.java,
* tools/external/asm/org/objectweb/asm/util/TraceSignatureVisitor.java,
* tools/external/asm/org/objectweb/asm/util/attrs/ASMStackMapAttribute.java,
* tools/external/asm/org/objectweb/asm/util/attrs/ASMStackMapTableAttribute.java,
* tools/external/asm/org/objectweb/asm/util/attrs/ASMifiable.java,
* tools/external/asm/org/objectweb/asm/util/attrs/Traceable.java,
* tools/external/asm/org/objectweb/asm/xml/ASMContentHandler.java,
* tools/external/asm/org/objectweb/asm/xml/Processor.java,
* tools/external/asm/org/objectweb/asm/xml/SAXAdapter.java,
* tools/external/asm/org/objectweb/asm/xml/SAXAnnotationAdapter.java,
* tools/external/asm/org/objectweb/asm/xml/SAXClassAdapter.java,
* tools/external/asm/org/objectweb/asm/xml/SAXCodeAdapter.java,
* tools/external/asm/org/objectweb/asm/xml/SAXFieldAdapter.java,
* tools/generated/gnu/classpath/tools/gjdoc/expr/JavaLexer.java,
* tools/generated/gnu/classpath/tools/gjdoc/expr/JavaRecognizer.java,
* tools/generated/gnu/classpath/tools/gjdoc/expr/JavaTokenTypes.java,
* tools/gnu/classpath/tools/FileSystemClassLoader.java,
* tools/gnu/classpath/tools/IOToolkit.java,
* tools/gnu/classpath/tools/MalformedInputEvent.java,
* tools/gnu/classpath/tools/MalformedInputListener.java,
* tools/gnu/classpath/tools/NotifyingInputStreamReader.java,
* tools/gnu/classpath/tools/StringToolkit.java,
* tools/gnu/classpath/tools/appletviewer/AppletSecurityManager.java,
* tools/gnu/classpath/tools/appletviewer/AppletTag.java,
* tools/gnu/classpath/tools/appletviewer/CommonAppletContext.java,
* tools/gnu/classpath/tools/appletviewer/CommonAppletStub.java,
* tools/gnu/classpath/tools/appletviewer/Main.java,
* tools/gnu/classpath/tools/appletviewer/PluginAppletViewer.java,
* tools/gnu/classpath/tools/appletviewer/PluginAppletWindow.java,
* tools/gnu/classpath/tools/appletviewer/StandaloneAppletViewer.java,
* tools/gnu/classpath/tools/appletviewer/StandaloneAppletWindow.java,
* tools/gnu/classpath/tools/appletviewer/TagParser.java,
* tools/gnu/classpath/tools/common/CallbackUtil.java,
* tools/gnu/classpath/tools/common/ClasspathToolParser.java,
* tools/gnu/classpath/tools/common/Persistent.java,
* tools/gnu/classpath/tools/common/ProviderUtil.java,
* tools/gnu/classpath/tools/common/SecurityProviderInfo.java,
* tools/gnu/classpath/tools/doclets/AbstractDoclet.java,
* tools/gnu/classpath/tools/doclets/DocletConfigurationException.java,
* tools/gnu/classpath/tools/doclets/DocletOption.java,
* tools/gnu/classpath/tools/doclets/DocletOptionColonSeparated.java,
* tools/gnu/classpath/tools/doclets/DocletOptionFile.java,
* tools/gnu/classpath/tools/doclets/DocletOptionFlag.java,
* tools/gnu/classpath/tools/doclets/DocletOptionPackageWildcard.java,
* tools/gnu/classpath/tools/doclets/DocletOptionString.java,
* tools/gnu/classpath/tools/doclets/InlineTagRenderer.java,
* tools/gnu/classpath/tools/doclets/InvalidPackageWildcardException.java,
* tools/gnu/classpath/tools/doclets/PackageGroup.java,
* tools/gnu/classpath/tools/doclets/PackageMatcher.java,
* tools/gnu/classpath/tools/doclets/StandardTaglet.java,
* tools/gnu/classpath/tools/doclets/TagletPrinter.java,
* tools/gnu/classpath/tools/doclets/debugdoclet/DebugDoclet.java,
* tools/gnu/classpath/tools/doclets/htmldoclet/CssClass.java,
* tools/gnu/classpath/tools/doclets/htmldoclet/ExternalDocSet.java,
* tools/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet.java,
* tools/gnu/classpath/tools/doclets/htmldoclet/HtmlPage.java,
* tools/gnu/classpath/tools/doclets/htmldoclet/HtmlTagletContext.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/Driver.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/Driver1_4.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/HtmlRepairer.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/TargetContext.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTranslet.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletConfigurationException.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletException.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletOptions.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/JarClassLoader.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/OutputFileInfo.java,
* tools/gnu/classpath/tools/getopt/FileArgumentCallback.java,
* tools/gnu/classpath/tools/getopt/Option.java,
* tools/gnu/classpath/tools/getopt/OptionGroup.java,
* tools/gnu/classpath/tools/getopt/Parser.java,
* tools/gnu/classpath/tools/gjdoc/AbstractTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/ArrayCharacterIterator.java,
* tools/gnu/classpath/tools/gjdoc/ClassDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/ClassDocProxy.java,
* tools/gnu/classpath/tools/gjdoc/ClassDocReflectedImpl.java,
* tools/gnu/classpath/tools/gjdoc/ConstructorDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/Debug.java,
* tools/gnu/classpath/tools/gjdoc/DirectoryTree.java,
* tools/gnu/classpath/tools/gjdoc/DocImpl.java,
* tools/gnu/classpath/tools/gjdoc/ErrorReporter.java,
* tools/gnu/classpath/tools/gjdoc/ExecutableMemberDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/FieldDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/GjdocPackageDoc.java,
* tools/gnu/classpath/tools/gjdoc/GjdocRootDoc.java,
* tools/gnu/classpath/tools/gjdoc/InheritDocTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/JavadocWrapper.java,
* tools/gnu/classpath/tools/gjdoc/LinkTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/Main.java,
* tools/gnu/classpath/tools/gjdoc/MemberDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/MethodDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/PackageDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/ParamTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/ParameterImpl.java,
* tools/gnu/classpath/tools/gjdoc/ParseException.java,
* tools/gnu/classpath/tools/gjdoc/Parser.java,
* tools/gnu/classpath/tools/gjdoc/ProgramElementDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/RootDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/SeeTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/SerialFieldTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/SourcePositionImpl.java,
* tools/gnu/classpath/tools/gjdoc/TagContainer.java,
* tools/gnu/classpath/tools/gjdoc/TagImpl.java,
* tools/gnu/classpath/tools/gjdoc/TemporaryStore.java,
* tools/gnu/classpath/tools/gjdoc/TextTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/ThrowsTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/Timer.java,
* tools/gnu/classpath/tools/gjdoc/TimerDoclet.java,
* tools/gnu/classpath/tools/gjdoc/TypeImpl.java,
* tools/gnu/classpath/tools/gjdoc/TypeVariableImpl.java,
* tools/gnu/classpath/tools/gjdoc/ValueTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/WritableType.java,
* tools/gnu/classpath/tools/gjdoc/expr/AdditionExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/AndExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/BinaryBitwiseExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/BinaryComputationExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/BinaryEqualityExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/BinaryExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/BinaryLogicalExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/BinaryRelationExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/BinaryShiftExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/BitShiftRightExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/CircularExpressionException.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConditionalExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantBoolean.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantByte.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantChar.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantDouble.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantFloat.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantInteger.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantLong.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantNull.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantShort.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantString.java,
* tools/gnu/classpath/tools/gjdoc/expr/Context.java,
* tools/gnu/classpath/tools/gjdoc/expr/DivisionExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/EqualExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/Evaluator.java,
* tools/gnu/classpath/tools/gjdoc/expr/EvaluatorEnvironment.java,
* tools/gnu/classpath/tools/gjdoc/expr/ExclusiveOrExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/Expression.java,
* tools/gnu/classpath/tools/gjdoc/expr/GreaterThanExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/GreaterThanOrEqualExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/IdentifierExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/IllegalExpressionException.java,
* tools/gnu/classpath/tools/gjdoc/expr/InclusiveOrExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/LessThanExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/LessThanOrEqualExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/LogicalAndExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/LogicalNotExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/LogicalOrExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/ModuloExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/MultiplicationExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/NegateExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/NotEqualExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/NotExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/ShiftLeftExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/ShiftRightExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/SubtractionExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/Type.java,
* tools/gnu/classpath/tools/gjdoc/expr/TypeCastExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/UnaryExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/UnknownIdentifierException.java,
* tools/gnu/classpath/tools/jar/Creator.java,
* tools/gnu/classpath/tools/jar/Indexer.java,
* tools/gnu/classpath/tools/jar/Main.java,
* tools/gnu/classpath/tools/jar/Updater.java,
* tools/gnu/classpath/tools/jarsigner/JarVerifier.java,
* tools/gnu/classpath/tools/jarsigner/Main.java,
* tools/gnu/classpath/tools/jarsigner/SFHelper.java,
* tools/gnu/classpath/tools/java2xhtml/Java2xhtml.java,
* tools/gnu/classpath/tools/javah/ClassWrapper.java,
* tools/gnu/classpath/tools/javah/CniPrintStream.java,
* tools/gnu/classpath/tools/javah/GcjhMain.java,
* tools/gnu/classpath/tools/javah/JniHelper.java,
* tools/gnu/classpath/tools/javah/JniIncludePrinter.java,
* tools/gnu/classpath/tools/javah/JniStubPrinter.java,
* tools/gnu/classpath/tools/javah/Keywords.java,
* tools/gnu/classpath/tools/javah/Main.java,
* tools/gnu/classpath/tools/javah/MethodHelper.java,
* tools/gnu/classpath/tools/keytool/CACertCmd.java,
* tools/gnu/classpath/tools/keytool/CertReqCmd.java,
* tools/gnu/classpath/tools/keytool/Command.java,
* tools/gnu/classpath/tools/keytool/DeleteCmd.java,
* tools/gnu/classpath/tools/keytool/ExportCmd.java,
* tools/gnu/classpath/tools/keytool/GenKeyCmd.java,
* tools/gnu/classpath/tools/keytool/IdentityDBCmd.java,
* tools/gnu/classpath/tools/keytool/ImportCmd.java,
* tools/gnu/classpath/tools/keytool/KeyCloneCmd.java,
* tools/gnu/classpath/tools/keytool/KeyPasswdCmd.java,
* tools/gnu/classpath/tools/keytool/ListCmd.java,
* tools/gnu/classpath/tools/keytool/PrintCertCmd.java,
* tools/gnu/classpath/tools/keytool/SelfCertCmd.java,
* tools/gnu/classpath/tools/keytool/StorePasswdCmd.java,
* tools/gnu/classpath/tools/orbd/Main.java,
* tools/gnu/classpath/tools/orbd/PersistentContext.java,
* tools/gnu/classpath/tools/orbd/PersistentContextMap.java,
* tools/gnu/classpath/tools/orbd/PersistentMap.java,
* tools/gnu/classpath/tools/rmic/AbstractMethodGenerator.java,
* tools/gnu/classpath/tools/rmic/ClassRmicCompiler.java,
* tools/gnu/classpath/tools/rmic/CompilationError.java,
* tools/gnu/classpath/tools/rmic/Generator.java,
* tools/gnu/classpath/tools/rmic/GiopIo.java,
* tools/gnu/classpath/tools/rmic/HashFinder.java,
* tools/gnu/classpath/tools/rmic/Main.java,
* tools/gnu/classpath/tools/rmic/MethodGenerator.java,
* tools/gnu/classpath/tools/rmic/RMICException.java,
* tools/gnu/classpath/tools/rmic/RmiMethodGenerator.java,
* tools/gnu/classpath/tools/rmic/RmicBackend.java,
* tools/gnu/classpath/tools/rmic/SourceGiopRmicCompiler.java,
* tools/gnu/classpath/tools/rmic/SourceRmicCompiler.java,
* tools/gnu/classpath/tools/rmic/Variables.java,
* tools/gnu/classpath/tools/rmic/WrapUnWrapper.java,
* tools/gnu/classpath/tools/rmid/ActivationSystemImpl.java,
* tools/gnu/classpath/tools/rmid/ActivationSystemImpl_Stub.java,
* tools/gnu/classpath/tools/rmid/Main.java,
* tools/gnu/classpath/tools/rmid/PersistentBidiHashTable.java,
* tools/gnu/classpath/tools/rmiregistry/Main.java,
* tools/gnu/classpath/tools/rmiregistry/PersistentHashTable.java,
* tools/gnu/classpath/tools/rmiregistry/RegistryImpl.java,
* tools/gnu/classpath/tools/rmiregistry/RegistryImpl_Skel.java,
* tools/gnu/classpath/tools/rmiregistry/RegistryImpl_Stub.java,
* tools/gnu/classpath/tools/serialver/SerialVer.java,
* tools/gnu/classpath/tools/taglets/AuthorTaglet.java,
* tools/gnu/classpath/tools/taglets/CodeTaglet.java,
* tools/gnu/classpath/tools/taglets/CopyrightTaglet.java,
* tools/gnu/classpath/tools/taglets/DeprecatedTaglet.java,
* tools/gnu/classpath/tools/taglets/GenericTaglet.java,
* tools/gnu/classpath/tools/taglets/GnuExtendedTaglet.java,
* tools/gnu/classpath/tools/taglets/SinceTaglet.java,
* tools/gnu/classpath/tools/taglets/TagletContext.java,
* tools/gnu/classpath/tools/taglets/ValueTaglet.java,
* tools/gnu/classpath/tools/taglets/VersionTaglet.java,
* tools/gnu/classpath/tools/tnameserv/Main.java,
* vm/reference/gnu/classpath/jdwp/VMFrame.java,
* vm/reference/gnu/classpath/jdwp/VMIdManager.java,
* vm/reference/gnu/classpath/jdwp/VMMethod.java,
* vm/reference/gnu/classpath/jdwp/VMVirtualMachine.java,
* vm/reference/gnu/java/lang/VMCPStringBuilder.java,
* vm/reference/gnu/java/lang/VMInstrumentationImpl.java,
* vm/reference/gnu/java/lang/management/VMClassLoadingMXBeanImpl.java,
* vm/reference/gnu/java/lang/management/VMCompilationMXBeanImpl.java,
* vm/reference/gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java,
* vm/reference/gnu/java/lang/management/VMMemoryMXBeanImpl.java,
* vm/reference/gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java,
* vm/reference/gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java,
* vm/reference/gnu/java/lang/management/VMThreadMXBeanImpl.java,
* vm/reference/gnu/java/net/VMPlainDatagramSocketImpl.java,
* vm/reference/gnu/java/net/VMPlainSocketImpl.java,
* vm/reference/gnu/java/nio/VMChannel.java,
* vm/reference/gnu/java/nio/VMPipe.java,
* vm/reference/gnu/java/nio/VMSelector.java,
* vm/reference/gnu/java/security/jce/prng/VMSecureRandom.java,
* vm/reference/java/io/VMFile.java,
* vm/reference/java/io/VMObjectInputStream.java,
* vm/reference/java/io/VMObjectStreamClass.java,
* vm/reference/java/lang/VMClass.java,
* vm/reference/java/lang/VMClassLoader.java,
* vm/reference/java/lang/VMDouble.java,
* vm/reference/java/lang/VMFloat.java,
* vm/reference/java/lang/VMMath.java,
* vm/reference/java/lang/VMObject.java,
* vm/reference/java/lang/VMProcess.java,
* vm/reference/java/lang/VMRuntime.java,
* vm/reference/java/lang/VMString.java,
* vm/reference/java/lang/VMSystem.java,
* vm/reference/java/lang/VMThread.java,
* vm/reference/java/lang/reflect/VMConstructor.java,
* vm/reference/java/lang/reflect/VMField.java,
* vm/reference/java/lang/reflect/VMMethod.java,
* vm/reference/java/net/VMNetworkInterface.java,
* vm/reference/java/nio/channels/VMChannels.java,
* vm/reference/java/security/VMAccessController.java,
* vm/reference/java/security/VMSecureRandom.java,
* vm/reference/java/util/VMTimeZone.java,
* vm/reference/sun/misc/Unsafe.java,
* vm/reference/sun/reflect/Reflection.java,
* vm/reference/sun/reflect/misc/ReflectUtil.java:
Normalise whitespace.
From-SVN: r168680
Diffstat (limited to 'libjava/classpath/java/util')
115 files changed, 7462 insertions, 7473 deletions
diff --git a/libjava/classpath/java/util/AbstractCollection.java b/libjava/classpath/java/util/AbstractCollection.java index a11654e..d3406c2 100644 --- a/libjava/classpath/java/util/AbstractCollection.java +++ b/libjava/classpath/java/util/AbstractCollection.java @@ -441,11 +441,11 @@ public abstract class AbstractCollection<E> while (hasNext) { Object o = itr.next(); - if (o == this) - r.append("<this>"); - else - r.append(o); - hasNext = itr.hasNext(); + if (o == this) + r.append("<this>"); + else + r.append(o); + hasNext = itr.hasNext(); if (hasNext) r.append(", "); } diff --git a/libjava/classpath/java/util/AbstractList.java b/libjava/classpath/java/util/AbstractList.java index c47b59b..13ee28a 100644 --- a/libjava/classpath/java/util/AbstractList.java +++ b/libjava/classpath/java/util/AbstractList.java @@ -243,7 +243,7 @@ public abstract class AbstractList<E> * Obtains a hash code for this list. In order to obey the general * contract of the hashCode method of class Object, this value is * calculated as follows: - * + * <pre>hashCode = 1; Iterator i = list.iterator(); while (i.hasNext()) @@ -591,7 +591,7 @@ while (i.hasNext()) /** * Adds the supplied object before the element that would be returned * by a call to <code>next()</code>, if the list supports addition. - * + * * @param o The object to add to the list. * @throws UnsupportedOperationException if the list doesn't support * the addition of new elements. @@ -713,7 +713,7 @@ while (i.hasNext()) * * All methods first check to see if the actual modCount of the backing * list is equal to its expected value, and throw a - * ConcurrentModificationException if it is not. + * ConcurrentModificationException if it is not. * * @param fromIndex the index that the returned list should start from * (inclusive) @@ -756,7 +756,7 @@ while (i.hasNext()) final int offset; /** The size of the sublist. */ int size; - + /** * Construct the sublist. * @@ -771,7 +771,7 @@ while (i.hasNext()) offset = fromIndex; size = toIndex - fromIndex; } - + /** * This method checks the two modCount fields to ensure that there has * not been a concurrent modification, returning if all is okay. @@ -783,9 +783,9 @@ while (i.hasNext()) void checkMod() { if (modCount != backingList.modCount) - throw new ConcurrentModificationException(); + throw new ConcurrentModificationException(); } - + /** * This method checks that a value is between 0 and size (inclusive). If * it is not, an exception is thrown. @@ -797,10 +797,10 @@ while (i.hasNext()) private void checkBoundsInclusive(int index) { if (index < 0 || index > size) - throw new IndexOutOfBoundsException("Index: " + index + ", Size:" - + size); + throw new IndexOutOfBoundsException("Index: " + index + ", Size:" + + size); } - + /** * This method checks that a value is between 0 (inclusive) and size * (exclusive). If it is not, an exception is thrown. @@ -812,10 +812,10 @@ while (i.hasNext()) private void checkBoundsExclusive(int index) { if (index < 0 || index >= size) - throw new IndexOutOfBoundsException("Index: " + index + ", Size:" - + size); + throw new IndexOutOfBoundsException("Index: " + index + ", Size:" + + size); } - + /** * Specified by AbstractList.subList to return the private field size. * @@ -828,7 +828,7 @@ while (i.hasNext()) checkMod(); return size; } - + /** * Specified by AbstractList.subList to delegate to the backing list. * @@ -851,7 +851,7 @@ while (i.hasNext()) checkBoundsExclusive(index); return backingList.set(index + offset, o); } - + /** * Specified by AbstractList.subList to delegate to the backing list. * @@ -867,7 +867,7 @@ while (i.hasNext()) checkBoundsExclusive(index); return backingList.get(index + offset); } - + /** * Specified by AbstractList.subList to delegate to the backing list. * @@ -891,7 +891,7 @@ while (i.hasNext()) size++; modCount = backingList.modCount; } - + /** * Specified by AbstractList.subList to delegate to the backing list. * @@ -912,7 +912,7 @@ while (i.hasNext()) modCount = backingList.modCount; return o; } - + /** * Specified by AbstractList.subList to delegate to the backing list. * This does no bounds checking, as it assumes it will only be called @@ -928,12 +928,12 @@ while (i.hasNext()) protected void removeRange(int fromIndex, int toIndex) { checkMod(); - + backingList.removeRange(offset + fromIndex, offset + toIndex); size -= toIndex - fromIndex; modCount = backingList.modCount; } - + /** * Specified by AbstractList.subList to delegate to the backing list. * @@ -961,7 +961,7 @@ while (i.hasNext()) modCount = backingList.modCount; return result; } - + /** * Specified by AbstractList.subList to return addAll(size, c). * @@ -981,7 +981,7 @@ while (i.hasNext()) { return addAll(size, c); } - + /** * Specified by AbstractList.subList to return listIterator(). * @@ -991,7 +991,7 @@ while (i.hasNext()) { return listIterator(); } - + /** * Specified by AbstractList.subList to return a wrapper around the * backing list's iterator. @@ -1006,176 +1006,176 @@ while (i.hasNext()) { checkMod(); checkBoundsInclusive(index); - + return new ListIterator<E>() - { - private final ListIterator<E> i - = backingList.listIterator(index + offset); - private int position = index; - - /** - * Tests to see if there are any more objects to - * return. - * - * @return True if the end of the list has not yet been - * reached. - */ - public boolean hasNext() - { - return position < size; - } - - /** - * Tests to see if there are objects prior to the - * current position in the list. - * - * @return True if objects exist prior to the current - * position of the iterator. - */ - public boolean hasPrevious() - { - return position > 0; - } - - /** - * Retrieves the next object from the list. - * - * @return The next object. - * @throws NoSuchElementException if there are no - * more objects to retrieve. - * @throws ConcurrentModificationException if the - * list has been modified elsewhere. - */ - public E next() - { - if (position == size) - throw new NoSuchElementException(); - position++; - return i.next(); - } - - /** - * Retrieves the previous object from the list. - * - * @return The next object. - * @throws NoSuchElementException if there are no - * previous objects to retrieve. - * @throws ConcurrentModificationException if the - * list has been modified elsewhere. - */ - public E previous() - { - if (position == 0) - throw new NoSuchElementException(); - position--; - return i.previous(); - } - - /** - * Returns the index of the next element in the - * list, which will be retrieved by <code>next()</code> - * - * @return The index of the next element. - */ - public int nextIndex() - { - return i.nextIndex() - offset; - } - - /** - * Returns the index of the previous element in the - * list, which will be retrieved by <code>previous()</code> - * - * @return The index of the previous element. - */ - public int previousIndex() - { - return i.previousIndex() - offset; - } - - /** - * Removes the last object retrieved by <code>next()</code> - * from the list, if the list supports object removal. - * - * @throws IllegalStateException if the iterator is positioned - * before the start of the list or the last object has already - * been removed. - * @throws UnsupportedOperationException if the list does - * not support removing elements. - */ - public void remove() - { - i.remove(); - size--; - position = nextIndex(); - modCount = backingList.modCount; - } - - - /** - * Replaces the last object retrieved by <code>next()</code> - * or <code>previous</code> with o, if the list supports object - * replacement and an add or remove operation has not already - * been performed. - * - * @throws IllegalStateException if the iterator is positioned - * before the start of the list or the last object has already - * been removed. - * @throws UnsupportedOperationException if the list doesn't support - * the addition or removal of elements. - * @throws ClassCastException if the type of o is not a valid type - * for this list. - * @throws IllegalArgumentException if something else related to o - * prevents its addition. - * @throws ConcurrentModificationException if the list - * has been modified elsewhere. - */ - public void set(E o) - { - i.set(o); - } - - /** - * Adds the supplied object before the element that would be returned - * by a call to <code>next()</code>, if the list supports addition. - * - * @param o The object to add to the list. - * @throws UnsupportedOperationException if the list doesn't support - * the addition of new elements. - * @throws ClassCastException if the type of o is not a valid type - * for this list. - * @throws IllegalArgumentException if something else related to o - * prevents its addition. - * @throws ConcurrentModificationException if the list - * has been modified elsewhere. - */ - public void add(E o) - { - i.add(o); - size++; - position++; - modCount = backingList.modCount; - } - - // Here is the reason why the various modCount fields are mostly - // ignored in this wrapper listIterator. - // If the backing listIterator is failfast, then the following holds: - // Using any other method on this list will call a corresponding - // method on the backing list *after* the backing listIterator - // is created, which will in turn cause a ConcurrentModException - // when this listIterator comes to use the backing one. So it is - // implicitly failfast. - // If the backing listIterator is NOT failfast, then the whole of - // this list isn't failfast, because the modCount field of the - // backing list is not valid. It would still be *possible* to - // make the iterator failfast wrt modifications of the sublist - // only, but somewhat pointless when the list can be changed under - // us. - // Either way, no explicit handling of modCount is needed. - // However modCount = backingList.modCount must be executed in add - // and remove, and size must also be updated in these two methods, - // since they do not go through the corresponding methods of the subList. - }; + { + private final ListIterator<E> i + = backingList.listIterator(index + offset); + private int position = index; + + /** + * Tests to see if there are any more objects to + * return. + * + * @return True if the end of the list has not yet been + * reached. + */ + public boolean hasNext() + { + return position < size; + } + + /** + * Tests to see if there are objects prior to the + * current position in the list. + * + * @return True if objects exist prior to the current + * position of the iterator. + */ + public boolean hasPrevious() + { + return position > 0; + } + + /** + * Retrieves the next object from the list. + * + * @return The next object. + * @throws NoSuchElementException if there are no + * more objects to retrieve. + * @throws ConcurrentModificationException if the + * list has been modified elsewhere. + */ + public E next() + { + if (position == size) + throw new NoSuchElementException(); + position++; + return i.next(); + } + + /** + * Retrieves the previous object from the list. + * + * @return The next object. + * @throws NoSuchElementException if there are no + * previous objects to retrieve. + * @throws ConcurrentModificationException if the + * list has been modified elsewhere. + */ + public E previous() + { + if (position == 0) + throw new NoSuchElementException(); + position--; + return i.previous(); + } + + /** + * Returns the index of the next element in the + * list, which will be retrieved by <code>next()</code> + * + * @return The index of the next element. + */ + public int nextIndex() + { + return i.nextIndex() - offset; + } + + /** + * Returns the index of the previous element in the + * list, which will be retrieved by <code>previous()</code> + * + * @return The index of the previous element. + */ + public int previousIndex() + { + return i.previousIndex() - offset; + } + + /** + * Removes the last object retrieved by <code>next()</code> + * from the list, if the list supports object removal. + * + * @throws IllegalStateException if the iterator is positioned + * before the start of the list or the last object has already + * been removed. + * @throws UnsupportedOperationException if the list does + * not support removing elements. + */ + public void remove() + { + i.remove(); + size--; + position = nextIndex(); + modCount = backingList.modCount; + } + + + /** + * Replaces the last object retrieved by <code>next()</code> + * or <code>previous</code> with o, if the list supports object + * replacement and an add or remove operation has not already + * been performed. + * + * @throws IllegalStateException if the iterator is positioned + * before the start of the list or the last object has already + * been removed. + * @throws UnsupportedOperationException if the list doesn't support + * the addition or removal of elements. + * @throws ClassCastException if the type of o is not a valid type + * for this list. + * @throws IllegalArgumentException if something else related to o + * prevents its addition. + * @throws ConcurrentModificationException if the list + * has been modified elsewhere. + */ + public void set(E o) + { + i.set(o); + } + + /** + * Adds the supplied object before the element that would be returned + * by a call to <code>next()</code>, if the list supports addition. + * + * @param o The object to add to the list. + * @throws UnsupportedOperationException if the list doesn't support + * the addition of new elements. + * @throws ClassCastException if the type of o is not a valid type + * for this list. + * @throws IllegalArgumentException if something else related to o + * prevents its addition. + * @throws ConcurrentModificationException if the list + * has been modified elsewhere. + */ + public void add(E o) + { + i.add(o); + size++; + position++; + modCount = backingList.modCount; + } + + // Here is the reason why the various modCount fields are mostly + // ignored in this wrapper listIterator. + // If the backing listIterator is failfast, then the following holds: + // Using any other method on this list will call a corresponding + // method on the backing list *after* the backing listIterator + // is created, which will in turn cause a ConcurrentModException + // when this listIterator comes to use the backing one. So it is + // implicitly failfast. + // If the backing listIterator is NOT failfast, then the whole of + // this list isn't failfast, because the modCount field of the + // backing list is not valid. It would still be *possible* to + // make the iterator failfast wrt modifications of the sublist + // only, but somewhat pointless when the list can be changed under + // us. + // Either way, no explicit handling of modCount is needed. + // However modCount = backingList.modCount must be executed in add + // and remove, and size must also be updated in these two methods, + // since they do not go through the corresponding methods of the subList. + }; } } // class SubList @@ -1200,5 +1200,5 @@ while (i.hasNext()) super(backing, fromIndex, toIndex); } } // class RandomAccessSubList - + } // class AbstractList diff --git a/libjava/classpath/java/util/AbstractMap.java b/libjava/classpath/java/util/AbstractMap.java index 5d59db9..e0e3571 100644 --- a/libjava/classpath/java/util/AbstractMap.java +++ b/libjava/classpath/java/util/AbstractMap.java @@ -71,14 +71,14 @@ import java.io.Serializable; */ public abstract class AbstractMap<K, V> implements Map<K, V> { - /** + /** * A class containing an immutable key and value. The * implementation of {@link Entry#setValue(V)} for this class * simply throws an {@link UnsupportedOperationException}, * thus preventing changes being made. This is useful when * a static thread-safe view of a map is required. * - * @since 1.6 + * @since 1.6 */ public static class SimpleImmutableEntry<K, V> implements Entry<K, V>, Serializable @@ -251,8 +251,8 @@ public abstract class AbstractMap<K, V> implements Map<K, V> public boolean equals(Object o) { return (o == this - || (o instanceof Map - && entrySet().equals(((Map<K, V>) o).entrySet()))); + || (o instanceof Map + && entrySet().equals(((Map<K, V>) o).entrySet()))); } /** @@ -330,76 +330,76 @@ public abstract class AbstractMap<K, V> implements Map<K, V> if (keys == null) keys = new AbstractSet<K>() { - /** - * Retrieves the number of keys in the backing map. - * - * @return The number of keys. - */ + /** + * Retrieves the number of keys in the backing map. + * + * @return The number of keys. + */ public int size() { return AbstractMap.this.size(); } - /** - * Returns true if the backing map contains the - * supplied key. - * - * @param key The key to search for. - * @return True if the key was found, false otherwise. - */ + /** + * Returns true if the backing map contains the + * supplied key. + * + * @param key The key to search for. + * @return True if the key was found, false otherwise. + */ public boolean contains(Object key) { return containsKey(key); } - /** - * Returns an iterator which iterates over the keys - * in the backing map, using a wrapper around the - * iterator returned by <code>entrySet()</code>. - * - * @return An iterator over the keys. - */ + /** + * Returns an iterator which iterates over the keys + * in the backing map, using a wrapper around the + * iterator returned by <code>entrySet()</code>. + * + * @return An iterator over the keys. + */ public Iterator<K> iterator() { return new Iterator<K>() { - /** - * The iterator returned by <code>entrySet()</code>. - */ + /** + * The iterator returned by <code>entrySet()</code>. + */ private final Iterator<Map.Entry<K, V>> map_iterator - = entrySet().iterator(); - - /** - * Returns true if a call to <code>next()</code> will - * return another key. - * - * @return True if the iterator has not yet reached - * the last key. - */ + = entrySet().iterator(); + + /** + * Returns true if a call to <code>next()</code> will + * return another key. + * + * @return True if the iterator has not yet reached + * the last key. + */ public boolean hasNext() { return map_iterator.hasNext(); } - /** - * Returns the key from the next entry retrieved - * by the underlying <code>entrySet()</code> iterator. - * - * @return The next key. - */ + /** + * Returns the key from the next entry retrieved + * by the underlying <code>entrySet()</code> iterator. + * + * @return The next key. + */ public K next() { return map_iterator.next().getKey(); } - /** - * Removes the map entry which has a key equal - * to that returned by the last call to - * <code>next()</code>. - * - * @throws UnsupportedOperationException if the - * map doesn't support removal. - */ + /** + * Removes the map entry which has a key equal + * to that returned by the last call to + * <code>next()</code>. + * + * @throws UnsupportedOperationException if the + * map doesn't support removal. + */ public void remove() { map_iterator.remove(); @@ -565,77 +565,77 @@ public abstract class AbstractMap<K, V> implements Map<K, V> if (values == null) values = new AbstractCollection<V>() { - /** - * Returns the number of values stored in - * the backing map. - * - * @return The number of values. - */ + /** + * Returns the number of values stored in + * the backing map. + * + * @return The number of values. + */ public int size() { return AbstractMap.this.size(); } - /** - * Returns true if the backing map contains - * the supplied value. - * - * @param value The value to search for. - * @return True if the value was found, false otherwise. - */ + /** + * Returns true if the backing map contains + * the supplied value. + * + * @param value The value to search for. + * @return True if the value was found, false otherwise. + */ public boolean contains(Object value) { return containsValue(value); } - /** - * Returns an iterator which iterates over the - * values in the backing map, by using a wrapper - * around the iterator returned by <code>entrySet()</code>. - * - * @return An iterator over the values. - */ + /** + * Returns an iterator which iterates over the + * values in the backing map, by using a wrapper + * around the iterator returned by <code>entrySet()</code>. + * + * @return An iterator over the values. + */ public Iterator<V> iterator() { return new Iterator<V>() { - /** - * The iterator returned by <code>entrySet()</code>. - */ + /** + * The iterator returned by <code>entrySet()</code>. + */ private final Iterator<Map.Entry<K, V>> map_iterator - = entrySet().iterator(); - - /** - * Returns true if a call to <code>next()</call> will - * return another value. - * - * @return True if the iterator has not yet reached - * the last value. - */ + = entrySet().iterator(); + + /** + * Returns true if a call to <code>next()</call> will + * return another value. + * + * @return True if the iterator has not yet reached + * the last value. + */ public boolean hasNext() { return map_iterator.hasNext(); } - /** - * Returns the value from the next entry retrieved - * by the underlying <code>entrySet()</code> iterator. - * - * @return The next value. - */ + /** + * Returns the value from the next entry retrieved + * by the underlying <code>entrySet()</code> iterator. + * + * @return The next value. + */ public V next() { return map_iterator.next().getValue(); } - /** - * Removes the map entry which has a key equal - * to that returned by the last call to - * <code>next()</code>. - * - * @throws UnsupportedOperationException if the - * map doesn't support removal. - */ + /** + * Removes the map entry which has a key equal + * to that returned by the last call to + * <code>next()</code>. + * + * @throws UnsupportedOperationException if the + * map doesn't support removal. + */ public void remove() { map_iterator.remove(); @@ -680,7 +680,7 @@ public abstract class AbstractMap<K, V> implements Map<K, V> * * @author Jon Zeppieri * @author Eric Blake (ebb9@email.byu.edu) - * + * * @since 1.6 */ public static class SimpleEntry<K, V> implements Entry<K, V>, Serializable @@ -711,7 +711,7 @@ public abstract class AbstractMap<K, V> implements Map<K, V> key = newKey; value = newValue; } - + public SimpleEntry(Entry<? extends K, ? extends V> entry) { this(entry.getKey(), entry.getValue()); @@ -814,6 +814,6 @@ public abstract class AbstractMap<K, V> implements Map<K, V> return key + "=" + value; } } // class SimpleEntry - - + + } diff --git a/libjava/classpath/java/util/AbstractSet.java b/libjava/classpath/java/util/AbstractSet.java index 423ac80..af1e4d1 100644 --- a/libjava/classpath/java/util/AbstractSet.java +++ b/libjava/classpath/java/util/AbstractSet.java @@ -83,8 +83,8 @@ public abstract class AbstractSet<E> public boolean equals(Object o) { return (o == this - || (o instanceof Set && ((Set) o).size() == size() - && containsAll((Collection) o))); + || (o instanceof Set && ((Set) o).size() == size() + && containsAll((Collection) o))); } /** @@ -128,18 +128,18 @@ public abstract class AbstractSet<E> int count = c.size(); if (oldsize < count) { - Iterator<E> i; - for (i = iterator(), count = oldsize; count > 0; count--) - { - if (c.contains(i.next())) - i.remove(); - } + Iterator<E> i; + for (i = iterator(), count = oldsize; count > 0; count--) + { + if (c.contains(i.next())) + i.remove(); + } } else { - Iterator<?> i; - for (i = c.iterator(); count > 0; count--) - remove(i.next()); + Iterator<?> i; + for (i = c.iterator(); count > 0; count--) + remove(i.next()); } return oldsize != size(); } diff --git a/libjava/classpath/java/util/ArrayList.java b/libjava/classpath/java/util/ArrayList.java index 1fb25d8..0da2193 100644 --- a/libjava/classpath/java/util/ArrayList.java +++ b/libjava/classpath/java/util/ArrayList.java @@ -503,8 +503,8 @@ public class ArrayList<E> extends AbstractList<E> // do so). throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + size); } - - + + /** * Remove from this list all elements contained in the given collection. * This is not public, due to Sun's API, but this performs in linear diff --git a/libjava/classpath/java/util/Arrays.java b/libjava/classpath/java/util/Arrays.java index d154eb1..dad55c4 100644 --- a/libjava/classpath/java/util/Arrays.java +++ b/libjava/classpath/java/util/Arrays.java @@ -76,7 +76,7 @@ public class Arrays { } - + // binarySearch /** * Perform a binary search of a byte array for a key. The array must be @@ -122,10 +122,10 @@ public class Arrays { if (low > hi) throw new IllegalArgumentException("The start index is higher than " + - "the finish index."); + "the finish index."); if (low < 0 || hi > a.length) throw new ArrayIndexOutOfBoundsException("One of the indices is out " + - "of bounds."); + "of bounds."); int mid = 0; while (low <= hi) { @@ -186,10 +186,10 @@ public class Arrays { if (low > hi) throw new IllegalArgumentException("The start index is higher than " + - "the finish index."); + "the finish index."); if (low < 0 || hi > a.length) throw new ArrayIndexOutOfBoundsException("One of the indices is out " + - "of bounds."); + "of bounds."); int mid = 0; while (low <= hi) { @@ -250,10 +250,10 @@ public class Arrays { if (low > hi) throw new IllegalArgumentException("The start index is higher than " + - "the finish index."); + "the finish index."); if (low < 0 || hi > a.length) throw new ArrayIndexOutOfBoundsException("One of the indices is out " + - "of bounds."); + "of bounds."); int mid = 0; while (low <= hi) { @@ -314,10 +314,10 @@ public class Arrays { if (low > hi) throw new IllegalArgumentException("The start index is higher than " + - "the finish index."); + "the finish index."); if (low < 0 || hi > a.length) throw new ArrayIndexOutOfBoundsException("One of the indices is out " + - "of bounds."); + "of bounds."); int mid = 0; while (low <= hi) { @@ -378,10 +378,10 @@ public class Arrays { if (low > hi) throw new IllegalArgumentException("The start index is higher than " + - "the finish index."); + "the finish index."); if (low < 0 || hi > a.length) throw new ArrayIndexOutOfBoundsException("One of the indices is out " + - "of bounds."); + "of bounds."); int mid = 0; while (low <= hi) { @@ -442,10 +442,10 @@ public class Arrays { if (low > hi) throw new IllegalArgumentException("The start index is higher than " + - "the finish index."); + "the finish index."); if (low < 0 || hi > a.length) throw new ArrayIndexOutOfBoundsException("One of the indices is out " + - "of bounds."); + "of bounds."); // Must use Float.compare to take into account NaN, +-0. int mid = 0; while (low <= hi) @@ -507,10 +507,10 @@ public class Arrays { if (low > hi) throw new IllegalArgumentException("The start index is higher than " + - "the finish index."); + "the finish index."); if (low < 0 || hi > a.length) throw new ArrayIndexOutOfBoundsException("One of the indices is out " + - "of bounds."); + "of bounds."); // Must use Double.compare to take into account NaN, +-0. int mid = 0; while (low <= hi) @@ -629,21 +629,21 @@ public class Arrays * <code>hi > a.length</code>. */ public static <T> int binarySearch(T[] a, int low, int hi, T key, - Comparator<? super T> c) + Comparator<? super T> c) { if (low > hi) throw new IllegalArgumentException("The start index is higher than " + - "the finish index."); + "the finish index."); if (low < 0 || hi > a.length) throw new ArrayIndexOutOfBoundsException("One of the indices is out " + - "of bounds."); + "of bounds."); int mid = 0; while (low <= hi) { mid = (low + hi) >>> 1; - // NOTE: Please keep the order of a[mid] and key. Although - // not required by the specs, the RI has it in this order as - // well, and real programs (erroneously) depend on it. + // NOTE: Please keep the order of a[mid] and key. Although + // not required by the specs, the RI has it in this order as + // well, and real programs (erroneously) depend on it. final int d = Collections.compare(a[mid], key, c); if (d == 0) return mid; @@ -656,7 +656,7 @@ public class Arrays return -mid - 1; } - + // equals /** * Compare two boolean arrays for equality. @@ -675,15 +675,15 @@ public class Arrays if (null == a1 || null == a2) return false; - + // If they're the same length, test each element if (a1.length == a2.length) { - int i = a1.length; - while (--i >= 0) - if (a1[i] != a2[i]) - return false; - return true; + int i = a1.length; + while (--i >= 0) + if (a1[i] != a2[i]) + return false; + return true; } return false; } @@ -709,11 +709,11 @@ public class Arrays // If they're the same length, test each element if (a1.length == a2.length) { - int i = a1.length; - while (--i >= 0) - if (a1[i] != a2[i]) - return false; - return true; + int i = a1.length; + while (--i >= 0) + if (a1[i] != a2[i]) + return false; + return true; } return false; } @@ -735,15 +735,15 @@ public class Arrays if (null == a1 || null == a2) return false; - + // If they're the same length, test each element if (a1.length == a2.length) { - int i = a1.length; - while (--i >= 0) - if (a1[i] != a2[i]) - return false; - return true; + int i = a1.length; + while (--i >= 0) + if (a1[i] != a2[i]) + return false; + return true; } return false; } @@ -769,11 +769,11 @@ public class Arrays // If they're the same length, test each element if (a1.length == a2.length) { - int i = a1.length; - while (--i >= 0) - if (a1[i] != a2[i]) - return false; - return true; + int i = a1.length; + while (--i >= 0) + if (a1[i] != a2[i]) + return false; + return true; } return false; } @@ -799,11 +799,11 @@ public class Arrays // If they're the same length, test each element if (a1.length == a2.length) { - int i = a1.length; - while (--i >= 0) - if (a1[i] != a2[i]) - return false; - return true; + int i = a1.length; + while (--i >= 0) + if (a1[i] != a2[i]) + return false; + return true; } return false; } @@ -829,11 +829,11 @@ public class Arrays // If they're the same length, test each element if (a1.length == a2.length) { - int i = a1.length; - while (--i >= 0) - if (a1[i] != a2[i]) - return false; - return true; + int i = a1.length; + while (--i >= 0) + if (a1[i] != a2[i]) + return false; + return true; } return false; } @@ -860,11 +860,11 @@ public class Arrays // If they're the same length, test each element if (a1.length == a2.length) { - int i = a1.length; - while (--i >= 0) - if (Float.compare(a1[i], a2[i]) != 0) - return false; - return true; + int i = a1.length; + while (--i >= 0) + if (Float.compare(a1[i], a2[i]) != 0) + return false; + return true; } return false; } @@ -886,16 +886,16 @@ public class Arrays if (null == a1 || null == a2) return false; - + // Must use Double.compare to take into account NaN, +-0. // If they're the same length, test each element if (a1.length == a2.length) { - int i = a1.length; - while (--i >= 0) - if (Double.compare(a1[i], a2[i]) != 0) - return false; - return true; + int i = a1.length; + while (--i >= 0) + if (Double.compare(a1[i], a2[i]) != 0) + return false; + return true; } return false; } @@ -918,20 +918,20 @@ public class Arrays if (null == a1 || null == a2) return false; - + // If they're the same length, test each element if (a1.length == a2.length) { - int i = a1.length; - while (--i >= 0) - if (! AbstractCollection.equals(a1[i], a2[i])) - return false; - return true; + int i = a1.length; + while (--i >= 0) + if (! AbstractCollection.equals(a1[i], a2[i])) + return false; + return true; } return false; } - + // fill /** * Fill an array with a boolean value. @@ -1207,7 +1207,7 @@ public class Arrays a[i] = val; } - + // sort // Thanks to Paul Fisher (rao@gnu.org) for finding this quicksort algorithm // as specified by Sun and porting it to Java. The algorithm is an optimised @@ -1633,8 +1633,8 @@ public class Arrays if (count <= 7) { for (int i = from + 1; i < from + count; i++) - for (int j = i; j > from && array[j - 1] > array[j]; j--) - swap(j, j - 1, array); + for (int j = i; j > from && array[j - 1] > array[j]; j--) + swap(j, j - 1, array); return; } @@ -2488,7 +2488,7 @@ public class Arrays * ordering (only possible when c is null) */ public static <T> void sort(T[] a, int fromIndex, int toIndex, - Comparator<? super T> c) + Comparator<? super T> c) { if (fromIndex > toIndex) throw new IllegalArgumentException("fromIndex " + fromIndex @@ -2618,7 +2618,7 @@ public class Arrays * * @param a the array to return a view of (<code>null</code> not permitted) * @return a fixed-size list, changes to which "write through" to the array - * + * * @throws NullPointerException if <code>a</code> is <code>null</code>. * @see Serializable * @see RandomAccess @@ -2629,7 +2629,7 @@ public class Arrays return new Arrays.ArrayList(a); } - /** + /** * Returns the hashcode of an array of long numbers. If two arrays * are equal, according to <code>equals()</code>, they should have the * same hashcode. The hashcode returned by the method is equal to that @@ -2640,7 +2640,7 @@ public class Arrays * @param v an array of long numbers for which the hash code should be * computed. * @return the hash code of the array, or 0 if null was given. - * @since 1.5 + * @since 1.5 */ public static int hashCode(long[] v) { @@ -2649,13 +2649,13 @@ public class Arrays int result = 1; for (int i = 0; i < v.length; ++i) { - int elt = (int) (v[i] ^ (v[i] >>> 32)); - result = 31 * result + elt; + int elt = (int) (v[i] ^ (v[i] >>> 32)); + result = 31 * result + elt; } return result; } - /** + /** * Returns the hashcode of an array of integer numbers. If two arrays * are equal, according to <code>equals()</code>, they should have the * same hashcode. The hashcode returned by the method is equal to that @@ -2666,7 +2666,7 @@ public class Arrays * @param v an array of integer numbers for which the hash code should be * computed. * @return the hash code of the array, or 0 if null was given. - * @since 1.5 + * @since 1.5 */ public static int hashCode(int[] v) { @@ -2678,7 +2678,7 @@ public class Arrays return result; } - /** + /** * Returns the hashcode of an array of short numbers. If two arrays * are equal, according to <code>equals()</code>, they should have the * same hashcode. The hashcode returned by the method is equal to that @@ -2689,7 +2689,7 @@ public class Arrays * @param v an array of short numbers for which the hash code should be * computed. * @return the hash code of the array, or 0 if null was given. - * @since 1.5 + * @since 1.5 */ public static int hashCode(short[] v) { @@ -2701,7 +2701,7 @@ public class Arrays return result; } - /** + /** * Returns the hashcode of an array of characters. If two arrays * are equal, according to <code>equals()</code>, they should have the * same hashcode. The hashcode returned by the method is equal to that @@ -2712,7 +2712,7 @@ public class Arrays * @param v an array of characters for which the hash code should be * computed. * @return the hash code of the array, or 0 if null was given. - * @since 1.5 + * @since 1.5 */ public static int hashCode(char[] v) { @@ -2724,7 +2724,7 @@ public class Arrays return result; } - /** + /** * Returns the hashcode of an array of bytes. If two arrays * are equal, according to <code>equals()</code>, they should have the * same hashcode. The hashcode returned by the method is equal to that @@ -2735,7 +2735,7 @@ public class Arrays * @param v an array of bytes for which the hash code should be * computed. * @return the hash code of the array, or 0 if null was given. - * @since 1.5 + * @since 1.5 */ public static int hashCode(byte[] v) { @@ -2747,7 +2747,7 @@ public class Arrays return result; } - /** + /** * Returns the hashcode of an array of booleans. If two arrays * are equal, according to <code>equals()</code>, they should have the * same hashcode. The hashcode returned by the method is equal to that @@ -2758,7 +2758,7 @@ public class Arrays * @param v an array of booleans for which the hash code should be * computed. * @return the hash code of the array, or 0 if null was given. - * @since 1.5 + * @since 1.5 */ public static int hashCode(boolean[] v) { @@ -2770,7 +2770,7 @@ public class Arrays return result; } - /** + /** * Returns the hashcode of an array of floats. If two arrays * are equal, according to <code>equals()</code>, they should have the * same hashcode. The hashcode returned by the method is equal to that @@ -2781,7 +2781,7 @@ public class Arrays * @param v an array of floats for which the hash code should be * computed. * @return the hash code of the array, or 0 if null was given. - * @since 1.5 + * @since 1.5 */ public static int hashCode(float[] v) { @@ -2793,7 +2793,7 @@ public class Arrays return result; } - /** + /** * Returns the hashcode of an array of doubles. If two arrays * are equal, according to <code>equals()</code>, they should have the * same hashcode. The hashcode returned by the method is equal to that @@ -2804,7 +2804,7 @@ public class Arrays * @param v an array of doubles for which the hash code should be * computed. * @return the hash code of the array, or 0 if null was given. - * @since 1.5 + * @since 1.5 */ public static int hashCode(double[] v) { @@ -2813,24 +2813,24 @@ public class Arrays int result = 1; for (int i = 0; i < v.length; ++i) { - long l = Double.doubleToLongBits(v[i]); - int elt = (int) (l ^ (l >>> 32)); - result = 31 * result + elt; + long l = Double.doubleToLongBits(v[i]); + int elt = (int) (l ^ (l >>> 32)); + result = 31 * result + elt; } return result; } - /** + /** * Returns the hashcode of an array of objects. If two arrays * are equal, according to <code>equals()</code>, they should have the * same hashcode. The hashcode returned by the method is equal to that - * obtained by the corresponding <code>List</code> object. + * obtained by the corresponding <code>List</code> object. * For <code>null</code>, 0 is returned. * * @param v an array of integer numbers for which the hash code should be * computed. * @return the hash code of the array, or 0 if null was given. - * @since 1.5 + * @since 1.5 */ public static int hashCode(Object[] v) { @@ -2839,8 +2839,8 @@ public class Arrays int result = 1; for (int i = 0; i < v.length; ++i) { - int elt = v[i] == null ? 0 : v[i].hashCode(); - result = 31 * result + elt; + int elt = v[i] == null ? 0 : v[i].hashCode(); + result = 31 * result + elt; } return result; } @@ -2852,30 +2852,30 @@ public class Arrays int result = 1; for (int i = 0; i < v.length; ++i) { - int elt; - if (v[i] == null) - elt = 0; - else if (v[i] instanceof boolean[]) - elt = hashCode((boolean[]) v[i]); - else if (v[i] instanceof byte[]) - elt = hashCode((byte[]) v[i]); - else if (v[i] instanceof char[]) - elt = hashCode((char[]) v[i]); - else if (v[i] instanceof short[]) - elt = hashCode((short[]) v[i]); - else if (v[i] instanceof int[]) - elt = hashCode((int[]) v[i]); - else if (v[i] instanceof long[]) - elt = hashCode((long[]) v[i]); - else if (v[i] instanceof float[]) - elt = hashCode((float[]) v[i]); - else if (v[i] instanceof double[]) - elt = hashCode((double[]) v[i]); - else if (v[i] instanceof Object[]) - elt = hashCode((Object[]) v[i]); - else - elt = v[i].hashCode(); - result = 31 * result + elt; + int elt; + if (v[i] == null) + elt = 0; + else if (v[i] instanceof boolean[]) + elt = hashCode((boolean[]) v[i]); + else if (v[i] instanceof byte[]) + elt = hashCode((byte[]) v[i]); + else if (v[i] instanceof char[]) + elt = hashCode((char[]) v[i]); + else if (v[i] instanceof short[]) + elt = hashCode((short[]) v[i]); + else if (v[i] instanceof int[]) + elt = hashCode((int[]) v[i]); + else if (v[i] instanceof long[]) + elt = hashCode((long[]) v[i]); + else if (v[i] instanceof float[]) + elt = hashCode((float[]) v[i]); + else if (v[i] instanceof double[]) + elt = hashCode((double[]) v[i]); + else if (v[i] instanceof Object[]) + elt = hashCode((Object[]) v[i]); + else + elt = v[i].hashCode(); + result = 31 * result + elt; } return result; } @@ -2890,37 +2890,37 @@ public class Arrays for (int i = 0; i < v1.length; ++i) { - Object e1 = v1[i]; - Object e2 = v2[i]; - - if (e1 == e2) - continue; - if (e1 == null || e2 == null) - return false; - - boolean check; - if (e1 instanceof boolean[] && e2 instanceof boolean[]) - check = equals((boolean[]) e1, (boolean[]) e2); - else if (e1 instanceof byte[] && e2 instanceof byte[]) - check = equals((byte[]) e1, (byte[]) e2); - else if (e1 instanceof char[] && e2 instanceof char[]) - check = equals((char[]) e1, (char[]) e2); - else if (e1 instanceof short[] && e2 instanceof short[]) - check = equals((short[]) e1, (short[]) e2); - else if (e1 instanceof int[] && e2 instanceof int[]) - check = equals((int[]) e1, (int[]) e2); - else if (e1 instanceof long[] && e2 instanceof long[]) - check = equals((long[]) e1, (long[]) e2); - else if (e1 instanceof float[] && e2 instanceof float[]) - check = equals((float[]) e1, (float[]) e2); - else if (e1 instanceof double[] && e2 instanceof double[]) - check = equals((double[]) e1, (double[]) e2); - else if (e1 instanceof Object[] && e2 instanceof Object[]) - check = equals((Object[]) e1, (Object[]) e2); - else - check = e1.equals(e2); - if (! check) - return false; + Object e1 = v1[i]; + Object e2 = v2[i]; + + if (e1 == e2) + continue; + if (e1 == null || e2 == null) + return false; + + boolean check; + if (e1 instanceof boolean[] && e2 instanceof boolean[]) + check = equals((boolean[]) e1, (boolean[]) e2); + else if (e1 instanceof byte[] && e2 instanceof byte[]) + check = equals((byte[]) e1, (byte[]) e2); + else if (e1 instanceof char[] && e2 instanceof char[]) + check = equals((char[]) e1, (char[]) e2); + else if (e1 instanceof short[] && e2 instanceof short[]) + check = equals((short[]) e1, (short[]) e2); + else if (e1 instanceof int[] && e2 instanceof int[]) + check = equals((int[]) e1, (int[]) e2); + else if (e1 instanceof long[] && e2 instanceof long[]) + check = equals((long[]) e1, (long[]) e2); + else if (e1 instanceof float[] && e2 instanceof float[]) + check = equals((float[]) e1, (float[]) e2); + else if (e1 instanceof double[] && e2 instanceof double[]) + check = equals((double[]) e1, (double[]) e2); + else if (e1 instanceof Object[] && e2 instanceof Object[]) + check = equals((Object[]) e1, (Object[]) e2); + else + check = e1.equals(e2); + if (! check) + return false; } return true; @@ -2940,9 +2940,9 @@ public class Arrays CPStringBuilder b = new CPStringBuilder("["); for (int i = 0; i < v.length; ++i) { - if (i > 0) - b.append(", "); - b.append(v[i]); + if (i > 0) + b.append(", "); + b.append(v[i]); } b.append("]"); return b.toString(); @@ -2962,9 +2962,9 @@ public class Arrays CPStringBuilder b = new CPStringBuilder("["); for (int i = 0; i < v.length; ++i) { - if (i > 0) - b.append(", "); - b.append(v[i]); + if (i > 0) + b.append(", "); + b.append(v[i]); } b.append("]"); return b.toString(); @@ -2984,9 +2984,9 @@ public class Arrays CPStringBuilder b = new CPStringBuilder("["); for (int i = 0; i < v.length; ++i) { - if (i > 0) - b.append(", "); - b.append(v[i]); + if (i > 0) + b.append(", "); + b.append(v[i]); } b.append("]"); return b.toString(); @@ -3006,9 +3006,9 @@ public class Arrays CPStringBuilder b = new CPStringBuilder("["); for (int i = 0; i < v.length; ++i) { - if (i > 0) - b.append(", "); - b.append(v[i]); + if (i > 0) + b.append(", "); + b.append(v[i]); } b.append("]"); return b.toString(); @@ -3028,9 +3028,9 @@ public class Arrays CPStringBuilder b = new CPStringBuilder("["); for (int i = 0; i < v.length; ++i) { - if (i > 0) - b.append(", "); - b.append(v[i]); + if (i > 0) + b.append(", "); + b.append(v[i]); } b.append("]"); return b.toString(); @@ -3050,9 +3050,9 @@ public class Arrays CPStringBuilder b = new CPStringBuilder("["); for (int i = 0; i < v.length; ++i) { - if (i > 0) - b.append(", "); - b.append(v[i]); + if (i > 0) + b.append(", "); + b.append(v[i]); } b.append("]"); return b.toString(); @@ -3072,9 +3072,9 @@ public class Arrays CPStringBuilder b = new CPStringBuilder("["); for (int i = 0; i < v.length; ++i) { - if (i > 0) - b.append(", "); - b.append(v[i]); + if (i > 0) + b.append(", "); + b.append(v[i]); } b.append("]"); return b.toString(); @@ -3094,9 +3094,9 @@ public class Arrays CPStringBuilder b = new CPStringBuilder("["); for (int i = 0; i < v.length; ++i) { - if (i > 0) - b.append(", "); - b.append(v[i]); + if (i > 0) + b.append(", "); + b.append(v[i]); } b.append("]"); return b.toString(); @@ -3116,9 +3116,9 @@ public class Arrays CPStringBuilder b = new CPStringBuilder("["); for (int i = 0; i < v.length; ++i) { - if (i > 0) - b.append(", "); - b.append(v[i]); + if (i > 0) + b.append(", "); + b.append(v[i]); } b.append("]"); return b.toString(); @@ -3129,40 +3129,40 @@ public class Arrays b.append("["); for (int i = 0; i < v.length; ++i) { - if (i > 0) - b.append(", "); - Object elt = v[i]; - if (elt == null) - b.append("null"); - else if (elt instanceof boolean[]) - b.append(toString((boolean[]) elt)); - else if (elt instanceof byte[]) - b.append(toString((byte[]) elt)); - else if (elt instanceof char[]) - b.append(toString((char[]) elt)); - else if (elt instanceof short[]) - b.append(toString((short[]) elt)); - else if (elt instanceof int[]) - b.append(toString((int[]) elt)); - else if (elt instanceof long[]) - b.append(toString((long[]) elt)); - else if (elt instanceof float[]) - b.append(toString((float[]) elt)); - else if (elt instanceof double[]) - b.append(toString((double[]) elt)); - else if (elt instanceof Object[]) - { - Object[] os = (Object[]) elt; - if (seen.contains(os)) - b.append("[...]"); - else - { - seen.add(os); - deepToString(os, b, seen); - } - } - else - b.append(elt); + if (i > 0) + b.append(", "); + Object elt = v[i]; + if (elt == null) + b.append("null"); + else if (elt instanceof boolean[]) + b.append(toString((boolean[]) elt)); + else if (elt instanceof byte[]) + b.append(toString((byte[]) elt)); + else if (elt instanceof char[]) + b.append(toString((char[]) elt)); + else if (elt instanceof short[]) + b.append(toString((short[]) elt)); + else if (elt instanceof int[]) + b.append(toString((int[]) elt)); + else if (elt instanceof long[]) + b.append(toString((long[]) elt)); + else if (elt instanceof float[]) + b.append(toString((float[]) elt)); + else if (elt instanceof double[]) + b.append(toString((double[]) elt)); + else if (elt instanceof Object[]) + { + Object[] os = (Object[]) elt; + if (seen.contains(os)) + b.append("[...]"); + else + { + seen.add(os); + deepToString(os, b, seen); + } + } + else + b.append(elt); } b.append("]"); } @@ -3223,7 +3223,7 @@ public class Arrays * * @param index The index to retrieve an object from. * @return The object at the array index specified. - */ + */ public E get(int index) { return a[index]; @@ -3325,7 +3325,7 @@ public class Arrays int size = a.length; if (array.length < size) array = (T[]) Array.newInstance(array.getClass().getComponentType(), - size); + size); else if (array.length > size) array[size] = null; @@ -3390,13 +3390,13 @@ public class Arrays { if (from > to) throw new IllegalArgumentException("The initial index is after " + - "the final index."); + "the final index."); boolean[] newArray = new boolean[to - from]; if (to > original.length) { - System.arraycopy(original, from, newArray, 0, - original.length - from); - fill(newArray, original.length, newArray.length, false); + System.arraycopy(original, from, newArray, 0, + original.length - from); + fill(newArray, original.length, newArray.length, false); } else System.arraycopy(original, from, newArray, 0, to - from); @@ -3459,13 +3459,13 @@ public class Arrays { if (from > to) throw new IllegalArgumentException("The initial index is after " + - "the final index."); + "the final index."); byte[] newArray = new byte[to - from]; if (to > original.length) { - System.arraycopy(original, from, newArray, 0, - original.length - from); - fill(newArray, original.length, newArray.length, (byte)0); + System.arraycopy(original, from, newArray, 0, + original.length - from); + fill(newArray, original.length, newArray.length, (byte)0); } else System.arraycopy(original, from, newArray, 0, to - from); @@ -3528,13 +3528,13 @@ public class Arrays { if (from > to) throw new IllegalArgumentException("The initial index is after " + - "the final index."); + "the final index."); char[] newArray = new char[to - from]; if (to > original.length) { - System.arraycopy(original, from, newArray, 0, - original.length - from); - fill(newArray, original.length, newArray.length, '\0'); + System.arraycopy(original, from, newArray, 0, + original.length - from); + fill(newArray, original.length, newArray.length, '\0'); } else System.arraycopy(original, from, newArray, 0, to - from); @@ -3597,13 +3597,13 @@ public class Arrays { if (from > to) throw new IllegalArgumentException("The initial index is after " + - "the final index."); + "the final index."); double[] newArray = new double[to - from]; if (to > original.length) { - System.arraycopy(original, from, newArray, 0, - original.length - from); - fill(newArray, original.length, newArray.length, 0d); + System.arraycopy(original, from, newArray, 0, + original.length - from); + fill(newArray, original.length, newArray.length, 0d); } else System.arraycopy(original, from, newArray, 0, to - from); @@ -3666,13 +3666,13 @@ public class Arrays { if (from > to) throw new IllegalArgumentException("The initial index is after " + - "the final index."); + "the final index."); float[] newArray = new float[to - from]; if (to > original.length) { - System.arraycopy(original, from, newArray, 0, - original.length - from); - fill(newArray, original.length, newArray.length, 0f); + System.arraycopy(original, from, newArray, 0, + original.length - from); + fill(newArray, original.length, newArray.length, 0f); } else System.arraycopy(original, from, newArray, 0, to - from); @@ -3735,13 +3735,13 @@ public class Arrays { if (from > to) throw new IllegalArgumentException("The initial index is after " + - "the final index."); + "the final index."); int[] newArray = new int[to - from]; if (to > original.length) { - System.arraycopy(original, from, newArray, 0, - original.length - from); - fill(newArray, original.length, newArray.length, 0); + System.arraycopy(original, from, newArray, 0, + original.length - from); + fill(newArray, original.length, newArray.length, 0); } else System.arraycopy(original, from, newArray, 0, to - from); @@ -3804,13 +3804,13 @@ public class Arrays { if (from > to) throw new IllegalArgumentException("The initial index is after " + - "the final index."); + "the final index."); long[] newArray = new long[to - from]; if (to > original.length) { - System.arraycopy(original, from, newArray, 0, - original.length - from); - fill(newArray, original.length, newArray.length, 0L); + System.arraycopy(original, from, newArray, 0, + original.length - from); + fill(newArray, original.length, newArray.length, 0L); } else System.arraycopy(original, from, newArray, 0, to - from); @@ -3873,13 +3873,13 @@ public class Arrays { if (from > to) throw new IllegalArgumentException("The initial index is after " + - "the final index."); + "the final index."); short[] newArray = new short[to - from]; if (to > original.length) { - System.arraycopy(original, from, newArray, 0, - original.length - from); - fill(newArray, original.length, newArray.length, (short)0); + System.arraycopy(original, from, newArray, 0, + original.length - from); + fill(newArray, original.length, newArray.length, (short)0); } else System.arraycopy(original, from, newArray, 0, to - from); @@ -3942,14 +3942,14 @@ public class Arrays { if (from > to) throw new IllegalArgumentException("The initial index is after " + - "the final index."); + "the final index."); Class elemType = original.getClass().getComponentType(); T[] newArray = (T[]) Array.newInstance(elemType, to - from); if (to > original.length) { - System.arraycopy(original, from, newArray, 0, - original.length - from); - fill(newArray, original.length, newArray.length, null); + System.arraycopy(original, from, newArray, 0, + original.length - from); + fill(newArray, original.length, newArray.length, null); } else System.arraycopy(original, from, newArray, 0, to - from); @@ -3977,7 +3977,7 @@ public class Arrays * @see #copyOfRange(U[],int,int,Class) */ public static <T,U> T[] copyOf(U[] original, int newLength, - Class<? extends T[]> newType) + Class<? extends T[]> newType) { if (newLength < 0) throw new NegativeArraySizeException("The array size is negative."); @@ -4014,18 +4014,18 @@ public class Arrays * @see #copyOf(T[],int) */ public static <T,U> T[] copyOfRange(U[] original, int from, int to, - Class<? extends T[]> newType) + Class<? extends T[]> newType) { if (from > to) throw new IllegalArgumentException("The initial index is after " + - "the final index."); + "the final index."); T[] newArray = (T[]) Array.newInstance(newType.getComponentType(), - to - from); + to - from); if (to > original.length) { - System.arraycopy(original, from, newArray, 0, - original.length - from); - fill(newArray, original.length, newArray.length, null); + System.arraycopy(original, from, newArray, 0, + original.length - from); + fill(newArray, original.length, newArray.length, null); } else System.arraycopy(original, from, newArray, 0, to - from); diff --git a/libjava/classpath/java/util/BitSet.java b/libjava/classpath/java/util/BitSet.java index 13bf8a1..1072978 100644 --- a/libjava/classpath/java/util/BitSet.java +++ b/libjava/classpath/java/util/BitSet.java @@ -107,7 +107,7 @@ public class BitSet implements Cloneable, Serializable { if (nbits < 0) throw new NegativeArraySizeException(); - + int length = nbits >>> 6; if ((nbits & LONG_MASK) != 0) ++length; @@ -412,7 +412,7 @@ public class BitSet implements Cloneable, Serializable * Then the following definition of the hashCode method * would be a correct implementation of the actual algorithm: * - * + * <pre>public int hashCode() { long h = 1234; @@ -535,7 +535,7 @@ public class BitSet implements Cloneable, Serializable * Returns the index of the next true bit, from the specified bit * (inclusive). If there is none, -1 is returned. You can iterate over * all true bits with this loop:<br> - * + * <pre>for (int i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i + 1)) { // operate on i here @@ -750,8 +750,8 @@ public class BitSet implements Cloneable, Serializable { for (int i = other.bits.length - 1; i >= 0; i--) { - if ((bits[i] & other.bits[i]) != other.bits[i]) - return false; + if ((bits[i] & other.bits[i]) != other.bits[i]) + return false; } return true; } diff --git a/libjava/classpath/java/util/Calendar.java b/libjava/classpath/java/util/Calendar.java index 0449e12..8123b17 100644 --- a/libjava/classpath/java/util/Calendar.java +++ b/libjava/classpath/java/util/Calendar.java @@ -1,5 +1,5 @@ /* Calendar.java -- - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -487,7 +487,7 @@ public abstract class Calendar } /** - * The set of properties for obtaining the minimum number of days in + * The set of properties for obtaining the minimum number of days in * the first week. */ private static transient final Properties properties; @@ -498,7 +498,7 @@ public abstract class Calendar static { properties = new Properties(); - try + try { properties.load(Calendar.class.getResourceAsStream("weeks.properties")); } @@ -538,19 +538,19 @@ public abstract class Calendar first = properties.getProperty("firstDay.DEFAULT"); try { - if (min != null) - minimalDaysInFirstWeek = Integer.parseInt(min); + if (min != null) + minimalDaysInFirstWeek = Integer.parseInt(min); } catch (NumberFormatException ex) { - minimalDaysInFirstWeek = 1; + minimalDaysInFirstWeek = 1; } firstDayOfWeek = 1; if (first != null) for (int i = 0; i < 8; i++) - if (days[i].equals(first)) - firstDayOfWeek = i; + if (days[i].equals(first)) + firstDayOfWeek = i; clear(); } @@ -558,7 +558,7 @@ public abstract class Calendar /** * Creates a calendar representing the actual time, using the default * time zone and locale. - * + * * @return The new calendar. */ public static synchronized Calendar getInstance() @@ -569,11 +569,11 @@ public abstract class Calendar /** * Creates a calendar representing the actual time, using the given * time zone and the default locale. - * + * * @param zone a time zone (<code>null</code> not permitted). - * + * * @return The new calendar. - * + * * @throws NullPointerException if <code>zone</code> is <code>null</code>. */ public static synchronized Calendar getInstance(TimeZone zone) @@ -584,11 +584,11 @@ public abstract class Calendar /** * Creates a calendar representing the actual time, using the default * time zone and the given locale. - * + * * @param locale a locale (<code>null</code> not permitted). - * + * * @return The new calendar. - * + * * @throws NullPointerException if <code>locale</code> is <code>null</code>. */ public static synchronized Calendar getInstance(Locale locale) @@ -611,12 +611,12 @@ public abstract class Calendar /** * Creates a calendar representing the actual time, using the given * time zone and locale. - * + * * @param zone a time zone (<code>null</code> not permitted). * @param locale a locale (<code>null</code> not permitted). - * + * * @return The new calendar. - * + * * @throws NullPointerException if <code>zone</code> or <code>locale</code> * is <code>null</code>. */ @@ -627,43 +627,43 @@ public abstract class Calendar try { - if (calendarClass == null) - { - calendarClass = Class.forName(calendarClassName); - if (Calendar.class.isAssignableFrom(calendarClass)) - cache.put(locale, calendarClass); - } - - // GregorianCalendar is by far the most common case. Optimize by - // avoiding reflection. - if (calendarClass == GregorianCalendar.class) - return new GregorianCalendar(zone, locale); - - if (Calendar.class.isAssignableFrom(calendarClass)) - { - Constructor ctor = calendarClass.getConstructor(ctorArgTypes); - return (Calendar) ctor.newInstance(new Object[] { zone, locale }); - } + if (calendarClass == null) + { + calendarClass = Class.forName(calendarClassName); + if (Calendar.class.isAssignableFrom(calendarClass)) + cache.put(locale, calendarClass); + } + + // GregorianCalendar is by far the most common case. Optimize by + // avoiding reflection. + if (calendarClass == GregorianCalendar.class) + return new GregorianCalendar(zone, locale); + + if (Calendar.class.isAssignableFrom(calendarClass)) + { + Constructor ctor = calendarClass.getConstructor(ctorArgTypes); + return (Calendar) ctor.newInstance(new Object[] { zone, locale }); + } } catch (ClassNotFoundException ex) { - exception = ex; + exception = ex; } catch (IllegalAccessException ex) { - exception = ex; + exception = ex; } catch (NoSuchMethodException ex) { - exception = ex; + exception = ex; } catch (InstantiationException ex) { - exception = ex; + exception = ex; } catch (InvocationTargetException ex) { - exception = ex; + exception = ex; } throw new RuntimeException("Error instantiating calendar for locale " @@ -710,9 +710,9 @@ public abstract class Calendar /** * Sets this Calendar's time to the given Date. All time fields * are invalidated by this method. - * + * * @param date the date (<code>null</code> not permitted). - * + * * @throws NullPointerException if <code>date</code> is <code>null</code>. */ public final void setTime(Date date) @@ -794,7 +794,7 @@ public abstract class Calendar { if (isTimeSet) for (int i = 0; i < FIELD_COUNT; i++) - isSet[i] = false; + isSet[i] = false; isTimeSet = false; fields[field] = value; isSet[field] = true; @@ -808,74 +808,74 @@ public abstract class Calendar switch (field) { case MONTH: // pattern 1,2 or 3 - isSet[DAY_OF_YEAR] = false; - isSet[WEEK_OF_YEAR] = false; - break; + isSet[DAY_OF_YEAR] = false; + isSet[WEEK_OF_YEAR] = false; + break; case DAY_OF_MONTH: // pattern 1 - isSet[YEAR] = true; - isSet[MONTH] = true; - isSet[WEEK_OF_MONTH] = true; - isSet[DAY_OF_WEEK] = false; - isSet[DAY_OF_WEEK_IN_MONTH] = false; - isSet[DAY_OF_YEAR] = false; - isSet[WEEK_OF_YEAR] = false; - break; + isSet[YEAR] = true; + isSet[MONTH] = true; + isSet[WEEK_OF_MONTH] = true; + isSet[DAY_OF_WEEK] = false; + isSet[DAY_OF_WEEK_IN_MONTH] = false; + isSet[DAY_OF_YEAR] = false; + isSet[WEEK_OF_YEAR] = false; + break; case WEEK_OF_MONTH: // pattern 2 - if (! isSet[DAY_OF_WEEK]) - fields[DAY_OF_WEEK] = getFirstDayOfWeek(); - isSet[YEAR] = true; - isSet[MONTH] = true; - isSet[DAY_OF_WEEK] = true; - isSet[DAY_OF_MONTH] = false; - isSet[DAY_OF_WEEK_IN_MONTH] = false; - isSet[DAY_OF_YEAR] = false; - isSet[WEEK_OF_YEAR] = false; - break; + if (! isSet[DAY_OF_WEEK]) + fields[DAY_OF_WEEK] = getFirstDayOfWeek(); + isSet[YEAR] = true; + isSet[MONTH] = true; + isSet[DAY_OF_WEEK] = true; + isSet[DAY_OF_MONTH] = false; + isSet[DAY_OF_WEEK_IN_MONTH] = false; + isSet[DAY_OF_YEAR] = false; + isSet[WEEK_OF_YEAR] = false; + break; case DAY_OF_WEEK_IN_MONTH: // pattern 3 - if (! isSet[DAY_OF_WEEK]) - fields[DAY_OF_WEEK] = getFirstDayOfWeek(); - isSet[YEAR] = true; - isSet[MONTH] = true; - isSet[DAY_OF_WEEK] = true; - isSet[DAY_OF_YEAR] = false; - isSet[DAY_OF_MONTH] = false; - isSet[WEEK_OF_MONTH] = false; - isSet[WEEK_OF_YEAR] = false; - break; + if (! isSet[DAY_OF_WEEK]) + fields[DAY_OF_WEEK] = getFirstDayOfWeek(); + isSet[YEAR] = true; + isSet[MONTH] = true; + isSet[DAY_OF_WEEK] = true; + isSet[DAY_OF_YEAR] = false; + isSet[DAY_OF_MONTH] = false; + isSet[WEEK_OF_MONTH] = false; + isSet[WEEK_OF_YEAR] = false; + break; case DAY_OF_YEAR: // pattern 4 - isSet[YEAR] = true; - isSet[MONTH] = false; - isSet[WEEK_OF_MONTH] = false; - isSet[DAY_OF_MONTH] = false; - isSet[DAY_OF_WEEK] = false; - isSet[WEEK_OF_YEAR] = false; - isSet[DAY_OF_WEEK_IN_MONTH] = false; - break; + isSet[YEAR] = true; + isSet[MONTH] = false; + isSet[WEEK_OF_MONTH] = false; + isSet[DAY_OF_MONTH] = false; + isSet[DAY_OF_WEEK] = false; + isSet[WEEK_OF_YEAR] = false; + isSet[DAY_OF_WEEK_IN_MONTH] = false; + break; case WEEK_OF_YEAR: // pattern 5 - if (! isSet[DAY_OF_WEEK]) - fields[DAY_OF_WEEK] = getFirstDayOfWeek(); - isSet[YEAR] = true; - isSet[DAY_OF_WEEK] = true; - isSet[MONTH] = false; - isSet[DAY_OF_MONTH] = false; - isSet[WEEK_OF_MONTH] = false; - isSet[DAY_OF_YEAR] = false; - isSet[DAY_OF_WEEK_IN_MONTH] = false; - break; + if (! isSet[DAY_OF_WEEK]) + fields[DAY_OF_WEEK] = getFirstDayOfWeek(); + isSet[YEAR] = true; + isSet[DAY_OF_WEEK] = true; + isSet[MONTH] = false; + isSet[DAY_OF_MONTH] = false; + isSet[WEEK_OF_MONTH] = false; + isSet[DAY_OF_YEAR] = false; + isSet[DAY_OF_WEEK_IN_MONTH] = false; + break; case AM_PM: - isSet[HOUR] = true; - isSet[HOUR_OF_DAY] = false; - break; + isSet[HOUR] = true; + isSet[HOUR_OF_DAY] = false; + break; case HOUR_OF_DAY: - isSet[AM_PM] = false; - isSet[HOUR] = false; - break; + isSet[AM_PM] = false; + isSet[HOUR] = false; + break; case HOUR: - isSet[AM_PM] = true; - isSet[HOUR_OF_DAY] = false; - break; + isSet[AM_PM] = true; + isSet[HOUR_OF_DAY] = false; + break; case DST_OFFSET: - explicitDSTOffset = true; + explicitDSTOffset = true; } // May have crossed over a DST boundary. @@ -950,7 +950,7 @@ public abstract class Calendar isTimeSet = false; areFieldsSet = false; int zoneOffs = zone.getRawOffset(); - int[] tempFields = + int[] tempFields = { 1, 1970, JANUARY, 1, 1, 1, 1, THURSDAY, 1, AM, 0, 0, 0, 0, 0, zoneOffs, 0 @@ -969,7 +969,7 @@ public abstract class Calendar */ public final void clear(int field) { - int[] tempFields = + int[] tempFields = { 1, 1970, JANUARY, 1, 1, 1, 1, THURSDAY, 1, AM, 0, 0, 0, 0, 0, zone.getRawOffset(), 0 @@ -1118,13 +1118,13 @@ public abstract class Calendar { while (amount > 0) { - roll(field, true); - amount--; + roll(field, true); + amount--; } while (amount < 0) { - roll(field, false); - amount++; + roll(field, false); + amount++; } } @@ -1260,9 +1260,9 @@ public abstract class Calendar tmp.set(field, min); for (; min > end; min--) { - tmp.add(field, -1); // Try to get smaller - if (tmp.get(field) != min - 1) - break; // Done if not successful + tmp.add(field, -1); // Try to get smaller + if (tmp.get(field) != min - 1) + break; // Done if not successful } return min; } @@ -1285,9 +1285,9 @@ public abstract class Calendar tmp.set(field, max); for (; max < end; max++) { - tmp.add(field, 1); - if (tmp.get(field) != max + 1) - break; + tmp.add(field, 1); + if (tmp.get(field) != max + 1) + break; } return max; } @@ -1295,14 +1295,14 @@ public abstract class Calendar /** * Compares the time of two calendar instances. * @param cal the calendar to which the time should be compared. - * @return 0 if the two calendars are set to the same time, - * less than 0 if the time of this calendar is before that of + * @return 0 if the two calendars are set to the same time, + * less than 0 if the time of this calendar is before that of * <code>cal</code>, or more than 0 if the time of this calendar is after * that of <code>cal</code>. * * @param cal the calendar to compare this instance with. * @throws NullPointerException if <code>cal</code> is null. - * @throws IllegalArgumentException if either calendar has fields set to + * @throws IllegalArgumentException if either calendar has fields set to * invalid values. * @since 1.5 */ @@ -1324,18 +1324,18 @@ public abstract class Calendar { try { - Calendar cal = (Calendar) super.clone(); - cal.fields = (int[]) fields.clone(); - cal.isSet = (boolean[]) isSet.clone(); - return cal; + Calendar cal = (Calendar) super.clone(); + cal.fields = (int[]) fields.clone(); + cal.isSet = (boolean[]) isSet.clone(); + return cal; } catch (CloneNotSupportedException ex) { - return null; + return null; } } - private static final String[] fieldNames = + private static final String[] fieldNames = { ",ERA=", ",YEAR=", ",MONTH=", ",WEEK_OF_YEAR=", @@ -1367,11 +1367,11 @@ public abstract class Calendar sb.append(",areFieldsSet=" + areFieldsSet); for (int i = 0; i < FIELD_COUNT; i++) { - sb.append(fieldNames[i]); - if (isSet[i]) - sb.append(fields[i]); - else - sb.append("?"); + sb.append(fieldNames[i]); + if (isSet[i]) + sb.append(fields[i]); + else + sb.append("?"); } sb.append(",lenient=").append(lenient); sb.append(",firstDayOfWeek=").append(firstDayOfWeek); @@ -1407,13 +1407,13 @@ public abstract class Calendar if (serialVersionOnStream > 1) { - // This is my interpretation of the serial number: - // Sun wants to remove all fields from the stream someday - // and will then increase the serialVersion number again. - // We prepare to be compatible. - fields = new int[FIELD_COUNT]; - isSet = new boolean[FIELD_COUNT]; - areFieldsSet = false; + // This is my interpretation of the serial number: + // Sun wants to remove all fields from the stream someday + // and will then increase the serialVersion number again. + // We prepare to be compatible. + fields = new int[FIELD_COUNT]; + isSet = new boolean[FIELD_COUNT]; + areFieldsSet = false; } } @@ -1449,15 +1449,15 @@ public abstract class Calendar { if (field < 0 || field >= FIELD_COUNT) throw new IllegalArgumentException("The field value, " + field + - ", is invalid."); + ", is invalid."); if (style != SHORT && style != LONG) throw new IllegalArgumentException("The style must be either " + - "short or long."); + "short or long."); if (field == YEAR || field == WEEK_OF_YEAR || - field == WEEK_OF_MONTH || field == DAY_OF_MONTH || - field == DAY_OF_YEAR || field == DAY_OF_WEEK_IN_MONTH || - field == HOUR || field == HOUR_OF_DAY || field == MINUTE || - field == SECOND || field == MILLISECOND) + field == WEEK_OF_MONTH || field == DAY_OF_MONTH || + field == DAY_OF_YEAR || field == DAY_OF_WEEK_IN_MONTH || + field == HOUR || field == HOUR_OF_DAY || field == MINUTE || + field == SECOND || field == MILLISECOND) return null; int value = get(field); @@ -1466,30 +1466,30 @@ public abstract class Calendar return syms.getEras()[value]; if (field == MONTH) if (style == LONG) - return syms.getMonths()[value]; - else - return syms.getShortMonths()[value]; + return syms.getMonths()[value]; + else + return syms.getShortMonths()[value]; if (field == DAY_OF_WEEK) if (style == LONG) - return syms.getWeekdays()[value]; + return syms.getWeekdays()[value]; else - return syms.getShortWeekdays()[value]; + return syms.getShortWeekdays()[value]; if (field == AM_PM) return syms.getAmPmStrings()[value]; if (field == ZONE_OFFSET) if (style == LONG) - return syms.getZoneStrings()[value][1]; + return syms.getZoneStrings()[value][1]; else - return syms.getZoneStrings()[value][2]; + return syms.getZoneStrings()[value][2]; if (field == DST_OFFSET) if (style == LONG) - return syms.getZoneStrings()[value][3]; + return syms.getZoneStrings()[value][3]; else - return syms.getZoneStrings()[value][4]; + return syms.getZoneStrings()[value][4]; throw new InternalError("Failed to resolve field " + field + - " with style " + style + " for locale " + - locale); + " with style " + style + " for locale " + + locale); } /** @@ -1528,93 +1528,93 @@ public abstract class Calendar { if (field < 0 || field >= FIELD_COUNT) throw new IllegalArgumentException("The field value, " + field + - ", is invalid."); + ", is invalid."); if (style != SHORT && style != LONG && style != ALL_STYLES) throw new IllegalArgumentException("The style must be either " + - "short, long or all styles."); + "short, long or all styles."); if (field == YEAR || field == WEEK_OF_YEAR || - field == WEEK_OF_MONTH || field == DAY_OF_MONTH || - field == DAY_OF_YEAR || field == DAY_OF_WEEK_IN_MONTH || - field == HOUR || field == HOUR_OF_DAY || field == MINUTE || - field == SECOND || field == MILLISECOND) + field == WEEK_OF_MONTH || field == DAY_OF_MONTH || + field == DAY_OF_YEAR || field == DAY_OF_WEEK_IN_MONTH || + field == HOUR || field == HOUR_OF_DAY || field == MINUTE || + field == SECOND || field == MILLISECOND) return null; DateFormatSymbols syms = DateFormatSymbols.getInstance(locale); Map<String,Integer> map = new HashMap<String,Integer>(); if (field == ERA) { - String[] eras = syms.getEras(); - for (int a = 0; a < eras.length; ++a) - map.put(eras[a], a); - return map; + String[] eras = syms.getEras(); + for (int a = 0; a < eras.length; ++a) + map.put(eras[a], a); + return map; } if (field == MONTH) { - if (style == LONG || style == ALL_STYLES) - { - String[] months = syms.getMonths(); - for (int a = 0; a < months.length; ++a) - map.put(months[a], a); - } - if (style == SHORT || style == ALL_STYLES) - { - String[] months = syms.getShortMonths(); - for (int a = 0; a < months.length; ++a) - map.put(months[a], a); - } - return map; + if (style == LONG || style == ALL_STYLES) + { + String[] months = syms.getMonths(); + for (int a = 0; a < months.length; ++a) + map.put(months[a], a); + } + if (style == SHORT || style == ALL_STYLES) + { + String[] months = syms.getShortMonths(); + for (int a = 0; a < months.length; ++a) + map.put(months[a], a); + } + return map; } if (field == DAY_OF_WEEK) { - if (style == LONG || style == ALL_STYLES) - { - String[] weekdays = syms.getWeekdays(); - for (int a = SUNDAY; a < weekdays.length; ++a) - map.put(weekdays[a], a); - } - if (style == SHORT || style == ALL_STYLES) - { - String[] weekdays = syms.getShortWeekdays(); - for (int a = SUNDAY; a < weekdays.length; ++a) - map.put(weekdays[a], a); - } - return map; + if (style == LONG || style == ALL_STYLES) + { + String[] weekdays = syms.getWeekdays(); + for (int a = SUNDAY; a < weekdays.length; ++a) + map.put(weekdays[a], a); + } + if (style == SHORT || style == ALL_STYLES) + { + String[] weekdays = syms.getShortWeekdays(); + for (int a = SUNDAY; a < weekdays.length; ++a) + map.put(weekdays[a], a); + } + return map; } if (field == AM_PM) { - String[] ampms = syms.getAmPmStrings(); - for (int a = 0; a < ampms.length; ++a) - map.put(ampms[a], a); - return map; + String[] ampms = syms.getAmPmStrings(); + for (int a = 0; a < ampms.length; ++a) + map.put(ampms[a], a); + return map; } if (field == ZONE_OFFSET) { - String[][] zones = syms.getZoneStrings(); - for (int a = 0; a < zones.length; ++a) - { - if (style == LONG || style == ALL_STYLES) - map.put(zones[a][1], a); - if (style == SHORT || style == ALL_STYLES) - map.put(zones[a][2], a); - } - return map; + String[][] zones = syms.getZoneStrings(); + for (int a = 0; a < zones.length; ++a) + { + if (style == LONG || style == ALL_STYLES) + map.put(zones[a][1], a); + if (style == SHORT || style == ALL_STYLES) + map.put(zones[a][2], a); + } + return map; } if (field == DST_OFFSET) { - String[][] zones = syms.getZoneStrings(); - for (int a = 0; a < zones.length; ++a) - { - if (style == LONG || style == ALL_STYLES) - map.put(zones[a][3], a); - if (style == SHORT || style == ALL_STYLES) - map.put(zones[a][4], a); - } - return map; + String[][] zones = syms.getZoneStrings(); + for (int a = 0; a < zones.length; ++a) + { + if (style == LONG || style == ALL_STYLES) + map.put(zones[a][3], a); + if (style == SHORT || style == ALL_STYLES) + map.put(zones[a][4], a); + } + return map; } - + throw new InternalError("Failed to resolve field " + field + - " with style " + style + " for locale " + - locale); + " with style " + style + " for locale " + + locale); } } diff --git a/libjava/classpath/java/util/Collections.java b/libjava/classpath/java/util/Collections.java index 066c9d5..828c6ec 100644 --- a/libjava/classpath/java/util/Collections.java +++ b/libjava/classpath/java/util/Collections.java @@ -354,7 +354,7 @@ public class Collections * This is true only if the given collection is also empty. * @param c The collection of objects, which should be compared * against the members of this list. - * @return <code>true</code> if c is also empty. + * @return <code>true</code> if c is also empty. */ public boolean containsAll(Collection<?> c) { @@ -552,7 +552,7 @@ public class Collections /** * No mappings, so this returns null. * @param o The key of the object to retrieve. - * @return null. + * @return null. */ public V get(Object o) { @@ -617,7 +617,7 @@ public class Collections } } // class EmptyMap - + /** * Compare two objects with or without a Comparator. If c is null, uses the * natural ordering. Slightly slower than doing it inline if the JVM isn't @@ -653,8 +653,8 @@ public class Collections * @throws NullPointerException if a null element has compareTo called * @see #sort(List) */ - public static <T> int binarySearch(List<? extends Comparable<? super T>> l, - T key) + public static <T> int binarySearch(List<? extends Comparable<? super T>> l, + T key) { return binarySearch(l, key, null); } @@ -687,7 +687,7 @@ public class Collections * @see #sort(List, Comparator) */ public static <T> int binarySearch(List<? extends T> l, T key, - Comparator<? super T> c) + Comparator<? super T> c) { int pos = 0; int low = 0; @@ -697,53 +697,53 @@ public class Collections // if the list is sequential-access. if (isSequential(l)) { - ListIterator<T> itr = ((List<T>) l).listIterator(); + ListIterator<T> itr = ((List<T>) l).listIterator(); int i = 0; - T o = itr.next(); // Assumes list is not empty (see isSequential) - boolean forward = true; + T o = itr.next(); // Assumes list is not empty (see isSequential) + boolean forward = true; while (low <= hi) { pos = (low + hi) >>> 1; if (i < pos) - { - if (!forward) - itr.next(); // Changing direction first. - for ( ; i != pos; i++, o = itr.next()) + { + if (!forward) + itr.next(); // Changing direction first. + for ( ; i != pos; i++, o = itr.next()) ; - forward = true; - } + forward = true; + } else - { - if (forward) - itr.previous(); // Changing direction first. - for ( ; i != pos; i--, o = itr.previous()) + { + if (forward) + itr.previous(); // Changing direction first. + for ( ; i != pos; i--, o = itr.previous()) ; - forward = false; - } - final int d = compare(o, key, c); - if (d == 0) + forward = false; + } + final int d = compare(o, key, c); + if (d == 0) return pos; - else if (d > 0) + else if (d > 0) hi = pos - 1; - else + else // This gets the insertion point right on the last loop low = ++pos; } } else { - while (low <= hi) - { - pos = (low + hi) >>> 1; - final int d = compare(((List<T>) l).get(pos), key, c); - if (d == 0) + while (low <= hi) + { + pos = (low + hi) >>> 1; + final int d = compare(((List<T>) l).get(pos), key, c); + if (d == 0) return pos; - else if (d > 0) + else if (d > 0) hi = pos - 1; - else + else // This gets the insertion point right on the last loop low = ++pos; - } + } } // If we failed to find it, we do the same whichever search we did. @@ -799,7 +799,7 @@ public class Collections */ public final boolean hasMoreElements() { - return i.hasNext(); + return i.hasNext(); } /** @@ -810,7 +810,7 @@ public class Collections */ public final T nextElement() { - return i.next(); + return i.next(); } }; } @@ -829,8 +829,8 @@ public class Collections ListIterator<? super T> itr = l.listIterator(); for (int i = l.size() - 1; i >= 0; --i) { - itr.next(); - itr.set(val); + itr.next(); + itr.set(val); } } @@ -928,16 +928,16 @@ public class Collections * (only possible when order is null) */ public static <T> T max(Collection<? extends T> c, - Comparator<? super T> order) + Comparator<? super T> order) { Iterator<? extends T> itr = c.iterator(); T max = itr.next(); // throws NoSuchElementException int csize = c.size(); for (int i = 1; i < csize; i++) { - T o = itr.next(); - if (compare(max, o, order) < 0) - max = o; + T o = itr.next(); + if (compare(max, o, order) < 0) + max = o; } return max; } @@ -974,16 +974,16 @@ public class Collections * (only possible when order is null) */ public static <T> T min(Collection<? extends T> c, - Comparator<? super T> order) + Comparator<? super T> order) { Iterator<? extends T> itr = c.iterator(); - T min = itr.next(); // throws NoSuchElementExcception + T min = itr.next(); // throws NoSuchElementExcception int csize = c.size(); for (int i = 1; i < csize; i++) { - T o = itr.next(); - if (compare(min, o, order) > 0) - min = o; + T o = itr.next(); + if (compare(min, o, order) > 0) + min = o; } return min; } @@ -1044,7 +1044,7 @@ public class Collections CopiesList(int n, T o) { if (n < 0) - throw new IllegalArgumentException(); + throw new IllegalArgumentException(); this.n = n; element = o; } @@ -1190,12 +1190,12 @@ public class Collections ListIterator i2 = l.listIterator(pos2); while (pos1 < pos2) { - Object o1 = i1.next(); + Object o1 = i1.next(); Object o2 = i2.previous(); - i1.set(o2); - i2.set(o1); - ++pos1; - --pos2; + i1.set(o2); + i2.set(o1); + ++pos1; + --pos2; } } @@ -1221,7 +1221,7 @@ public class Collections { public int compare(T a, T b) { - return - c.compare(a, b); + return - c.compare(a, b); } }; } @@ -1344,7 +1344,7 @@ public class Collections // Now, make the swaps. We must take the remainder every time through // the inner loop so that we don't overflow i to negative values. - List<Object> objList = (List<Object>) list; + List<Object> objList = (List<Object>) list; while (--lcm >= 0) { Object o = objList.get(lcm); @@ -1381,10 +1381,10 @@ public class Collections if (defaultRandom == null) { synchronized (Collections.class) - { - if (defaultRandom == null) - defaultRandom = new Random(); - } + { + if (defaultRandom == null) + defaultRandom = new Random(); + } } shuffle(l, defaultRandom); } @@ -1432,12 +1432,12 @@ public class Collections for (int pos = lsize - 1; pos > 0; --pos) { - // Obtain a random position to swap with. pos + 1 is used so that the - // range of the random number includes the current position. - int swap = r.nextInt(pos + 1); + // Obtain a random position to swap with. pos + 1 is used so that the + // range of the random number includes the current position. + int swap = r.nextInt(pos + 1); - // Swap the desired element. - Object o; + // Swap the desired element. + Object o; if (sequential) { o = a[swap]; @@ -1446,7 +1446,7 @@ public class Collections else o = list.set(swap, i.previous()); - i.set(o); + i.set(o); } } @@ -1455,11 +1455,11 @@ public class Collections * collection. The frequency represents the number of occurrences of * elements within the collection which return <code>true</code> when * compared with the object using the <code>equals</code> method. - * + * * @param c the collection to scan for occurrences of the object. * @param o the object to locate occurrances of within the collection. * @throws NullPointerException if the collection is <code>null</code>. - * @since 1.5 + * @since 1.5 */ public static int frequency (Collection<?> c, Object o) { @@ -1467,9 +1467,9 @@ public class Collections final Iterator<?> it = c.iterator(); while (it.hasNext()) { - Object v = it.next(); - if (AbstractCollection.equals(o, v)) - ++result; + Object v = it.next(); + if (AbstractCollection.equals(o, v)) + ++result; } return result; } @@ -1505,9 +1505,9 @@ public class Collections for (T element : a) { - boolean result = c.add(element); - if (result) - overall = true; + boolean result = c.add(element); + if (result) + overall = true; } return overall; } @@ -1531,11 +1531,11 @@ public class Collections final Iterator<Object> it = oc1.iterator(); while (it.hasNext()) if (c2.contains(it.next())) - return false; + return false; return true; } - + /** * Obtain an immutable Set consisting of a single element. The return value * of this method is Serializable. @@ -1595,30 +1595,30 @@ public class Collections { return new Iterator<T>() { - /** - * Flag to indicate whether or not the element has - * been retrieved. - */ + /** + * Flag to indicate whether or not the element has + * been retrieved. + */ private boolean hasNext = true; - /** - * Returns <code>true</code> if elements still remain to be - * iterated through. - * - * @return <code>true</code> if the element has not yet been returned. - */ + /** + * Returns <code>true</code> if elements still remain to be + * iterated through. + * + * @return <code>true</code> if the element has not yet been returned. + */ public boolean hasNext() { return hasNext; } - /** - * Returns the element. - * - * @return The element used by this singleton. - * @throws NoSuchElementException if the object - * has already been retrieved. - */ + /** + * Returns the element. + * + * @return The element used by this singleton. + * @throws NoSuchElementException if the object + * has already been retrieved. + */ public T next() { if (hasNext) @@ -1630,15 +1630,15 @@ public class Collections throw new NoSuchElementException(); } - /** - * Removes the element from the singleton. - * As this set is immutable, this will always - * throw an exception. - * - * @throws UnsupportedOperationException as the - * singleton set doesn't support - * <code>remove()</code>. - */ + /** + * Removes the element from the singleton. + * As this set is immutable, this will always + * throw an exception. + * + * @throws UnsupportedOperationException as the + * singleton set doesn't support + * <code>remove()</code>. + */ public void remove() { throw new UnsupportedOperationException(); @@ -1678,7 +1678,7 @@ public class Collections /** * The hash is just that of the element. - * + * * @return The hashcode of the element. */ public int hashCode() @@ -1842,7 +1842,7 @@ public class Collections /** * Sublists are limited in scope. - * + * * @param from The starting bound for the sublist. * @param to The ending bound for the sublist. * @return Either an empty list if both bounds are @@ -1876,7 +1876,7 @@ public class Collections * Obvious string. * * @return The string surrounded by enclosing - * square brackets. + * square brackets. */ public String toString() { @@ -1949,25 +1949,25 @@ public class Collections public Set<Map.Entry<K, V>> entrySet() { if (entries == null) - { - Map.Entry<K,V> entry = new AbstractMap.SimpleEntry<K, V>(k, v) - { - /** - * Sets the value of the map entry to the supplied value. - * An exception is always thrown, as the map is immutable. - * - * @param o The new value. - * @return The old value. - * @throws UnsupportedOperationException as setting the value - * is not supported. - */ - public V setValue(V o) - { - throw new UnsupportedOperationException(); - } - }; - entries = singleton(entry); - } + { + Map.Entry<K,V> entry = new AbstractMap.SimpleEntry<K, V>(k, v) + { + /** + * Sets the value of the map entry to the supplied value. + * An exception is always thrown, as the map is immutable. + * + * @param o The new value. + * @return The old value. + * @throws UnsupportedOperationException as setting the value + * is not supported. + */ + public V setValue(V o) + { + throw new UnsupportedOperationException(); + } + }; + entries = singleton(entry); + } return entries; } @@ -2100,10 +2100,10 @@ public class Collections * <code>null</code> for natural ordering * @throws ClassCastException if c will not compare some pair of items * @throws UnsupportedOperationException if the List is not modifiable - * @throws NullPointerException if the List is <code>null</code> or - * <code>null</code> is compared by natural ordering (only possible + * @throws NullPointerException if the List is <code>null</code> or + * <code>null</code> is compared by natural ordering (only possible * when c is <code>null</code>) - * + * * @see Arrays#sort(Object[], Comparator) */ public static <T> void sort(List<T> l, Comparator<? super T> c) @@ -2113,8 +2113,8 @@ public class Collections ListIterator<T> i = l.listIterator(); for (int pos = 0, alen = a.length; pos < alen; pos++) { - i.next(); - i.set(a[pos]); + i.next(); + i.set(a[pos]); } } @@ -2136,7 +2136,7 @@ public class Collections list.set(i, list.set(j, list.get(i))); } - + /** * Returns a synchronized (thread-safe) collection wrapper backed by the * given collection. Notice that element access through the iterators @@ -2536,7 +2536,7 @@ public class Collections /** * Retrieves the next object in the underlying collection. * A lock is obtained on the mutex before the collection is accessed. - * + * * @return The next object in the collection. * @throws NoSuchElementException if there are no more elements */ @@ -2695,7 +2695,7 @@ public class Collections /** * Add the contents of a collection to the underlying list at the given - * index (optional operation). If the list imposes restraints on what + * index (optional operation). If the list imposes restraints on what * can be inserted, such as no null elements, this should be documented. * A lock is obtained on the mutex before any of the elements are added. * @@ -2854,7 +2854,7 @@ public class Collections synchronized (mutex) { return new SynchronizedListIterator<T>(mutex, - list.listIterator(index)); + list.listIterator(index)); } } @@ -2926,7 +2926,7 @@ public class Collections synchronized (mutex) { return new SynchronizedList<T>(mutex, - list.subList(fromIndex, toIndex)); + list.subList(fromIndex, toIndex)); } } } // class SynchronizedList @@ -2991,8 +2991,8 @@ public class Collections synchronized (mutex) { return new SynchronizedRandomAccessList<T>(mutex, - list.subList(fromIndex, - toIndex)); + list.subList(fromIndex, + toIndex)); } } } // class SynchronizedRandomAccessList @@ -3308,14 +3308,14 @@ public class Collections e = o; } - /** - * Returns <code>true</code> if the object, o, implements <code>Map.Entry</code> - * with the same key and value as the underlying entry. A lock is - * obtained on the mutex before the comparison takes place. - * - * @param o The object to compare with this entry. - * @return <code>true</code> if o is equivalent to the underlying map entry. - */ + /** + * Returns <code>true</code> if the object, o, implements <code>Map.Entry</code> + * with the same key and value as the underlying entry. A lock is + * obtained on the mutex before the comparison takes place. + * + * @param o The object to compare with this entry. + * @return <code>true</code> if o is equivalent to the underlying map entry. + */ public boolean equals(Object o) { synchronized (mutex) @@ -3324,12 +3324,12 @@ public class Collections } } - /** - * Returns the key used in the underlying map entry. A lock is obtained - * on the mutex before the key is retrieved. - * - * @return The key of the underlying map entry. - */ + /** + * Returns the key used in the underlying map entry. A lock is obtained + * on the mutex before the key is retrieved. + * + * @return The key of the underlying map entry. + */ public K getKey() { synchronized (mutex) @@ -3338,12 +3338,12 @@ public class Collections } } - /** - * Returns the value used in the underlying map entry. A lock is obtained - * on the mutex before the value is retrieved. - * - * @return The value of the underlying map entry. - */ + /** + * Returns the value used in the underlying map entry. A lock is obtained + * on the mutex before the value is retrieved. + * + * @return The value of the underlying map entry. + */ public V getValue() { synchronized (mutex) @@ -3352,15 +3352,15 @@ public class Collections } } - /** - * Computes the hash code for the underlying map entry. - * This computation is described in the documentation for the - * <code>Map</code> interface. A lock is obtained on the mutex - * before the underlying map is accessed. - * - * @return The hash code of the underlying map entry. - * @see Map#hashCode() - */ + /** + * Computes the hash code for the underlying map entry. + * This computation is described in the documentation for the + * <code>Map</code> interface. A lock is obtained on the mutex + * before the underlying map is accessed. + * + * @return The hash code of the underlying map entry. + * @see Map#hashCode() + */ public int hashCode() { synchronized (mutex) @@ -3369,22 +3369,22 @@ public class Collections } } - /** - * Replaces the value in the underlying map entry with the specified - * object (optional operation). A lock is obtained on the mutex - * before the map is altered. The map entry, in turn, will alter - * the underlying map object. The operation is undefined if the - * <code>remove()</code> method of the iterator has been called - * beforehand. - * - * @param value the new value to store - * @return the old value - * @throws UnsupportedOperationException if the operation is not supported. - * @throws ClassCastException if the value is of the wrong type. - * @throws IllegalArgumentException if something about the value - * prevents it from existing in this map. - * @throws NullPointerException if the map forbids null values. - */ + /** + * Replaces the value in the underlying map entry with the specified + * object (optional operation). A lock is obtained on the mutex + * before the map is altered. The map entry, in turn, will alter + * the underlying map object. The operation is undefined if the + * <code>remove()</code> method of the iterator has been called + * beforehand. + * + * @param value the new value to store + * @return the old value + * @throws UnsupportedOperationException if the operation is not supported. + * @throws ClassCastException if the value is of the wrong type. + * @throws IllegalArgumentException if something about the value + * prevents it from existing in this map. + * @throws NullPointerException if the map forbids null values. + */ public V setValue(V value) { synchronized (mutex) @@ -3393,12 +3393,12 @@ public class Collections } } - /** - * Returns a textual representation of the underlying map entry. - * A lock is obtained on the mutex before the entry is accessed. - * - * @return The contents of the map entry in <code>String</code> form. - */ + /** + * Returns a textual representation of the underlying map entry. + * A lock is obtained on the mutex before the entry is accessed. + * + * @return The contents of the map entry in <code>String</code> form. + */ public String toString() { synchronized (mutex) @@ -3414,29 +3414,29 @@ public class Collections { entries = new SynchronizedSet<Map.Entry<K, V>>(mutex, m.entrySet()) { - /** - * Returns an iterator over the set. The iterator has no specific order, - * unless further specified. A lock is obtained on the set's mutex - * before the iterator is created. The created iterator is also - * thread-safe. - * - * @return A synchronized set iterator. - */ + /** + * Returns an iterator over the set. The iterator has no specific order, + * unless further specified. A lock is obtained on the set's mutex + * before the iterator is created. The created iterator is also + * thread-safe. + * + * @return A synchronized set iterator. + */ public Iterator<Map.Entry<K, V>> iterator() { synchronized (super.mutex) { return new SynchronizedIterator<Map.Entry<K, V>>(super.mutex, - c.iterator()) + c.iterator()) { - /** - * Retrieves the next map entry from the iterator. - * A lock is obtained on the iterator's mutex before - * the entry is created. The new map entry is enclosed in - * a thread-safe wrapper. - * - * @return A synchronized map entry. - */ + /** + * Retrieves the next map entry from the iterator. + * A lock is obtained on the iterator's mutex before + * the entry is created. The new map entry is enclosed in + * a thread-safe wrapper. + * + * @return A synchronized map entry. + */ public Map.Entry<K, V> next() { synchronized (super.mutex) @@ -3658,7 +3658,7 @@ public class Collections * <code>add</code> or <code>addAll</code>, is not supported via this * collection. A lock is obtained on the mutex before the collection * is created. - * + * * @return the collection of all values in the underlying map. */ public Collection<V> values() @@ -3946,7 +3946,7 @@ public class Collections synchronized (mutex) { return new SynchronizedSortedMap<K, V>(mutex, - sm.subMap(fromKey, toKey)); + sm.subMap(fromKey, toKey)); } } @@ -4144,8 +4144,8 @@ public class Collections synchronized (mutex) { return new SynchronizedSortedSet<T>(mutex, - ss.subSet(fromElement, - toElement)); + ss.subSet(fromElement, + toElement)); } } @@ -4174,7 +4174,7 @@ public class Collections } } // class SynchronizedSortedSet - + /** * Returns an unmodifiable view of the given collection. This allows * "read-only" access, although changes in the backing collection show up @@ -4497,7 +4497,7 @@ public class Collections * via sublists, will fail with {@link UnsupportedOperationException}. * Although this view prevents changes to the structure of the list and * its elements, the values referenced by the objects in the list can - * still be modified. + * still be modified. * <p> * * The returned List implements Serializable, but can only be serialized if @@ -4868,7 +4868,7 @@ public class Collections * iterators will fail with {@link UnsupportedOperationException}. * Although this view prevents changes to the structure of the map and its * entries, the values referenced by the objects in the map can still be - * modified. + * modified. * <p> * * The returned Map implements Serializable, but can only be serialized if @@ -4879,7 +4879,7 @@ public class Collections * @see Serializable */ public static <K, V> Map<K, V> unmodifiableMap(Map<? extends K, - ? extends V> m) + ? extends V> m) { return new UnmodifiableMap<K, V>(m); } @@ -5019,7 +5019,7 @@ public class Collections /** * Returns <code>true</code> if the object, o, is also a map entry * with an identical key and value. - * + * * @param o the object to compare. * @return <code>true</code> if o is an equivalent map entry. */ @@ -5030,7 +5030,7 @@ public class Collections /** * Returns the key of this map entry. - * + * * @return the key. */ public K getKey() @@ -5040,7 +5040,7 @@ public class Collections /** * Returns the value of this map entry. - * + * * @return the value. */ public V getValue() @@ -5051,7 +5051,7 @@ public class Collections /** * Computes the hash code of this map entry. The computation is * described in the <code>Map</code> interface documentation. - * + * * @return the hash code of this entry. * @see Map#hashCode() */ @@ -5063,7 +5063,7 @@ public class Collections /** * Blocks the alteration of the value of this map entry. This method * never returns, throwing an exception instead. - * + * * @param value The new value. * @throws UnsupportedOperationException as an unmodifiable map entry * does not support the <code>setValue()</code> operation. @@ -5075,7 +5075,7 @@ public class Collections /** * Returns a textual representation of the map entry. - * + * * @return The map entry as a <code>String</code>. */ public String toString() @@ -5102,20 +5102,20 @@ public class Collections public Iterator<Map.Entry<K,V>> iterator() { return new UnmodifiableIterator<Map.Entry<K,V>>(c.iterator()) - { - /** - * Obtains the next element from the underlying set of - * map entries. - * - * @return the next element in the collection. - * @throws NoSuchElementException if there are no more elements. - */ + { + /** + * Obtains the next element from the underlying set of + * map entries. + * + * @return the next element in the collection. + * @throws NoSuchElementException if there are no more elements. + */ public Map.Entry<K,V> next() { final Map.Entry<K,V> e = super.next(); - return new UnmodifiableMapEntry<K,V>(e); - } - }; + return new UnmodifiableMapEntry<K,V>(e); + } + }; } // The array returned is an array of UnmodifiableMapEntry instead of @@ -5124,14 +5124,14 @@ public class Collections { Object[] mapEntryResult = super.toArray(); UnmodifiableMapEntry<K,V> result[] = null; - + if (mapEntryResult != null) { result = (UnmodifiableMapEntry<K,V>[]) - new UnmodifiableMapEntry[mapEntryResult.length]; + new UnmodifiableMapEntry[mapEntryResult.length]; for (int i = 0; i < mapEntryResult.length; ++i) - result[i] = new UnmodifiableMapEntry<K,V>((Map.Entry<K,V>)mapEntryResult[i]); - } + result[i] = new UnmodifiableMapEntry<K,V>((Map.Entry<K,V>)mapEntryResult[i]); + } return result; } @@ -5140,14 +5140,14 @@ public class Collections public <S> S[] toArray(S[] array) { S[] result = super.toArray(array); - + if (result != null) - for (int i = 0; i < result.length; i++) - array[i] = - (S) new UnmodifiableMapEntry<K,V>((Map.Entry<K,V>) result[i]); + for (int i = 0; i < result.length; i++) + array[i] = + (S) new UnmodifiableMapEntry<K,V>((Map.Entry<K,V>) result[i]); return array; } - + } // class UnmodifiableEntrySet @@ -5311,7 +5311,7 @@ public class Collections * will fail with {@link UnsupportedOperationException}. * Although this view prevents changes to the structure of the set and its * entries, the values referenced by the objects in the set can still be - * modified. + * modified. * <p> * * The returned Set implements Serializable, but can only be serialized if @@ -5366,7 +5366,7 @@ public class Collections * hash codes of all elements within the set. * * @return the hash code of the set. - */ + */ public int hashCode() { return c.hashCode(); @@ -5380,7 +5380,7 @@ public class Collections * views, or iterators, will fail with {@link UnsupportedOperationException}. * Although this view prevents changes to the structure of the map and its * entries, the values referenced by the objects in the map can still be - * modified. + * modified. * <p> * * The returned SortedMap implements Serializable, but can only be @@ -5391,7 +5391,7 @@ public class Collections * @see Serializable */ public static <K, V> SortedMap<K, V> unmodifiableSortedMap(SortedMap<K, - ? extends V> m) + ? extends V> m) { return new UnmodifiableSortedMap<K, V>(m); } @@ -5555,7 +5555,7 @@ public class Collections * iterators, will fail with {@link UnsupportedOperationException}. * Although this view prevents changes to the structure of the set and its * entries, the values referenced by the objects in the set can still be - * modified. + * modified. * <p> * * The returns SortedSet implements Serializable, but can only be @@ -5724,7 +5724,7 @@ public class Collections } // class UnmodifiableSortedSet /** - * <p> + * <p> * Returns a dynamically typesafe view of the given collection, * where any modification is first checked to ensure that the type * of the new data is appropriate. Although the addition of @@ -5740,7 +5740,7 @@ public class Collections * <code>ClassCastException</code> caused by erroneous casting, or * for protecting collections from corruption by external libraries. * </p> - * <p> + * <p> * Since the collection might be a List or a Set, and those * have incompatible equals and hashCode requirements, this relies * on Object's implementation rather than passing those calls on to @@ -5748,7 +5748,7 @@ public class Collections * Serializable, but can only be serialized if the collection it * wraps is likewise Serializable. * </p> - * + * * @param c the collection to wrap in a dynamically typesafe wrapper * @param type the type of elements the collection should hold. * @return a dynamically typesafe view of the collection. @@ -5756,7 +5756,7 @@ public class Collections * @since 1.5 */ public static <E> Collection<E> checkedCollection(Collection<E> c, - Class<E> type) + Class<E> type) { return new CheckedCollection<E>(c, type); } @@ -5775,7 +5775,7 @@ public class Collections * Compatible with JDK 1.5. */ private static final long serialVersionUID = 1578914078182001775L; - + /** * The wrapped collection. Package visible for use by subclasses. * @serial the real collection @@ -5814,9 +5814,9 @@ public class Collections public boolean add(E o) { if (type.isInstance(o)) - return c.add(o); + return c.add(o); else - throw new ClassCastException("The element is of the incorrect type."); + throw new ClassCastException("The element is of the incorrect type."); } /** @@ -5834,11 +5834,11 @@ public class Collections Collection<E> typedColl = (Collection<E>) c; final Iterator<E> it = typedColl.iterator(); while (it.hasNext()) - { - final E element = it.next(); - if (!type.isInstance(element)) - throw new ClassCastException("A member of the collection is not of the correct type."); - } + { + final E element = it.next(); + if (!type.isInstance(element)) + throw new ClassCastException("A member of the collection is not of the correct type."); + } return c.addAll(typedColl); } @@ -6075,7 +6075,7 @@ public class Collections } // class CheckedIterator /** - * <p> + * <p> * Returns a dynamically typesafe view of the given list, * where any modification is first checked to ensure that the type * of the new data is appropriate. Although the addition of @@ -6118,7 +6118,7 @@ public class Collections * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.5 */ - private static class CheckedList<E> + private static class CheckedList<E> extends CheckedCollection<E> implements List<E> { @@ -6158,9 +6158,9 @@ public class Collections public void add(int index, E o) { if (type.isInstance(o)) - list.add(index, o); + list.add(index, o); else - throw new ClassCastException("The object is of the wrong type."); + throw new ClassCastException("The object is of the wrong type."); } /** @@ -6178,10 +6178,10 @@ public class Collections Collection<E> typedColl = (Collection<E>) coll; final Iterator<E> it = typedColl.iterator(); while (it.hasNext()) - { - if (!type.isInstance(it.next())) - throw new ClassCastException("A member of the collection is not of the correct type."); - } + { + if (!type.isInstance(it.next())) + throw new ClassCastException("A member of the collection is not of the correct type."); + } return list.addAll(index, coll); } @@ -6399,9 +6399,9 @@ public class Collections public void add(E o) { if (type.isInstance(o)) - li.add(o); + li.add(o); else - throw new ClassCastException("The object is of the wrong type."); + throw new ClassCastException("The object is of the wrong type."); } /** @@ -6466,14 +6466,14 @@ public class Collections public void set(E o) { if (type.isInstance(o)) - li.set(o); + li.set(o); else - throw new ClassCastException("The object is of the wrong type."); + throw new ClassCastException("The object is of the wrong type."); } } // class CheckedListIterator /** - * <p> + * <p> * Returns a dynamically typesafe view of the given map, * where any modification is first checked to ensure that the type * of the new data is appropriate. Although the addition of @@ -6501,7 +6501,7 @@ public class Collections * @see Serializable */ public static <K, V> Map<K, V> checkedMap(Map<K, V> m, Class<K> keyType, - Class<V> valueType) + Class<V> valueType) { return new CheckedMap<K, V>(m, keyType, valueType); } @@ -6513,7 +6513,7 @@ public class Collections * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.5 */ - private static class CheckedMap<K, V> + private static class CheckedMap<K, V> implements Map<K, V>, Serializable { /** @@ -6621,7 +6621,7 @@ public class Collections * <p> * The set is backed by the map, so that changes in one show up in the * other. Modifications made while an iterator is in progress cause - * undefined behavior. + * undefined behavior. * </p> * * @return the checked set view of all mapping entries. @@ -6630,14 +6630,14 @@ public class Collections public Set<Map.Entry<K, V>> entrySet() { if (entries == null) - { - Class<Map.Entry<K,V>> klass = - (Class<Map.Entry<K,V>>) (Class) Map.Entry.class; - entries = new CheckedEntrySet<Map.Entry<K,V>,K,V>(m.entrySet(), - klass, - keyType, - valueType); - } + { + Class<Map.Entry<K,V>> klass = + (Class<Map.Entry<K,V>>) (Class) Map.Entry.class; + entries = new CheckedEntrySet<Map.Entry<K,V>,K,V>(m.entrySet(), + klass, + keyType, + valueType); + } return entries; } @@ -6656,13 +6656,13 @@ public class Collections * @serial the key type. */ private final Class<SK> keyType; - + /** * The type of the map's values. * @serial the value type. */ private final Class<SV> valueType; - + /** * Wrap a given set of map entries. * @@ -6672,104 +6672,104 @@ public class Collections * @param valueType the type of the map's values. */ CheckedEntrySet(Set<E> s, Class<E> type, Class<SK> keyType, - Class<SV> valueType) + Class<SV> valueType) { super(s, type); - this.keyType = keyType; - this.valueType = valueType; + this.keyType = keyType; + this.valueType = valueType; } // The iterator must return checked map entries. public Iterator<E> iterator() { return new CheckedIterator<E>(c.iterator(), type) - { - /** - * Obtains the next element from the underlying set of - * map entries. - * - * @return the next element in the collection. - * @throws NoSuchElementException if there are no more elements. - */ + { + /** + * Obtains the next element from the underlying set of + * map entries. + * + * @return the next element in the collection. + * @throws NoSuchElementException if there are no more elements. + */ public E next() { final Map.Entry e = (Map.Entry) super.next(); return (E) new Map.Entry() - { - /** - * Returns <code>true</code> if the object, o, is also a map - * entry with an identical key and value. - * - * @param o the object to compare. - * @return <code>true</code> if o is an equivalent map entry. - */ + { + /** + * Returns <code>true</code> if the object, o, is also a map + * entry with an identical key and value. + * + * @param o the object to compare. + * @return <code>true</code> if o is an equivalent map entry. + */ public boolean equals(Object o) { return e.equals(o); } - - /** - * Returns the key of this map entry. - * - * @return the key. - */ + + /** + * Returns the key of this map entry. + * + * @return the key. + */ public Object getKey() { return e.getKey(); } - /** - * Returns the value of this map entry. - * - * @return the value. - */ + /** + * Returns the value of this map entry. + * + * @return the value. + */ public Object getValue() { return e.getValue(); } - /** - * Computes the hash code of this map entry. - * The computation is described in the <code>Map</code> - * interface documentation. - * - * @return the hash code of this entry. - * @see Map#hashCode() - */ - public int hashCode() + /** + * Computes the hash code of this map entry. + * The computation is described in the <code>Map</code> + * interface documentation. + * + * @return the hash code of this entry. + * @see Map#hashCode() + */ + public int hashCode() { return e.hashCode(); } - /** - * Sets the value of this map entry, provided it is of the - * right type. - * - * @param value The new value. - * @throws ClassCastException if the type of the value is not - * a valid type for the underlying - * map. - */ + /** + * Sets the value of this map entry, provided it is of the + * right type. + * + * @param value The new value. + * @throws ClassCastException if the type of the value is not + * a valid type for the underlying + * map. + */ public Object setValue(Object value) { - if (valueType.isInstance(value)) - return e.setValue(value); - else - throw new ClassCastException("The value is of the wrong type."); + if (valueType.isInstance(value)) + return e.setValue(value); + else + throw new ClassCastException("The value is of the wrong type."); } - /** - * Returns a textual representation of the map entry. - * - * @return The map entry as a <code>String</code>. - */ + /** + * Returns a textual representation of the map entry. + * + * @return The map entry as a <code>String</code>. + */ public String toString() { return e.toString(); } - }; + }; } - }; + }; } } // class CheckedEntrySet @@ -6811,17 +6811,17 @@ public class Collections * @param value The new value. * @return the previous value of the key, or null if there was no mapping. * @throws ClassCastException if the type of the key or the value is - * not a valid type for the underlying map. + * not a valid type for the underlying map. */ public V put(K key, V value) { if (keyType.isInstance(key)) - { - if (valueType.isInstance(value)) - return m.put(key,value); - else - throw new ClassCastException("The value is of the wrong type."); - } + { + if (valueType.isInstance(value)) + return m.put(key,value); + else + throw new ClassCastException("The value is of the wrong type."); + } throw new ClassCastException("The key is of the wrong type."); } @@ -6875,20 +6875,20 @@ public class Collections * @param map the map, the entries of which should be added * to the underlying map. * @throws ClassCastException if the type of a key or value is - * not a valid type for the underlying map. + * not a valid type for the underlying map. */ public void putAll(Map<? extends K, ? extends V> map) { Map<K,V> typedMap = (Map<K,V>) map; final Iterator<Map.Entry<K,V>> it = typedMap.entrySet().iterator(); while (it.hasNext()) - { - final Map.Entry<K,V> entry = it.next(); - if (!keyType.isInstance(entry.getKey())) - throw new ClassCastException("A key is of the wrong type."); - if (!valueType.isInstance(entry.getValue())) - throw new ClassCastException("A value is of the wrong type."); - } + { + final Map.Entry<K,V> entry = it.next(); + if (!keyType.isInstance(entry.getKey())) + throw new ClassCastException("A key is of the wrong type."); + if (!valueType.isInstance(entry.getValue())) + throw new ClassCastException("A value is of the wrong type."); + } m.putAll(typedMap); } @@ -6941,7 +6941,7 @@ public class Collections * behavior. These modifications are again limited to the values of * the keys. * </p> - * + * * @return the collection view of all values. */ public Collection<V> values() @@ -6953,7 +6953,7 @@ public class Collections } // class CheckedMap /** - * <p> + * <p> * Returns a dynamically typesafe view of the given set, * where any modification is first checked to ensure that the type * of the new data is appropriate. Although the addition of @@ -6991,7 +6991,7 @@ public class Collections * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.5 */ - private static class CheckedSet<E> + private static class CheckedSet<E> extends CheckedCollection<E> implements Set<E> { @@ -7027,7 +7027,7 @@ public class Collections * hash codes of all elements within the set. * * @return the hash code of the set. - */ + */ public int hashCode() { return c.hashCode(); @@ -7035,7 +7035,7 @@ public class Collections } // class CheckedSet /** - * <p> + * <p> * Returns a dynamically typesafe view of the given sorted map, * where any modification is first checked to ensure that the type * of the new data is appropriate. Although the addition of @@ -7063,8 +7063,8 @@ public class Collections * @see Serializable */ public static <K, V> SortedMap<K, V> checkedSortedMap(SortedMap<K, V> m, - Class<K> keyType, - Class<V> valueType) + Class<K> keyType, + Class<V> valueType) { return new CheckedSortedMap<K, V>(m, keyType, valueType); } @@ -7199,8 +7199,8 @@ public class Collections */ public SortedMap<K, V> subMap(K fromKey, K toKey) { - return new CheckedSortedMap<K, V>(sm.subMap(fromKey, toKey), keyType, - valueType); + return new CheckedSortedMap<K, V>(sm.subMap(fromKey, toKey), keyType, + valueType); } /** @@ -7231,7 +7231,7 @@ public class Collections public SortedMap<K, V> tailMap(K fromKey) { return new CheckedSortedMap<K, V>(sm.tailMap(fromKey), keyType, - valueType); + valueType); } } // class CheckedSortedMap @@ -7263,7 +7263,7 @@ public class Collections * @see Serializable */ public static <E> SortedSet<E> checkedSortedSet(SortedSet<E> s, - Class<E> type) + Class<E> type) { return new CheckedSortedSet<E>(s, type); } @@ -7275,7 +7275,7 @@ public class Collections * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.5 */ - private static class CheckedSortedSet<E> + private static class CheckedSortedSet<E> extends CheckedSet<E> implements SortedSet<E> { @@ -7287,7 +7287,7 @@ public class Collections /** * The wrapped set; stored both here and in the superclass to avoid * excessive casting. - * + * * @serial the wrapped set */ private SortedSet<E> ss; @@ -7388,7 +7388,7 @@ public class Collections * new Integer(highlimit.intValue() + 1))</code> to reverse * the inclusiveness of both endpoints. * </p> - * + * * @param fromElement the inclusive lower range of the subset. * @param toElement the exclusive upper range of the subset. * @return the subset. @@ -7471,7 +7471,7 @@ public class Collections } /** - * The implementation of {@link #asLIFOQueue(Deque)}. + * The implementation of {@link #asLIFOQueue(Deque)}. * * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.6 @@ -7479,7 +7479,7 @@ public class Collections private static class LIFOQueue<T> extends AbstractQueue<T> { - + /** * The backing deque. */ @@ -7500,36 +7500,36 @@ public class Collections { return deque.offerFirst(e); } - + public boolean addAll(Collection<? extends T> c) { boolean result = false; final Iterator<? extends T> it = c.iterator(); while (it.hasNext()) - result |= deque.offerFirst(it.next()); + result |= deque.offerFirst(it.next()); return result; } - + public void clear() { deque.clear(); } - + public boolean isEmpty() { return deque.isEmpty(); } - + public Iterator<T> iterator() { return deque.iterator(); } - + public boolean offer(T e) { return deque.offerFirst(e); } - + public T peek() { return deque.peek(); @@ -7539,7 +7539,7 @@ public class Collections { return deque.poll(); } - + public int size() { return deque.size(); @@ -7547,7 +7547,7 @@ public class Collections } // class LIFOQueue /** - * The implementation of {@link #newSetFromMap(Map)}. + * The implementation of {@link #newSetFromMap(Map)}. * * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.6 @@ -7555,7 +7555,7 @@ public class Collections private static class MapSet<E> extends AbstractSet<E> { - + /** * The backing map. */ @@ -7571,7 +7571,7 @@ public class Collections public MapSet(Map<E,Boolean> map) { if (!map.isEmpty()) - throw new IllegalArgumentException("The map must be empty."); + throw new IllegalArgumentException("The map must be empty."); this.map = map; } @@ -7579,45 +7579,45 @@ public class Collections { return map.put(e, true) == null; } - + public boolean addAll(Collection<? extends E> c) { boolean result = false; final Iterator<? extends E> it = c.iterator(); while (it.hasNext()) - result |= (map.put(it.next(), true) == null); + result |= (map.put(it.next(), true) == null); return result; } - + public void clear() { map.clear(); } - + public boolean contains(Object o) { return map.containsKey(o); } - + public boolean isEmpty() { return map.isEmpty(); } - + public Iterator<E> iterator() { return map.keySet().iterator(); } - + public boolean remove(Object o) { return map.remove(o) != null; } - + public int size() { return map.size(); } } // class MapSet - + } // class Collections diff --git a/libjava/classpath/java/util/Currency.java b/libjava/classpath/java/util/Currency.java index 11235f1..d58082c 100644 --- a/libjava/classpath/java/util/Currency.java +++ b/libjava/classpath/java/util/Currency.java @@ -7,7 +7,7 @@ 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 @@ -60,7 +60,7 @@ import java.util.spi.CurrencyNameProvider; * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.4 */ -public final class Currency +public final class Currency implements Serializable { /** @@ -95,7 +95,7 @@ public final class Currency * @serial the number of fraction digits */ private transient int fractionDigits; - + /** * A cached map of country codes * instances to international currency code @@ -115,7 +115,7 @@ public final class Currency * is the international currency code. * * @see #getInstance(java.util.Locale) - * @see #getInstance(java.lang.String) + * @see #getInstance(java.lang.String) * @see #readResolve() * @serial ignored. */ @@ -133,7 +133,7 @@ public final class Currency /* Create the properties object */ properties = new Properties(); /* Try and load the properties from our iso4217.properties resource */ - try + try { properties.load(Currency.class.getResourceAsStream("iso4217.properties")); } @@ -157,7 +157,7 @@ public final class Currency * country code, are ignored. The results of calling this * method may vary over time, as the currency associated with * a particular country changes. For countries without - * a given currency (e.g. Antarctica), the result is null. + * a given currency (e.g. Antarctica), the result is null. * * @param loc the locale for the new currency, or null if * there is no country code specified or a currency @@ -176,8 +176,8 @@ public final class Currency if (countryCode.equals("")) { throw new - IllegalArgumentException("Invalid (empty) country code for locale:" - + loc); + IllegalArgumentException("Invalid (empty) country code for locale:" + + loc); } /* Construct the key for the currency */ currencyKey = countryCode + ".currency"; @@ -206,7 +206,7 @@ public final class Currency * currency code. * * @param code the code to use. - */ + */ private Currency(String code) { currencyCode = code; @@ -234,19 +234,19 @@ public final class Currency * currencies, such as IMF Special Drawing Rights, -1 is returned. * * @return the number of digits after the decimal separator for this currency. - */ + */ public int getDefaultFractionDigits() { return fractionDigits; } - + /** * Builds a new currency instance for this locale. * All components of the given locale, other than the * country code, are ignored. The results of calling this * method may vary over time, as the currency associated with * a particular country changes. For countries without - * a given currency (e.g. Antarctica), the result is null. + * a given currency (e.g. Antarctica), the result is null. * * @param locale a <code>Locale</code> instance. * @return a new <code>Currency</code> instance. @@ -254,7 +254,7 @@ public final class Currency * country code is null. * @throws IllegalArgumentException if the country of * the given locale is not a supported ISO3166 code. - */ + */ public static Currency getInstance(Locale locale) { /** @@ -270,39 +270,39 @@ public final class Currency String country = locale.getCountry(); if (locale == null || country == null) { - throw new - NullPointerException("The locale or its country is null."); + throw new + NullPointerException("The locale or its country is null."); } - + /* Check that country of locale given is valid. */ if (country.length() != 2) throw new IllegalArgumentException(); - + /* Attempt to get the currency from the cache */ String code = (String) countryMap.get(country); if (code == null) { /* Create the currency for this locale */ newCurrency = new Currency(locale); - /* + /* * If the currency code is null, then creation failed * and we return null. */ - code = newCurrency.getCurrencyCode(); + code = newCurrency.getCurrencyCode(); if (code == null) { return null; } - else + else { /* Cache it */ countryMap.put(country, code); - cache.put(code, newCurrency); + cache.put(code, newCurrency); } } else { - newCurrency = (Currency) cache.get(code); + newCurrency = (Currency) cache.get(code); } /* Return the instance */ return newCurrency; @@ -321,10 +321,10 @@ public final class Currency { Locale[] allLocales; - /* + /* * Throw a null pointer exception explicitly if currencyCode is null. * One is not thrown otherwise. It results in an - * IllegalArgumentException. + * IllegalArgumentException. */ if (currencyCode == null) { @@ -336,35 +336,35 @@ public final class Currency Currency newCurrency = (Currency) cache.get(currencyCode); if (newCurrency == null) { - /* Get all locales */ - allLocales = Locale.getAvailableLocales(); - /* Loop through each locale, looking for the code */ - for (int i = 0;i < allLocales.length; i++) - { - try - { - Currency testCurrency = getInstance (allLocales[i]); - if (testCurrency != null && - testCurrency.getCurrencyCode().equals(currencyCode)) - { - return testCurrency; - } - } - catch (IllegalArgumentException exception) - { - /* Ignore locales without valid countries */ - } - } - /* - * If we get this far, the code is not supported by any of - * our locales. - */ - throw new IllegalArgumentException("The currency code, " + currencyCode + - ", is not supported."); + /* Get all locales */ + allLocales = Locale.getAvailableLocales(); + /* Loop through each locale, looking for the code */ + for (int i = 0;i < allLocales.length; i++) + { + try + { + Currency testCurrency = getInstance (allLocales[i]); + if (testCurrency != null && + testCurrency.getCurrencyCode().equals(currencyCode)) + { + return testCurrency; + } + } + catch (IllegalArgumentException exception) + { + /* Ignore locales without valid countries */ + } + } + /* + * If we get this far, the code is not supported by any of + * our locales. + */ + throw new IllegalArgumentException("The currency code, " + currencyCode + + ", is not supported."); } else { - return newCurrency; + return newCurrency; } } @@ -413,27 +413,27 @@ public final class Currency try { return ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", - locale).getString(property); + locale).getString(property); } catch (MissingResourceException exception) { - /* This means runtime support for the locale - * is not available, so we check providers. */ + /* This means runtime support for the locale + * is not available, so we check providers. */ } for (CurrencyNameProvider p : - ServiceLoader.load(CurrencyNameProvider.class)) + ServiceLoader.load(CurrencyNameProvider.class)) { - for (Locale loc : p.getAvailableLocales()) - { - if (loc.equals(locale)) - { - String localizedString = p.getSymbol(currencyCode, - locale); - if (localizedString != null) - return localizedString; - break; - } - } + for (Locale loc : p.getAvailableLocales()) + { + if (loc.equals(locale)) + { + String localizedString = p.getSymbol(currencyCode, + locale); + if (localizedString != null) + return localizedString; + break; + } + } } if (locale.equals(Locale.ROOT)) // Base case return currencyCode; diff --git a/libjava/classpath/java/util/Date.java b/libjava/classpath/java/util/Date.java index 5f83cd0..3f7ba6f 100644 --- a/libjava/classpath/java/util/Date.java +++ b/libjava/classpath/java/util/Date.java @@ -49,11 +49,11 @@ import java.text.SimpleDateFormat; /** * <p> * This class represents a specific time in milliseconds since the epoch. - * The epoch is 1970, January 1 00:00:00.0000 UTC. + * The epoch is 1970, January 1 00:00:00.0000 UTC. * </p> * <p> * <code>Date</code> is intended to reflect universal time coordinate (UTC), - * but this depends on the underlying host environment. Most operating systems + * but this depends on the underlying host environment. Most operating systems * don't handle the leap second, which occurs about once every year or * so. The leap second is added to the last minute of the day on either * the 30th of June or the 31st of December, creating a minute 61 seconds @@ -127,13 +127,13 @@ public class Date * An array of week names used to map names to integer values. */ private static final String[] weekNames = { "Sun", "Mon", "Tue", "Wed", - "Thu", "Fri", "Sat" }; + "Thu", "Fri", "Sat" }; /** * An array of month names used to map names to integer values. */ private static final String[] monthNames = { "Jan", "Feb", "Mar", "Apr", - "May", "Jun", "Jul", "Aug", - "Sep", "Oct", "Nov", "Dec" }; + "May", "Jun", "Jul", "Aug", + "Sep", "Oct", "Nov", "Dec" }; /** * Creates a new Date Object representing the current time. */ @@ -187,7 +187,7 @@ public class Date * Creates a new Date Object representing the given time. * * @deprecated use <code>new GregorianCalendar(year+1900, month, - * day, hour, min, sec)</code> instead. + * day, hour, min, sec)</code> instead. * @param year the difference between the required year and 1900. * @param month the month as a value between 0 and 11. * @param day the day as a value between 0 and 31. @@ -200,7 +200,7 @@ public class Date public Date(int year, int month, int day, int hour, int min, int sec) { GregorianCalendar cal = - new GregorianCalendar(year + 1900, month, day, hour, min, sec); + new GregorianCalendar(year + 1900, month, day, hour, min, sec); time = cal.getTimeInMillis(); } @@ -208,7 +208,7 @@ public class Date * Creates a new Date from the given string representation. This * does the same as <code>new Date(Date.parse(s))</code> * @see #parse - * @deprecated use <code>java.text.DateFormat.parse(s)</code> instead. + * @deprecated use <code>java.text.DateFormat.parse(s)</code> instead. */ public Date(String s) { @@ -226,11 +226,11 @@ public class Date { try { - return super.clone(); + return super.clone(); } catch (CloneNotSupportedException ex) { - return null; + return null; } } @@ -253,7 +253,7 @@ public class Date * @return the time in milliseconds since the epoch. */ public static long UTC(int year, int month, int date, - int hrs, int min, int sec) + int hrs, int min, int sec) { GregorianCalendar cal = new GregorianCalendar(year + 1900, month, date, hrs, min, sec); @@ -278,7 +278,7 @@ public class Date * from this object is also used to determine whether or not daylight savings * time is in effect. For example, the offset for the UK would be 0 if the * month of the date object was January, and 1 if the month was August. - * + * * @deprecated use * <code>Calendar.get(Calendar.ZONE_OFFSET)+Calendar.get(Calendar.DST_OFFSET)</code> * instead. @@ -291,13 +291,13 @@ public class Date Calendar cal = Calendar.getInstance(); cal.setTimeInMillis(time); return - (cal.get(Calendar.ZONE_OFFSET) - + cal.get(Calendar.DST_OFFSET)) / (60 * 1000); + + cal.get(Calendar.DST_OFFSET)) / (60 * 1000); } /** * Sets the time which this object should represent. * - * @param time the time in milliseconds since the epoch. + * @param time the time in milliseconds since the epoch. */ public void setTime(long time) { @@ -309,7 +309,7 @@ public class Date * * @param when the other date * @return true, if the date represented by this object is - * strictly later than the time represented by when. + * strictly later than the time represented by when. */ public boolean after(Date when) { @@ -334,7 +334,7 @@ public class Date * @param obj the object to compare. * @return true, if obj is a Date object and the time represented * by obj is exactly the same as the time represented by this - * object. + * object. */ public boolean equals(Object obj) { @@ -348,7 +348,7 @@ public class Date * @return 0, if the date represented * by obj is exactly the same as the time represented by this * object, a negative if this Date is before the other Date, and - * a positive value otherwise. + * a positive value otherwise. */ public int compareTo(Date when) { @@ -414,7 +414,7 @@ public class Date * </li> * </ul> * <p> - * The <code>DateFormat</code> class should now be + * The <code>DateFormat</code> class should now be * preferred over using this method. * </p> * @@ -439,11 +439,11 @@ public class Date + sec.substring(sec.length() - 2) + " " + cal.getTimeZone().getDisplayName(cal.getTimeZone().inDaylightTime(this), - TimeZone.SHORT) + " " + + TimeZone.SHORT) + " " + year.substring(year.length() - 4); } - /** + /** * Returns a locale-dependent string representation of this * <code>Date</code> object. * @@ -457,7 +457,7 @@ public class Date return java.text.DateFormat.getInstance().format(this); } - /** + /** * <p> * Returns a string representation of this <code>Date</code> * object using GMT rather than the local timezone. @@ -497,7 +497,7 @@ public class Date * the local timezone. * </li> * </ul> - * + * * @deprecated Use DateFormat.format(Date) with a GMT TimeZone. * @return A string of the form 'd mon yyyy hh:mm:ss GMT' using * GMT as opposed to the local timezone. @@ -526,12 +526,12 @@ public class Date try { - // parseInt doesn't handle '+' so strip off sign. - num = Integer.parseInt(tok.substring(1)); + // parseInt doesn't handle '+' so strip off sign. + num = Integer.parseInt(tok.substring(1)); } catch (NumberFormatException ex) { - throw new IllegalArgumentException(tok); + throw new IllegalArgumentException(tok); } // Convert hours to minutes. @@ -557,8 +557,8 @@ public class Date // We could possibly use the fields of DateFormatSymbols but that is // localized and thus might not match the English words specified. String months[] = { "JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", - "JUNE", "JULY", "AUGUST", "SEPTEMBER", "OCTOBER", - "NOVEMBER", "DECEMBER" }; + "JUNE", "JULY", "AUGUST", "SEPTEMBER", "OCTOBER", + "NOVEMBER", "DECEMBER" }; int i; for (i = 0; i < 12; i++) @@ -581,7 +581,7 @@ public class Date // We could possibly use the fields of DateFormatSymbols but that is // localized and thus might not match the English words specified. String daysOfWeek[] = { "SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY", - "THURSDAY", "FRIDAY", "SATURDAY" }; + "THURSDAY", "FRIDAY", "SATURDAY" }; int i; for (i = 0; i < 7; i++) @@ -591,7 +591,7 @@ public class Date return false; } - /** + /** * <p> * Parses a String and returns the time, in milliseconds since the * epoch, it represents. Most syntaxes are handled, including @@ -612,7 +612,7 @@ public class Date * failure. The ASCII characters A-Z, a-z, 0-9, and ',', '+', '-', * ':' and '/' are the only characters permitted within the string, * besides whitespace and characters enclosed within parantheses - * '(' and ')'. + * '(' and ')'. * </p> * <p> * A sequence of consecutive digits are recognised as a number, @@ -729,15 +729,15 @@ public class Date int len = string.length(); for (int i = 0; i < len; i++) { - char ch = string.charAt(i); - if (ch >= 'a' && ch <= 'z') - ch -= 'a' - 'A'; - if (ch == '(') - parenNesting++; - else if (parenNesting == 0) - buf.append(ch); - else if (ch == ')') - parenNesting--; + char ch = string.charAt(i); + if (ch >= 'a' && ch <= 'z') + ch -= 'a' - 'A'; + if (ch == '(') + parenNesting++; + else if (parenNesting == 0) + buf.append(ch); + else if (ch == ')') + parenNesting--; } int tmpMonth; @@ -747,163 +747,163 @@ public class Date while (strtok.hasMoreTokens()) { - String tok = strtok.nextToken(); - char firstch = tok.charAt(0); - if ((firstch == '+' || firstch == '-') && year >= 0) - { - timezone = parseTz(tok, firstch); - localTimezone = false; - } - else if (firstch >= '0' && firstch <= '9') - { - int lastPunct = -1; - while (tok != null && tok.length() > 0) - { - int punctOffset = tok.length(); - int num = 0; - int punct; - for (int i = 0; ; i++) - { - if (i >= punctOffset) - { - punct = -1; - break; - } - else - { - punct = tok.charAt(i); - if (punct >= '0' && punct <= '9') - { - if (num > 999999999) // in case of overflow - throw new IllegalArgumentException(tok); - num = 10 * num + (punct - '0'); - } - else - { - punctOffset = i; - break; - } - } - - } - - if (punct == ':') - { - if (hour < 0) - hour = num; - else - minute = num; - } - else if (lastPunct == ':' && hour >= 0 && (minute < 0 || second < 0)) - { - if (minute < 0) - minute = num; - else - second = num; - } - else if ((num >= 70 - && (punct == ' ' || punct == ',' - || punct == '/' || punct < 0)) - || (num < 70 && day >= 0 && month >= 0 && year < 0)) - { - if (num >= 100) - year = num; - else - { - int curYear = 1900 + new Date().getYear(); - int firstYear = curYear - 80; - year = firstYear / 100 * 100 + num; - if (year < firstYear) - year += 100; - } - } - else if (punct == '/') - { - if (month < 0) - month = num - 1; - else - day = num; - } - else if (hour >= 0 && minute < 0) - minute = num; - else if (minute >= 0 && second < 0) - second = num; - else if (day < 0) - day = num; - else - throw new IllegalArgumentException(tok); - - // Advance string if there's more to process in this token. - if (punct < 0 || punctOffset + 1 >= tok.length()) - tok = null; - else - tok = tok.substring(punctOffset + 1); - lastPunct = punct; - } - } - else if (firstch >= 'A' && firstch <= 'Z') - { - if (tok.equals("AM")) - { - if (hour < 1 || hour > 12) - throw new IllegalArgumentException(tok); - if (hour == 12) - hour = 0; - } - else if (tok.equals("PM")) - { - if (hour < 1 || hour > 12) - throw new IllegalArgumentException(tok); - if (hour < 12) - hour += 12; - } - else if (parseDayOfWeek(tok)) - { /* Ignore it; throw the token away. */ } - else if (tok.equals("UT") || tok.equals("UTC") || tok.equals("GMT")) - localTimezone = false; - else if (tok.startsWith("UT") || tok.startsWith("GMT")) - { - int signOffset = 3; - if (tok.charAt(1) == 'T' && tok.charAt(2) != 'C') - signOffset = 2; - - char sign = tok.charAt(signOffset); - if (sign != '+' && sign != '-') - throw new IllegalArgumentException(tok); - - timezone = parseTz(tok.substring(signOffset), sign); - localTimezone = false; - } - else if ((tmpMonth = parseMonth(tok)) >= 0) - month = tmpMonth; - else if (tok.length() == 3 && tok.charAt(2) == 'T') - { - // Convert timezone offset from hours to minutes. - char ch = tok.charAt(0); - if (ch == 'E') - timezone = -5 * 60; - else if (ch == 'C') - timezone = -6 * 60; - else if (ch == 'M') - timezone = -7 * 60; - else if (ch == 'P') - timezone = -8 * 60; - else - throw new IllegalArgumentException(tok); - - // Shift 60 minutes for Daylight Savings Time. - if (tok.charAt(1) == 'D') - timezone += 60; - else if (tok.charAt(1) != 'S') - throw new IllegalArgumentException(tok); - - localTimezone = false; - } - else - throw new IllegalArgumentException(tok); - } - else - throw new IllegalArgumentException(tok); + String tok = strtok.nextToken(); + char firstch = tok.charAt(0); + if ((firstch == '+' || firstch == '-') && year >= 0) + { + timezone = parseTz(tok, firstch); + localTimezone = false; + } + else if (firstch >= '0' && firstch <= '9') + { + int lastPunct = -1; + while (tok != null && tok.length() > 0) + { + int punctOffset = tok.length(); + int num = 0; + int punct; + for (int i = 0; ; i++) + { + if (i >= punctOffset) + { + punct = -1; + break; + } + else + { + punct = tok.charAt(i); + if (punct >= '0' && punct <= '9') + { + if (num > 999999999) // in case of overflow + throw new IllegalArgumentException(tok); + num = 10 * num + (punct - '0'); + } + else + { + punctOffset = i; + break; + } + } + + } + + if (punct == ':') + { + if (hour < 0) + hour = num; + else + minute = num; + } + else if (lastPunct == ':' && hour >= 0 && (minute < 0 || second < 0)) + { + if (minute < 0) + minute = num; + else + second = num; + } + else if ((num >= 70 + && (punct == ' ' || punct == ',' + || punct == '/' || punct < 0)) + || (num < 70 && day >= 0 && month >= 0 && year < 0)) + { + if (num >= 100) + year = num; + else + { + int curYear = 1900 + new Date().getYear(); + int firstYear = curYear - 80; + year = firstYear / 100 * 100 + num; + if (year < firstYear) + year += 100; + } + } + else if (punct == '/') + { + if (month < 0) + month = num - 1; + else + day = num; + } + else if (hour >= 0 && minute < 0) + minute = num; + else if (minute >= 0 && second < 0) + second = num; + else if (day < 0) + day = num; + else + throw new IllegalArgumentException(tok); + + // Advance string if there's more to process in this token. + if (punct < 0 || punctOffset + 1 >= tok.length()) + tok = null; + else + tok = tok.substring(punctOffset + 1); + lastPunct = punct; + } + } + else if (firstch >= 'A' && firstch <= 'Z') + { + if (tok.equals("AM")) + { + if (hour < 1 || hour > 12) + throw new IllegalArgumentException(tok); + if (hour == 12) + hour = 0; + } + else if (tok.equals("PM")) + { + if (hour < 1 || hour > 12) + throw new IllegalArgumentException(tok); + if (hour < 12) + hour += 12; + } + else if (parseDayOfWeek(tok)) + { /* Ignore it; throw the token away. */ } + else if (tok.equals("UT") || tok.equals("UTC") || tok.equals("GMT")) + localTimezone = false; + else if (tok.startsWith("UT") || tok.startsWith("GMT")) + { + int signOffset = 3; + if (tok.charAt(1) == 'T' && tok.charAt(2) != 'C') + signOffset = 2; + + char sign = tok.charAt(signOffset); + if (sign != '+' && sign != '-') + throw new IllegalArgumentException(tok); + + timezone = parseTz(tok.substring(signOffset), sign); + localTimezone = false; + } + else if ((tmpMonth = parseMonth(tok)) >= 0) + month = tmpMonth; + else if (tok.length() == 3 && tok.charAt(2) == 'T') + { + // Convert timezone offset from hours to minutes. + char ch = tok.charAt(0); + if (ch == 'E') + timezone = -5 * 60; + else if (ch == 'C') + timezone = -6 * 60; + else if (ch == 'M') + timezone = -7 * 60; + else if (ch == 'P') + timezone = -8 * 60; + else + throw new IllegalArgumentException(tok); + + // Shift 60 minutes for Daylight Savings Time. + if (tok.charAt(1) == 'D') + timezone += 60; + else if (tok.charAt(1) != 'S') + throw new IllegalArgumentException(tok); + + localTimezone = false; + } + else + throw new IllegalArgumentException(tok); + } + else + throw new IllegalArgumentException(tok); } // Unspecified hours, minutes, or seconds should default to 0. @@ -925,8 +925,8 @@ public class Date = new GregorianCalendar(year, month, day, hour, minute, second); if (!localTimezone) { - cal.set(Calendar.ZONE_OFFSET, timezone * 60 * 1000); - cal.set(Calendar.DST_OFFSET, 0); + cal.set(Calendar.ZONE_OFFSET, timezone * 60 * 1000); + cal.set(Calendar.DST_OFFSET, 0); } return cal.getTimeInMillis(); } @@ -965,7 +965,7 @@ public class Date * @param year the year minus 1900. * @deprecated Use Calendar instead of Date, and use * set(Calendar.YEAR, year) instead. Note about the 1900 - * difference in year. + * difference in year. * @see #getYear() * @see Calendar */ @@ -1008,13 +1008,13 @@ public class Date * in the seconds value being reset to 0 and the minutes * value being incremented by 1, if the new time does * not include a leap second. - * + * * @param month the month, with a zero-based index * from January. * @deprecated Use Calendar instead of Date, and use * set(Calendar.MONTH, month) instead. * @see #getMonth() - * @see Calendar + * @see Calendar */ public void setMonth(int month) { @@ -1059,7 +1059,7 @@ public class Date * * @param date the date. * @deprecated Use Calendar instead of Date, and use - * set(Calendar.DATE, date) instead. + * set(Calendar.DATE, date) instead. * @see Calendar * @see #getDate() */ @@ -1121,7 +1121,7 @@ public class Date * @deprecated Use Calendar instead of Date, and use * set(Calendar.HOUR_OF_DAY, hours) instead. * @see Calendar - * @see #getHours() + * @see #getHours() */ public void setHours(int hours) { @@ -1162,7 +1162,7 @@ public class Date * * @param minutes the minutes. * @deprecated Use Calendar instead of Date, and use - * set(Calendar.MINUTE, minutes) instead. + * set(Calendar.MINUTE, minutes) instead. * @see Calendar * @see #getMinutes() */ @@ -1207,7 +1207,7 @@ public class Date * @deprecated Use Calendar instead of Date, and use * set(Calendar.SECOND, seconds) instead. * @see Calendar - * @see #getSeconds() + * @see #getSeconds() */ public void setSeconds(int seconds) { diff --git a/libjava/classpath/java/util/Dictionary.java b/libjava/classpath/java/util/Dictionary.java index 7b82a9f..acd90eb 100644 --- a/libjava/classpath/java/util/Dictionary.java +++ b/libjava/classpath/java/util/Dictionary.java @@ -1,4 +1,4 @@ -/* Dictionary.java -- an abstract (and essentially worthless) +/* Dictionary.java -- an abstract (and essentially worthless) class which is Hashtable's superclass Copyright (C) 1998, 2001, 2002, 2004 Free Software Foundation, Inc. @@ -42,12 +42,12 @@ package java.util; /** * A Dictionary maps keys to values; <i>how</i> it does that is * implementation-specific. - * + * * This is an abstract class which has really gone by the wayside. * People at Javasoft are probably embarrassed by it. At this point, * it might as well be an interface rather than a class, but it remains * this poor, laughable skeleton for the sake of backwards compatibility. - * At any rate, this was what came before the {@link Map} interface + * At any rate, this was what came before the {@link Map} interface * in the Collections framework. * * @author Jon Zeppieri @@ -77,7 +77,7 @@ public abstract class Dictionary<K, V> */ public abstract Enumeration<V> elements(); - /** + /** * Returns the value associated with the supplied key, or null * if no such value exists. Since Dictionaries are not allowed null keys * or elements, a null result always means the key is not present. diff --git a/libjava/classpath/java/util/DuplicateFormatFlagsException.java b/libjava/classpath/java/util/DuplicateFormatFlagsException.java index c180605..38c3766 100644 --- a/libjava/classpath/java/util/DuplicateFormatFlagsException.java +++ b/libjava/classpath/java/util/DuplicateFormatFlagsException.java @@ -38,15 +38,15 @@ exception statement from your version. */ package java.util; -/** +/** * Thrown when the flags supplied to the {@link Formatter#format()} * method of a {@link Formatter} contain duplicates. * * @author Tom Tromey (tromey@redhat.com) * @author Andrew John Hughes (gnu_andrew@member.fsf.org) - * @since 1.5 + * @since 1.5 */ -public class DuplicateFormatFlagsException +public class DuplicateFormatFlagsException extends IllegalFormatException { private static final long serialVersionUID = 18890531L; @@ -72,7 +72,7 @@ public class DuplicateFormatFlagsException super("Duplicate flag passed in " + flags); if (flags == null) throw new - NullPointerException("Null flags value passed to constructor."); + NullPointerException("Null flags value passed to constructor."); this.flags = flags; } diff --git a/libjava/classpath/java/util/EnumMap.java b/libjava/classpath/java/util/EnumMap.java index b7187b9..78f0500 100644 --- a/libjava/classpath/java/util/EnumMap.java +++ b/libjava/classpath/java/util/EnumMap.java @@ -40,10 +40,10 @@ package java.util; import java.io.Serializable; -/** +/** * @author Tom Tromey (tromey@redhat.com) * @author Andrew John Hughes (gnu_andrew@member.fsf.org) - * @since 1.5 + * @since 1.5 */ public class EnumMap<K extends Enum<K>, V> @@ -82,29 +82,29 @@ public class EnumMap<K extends Enum<K>, V> { if (map instanceof EnumMap) { - EnumMap<K, ? extends V> other = (EnumMap<K, ? extends V>) map; - store = (V[]) other.store.clone(); - cardinality = other.cardinality; - enumClass = other.enumClass; + EnumMap<K, ? extends V> other = (EnumMap<K, ? extends V>) map; + store = (V[]) other.store.clone(); + cardinality = other.cardinality; + enumClass = other.enumClass; } else { - for (K key : map.keySet()) - { - V value = map.get(key); - if (store == null) - { - enumClass = key.getDeclaringClass(); - store = (V[]) new Object[enumClass.getEnumConstants().length]; - } - int o = key.ordinal(); - if (store[o] == emptySlot) - ++cardinality; - store[o] = value; - } - // There must be a single element. - if (store == null) - throw new IllegalArgumentException("no elements in map"); + for (K key : map.keySet()) + { + V value = map.get(key); + if (store == null) + { + enumClass = key.getDeclaringClass(); + store = (V[]) new Object[enumClass.getEnumConstants().length]; + } + int o = key.ordinal(); + if (store[o] == emptySlot) + ++cardinality; + store[o] = value; + } + // There must be a single element. + if (store == null) + throw new IllegalArgumentException("no elements in map"); } } @@ -117,8 +117,8 @@ public class EnumMap<K extends Enum<K>, V> { for (V i : store) { - if (i != emptySlot && AbstractCollection.equals(i , value)) - return true; + if (i != emptySlot && AbstractCollection.equals(i , value)) + return true; } return false; } @@ -150,8 +150,8 @@ public class EnumMap<K extends Enum<K>, V> V result; if (store[o] == emptySlot) { - result = null; - ++cardinality; + result = null; + ++cardinality; } else result = store[o]; @@ -179,12 +179,12 @@ public class EnumMap<K extends Enum<K>, V> { for (K key : map.keySet()) { - V value = map.get(key); + V value = map.get(key); - int o = key.ordinal(); - if (store[o] == emptySlot) - ++cardinality; - store[o] = value; + int o = key.ordinal(); + if (store[o] == emptySlot) + ++cardinality; + store[o] = value; } } @@ -198,56 +198,56 @@ public class EnumMap<K extends Enum<K>, V> { if (keys == null) { - keys = new AbstractSet<K>() - { - public int size() - { - return cardinality; - } - - public Iterator<K> iterator() - { - return new Iterator<K>() - { - int count = 0; - int index = -1; - - public boolean hasNext() - { - return count < cardinality; - } - - public K next() - { - ++count; - for (++index; store[index] == emptySlot; ++index) - ; - return enumClass.getEnumConstants()[index]; - } - - public void remove() - { - --cardinality; - store[index] = (V) emptySlot; - } - }; - } - - public void clear() - { - EnumMap.this.clear(); - } - - public boolean contains(Object o) - { - return contains(o); - } - - public boolean remove(Object o) - { - return EnumMap.this.remove(o) != null; - } - }; + keys = new AbstractSet<K>() + { + public int size() + { + return cardinality; + } + + public Iterator<K> iterator() + { + return new Iterator<K>() + { + int count = 0; + int index = -1; + + public boolean hasNext() + { + return count < cardinality; + } + + public K next() + { + ++count; + for (++index; store[index] == emptySlot; ++index) + ; + return enumClass.getEnumConstants()[index]; + } + + public void remove() + { + --cardinality; + store[index] = (V) emptySlot; + } + }; + } + + public void clear() + { + EnumMap.this.clear(); + } + + public boolean contains(Object o) + { + return contains(o); + } + + public boolean remove(Object o) + { + return EnumMap.this.remove(o) != null; + } + }; } return keys; } @@ -256,46 +256,46 @@ public class EnumMap<K extends Enum<K>, V> { if (values == null) { - values = new AbstractCollection<V>() - { - public int size() - { - return cardinality; - } - - public Iterator<V> iterator() - { - return new Iterator<V>() - { - int count = 0; - int index = -1; - - public boolean hasNext() - { - return count < cardinality; - } - - public V next() - { - ++count; - for (++index; store[index] == emptySlot; ++index) - ; - return store[index]; - } - - public void remove() - { - --cardinality; - store[index] = (V) emptySlot; - } - }; - } - - public void clear() - { - EnumMap.this.clear(); - } - }; + values = new AbstractCollection<V>() + { + public int size() + { + return cardinality; + } + + public Iterator<V> iterator() + { + return new Iterator<V>() + { + int count = 0; + int index = -1; + + public boolean hasNext() + { + return count < cardinality; + } + + public V next() + { + ++count; + for (++index; store[index] == emptySlot; ++index) + ; + return store[index]; + } + + public void remove() + { + --cardinality; + store[index] = (V) emptySlot; + } + }; + } + + public void clear() + { + EnumMap.this.clear(); + } + }; } return values; } @@ -304,74 +304,74 @@ public class EnumMap<K extends Enum<K>, V> { if (entries == null) { - entries = new AbstractSet<Map.Entry<K, V>>() - { - public int size() - { - return cardinality; - } - - public Iterator<Map.Entry<K, V>> iterator() - { - return new Iterator<Map.Entry<K, V>>() - { - int count = 0; - int index = -1; - - public boolean hasNext() - { - return count < cardinality; - } - - public Map.Entry<K,V> next() - { - ++count; - for (++index; store[index] == emptySlot; ++index) - ; - // FIXME: we could just return something that - // only knows the index. That would be cleaner. - return new AbstractMap.SimpleEntry<K, V>(enumClass.getEnumConstants()[index], - store[index]) - { - public V setValue(V newVal) - { - value = newVal; - return put(key, newVal); - } - }; - } - - public void remove() - { - --cardinality; - store[index] = (V) emptySlot; - } - }; - } - - public void clear() - { - EnumMap.this.clear(); - } - - public boolean contains(Object o) - { - if (! (o instanceof Map.Entry)) - return false; - Map.Entry<K, V> other = (Map.Entry<K, V>) o; - return (containsKey(other.getKey()) - && AbstractCollection.equals(get(other.getKey()), - other.getValue())); - } - - public boolean remove(Object o) - { - if (! (o instanceof Map.Entry)) - return false; - Map.Entry<K, V> other = (Map.Entry<K, V>) o; - return EnumMap.this.remove(other.getKey()) != null; - } - }; + entries = new AbstractSet<Map.Entry<K, V>>() + { + public int size() + { + return cardinality; + } + + public Iterator<Map.Entry<K, V>> iterator() + { + return new Iterator<Map.Entry<K, V>>() + { + int count = 0; + int index = -1; + + public boolean hasNext() + { + return count < cardinality; + } + + public Map.Entry<K,V> next() + { + ++count; + for (++index; store[index] == emptySlot; ++index) + ; + // FIXME: we could just return something that + // only knows the index. That would be cleaner. + return new AbstractMap.SimpleEntry<K, V>(enumClass.getEnumConstants()[index], + store[index]) + { + public V setValue(V newVal) + { + value = newVal; + return put(key, newVal); + } + }; + } + + public void remove() + { + --cardinality; + store[index] = (V) emptySlot; + } + }; + } + + public void clear() + { + EnumMap.this.clear(); + } + + public boolean contains(Object o) + { + if (! (o instanceof Map.Entry)) + return false; + Map.Entry<K, V> other = (Map.Entry<K, V>) o; + return (containsKey(other.getKey()) + && AbstractCollection.equals(get(other.getKey()), + other.getValue())); + } + + public boolean remove(Object o) + { + if (! (o instanceof Map.Entry)) + return false; + Map.Entry<K, V> other = (Map.Entry<K, V>) o; + return EnumMap.this.remove(other.getKey()) != null; + } + }; } return entries; } @@ -391,12 +391,12 @@ public class EnumMap<K extends Enum<K>, V> EnumMap<K, V> result; try { - result = (EnumMap<K, V>) super.clone(); + result = (EnumMap<K, V>) super.clone(); } catch (CloneNotSupportedException ignore) { - // Can't happen. - result = null; + // Can't happen. + result = null; } result.store = (V[]) store.clone(); return result; diff --git a/libjava/classpath/java/util/EnumSet.java b/libjava/classpath/java/util/EnumSet.java index 31b0368..60d0106 100644 --- a/libjava/classpath/java/util/EnumSet.java +++ b/libjava/classpath/java/util/EnumSet.java @@ -52,7 +52,7 @@ import java.io.Serializable; * </p> * <p> * This class is designed to provide an alternative to using integer bit flags - * by providing a typesafe {@link Collection} interface with an underlying + * by providing a typesafe {@link Collection} interface with an underlying * implementation that utilises the assumptions above to give an equivalent level * of efficiency. The values in a {@link EnumSet} must all be from the same * {@link Enum} type, which allows the contents to be packed into a bit vector. @@ -76,7 +76,7 @@ import java.io.Serializable; * @author Tom Tromey (tromey@redhat.com) * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @author Dalibor Topic (robilad@kaffe.org) - * @since 1.5 + * @since 1.5 */ // FIXME: serialization is special, uses SerializationProxy. @@ -115,7 +115,7 @@ public abstract class EnumSet<T extends Enum<T>> /** * Returns a clone of the set. - * + * * @return a clone of the set. */ public EnumSet<T> clone() @@ -124,12 +124,12 @@ public abstract class EnumSet<T extends Enum<T>> try { - r = (EnumSet<T>) super.clone(); + r = (EnumSet<T>) super.clone(); } catch (CloneNotSupportedException _) { - /* Can't happen */ - return null; + /* Can't happen */ + return null; } r.store = (BitSet) store.clone(); return r; @@ -190,16 +190,16 @@ public abstract class EnumSet<T extends Enum<T>> if (other instanceof EnumSet) return copyOf((EnumSet<T>) other); if (other.isEmpty()) - throw new IllegalArgumentException("Collection is empty"); + throw new IllegalArgumentException("Collection is empty"); EnumSet<T> r = null; for (T val : other) { - if (r == null) - r = of(val); - else - r.add(val); + if (r == null) + r = of(val); + else + r.add(val); } return r; @@ -225,7 +225,7 @@ public abstract class EnumSet<T extends Enum<T>> /** * Creates a new {@link EnumSet} populated with the given element. - * + * * @param first the element to use to populate the new set. * @return an {@link EnumSet} containing the element. * @throws NullPointerException if <code>first</code> is <code>null</code>. @@ -236,149 +236,149 @@ public abstract class EnumSet<T extends Enum<T>> { public boolean add(T val) { - if (store.get(val.ordinal())) - return false; + if (store.get(val.ordinal())) + return false; - store.set(val.ordinal()); - ++cardinality; - return true; + store.set(val.ordinal()); + ++cardinality; + return true; } public boolean addAll(Collection<? extends T> c) { - boolean result = false; - if (c instanceof EnumSet) - { - EnumSet<T> other = (EnumSet<T>) c; - if (enumClass == other.enumClass) - { - store.or(other.store); - int save = cardinality; - cardinality = store.cardinality(); - result = save != cardinality; - } - } - else - { - for (T val : c) - { - if (add (val)) - result = true; - } - } - return result; + boolean result = false; + if (c instanceof EnumSet) + { + EnumSet<T> other = (EnumSet<T>) c; + if (enumClass == other.enumClass) + { + store.or(other.store); + int save = cardinality; + cardinality = store.cardinality(); + result = save != cardinality; + } + } + else + { + for (T val : c) + { + if (add (val)) + result = true; + } + } + return result; } public void clear() { - store.clear(); - cardinality = 0; + store.clear(); + cardinality = 0; } public boolean contains(Object o) { - if (! (o instanceof Enum)) - return false; + if (! (o instanceof Enum)) + return false; - Enum<T> e = (Enum<T>) o; - if (e.getDeclaringClass() != enumClass) - return false; + Enum<T> e = (Enum<T>) o; + if (e.getDeclaringClass() != enumClass) + return false; - return store.get(e.ordinal()); + return store.get(e.ordinal()); } public boolean containsAll(Collection<?> c) { - if (c instanceof EnumSet) - { - EnumSet<T> other = (EnumSet<T>) c; - if (enumClass == other.enumClass) - return store.containsAll(other.store); - - return false; - } - return super.containsAll(c); + if (c instanceof EnumSet) + { + EnumSet<T> other = (EnumSet<T>) c; + if (enumClass == other.enumClass) + return store.containsAll(other.store); + + return false; + } + return super.containsAll(c); } public Iterator<T> iterator() { - return new Iterator<T>() - { - int next = -1; - int count = 0; - - public boolean hasNext() - { - return count < cardinality; - } - - public T next() - { - next = store.nextSetBit(next + 1); - ++count; - return enumClass.getEnumConstants()[next]; - } - - public void remove() - { - if (! store.get(next)) - { - store.clear(next); - --cardinality; - } - } - }; + return new Iterator<T>() + { + int next = -1; + int count = 0; + + public boolean hasNext() + { + return count < cardinality; + } + + public T next() + { + next = store.nextSetBit(next + 1); + ++count; + return enumClass.getEnumConstants()[next]; + } + + public void remove() + { + if (! store.get(next)) + { + store.clear(next); + --cardinality; + } + } + }; } public boolean remove(Object o) { - if (! (o instanceof Enum)) - return false; + if (! (o instanceof Enum)) + return false; - Enum<T> e = (Enum<T>) o; - if (e.getDeclaringClass() != enumClass) - return false; + Enum<T> e = (Enum<T>) o; + if (e.getDeclaringClass() != enumClass) + return false; - store.clear(e.ordinal()); - --cardinality; - return true; + store.clear(e.ordinal()); + --cardinality; + return true; } public boolean removeAll(Collection<?> c) { - if (c instanceof EnumSet) - { - EnumSet<T> other = (EnumSet<T>) c; - if (enumClass != other.enumClass) - return false; - - store.andNot(other.store); - int save = cardinality; - cardinality = store.cardinality(); - return save != cardinality; - } - return super.removeAll(c); + if (c instanceof EnumSet) + { + EnumSet<T> other = (EnumSet<T>) c; + if (enumClass != other.enumClass) + return false; + + store.andNot(other.store); + int save = cardinality; + cardinality = store.cardinality(); + return save != cardinality; + } + return super.removeAll(c); } public boolean retainAll(Collection<?> c) { - if (c instanceof EnumSet) - { - EnumSet<T> other = (EnumSet<T>) c; - if (enumClass != other.enumClass) - return false; - - store.and(other.store); - int save = cardinality; - cardinality = store.cardinality(); - return save != cardinality; - } - return super.retainAll(c); + if (c instanceof EnumSet) + { + EnumSet<T> other = (EnumSet<T>) c; + if (enumClass != other.enumClass) + return false; + + store.and(other.store); + int save = cardinality; + cardinality = store.cardinality(); + return save != cardinality; + } + return super.retainAll(c); } public int size() { - return cardinality; + return cardinality; } }; @@ -392,7 +392,7 @@ public abstract class EnumSet<T extends Enum<T>> /** * Creates a new {@link EnumSet} populated with the given two elements. - * + * * @param first the first element to use to populate the new set. * @param second the second element to use. * @return an {@link EnumSet} containing the elements. @@ -407,7 +407,7 @@ public abstract class EnumSet<T extends Enum<T>> /** * Creates a new {@link EnumSet} populated with the given three elements. - * + * * @param first the first element to use to populate the new set. * @param second the second element to use. * @param third the third element to use. @@ -423,7 +423,7 @@ public abstract class EnumSet<T extends Enum<T>> /** * Creates a new {@link EnumSet} populated with the given four elements. - * + * * @param first the first element to use to populate the new set. * @param second the second element to use. * @param third the third element to use. @@ -432,7 +432,7 @@ public abstract class EnumSet<T extends Enum<T>> * @throws NullPointerException if any of the parameters are <code>null</code>. */ public static <T extends Enum<T>> EnumSet<T> of(T first, T second, T third, - T fourth) + T fourth) { EnumSet<T> r = of(first, second, third); r.add(fourth); @@ -441,7 +441,7 @@ public abstract class EnumSet<T extends Enum<T>> /** * Creates a new {@link EnumSet} populated with the given five elements. - * + * * @param first the first element to use to populate the new set. * @param second the second element to use. * @param third the third element to use. @@ -451,7 +451,7 @@ public abstract class EnumSet<T extends Enum<T>> * @throws NullPointerException if any of the parameters are <code>null</code>. */ public static <T extends Enum<T>> EnumSet<T> of(T first, T second, T third, - T fourth, T fifth) + T fourth, T fifth) { EnumSet<T> r = of(first, second, third, fourth); r.add(fifth); @@ -460,7 +460,7 @@ public abstract class EnumSet<T extends Enum<T>> /** * Creates a new {@link EnumSet} populated with the given elements. - * + * * @param first the first element to use to populate the new set. * @param rest the other elements to use. * @return an {@link EnumSet} containing the elements. diff --git a/libjava/classpath/java/util/FormatFlagsConversionMismatchException.java b/libjava/classpath/java/util/FormatFlagsConversionMismatchException.java index ec31773..b28ded1 100644 --- a/libjava/classpath/java/util/FormatFlagsConversionMismatchException.java +++ b/libjava/classpath/java/util/FormatFlagsConversionMismatchException.java @@ -38,14 +38,14 @@ exception statement from your version. */ package java.util; -/** +/** * Thrown when the flags supplied to the {@link Formatter#format()} * method of a {@link Formatter} contains a flag that does not match * the conversion character specified for it. * * @author Tom Tromey (tromey@redhat.com) * @author Andrew John Hughes (gnu_andrew@member.fsf.org) - * @since 1.5 + * @since 1.5 */ public class FormatFlagsConversionMismatchException extends IllegalFormatException @@ -83,7 +83,7 @@ public class FormatFlagsConversionMismatchException super("Invalid flag " + f + " for conversion " + c); if (f == null) throw new - NullPointerException("Null flag value passed to constructor."); + NullPointerException("Null flag value passed to constructor."); this.f = f; this.c = c; } diff --git a/libjava/classpath/java/util/Formattable.java b/libjava/classpath/java/util/Formattable.java index 27e26a7..6a83ed5d 100644 --- a/libjava/classpath/java/util/Formattable.java +++ b/libjava/classpath/java/util/Formattable.java @@ -7,7 +7,7 @@ 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 @@ -38,7 +38,7 @@ exception statement from your version. */ package java.util; -/** +/** * <p> * The <code>Formattable</code> interface is used to provide customised * formatting to arbitrary objects via the {@link Formatter}. The @@ -54,7 +54,7 @@ package java.util; * * @author Tom Tromey (tromey@redhat.com) * @author Andrew John Hughes (gnu_andrew@member.fsf.org) - * @since 1.5 + * @since 1.5 */ public interface Formattable { @@ -88,5 +88,5 @@ public interface Formattable * between it and the arguments. */ public void formatTo(Formatter formatter, int flags, int width, - int precision); + int precision); } diff --git a/libjava/classpath/java/util/FormattableFlags.java b/libjava/classpath/java/util/FormattableFlags.java index 648b3c0..2c5e199 100644 --- a/libjava/classpath/java/util/FormattableFlags.java +++ b/libjava/classpath/java/util/FormattableFlags.java @@ -38,7 +38,7 @@ exception statement from your version. */ package java.util; -/** +/** * This class contains a set of flags used * by the {@link Formattable#formatTo()} method. * They are used to modify the output of the @@ -48,7 +48,7 @@ package java.util; * * @author Tom Tromey (tromey@redhat.com) * @author Andrew John Hughes (gnu_andrew@member.fsf.org) - * @since 1.5 + * @since 1.5 */ public class FormattableFlags { diff --git a/libjava/classpath/java/util/Formatter.java b/libjava/classpath/java/util/Formatter.java index 9217d93..04ae805 100644 --- a/libjava/classpath/java/util/Formatter.java +++ b/libjava/classpath/java/util/Formatter.java @@ -7,7 +7,7 @@ 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 @@ -56,7 +56,7 @@ import java.text.DecimalFormatSymbols; import gnu.classpath.SystemProperties; -/** +/** * <p> * A Java formatter for <code>printf</code>-style format strings, * as seen in the C programming language. This differs from the @@ -79,12 +79,12 @@ import gnu.classpath.SystemProperties; * <strong>Note</strong>: the formatter is not thread-safe. For * multi-threaded access, external synchronization should be provided. * </p> - * + * * @author Tom Tromey (tromey@redhat.com) * @author Andrew John Hughes (gnu_andrew@member.fsf.org) - * @since 1.5 + * @since 1.5 */ -public final class Formatter +public final class Formatter implements Closeable, Flushable { @@ -211,7 +211,7 @@ public final class Formatter * @throws SecurityException if a security manager is present * and doesn't allow writing to the file. */ - public Formatter(File file) + public Formatter(File file) throws FileNotFoundException { this(new OutputStreamWriter(new FileOutputStream(file))); @@ -257,7 +257,7 @@ public final class Formatter throws FileNotFoundException, UnsupportedEncodingException { this(new OutputStreamWriter(new FileOutputStream(file), charset), - loc); + loc); } /** @@ -373,7 +373,7 @@ public final class Formatter throws FileNotFoundException, UnsupportedEncodingException { this(new OutputStreamWriter(new FileOutputStream(file), charset), - loc); + loc); } /** @@ -390,13 +390,13 @@ public final class Formatter return; try { - if (out instanceof Closeable) - ((Closeable) out).close(); + if (out instanceof Closeable) + ((Closeable) out).close(); } catch (IOException _) { - // FIXME: do we ignore these or do we set ioException? - // The docs seem to indicate that we should ignore. + // FIXME: do we ignore these or do we set ioException? + // The docs seem to indicate that we should ignore. } closed = true; } @@ -414,13 +414,13 @@ public final class Formatter throw new FormatterClosedException(); try { - if (out instanceof Flushable) - ((Flushable) out).flush(); + if (out instanceof Flushable) + ((Flushable) out).flush(); } catch (IOException _) { - // FIXME: do we ignore these or do we set ioException? - // The docs seem to indicate that we should ignore. + // FIXME: do we ignore these or do we set ioException? + // The docs seem to indicate that we should ignore. } } @@ -450,7 +450,7 @@ public final class Formatter flags &= ~allowed; if (flags != 0) throw new FormatFlagsConversionMismatchException(getName(flags), - conversion); + conversion); } /** @@ -473,7 +473,7 @@ public final class Formatter * @param isNegative true if the value is negative. */ private void applyLocalization(CPStringBuilder builder, int flags, int width, - boolean isNegative) + boolean isNegative) { DecimalFormatSymbols dfsyms; if (fmtLocale == null) @@ -486,52 +486,52 @@ public final class Formatter int decimalOffset = -1; for (int i = builder.length() - 1; i >= 0; --i) { - char c = builder.charAt(i); - if (c >= '0' && c <= '9') - builder.setCharAt(i, (char) (c - '0' + zeroDigit)); - else if (c == '.') - { - assert decimalOffset == -1; - decimalOffset = i; - } + char c = builder.charAt(i); + if (c >= '0' && c <= '9') + builder.setCharAt(i, (char) (c - '0' + zeroDigit)); + else if (c == '.') + { + assert decimalOffset == -1; + decimalOffset = i; + } } // Localize the decimal separator. if (decimalOffset != -1) { - builder.deleteCharAt(decimalOffset); - builder.insert(decimalOffset, dfsyms.getDecimalSeparator()); + builder.deleteCharAt(decimalOffset); + builder.insert(decimalOffset, dfsyms.getDecimalSeparator()); } - + // Insert the grouping separators. if ((flags & FormattableFlags.COMMA) != 0) { - char groupSeparator = dfsyms.getGroupingSeparator(); - int groupSize = 3; // FIXME - int offset = (decimalOffset == -1) ? builder.length() : decimalOffset; - // We use '>' because we don't want to insert a separator - // before the first digit. - for (int i = offset - groupSize; i > 0; i -= groupSize) - builder.insert(i, groupSeparator); + char groupSeparator = dfsyms.getGroupingSeparator(); + int groupSize = 3; // FIXME + int offset = (decimalOffset == -1) ? builder.length() : decimalOffset; + // We use '>' because we don't want to insert a separator + // before the first digit. + for (int i = offset - groupSize; i > 0; i -= groupSize) + builder.insert(i, groupSeparator); } if ((flags & FormattableFlags.ZERO) != 0) { - // Zero fill. Note that according to the algorithm we do not - // insert grouping separators here. - for (int i = width - builder.length(); i > 0; --i) - builder.insert(0, zeroDigit); + // Zero fill. Note that according to the algorithm we do not + // insert grouping separators here. + for (int i = width - builder.length(); i > 0; --i) + builder.insert(0, zeroDigit); } if (isNegative) { - if ((flags & FormattableFlags.PAREN) != 0) - { - builder.insert(0, '('); - builder.append(')'); - } - else - builder.insert(0, '-'); + if ((flags & FormattableFlags.PAREN) != 0) + { + builder.insert(0, '('); + builder.append(')'); + } + else + builder.insert(0, '-'); } else if ((flags & FormattableFlags.PLUS) != 0) builder.insert(0, '+'); @@ -554,10 +554,10 @@ public final class Formatter { if ((flags & FormattableFlags.UPPERCASE) != 0) { - if (fmtLocale == null) - arg = arg.toUpperCase(); - else - arg = arg.toUpperCase(fmtLocale); + if (fmtLocale == null) + arg = arg.toUpperCase(); + else + arg = arg.toUpperCase(fmtLocale); } if (precision >= 0 && arg.length() > precision) @@ -568,19 +568,19 @@ public final class Formatter throw new MissingFormatWidthException("fixme"); if (! leftJustify && arg.length() < width) { - for (int i = width - arg.length(); i > 0; --i) - out.append(' '); + for (int i = width - arg.length(); i > 0; --i) + out.append(' '); } out.append(arg); if (leftJustify && arg.length() < width) { - for (int i = width - arg.length(); i > 0; --i) - out.append(' '); + for (int i = width - arg.length(); i > 0; --i) + out.append(' '); } } - /** - * Emit a boolean. + /** + * Emit a boolean. * * @param arg the boolean to emit. * @param flags the formatting flags to use. @@ -590,12 +590,12 @@ public final class Formatter * @throws IOException if the output stream throws an I/O error. */ private void booleanFormat(Object arg, int flags, int width, int precision, - char conversion) + char conversion) throws IOException { checkFlags(flags, - FormattableFlags.LEFT_JUSTIFY | FormattableFlags.UPPERCASE, - conversion); + FormattableFlags.LEFT_JUSTIFY | FormattableFlags.UPPERCASE, + conversion); String result; if (arg instanceof Boolean) result = String.valueOf((Boolean) arg); @@ -604,8 +604,8 @@ public final class Formatter genericFormat(result, flags, width, precision); } - /** - * Emit a hash code. + /** + * Emit a hash code. * * @param arg the hash code to emit. * @param flags the formatting flags to use. @@ -615,18 +615,18 @@ public final class Formatter * @throws IOException if the output stream throws an I/O error. */ private void hashCodeFormat(Object arg, int flags, int width, int precision, - char conversion) + char conversion) throws IOException { checkFlags(flags, - FormattableFlags.LEFT_JUSTIFY | FormattableFlags.UPPERCASE, - conversion); + FormattableFlags.LEFT_JUSTIFY | FormattableFlags.UPPERCASE, + conversion); genericFormat(arg == null ? "null" : Integer.toHexString(arg.hashCode()), - flags, width, precision); + flags, width, precision); } - /** - * Emit a String or Formattable conversion. + /** + * Emit a String or Formattable conversion. * * @param arg the String or Formattable to emit. * @param flags the formatting flags to use. @@ -636,31 +636,31 @@ public final class Formatter * @throws IOException if the output stream throws an I/O error. */ private void stringFormat(Object arg, int flags, int width, int precision, - char conversion) + char conversion) throws IOException { if (arg instanceof Formattable) { - checkFlags(flags, - (FormattableFlags.LEFT_JUSTIFY - | FormattableFlags.UPPERCASE - | FormattableFlags.ALTERNATE), - conversion); - Formattable fmt = (Formattable) arg; - fmt.formatTo(this, flags, width, precision); + checkFlags(flags, + (FormattableFlags.LEFT_JUSTIFY + | FormattableFlags.UPPERCASE + | FormattableFlags.ALTERNATE), + conversion); + Formattable fmt = (Formattable) arg; + fmt.formatTo(this, flags, width, precision); } else { - checkFlags(flags, - FormattableFlags.LEFT_JUSTIFY | FormattableFlags.UPPERCASE, - conversion); - genericFormat(arg == null ? "null" : arg.toString(), flags, width, - precision); + checkFlags(flags, + FormattableFlags.LEFT_JUSTIFY | FormattableFlags.UPPERCASE, + conversion); + genericFormat(arg == null ? "null" : arg.toString(), flags, width, + precision); } } - /** - * Emit a character. + /** + * Emit a character. * * @param arg the character to emit. * @param flags the formatting flags to use. @@ -670,12 +670,12 @@ public final class Formatter * @throws IOException if the output stream throws an I/O error. */ private void characterFormat(Object arg, int flags, int width, int precision, - char conversion) + char conversion) throws IOException { checkFlags(flags, - FormattableFlags.LEFT_JUSTIFY | FormattableFlags.UPPERCASE, - conversion); + FormattableFlags.LEFT_JUSTIFY | FormattableFlags.UPPERCASE, + conversion); noPrecision(precision); int theChar; @@ -687,9 +687,9 @@ public final class Formatter theChar = (char) (((Short) arg).shortValue ()); else if (arg instanceof Integer) { - theChar = ((Integer) arg).intValue(); - if (! Character.isValidCodePoint(theChar)) - throw new IllegalFormatCodePointException(theChar); + theChar = ((Integer) arg).intValue(); + if (! Character.isValidCodePoint(theChar)) + throw new IllegalFormatCodePointException(theChar); } else throw new IllegalFormatConversionException(conversion, arg.getClass()); @@ -697,7 +697,7 @@ public final class Formatter genericFormat(result, flags, width, precision); } - /** + /** * Emit a '%'. * * @param flags the formatting flags to use. @@ -713,7 +713,7 @@ public final class Formatter genericFormat("%", flags, width, precision); } - /** + /** * Emit a newline. * * @param flags the formatting flags to use. @@ -744,15 +744,15 @@ public final class Formatter * @return the result. */ private CPStringBuilder basicIntegralConversion(Object arg, int flags, - int width, int precision, - int radix, char conversion) + int width, int precision, + int radix, char conversion) { assert radix == 8 || radix == 10 || radix == 16; noPrecision(precision); // Some error checking. if ((flags & FormattableFlags.PLUS) != 0 - && (flags & FormattableFlags.SPACE) != 0) + && (flags & FormattableFlags.SPACE) != 0) throw new IllegalFormatFlagsException(getName(flags)); if ((flags & FormattableFlags.LEFT_JUSTIFY) != 0 && width == -1) @@ -761,41 +761,41 @@ public final class Formatter // Do the base translation of the value to a string. String result; int basicFlags = (FormattableFlags.LEFT_JUSTIFY - // We already handled any possible error when - // parsing. - | FormattableFlags.UPPERCASE - | FormattableFlags.ZERO); + // We already handled any possible error when + // parsing. + | FormattableFlags.UPPERCASE + | FormattableFlags.ZERO); if (radix == 10) basicFlags |= (FormattableFlags.PLUS - | FormattableFlags.SPACE - | FormattableFlags.COMMA - | FormattableFlags.PAREN); + | FormattableFlags.SPACE + | FormattableFlags.COMMA + | FormattableFlags.PAREN); else basicFlags |= FormattableFlags.ALTERNATE; if (arg instanceof BigInteger) { - checkFlags(flags, - (basicFlags - | FormattableFlags.PLUS - | FormattableFlags.SPACE - | FormattableFlags.PAREN), - conversion); - BigInteger bi = (BigInteger) arg; - result = bi.toString(radix); + checkFlags(flags, + (basicFlags + | FormattableFlags.PLUS + | FormattableFlags.SPACE + | FormattableFlags.PAREN), + conversion); + BigInteger bi = (BigInteger) arg; + result = bi.toString(radix); } else if (arg instanceof Number - && ! (arg instanceof Float) - && ! (arg instanceof Double)) + && ! (arg instanceof Float) + && ! (arg instanceof Double)) { - checkFlags(flags, basicFlags, conversion); - long value = ((Number) arg).longValue (); - if (radix == 8) - result = Long.toOctalString(value); - else if (radix == 16) - result = Long.toHexString(value); - else - result = Long.toString(value); + checkFlags(flags, basicFlags, conversion); + long value = ((Number) arg).longValue (); + if (radix == 8) + result = Long.toOctalString(value); + else if (radix == 16) + result = Long.toHexString(value); + else + result = Long.toString(value); } else throw new IllegalFormatConversionException(conversion, arg.getClass()); @@ -803,9 +803,9 @@ public final class Formatter return new CPStringBuilder(result); } - /** - * Emit a hex or octal value. - * + /** + * Emit a hex or octal value. + * * @param arg the hexadecimal or octal value. * @param flags the formatting flags to use. * @param width the width to use. @@ -815,79 +815,79 @@ public final class Formatter * @throws IOException if the output stream throws an I/O error. */ private void hexOrOctalConversion(Object arg, int flags, int width, - int precision, int radix, - char conversion) + int precision, int radix, + char conversion) throws IOException { assert radix == 8 || radix == 16; CPStringBuilder builder = basicIntegralConversion(arg, flags, width, - precision, radix, - conversion); + precision, radix, + conversion); int insertPoint = 0; // Insert the sign. if (builder.charAt(0) == '-') { - // Already inserted. Note that we don't insert a sign, since - // the only case where it is needed it BigInteger, and it has - // already been inserted by toString. - ++insertPoint; + // Already inserted. Note that we don't insert a sign, since + // the only case where it is needed it BigInteger, and it has + // already been inserted by toString. + ++insertPoint; } else if ((flags & FormattableFlags.PLUS) != 0) { - builder.insert(insertPoint, '+'); - ++insertPoint; + builder.insert(insertPoint, '+'); + ++insertPoint; } else if ((flags & FormattableFlags.SPACE) != 0) { - builder.insert(insertPoint, ' '); - ++insertPoint; + builder.insert(insertPoint, ' '); + ++insertPoint; } // Insert the radix prefix. if ((flags & FormattableFlags.ALTERNATE) != 0) { - builder.insert(insertPoint, radix == 8 ? "0" : "0x"); - insertPoint += radix == 8 ? 1 : 2; + builder.insert(insertPoint, radix == 8 ? "0" : "0x"); + insertPoint += radix == 8 ? 1 : 2; } // Now justify the result. int resultWidth = builder.length(); if (resultWidth < width) { - char fill = ((flags & FormattableFlags.ZERO) != 0) ? '0' : ' '; - if ((flags & FormattableFlags.LEFT_JUSTIFY) != 0) - { - // Left justify. - if (fill == ' ') - insertPoint = builder.length(); - } - else - { - // Right justify. Insert spaces before the radix prefix - // and sign. - insertPoint = 0; - } - while (resultWidth++ < width) - builder.insert(insertPoint, fill); + char fill = ((flags & FormattableFlags.ZERO) != 0) ? '0' : ' '; + if ((flags & FormattableFlags.LEFT_JUSTIFY) != 0) + { + // Left justify. + if (fill == ' ') + insertPoint = builder.length(); + } + else + { + // Right justify. Insert spaces before the radix prefix + // and sign. + insertPoint = 0; + } + while (resultWidth++ < width) + builder.insert(insertPoint, fill); } String result = builder.toString(); if ((flags & FormattableFlags.UPPERCASE) != 0) { - if (fmtLocale == null) - result = result.toUpperCase(); - else - result = result.toUpperCase(fmtLocale); + if (fmtLocale == null) + result = result.toUpperCase(); + else + result = result.toUpperCase(fmtLocale); } out.append(result); } - /** - * Emit a decimal value. - * + /** + * Emit a decimal value. + * * @param arg the hexadecimal or octal value. * @param flags the formatting flags to use. * @param width the width to use. @@ -896,26 +896,26 @@ public final class Formatter * @throws IOException if the output stream throws an I/O error. */ private void decimalConversion(Object arg, int flags, int width, - int precision, char conversion) + int precision, char conversion) throws IOException { CPStringBuilder builder = basicIntegralConversion(arg, flags, width, - precision, 10, - conversion); + precision, 10, + conversion); boolean isNegative = false; if (builder.charAt(0) == '-') { - // Sign handling is done during localization. - builder.deleteCharAt(0); - isNegative = true; + // Sign handling is done during localization. + builder.deleteCharAt(0); + isNegative = true; } applyLocalization(builder, flags, width, isNegative); genericFormat(builder.toString(), flags, width, precision); } - /** - * Emit a single date or time conversion to a StringBuilder. + /** + * Emit a single date or time conversion to a StringBuilder. * * @param builder the builder to write to. * @param cal the calendar to use in the conversion. @@ -923,185 +923,185 @@ public final class Formatter * @param syms the date formatting symbols. */ private void singleDateTimeConversion(CPStringBuilder builder, Calendar cal, - char conversion, - DateFormatSymbols syms) + char conversion, + DateFormatSymbols syms) { int oldLen = builder.length(); int digits = -1; switch (conversion) { case 'H': - builder.append(cal.get(Calendar.HOUR_OF_DAY)); - digits = 2; - break; + builder.append(cal.get(Calendar.HOUR_OF_DAY)); + digits = 2; + break; case 'I': - builder.append(cal.get(Calendar.HOUR)); - digits = 2; - break; + builder.append(cal.get(Calendar.HOUR)); + digits = 2; + break; case 'k': - builder.append(cal.get(Calendar.HOUR_OF_DAY)); - break; + builder.append(cal.get(Calendar.HOUR_OF_DAY)); + break; case 'l': - builder.append(cal.get(Calendar.HOUR)); - break; + builder.append(cal.get(Calendar.HOUR)); + break; case 'M': - builder.append(cal.get(Calendar.MINUTE)); - digits = 2; - break; + builder.append(cal.get(Calendar.MINUTE)); + digits = 2; + break; case 'S': - builder.append(cal.get(Calendar.SECOND)); - digits = 2; - break; + builder.append(cal.get(Calendar.SECOND)); + digits = 2; + break; case 'N': - // FIXME: nanosecond ... - digits = 9; - break; + // FIXME: nanosecond ... + digits = 9; + break; case 'p': - { - int ampm = cal.get(Calendar.AM_PM); - builder.append(syms.getAmPmStrings()[ampm]); - } - break; + { + int ampm = cal.get(Calendar.AM_PM); + builder.append(syms.getAmPmStrings()[ampm]); + } + break; case 'z': - { - int zone = cal.get(Calendar.ZONE_OFFSET) / (1000 * 60); - builder.append(zone); - digits = 4; - // Skip the '-' sign. - if (zone < 0) - ++oldLen; - } - break; + { + int zone = cal.get(Calendar.ZONE_OFFSET) / (1000 * 60); + builder.append(zone); + digits = 4; + // Skip the '-' sign. + if (zone < 0) + ++oldLen; + } + break; case 'Z': - { - // FIXME: DST? - int zone = cal.get(Calendar.ZONE_OFFSET) / (1000 * 60 * 60); - String[][] zs = syms.getZoneStrings(); - builder.append(zs[zone + 12][1]); - } - break; + { + // FIXME: DST? + int zone = cal.get(Calendar.ZONE_OFFSET) / (1000 * 60 * 60); + String[][] zs = syms.getZoneStrings(); + builder.append(zs[zone + 12][1]); + } + break; case 's': - { - long val = cal.getTime().getTime(); - builder.append(val / 1000); - } - break; + { + long val = cal.getTime().getTime(); + builder.append(val / 1000); + } + break; case 'Q': - { - long val = cal.getTime().getTime(); - builder.append(val); - } - break; + { + long val = cal.getTime().getTime(); + builder.append(val); + } + break; case 'B': - { - int month = cal.get(Calendar.MONTH); - builder.append(syms.getMonths()[month]); - } - break; + { + int month = cal.get(Calendar.MONTH); + builder.append(syms.getMonths()[month]); + } + break; case 'b': case 'h': - { - int month = cal.get(Calendar.MONTH); - builder.append(syms.getShortMonths()[month]); - } - break; + { + int month = cal.get(Calendar.MONTH); + builder.append(syms.getShortMonths()[month]); + } + break; case 'A': - { - int day = cal.get(Calendar.DAY_OF_WEEK); - builder.append(syms.getWeekdays()[day]); - } - break; + { + int day = cal.get(Calendar.DAY_OF_WEEK); + builder.append(syms.getWeekdays()[day]); + } + break; case 'a': - { - int day = cal.get(Calendar.DAY_OF_WEEK); - builder.append(syms.getShortWeekdays()[day]); - } - break; + { + int day = cal.get(Calendar.DAY_OF_WEEK); + builder.append(syms.getShortWeekdays()[day]); + } + break; case 'C': - builder.append(cal.get(Calendar.YEAR) / 100); - digits = 2; - break; + builder.append(cal.get(Calendar.YEAR) / 100); + digits = 2; + break; case 'Y': - builder.append(cal.get(Calendar.YEAR)); - digits = 4; - break; + builder.append(cal.get(Calendar.YEAR)); + digits = 4; + break; case 'y': - builder.append(cal.get(Calendar.YEAR) % 100); - digits = 2; - break; + builder.append(cal.get(Calendar.YEAR) % 100); + digits = 2; + break; case 'j': - builder.append(cal.get(Calendar.DAY_OF_YEAR)); - digits = 3; - break; + builder.append(cal.get(Calendar.DAY_OF_YEAR)); + digits = 3; + break; case 'm': - builder.append(cal.get(Calendar.MONTH) + 1); - digits = 2; - break; + builder.append(cal.get(Calendar.MONTH) + 1); + digits = 2; + break; case 'd': - builder.append(cal.get(Calendar.DAY_OF_MONTH)); - digits = 2; - break; + builder.append(cal.get(Calendar.DAY_OF_MONTH)); + digits = 2; + break; case 'e': - builder.append(cal.get(Calendar.DAY_OF_MONTH)); - break; + builder.append(cal.get(Calendar.DAY_OF_MONTH)); + break; case 'R': - singleDateTimeConversion(builder, cal, 'H', syms); - builder.append(':'); - singleDateTimeConversion(builder, cal, 'M', syms); - break; + singleDateTimeConversion(builder, cal, 'H', syms); + builder.append(':'); + singleDateTimeConversion(builder, cal, 'M', syms); + break; case 'T': - singleDateTimeConversion(builder, cal, 'H', syms); - builder.append(':'); - singleDateTimeConversion(builder, cal, 'M', syms); - builder.append(':'); - singleDateTimeConversion(builder, cal, 'S', syms); - break; + singleDateTimeConversion(builder, cal, 'H', syms); + builder.append(':'); + singleDateTimeConversion(builder, cal, 'M', syms); + builder.append(':'); + singleDateTimeConversion(builder, cal, 'S', syms); + break; case 'r': - singleDateTimeConversion(builder, cal, 'I', syms); - builder.append(':'); - singleDateTimeConversion(builder, cal, 'M', syms); - builder.append(':'); - singleDateTimeConversion(builder, cal, 'S', syms); - builder.append(' '); - singleDateTimeConversion(builder, cal, 'p', syms); - break; + singleDateTimeConversion(builder, cal, 'I', syms); + builder.append(':'); + singleDateTimeConversion(builder, cal, 'M', syms); + builder.append(':'); + singleDateTimeConversion(builder, cal, 'S', syms); + builder.append(' '); + singleDateTimeConversion(builder, cal, 'p', syms); + break; case 'D': - singleDateTimeConversion(builder, cal, 'm', syms); - builder.append('/'); - singleDateTimeConversion(builder, cal, 'd', syms); - builder.append('/'); - singleDateTimeConversion(builder, cal, 'y', syms); - break; + singleDateTimeConversion(builder, cal, 'm', syms); + builder.append('/'); + singleDateTimeConversion(builder, cal, 'd', syms); + builder.append('/'); + singleDateTimeConversion(builder, cal, 'y', syms); + break; case 'F': - singleDateTimeConversion(builder, cal, 'Y', syms); - builder.append('-'); - singleDateTimeConversion(builder, cal, 'm', syms); - builder.append('-'); - singleDateTimeConversion(builder, cal, 'd', syms); - break; + singleDateTimeConversion(builder, cal, 'Y', syms); + builder.append('-'); + singleDateTimeConversion(builder, cal, 'm', syms); + builder.append('-'); + singleDateTimeConversion(builder, cal, 'd', syms); + break; case 'c': - singleDateTimeConversion(builder, cal, 'a', syms); - builder.append(' '); - singleDateTimeConversion(builder, cal, 'b', syms); - builder.append(' '); - singleDateTimeConversion(builder, cal, 'd', syms); - builder.append(' '); - singleDateTimeConversion(builder, cal, 'T', syms); - builder.append(' '); - singleDateTimeConversion(builder, cal, 'Z', syms); - builder.append(' '); - singleDateTimeConversion(builder, cal, 'Y', syms); - break; + singleDateTimeConversion(builder, cal, 'a', syms); + builder.append(' '); + singleDateTimeConversion(builder, cal, 'b', syms); + builder.append(' '); + singleDateTimeConversion(builder, cal, 'd', syms); + builder.append(' '); + singleDateTimeConversion(builder, cal, 'T', syms); + builder.append(' '); + singleDateTimeConversion(builder, cal, 'Z', syms); + builder.append(' '); + singleDateTimeConversion(builder, cal, 'Y', syms); + break; default: - throw new UnknownFormatConversionException(String.valueOf(conversion)); + throw new UnknownFormatConversionException(String.valueOf(conversion)); } if (digits > 0) { - int newLen = builder.length(); - int delta = newLen - oldLen; - while (delta++ < digits) - builder.insert(oldLen, '0'); + int newLen = builder.length(); + int delta = newLen - oldLen; + while (delta++ < digits) + builder.insert(oldLen, '0'); } } @@ -1117,33 +1117,33 @@ public final class Formatter * @throws IOException if the output stream throws an I/O error. */ private void dateTimeConversion(Object arg, int flags, int width, - int precision, char conversion, - char subConversion) + int precision, char conversion, + char subConversion) throws IOException { noPrecision(precision); checkFlags(flags, - FormattableFlags.LEFT_JUSTIFY | FormattableFlags.UPPERCASE, - conversion); + FormattableFlags.LEFT_JUSTIFY | FormattableFlags.UPPERCASE, + conversion); Calendar cal; if (arg instanceof Calendar) cal = (Calendar) arg; else { - Date date; - if (arg instanceof Date) - date = (Date) arg; - else if (arg instanceof Long) - date = new Date(((Long) arg).longValue()); - else - throw new IllegalFormatConversionException(conversion, - arg.getClass()); - if (fmtLocale == null) - cal = Calendar.getInstance(); - else - cal = Calendar.getInstance(fmtLocale); - cal.setTime(date); + Date date; + if (arg instanceof Date) + date = (Date) arg; + else if (arg instanceof Long) + date = new Date(((Long) arg).longValue()); + else + throw new IllegalFormatConversionException(conversion, + arg.getClass()); + if (fmtLocale == null) + cal = Calendar.getInstance(); + else + cal = Calendar.getInstance(fmtLocale); + cal.setTime(date); } // We could try to be more efficient by computing this lazily. @@ -1170,8 +1170,8 @@ public final class Formatter ++index; if (index >= length) { - // FIXME: what exception here? - throw new IllegalArgumentException(); + // FIXME: what exception here? + throw new IllegalArgumentException(); } } @@ -1204,20 +1204,20 @@ public final class Formatter int start = index; if (format.charAt(index) == '<') { - result = 0; - advance(); + result = 0; + advance(); } else if (Character.isDigit(format.charAt(index))) { - result = parseInt(); - if (format.charAt(index) == '$') - advance(); - else - { - // Reset. - index = start; - result = -1; - } + result = parseInt(); + if (format.charAt(index) == '$') + advance(); + else + { + // Reset. + index = start; + result = -1; + } } return result; } @@ -1235,15 +1235,15 @@ public final class Formatter int start = index; while (true) { - int x = FLAGS.indexOf(format.charAt(index)); - if (x == -1) - break; - int newValue = 1 << x; - if ((value & newValue) != 0) - throw new DuplicateFormatFlagsException(format.substring(start, - index + 1)); - value |= newValue; - advance(); + int x = FLAGS.indexOf(format.charAt(index)); + if (x == -1) + break; + int newValue = 1 << x; + if ((value & newValue) != 0) + throw new DuplicateFormatFlagsException(format.substring(start, + index + 1)); + value |= newValue; + advance(); } return value; } @@ -1293,7 +1293,7 @@ public final class Formatter * specification or a mismatch * between it and the arguments. * @throws FormatterClosedException if the formatter is closed. - */ + */ public Formatter format(Locale loc, String fmt, Object... args) { if (closed) @@ -1305,122 +1305,122 @@ public final class Formatter try { - fmtLocale = loc; - format = fmt; - length = format.length(); - for (index = 0; index < length; ++index) - { - char c = format.charAt(index); - if (c != '%') - { - out.append(c); - continue; - } - - int start = index; - advance(); - - // We do the needed post-processing of this later, when we - // determine whether an argument is actually needed by - // this conversion. - int argumentIndex = parseArgumentIndex(); - - int flags = parseFlags(); - int width = parseWidth(); - int precision = parsePrecision(); - char origConversion = format.charAt(index); - char conversion = origConversion; - if (Character.isUpperCase(conversion)) - { - flags |= FormattableFlags.UPPERCASE; - conversion = Character.toLowerCase(conversion); - } - - Object argument = null; - if (conversion == '%' || conversion == 'n') - { - if (argumentIndex != -1) - { - // FIXME: not sure about this. - throw new UnknownFormatConversionException("FIXME"); - } - } - else - { - if (argumentIndex == -1) - argumentIndex = implicitArgumentIndex++; - else if (argumentIndex == 0) - argumentIndex = previousArgumentIndex; - // Argument indices start at 1 but array indices at 0. - --argumentIndex; - if (argumentIndex < 0 || argumentIndex >= args.length) - throw new MissingFormatArgumentException(format.substring(start, index)); - argument = args[argumentIndex]; - } - - switch (conversion) - { - case 'b': - booleanFormat(argument, flags, width, precision, - origConversion); - break; - case 'h': - hashCodeFormat(argument, flags, width, precision, - origConversion); - break; - case 's': - stringFormat(argument, flags, width, precision, - origConversion); - break; - case 'c': - characterFormat(argument, flags, width, precision, - origConversion); - break; - case 'd': - checkFlags(flags & FormattableFlags.UPPERCASE, 0, 'd'); - decimalConversion(argument, flags, width, precision, - origConversion); - break; - case 'o': - checkFlags(flags & FormattableFlags.UPPERCASE, 0, 'o'); - hexOrOctalConversion(argument, flags, width, precision, 8, - origConversion); - break; - case 'x': - hexOrOctalConversion(argument, flags, width, precision, 16, - origConversion); - case 'e': - // scientificNotationConversion(); - break; - case 'f': - // floatingDecimalConversion(); - break; - case 'g': - // smartFloatingConversion(); - break; - case 'a': - // hexFloatingConversion(); - break; - case 't': - advance(); - char subConversion = format.charAt(index); - dateTimeConversion(argument, flags, width, precision, - origConversion, subConversion); - break; - case '%': - percentFormat(flags, width, precision); - break; - case 'n': - newLineFormat(flags, width, precision); - break; - default: - throw new UnknownFormatConversionException(String.valueOf(origConversion)); - } - } + fmtLocale = loc; + format = fmt; + length = format.length(); + for (index = 0; index < length; ++index) + { + char c = format.charAt(index); + if (c != '%') + { + out.append(c); + continue; + } + + int start = index; + advance(); + + // We do the needed post-processing of this later, when we + // determine whether an argument is actually needed by + // this conversion. + int argumentIndex = parseArgumentIndex(); + + int flags = parseFlags(); + int width = parseWidth(); + int precision = parsePrecision(); + char origConversion = format.charAt(index); + char conversion = origConversion; + if (Character.isUpperCase(conversion)) + { + flags |= FormattableFlags.UPPERCASE; + conversion = Character.toLowerCase(conversion); + } + + Object argument = null; + if (conversion == '%' || conversion == 'n') + { + if (argumentIndex != -1) + { + // FIXME: not sure about this. + throw new UnknownFormatConversionException("FIXME"); + } + } + else + { + if (argumentIndex == -1) + argumentIndex = implicitArgumentIndex++; + else if (argumentIndex == 0) + argumentIndex = previousArgumentIndex; + // Argument indices start at 1 but array indices at 0. + --argumentIndex; + if (argumentIndex < 0 || argumentIndex >= args.length) + throw new MissingFormatArgumentException(format.substring(start, index)); + argument = args[argumentIndex]; + } + + switch (conversion) + { + case 'b': + booleanFormat(argument, flags, width, precision, + origConversion); + break; + case 'h': + hashCodeFormat(argument, flags, width, precision, + origConversion); + break; + case 's': + stringFormat(argument, flags, width, precision, + origConversion); + break; + case 'c': + characterFormat(argument, flags, width, precision, + origConversion); + break; + case 'd': + checkFlags(flags & FormattableFlags.UPPERCASE, 0, 'd'); + decimalConversion(argument, flags, width, precision, + origConversion); + break; + case 'o': + checkFlags(flags & FormattableFlags.UPPERCASE, 0, 'o'); + hexOrOctalConversion(argument, flags, width, precision, 8, + origConversion); + break; + case 'x': + hexOrOctalConversion(argument, flags, width, precision, 16, + origConversion); + case 'e': + // scientificNotationConversion(); + break; + case 'f': + // floatingDecimalConversion(); + break; + case 'g': + // smartFloatingConversion(); + break; + case 'a': + // hexFloatingConversion(); + break; + case 't': + advance(); + char subConversion = format.charAt(index); + dateTimeConversion(argument, flags, width, precision, + origConversion, subConversion); + break; + case '%': + percentFormat(flags, width, precision); + break; + case 'n': + newLineFormat(flags, width, precision); + break; + default: + throw new UnknownFormatConversionException(String.valueOf(origConversion)); + } + } } catch (IOException exc) { - ioException = exc; + ioException = exc; } return this; } diff --git a/libjava/classpath/java/util/FormatterClosedException.java b/libjava/classpath/java/util/FormatterClosedException.java index c358864..6206849 100644 --- a/libjava/classpath/java/util/FormatterClosedException.java +++ b/libjava/classpath/java/util/FormatterClosedException.java @@ -38,15 +38,15 @@ exception statement from your version. */ package java.util; -/** +/** * Thrown when a method is called on a {@link Formatter} but * it has already been closed. * * @author Tom Tromey (tromey@redhat.com) * @author Andrew John Hughes (gnu_andrew@member.fsf.org) - * @since 1.5 + * @since 1.5 */ -public class FormatterClosedException +public class FormatterClosedException extends IllegalStateException { private static final long serialVersionUID = 18111216L; diff --git a/libjava/classpath/java/util/GregorianCalendar.java b/libjava/classpath/java/util/GregorianCalendar.java index 6eb7ce8..b5d9e8c 100644 --- a/libjava/classpath/java/util/GregorianCalendar.java +++ b/libjava/classpath/java/util/GregorianCalendar.java @@ -367,25 +367,25 @@ public class GregorianCalendar extends Calendar if (month > 11) { - year += (month / 12); - month = month % 12; + year += (month / 12); + month = month % 12; } if (month < 0) { - year += (int) month / 12; - month = month % 12; - if (month < 0) - { - month += 12; - year--; - } + year += (int) month / 12; + month = month % 12; + if (month < 0) + { + month += 12; + year--; + } } int dayOfYear = dayCount[month] + 1; if (month > 1) if (isLeapYear(year)) - dayOfYear++; + dayOfYear++; boolean greg = isGregorian(year, dayOfYear); int day = (int) getLinearDay(year, dayOfYear, greg); @@ -431,29 +431,29 @@ public class GregorianCalendar extends Calendar throw new IllegalArgumentException("Illegal MONTH."); if (isSet[WEEK_OF_YEAR]) { - int daysInYear = 365 + leap; - daysInYear += (getFirstDayOfMonth(year, 0) - 1); // pad first week - int last = getFirstDayOfMonth(year, 11) + 4; - if (last > 7) - last -= 7; - daysInYear += 7 - last; - int weeks = daysInYear / 7; - if (fields[WEEK_OF_YEAR] < 1 || fields[WEEK_OF_YEAR] > weeks) - throw new IllegalArgumentException("Illegal WEEK_OF_YEAR."); + int daysInYear = 365 + leap; + daysInYear += (getFirstDayOfMonth(year, 0) - 1); // pad first week + int last = getFirstDayOfMonth(year, 11) + 4; + if (last > 7) + last -= 7; + daysInYear += 7 - last; + int weeks = daysInYear / 7; + if (fields[WEEK_OF_YEAR] < 1 || fields[WEEK_OF_YEAR] > weeks) + throw new IllegalArgumentException("Illegal WEEK_OF_YEAR."); } if (isSet[WEEK_OF_MONTH]) { - int weeks = (month == 1 && leap == 0) ? 5 : 6; - if (fields[WEEK_OF_MONTH] < 1 || fields[WEEK_OF_MONTH] > weeks) - throw new IllegalArgumentException("Illegal WEEK_OF_MONTH."); + int weeks = (month == 1 && leap == 0) ? 5 : 6; + if (fields[WEEK_OF_MONTH] < 1 || fields[WEEK_OF_MONTH] > weeks) + throw new IllegalArgumentException("Illegal WEEK_OF_MONTH."); } if (isSet[DAY_OF_MONTH]) if (fields[DAY_OF_MONTH] < 1 || fields[DAY_OF_MONTH] > month_days[month] + ((month == 1) ? leap : 0)) - throw new IllegalArgumentException("Illegal DAY_OF_MONTH."); + throw new IllegalArgumentException("Illegal DAY_OF_MONTH."); if (isSet[DAY_OF_YEAR] && (fields[DAY_OF_YEAR] < 1 || fields[DAY_OF_YEAR] > 365 + leap)) @@ -465,10 +465,10 @@ public class GregorianCalendar extends Calendar if (isSet[DAY_OF_WEEK_IN_MONTH]) { - int weeks = (month == 1 && leap == 0) ? 4 : 5; - if (fields[DAY_OF_WEEK_IN_MONTH] < -weeks - || fields[DAY_OF_WEEK_IN_MONTH] > weeks) - throw new IllegalArgumentException("Illegal DAY_OF_WEEK_IN_MONTH."); + int weeks = (month == 1 && leap == 0) ? 4 : 5; + if (fields[DAY_OF_WEEK_IN_MONTH] < -weeks + || fields[DAY_OF_WEEK_IN_MONTH] > weeks) + throw new IllegalArgumentException("Illegal DAY_OF_WEEK_IN_MONTH."); } if (isSet[AM_PM] && fields[AM_PM] != AM && fields[AM_PM] != PM) @@ -522,78 +522,78 @@ public class GregorianCalendar extends Calendar if (! isSet[MONTH] && (! isSet[DAY_OF_WEEK] || isSet[WEEK_OF_YEAR])) { - // 5: YEAR + DAY_OF_WEEK + WEEK_OF_YEAR - if (isSet[WEEK_OF_YEAR]) - { - int first = getFirstDayOfMonth(year, 0); - int offs = 1; - int daysInFirstWeek = getFirstDayOfWeek() - first; - if (daysInFirstWeek <= 0) - daysInFirstWeek += 7; - - if (daysInFirstWeek < getMinimalDaysInFirstWeek()) - offs += daysInFirstWeek; - else - offs -= 7 - daysInFirstWeek; - month = 0; - day = offs + 7 * (fields[WEEK_OF_YEAR] - 1); - offs = fields[DAY_OF_WEEK] - getFirstDayOfWeek(); - - if (offs < 0) - offs += 7; - day += offs; - } - else - { - // 4: YEAR + DAY_OF_YEAR - month = 0; - day = fields[DAY_OF_YEAR]; - } + // 5: YEAR + DAY_OF_WEEK + WEEK_OF_YEAR + if (isSet[WEEK_OF_YEAR]) + { + int first = getFirstDayOfMonth(year, 0); + int offs = 1; + int daysInFirstWeek = getFirstDayOfWeek() - first; + if (daysInFirstWeek <= 0) + daysInFirstWeek += 7; + + if (daysInFirstWeek < getMinimalDaysInFirstWeek()) + offs += daysInFirstWeek; + else + offs -= 7 - daysInFirstWeek; + month = 0; + day = offs + 7 * (fields[WEEK_OF_YEAR] - 1); + offs = fields[DAY_OF_WEEK] - getFirstDayOfWeek(); + + if (offs < 0) + offs += 7; + day += offs; + } + else + { + // 4: YEAR + DAY_OF_YEAR + month = 0; + day = fields[DAY_OF_YEAR]; + } } else { - if (isSet[DAY_OF_WEEK]) - { - int first = getFirstDayOfMonth(year, month); - - // 3: YEAR + MONTH + DAY_OF_WEEK_IN_MONTH + DAY_OF_WEEK - if (isSet[DAY_OF_WEEK_IN_MONTH]) - { - if (fields[DAY_OF_WEEK_IN_MONTH] < 0) - { - month++; - first = getFirstDayOfMonth(year, month); - day = 1 + 7 * (fields[DAY_OF_WEEK_IN_MONTH]); - } - else - day = 1 + 7 * (fields[DAY_OF_WEEK_IN_MONTH] - 1); - - int offs = fields[DAY_OF_WEEK] - first; - if (offs < 0) - offs += 7; - day += offs; - } - else - { // 2: YEAR + MONTH + WEEK_OF_MONTH + DAY_OF_WEEK - int offs = 1; - int daysInFirstWeek = getFirstDayOfWeek() - first; - if (daysInFirstWeek <= 0) - daysInFirstWeek += 7; - - if (daysInFirstWeek < getMinimalDaysInFirstWeek()) - offs += daysInFirstWeek; - else - offs -= 7 - daysInFirstWeek; - - day = offs + 7 * (fields[WEEK_OF_MONTH] - 1); - offs = fields[DAY_OF_WEEK] - getFirstDayOfWeek(); - if (offs < 0) - offs += 7; - day += offs; - } - } - - // 1: YEAR + MONTH + DAY_OF_MONTH + if (isSet[DAY_OF_WEEK]) + { + int first = getFirstDayOfMonth(year, month); + + // 3: YEAR + MONTH + DAY_OF_WEEK_IN_MONTH + DAY_OF_WEEK + if (isSet[DAY_OF_WEEK_IN_MONTH]) + { + if (fields[DAY_OF_WEEK_IN_MONTH] < 0) + { + month++; + first = getFirstDayOfMonth(year, month); + day = 1 + 7 * (fields[DAY_OF_WEEK_IN_MONTH]); + } + else + day = 1 + 7 * (fields[DAY_OF_WEEK_IN_MONTH] - 1); + + int offs = fields[DAY_OF_WEEK] - first; + if (offs < 0) + offs += 7; + day += offs; + } + else + { // 2: YEAR + MONTH + WEEK_OF_MONTH + DAY_OF_WEEK + int offs = 1; + int daysInFirstWeek = getFirstDayOfWeek() - first; + if (daysInFirstWeek <= 0) + daysInFirstWeek += 7; + + if (daysInFirstWeek < getMinimalDaysInFirstWeek()) + offs += daysInFirstWeek; + else + offs -= 7 - daysInFirstWeek; + + day = offs + 7 * (fields[WEEK_OF_MONTH] - 1); + offs = fields[DAY_OF_WEEK] - getFirstDayOfWeek(); + if (offs < 0) + offs += 7; + day += offs; + } + } + + // 1: YEAR + MONTH + DAY_OF_MONTH } if (era == BC && year > 0) year = 1 - year; @@ -603,9 +603,9 @@ public class GregorianCalendar extends Calendar // get the hour (but no check for validity) if (isSet[HOUR]) { - hour = fields[HOUR]; - if (fields[AM_PM] == PM) - hour += 12; + hour = fields[HOUR]; + if (fields[AM_PM] == PM) + hour += 12; } else hour = fields[HOUR_OF_DAY]; @@ -619,41 +619,41 @@ public class GregorianCalendar extends Calendar if (month < 0) { - year += (int) month / 12; - month = month % 12; - if (month < 0) - { - month += 12; - year--; - } + year += (int) month / 12; + month = month % 12; + if (month < 0) + { + month += 12; + year--; + } } if (month > 11) { - year += (month / 12); - month = month % 12; + year += (month / 12); + month = month % 12; } month_days[1] = isLeapYear(year) ? 29 : 28; while (day <= 0) { - if (month == 0) - { - year--; - month_days[1] = isLeapYear(year) ? 29 : 28; - } - month = (month + 11) % 12; - day += month_days[month]; + if (month == 0) + { + year--; + month_days[1] = isLeapYear(year) ? 29 : 28; + } + month = (month + 11) % 12; + day += month_days[month]; } while (day > month_days[month]) { - day -= (month_days[month]); - month = (month + 1) % 12; - if (month == 0) - { - year++; - month_days[1] = isLeapYear(year) ? 29 : 28; - } + day -= (month_days[month]); + month = (month + 1) % 12; + if (month == 0) + { + year++; + month_days[1] = isLeapYear(year) ? 29 : 28; + } } // ok, by here we have valid day,month,year,era and millisinday @@ -719,19 +719,19 @@ public class GregorianCalendar extends Calendar if (gregorian) { - // subtract the days that are missing in gregorian calendar - // with respect to julian calendar. - // - // Okay, here we rely on the fact that the gregorian - // calendar was introduced in the AD era. This doesn't work - // with negative years. - // - // The additional leap year factor accounts for the fact that - // a leap day is not seen on Jan 1 of the leap year. - int gregOffset = (int) Math.floor((double) (year - 1) / 400.) - - (int) Math.floor((double) (year - 1) / 100.); - - return julianDay + gregOffset; + // subtract the days that are missing in gregorian calendar + // with respect to julian calendar. + // + // Okay, here we rely on the fact that the gregorian + // calendar was introduced in the AD era. This doesn't work + // with negative years. + // + // The additional leap year factor accounts for the fact that + // a leap day is not seen on Jan 1 of the leap year. + int gregOffset = (int) Math.floor((double) (year - 1) / 400.) + - (int) Math.floor((double) (year - 1) / 100.); + + return julianDay + gregOffset; } else julianDay -= 2; @@ -754,7 +754,7 @@ public class GregorianCalendar extends Calendar weekday += 7; fields[DAY_OF_WEEK] = weekday; - // get a first approximation of the year. This may be one + // get a first approximation of the year. This may be one // year too big. int year = 1970 + (int) (gregorian @@ -768,8 +768,8 @@ public class GregorianCalendar extends Calendar // Now look in which year day really lies. if (day < firstDayOfYear) { - year--; - firstDayOfYear = getLinearDay(year, 1, gregorian); + year--; + firstDayOfYear = getLinearDay(year, 1, gregorian); } day -= firstDayOfYear - 1; // day of year, one based. @@ -777,27 +777,27 @@ public class GregorianCalendar extends Calendar fields[DAY_OF_YEAR] = (int) day; if (year <= 0) { - fields[ERA] = BC; - fields[YEAR] = 1 - year; + fields[ERA] = BC; + fields[YEAR] = 1 - year; } else { - fields[ERA] = AD; - fields[YEAR] = year; + fields[ERA] = AD; + fields[YEAR] = year; } int leapday = isLeapYear(year) ? 1 : 0; if (day <= 31 + 28 + leapday) { - fields[MONTH] = (int) day / 32; // 31->JANUARY, 32->FEBRUARY - fields[DAY_OF_MONTH] = (int) day - 31 * fields[MONTH]; + fields[MONTH] = (int) day / 32; // 31->JANUARY, 32->FEBRUARY + fields[DAY_OF_MONTH] = (int) day - 31 * fields[MONTH]; } else { - // A few more magic formulas - int scaledDay = ((int) day - leapday) * 5 + 8; - fields[MONTH] = scaledDay / (31 + 30 + 31 + 30 + 31); - fields[DAY_OF_MONTH] = (scaledDay % (31 + 30 + 31 + 30 + 31)) / 5 + 1; + // A few more magic formulas + int scaledDay = ((int) day - leapday) * 5 + 8; + fields[MONTH] = scaledDay / (31 + 30 + 31 + 30 + 31); + fields[DAY_OF_MONTH] = (scaledDay % (31 + 30 + 31 + 30 + 31)) / 5 + 1; } } @@ -819,8 +819,8 @@ public class GregorianCalendar extends Calendar if (millisInDay < 0) { - millisInDay += (24 * 60 * 60 * 1000); - day--; + millisInDay += (24 * 60 * 60 * 1000); + day--; } calculateDay(fields, day, gregorian); @@ -832,8 +832,8 @@ public class GregorianCalendar extends Calendar millisInDay += fields[DST_OFFSET]; if (millisInDay >= 24 * 60 * 60 * 1000) { - millisInDay -= 24 * 60 * 60 * 1000; - calculateDay(fields, ++day, gregorian); + millisInDay -= 24 * 60 * 60 * 1000; + calculateDay(fields, ++day, gregorian); } fields[DAY_OF_WEEK_IN_MONTH] = (fields[DAY_OF_MONTH] + 6) / 7; @@ -845,7 +845,7 @@ public class GregorianCalendar extends Calendar // nb 35 is the smallest multiple of 7 that ensures that // the left hand side of the modulo operator is positive. int relativeWeekdayOfFirst = (relativeWeekday - fields[DAY_OF_MONTH] - + 1 + 35) % 7; + + 1 + 35) % 7; // which week of the month is the first of this month in? int minDays = getMinimalDaysInFirstWeek(); @@ -853,11 +853,11 @@ public class GregorianCalendar extends Calendar // which week of the month is this day in? fields[WEEK_OF_MONTH] = (fields[DAY_OF_MONTH] - + relativeWeekdayOfFirst - 1) / 7 + weekOfFirst; + + relativeWeekdayOfFirst - 1) / 7 + weekOfFirst; int weekOfYear = (fields[DAY_OF_YEAR] - relativeWeekday + 6) / 7; - // Do the Correction: getMinimalDaysInFirstWeek() is always in the + // Do the Correction: getMinimalDaysInFirstWeek() is always in the // first week. int firstWeekday = (7 + getWeekDay(fields[YEAR], minDays) - getFirstDayOfWeek()) % 7; @@ -878,7 +878,7 @@ public class GregorianCalendar extends Calendar areFieldsSet = isSet[ERA] = isSet[YEAR] = isSet[MONTH] = isSet[WEEK_OF_YEAR] = isSet[WEEK_OF_MONTH] = isSet[DAY_OF_MONTH] = isSet[DAY_OF_YEAR] = isSet[DAY_OF_WEEK] = isSet[DAY_OF_WEEK_IN_MONTH] = isSet[AM_PM] = isSet[HOUR] = isSet[HOUR_OF_DAY] = isSet[MINUTE] = isSet[SECOND] = isSet[MILLISECOND] = isSet[ZONE_OFFSET] = isSet[DST_OFFSET] = true; } - + /** * Return a hash code for this object, following the general contract * specified by {@link Object#hashCode()}. @@ -931,76 +931,76 @@ public class GregorianCalendar extends Calendar switch (field) { case YEAR: - complete(); - fields[YEAR] += amount; - isTimeSet = false; - break; + complete(); + fields[YEAR] += amount; + isTimeSet = false; + break; case MONTH: - complete(); - int months = fields[MONTH] + amount; - fields[YEAR] += months / 12; - fields[MONTH] = months % 12; - if (fields[MONTH] < 0) - { - fields[MONTH] += 12; - fields[YEAR]--; - } - int maxDay = getActualMaximum(DAY_OF_MONTH); - if (fields[DAY_OF_MONTH] > maxDay) - fields[DAY_OF_MONTH] = maxDay; - set(YEAR, fields[YEAR]); - set(MONTH, fields[MONTH]); - break; + complete(); + int months = fields[MONTH] + amount; + fields[YEAR] += months / 12; + fields[MONTH] = months % 12; + if (fields[MONTH] < 0) + { + fields[MONTH] += 12; + fields[YEAR]--; + } + int maxDay = getActualMaximum(DAY_OF_MONTH); + if (fields[DAY_OF_MONTH] > maxDay) + fields[DAY_OF_MONTH] = maxDay; + set(YEAR, fields[YEAR]); + set(MONTH, fields[MONTH]); + break; case DAY_OF_MONTH: case DAY_OF_YEAR: case DAY_OF_WEEK: - if (! isTimeSet) - computeTime(); - time += amount * (24 * 60 * 60 * 1000L); - areFieldsSet = false; - break; + if (! isTimeSet) + computeTime(); + time += amount * (24 * 60 * 60 * 1000L); + areFieldsSet = false; + break; case WEEK_OF_YEAR: case WEEK_OF_MONTH: case DAY_OF_WEEK_IN_MONTH: - if (! isTimeSet) - computeTime(); - time += amount * (7 * 24 * 60 * 60 * 1000L); - areFieldsSet = false; - break; + if (! isTimeSet) + computeTime(); + time += amount * (7 * 24 * 60 * 60 * 1000L); + areFieldsSet = false; + break; case AM_PM: - if (! isTimeSet) - computeTime(); - time += amount * (12 * 60 * 60 * 1000L); - areFieldsSet = false; - break; + if (! isTimeSet) + computeTime(); + time += amount * (12 * 60 * 60 * 1000L); + areFieldsSet = false; + break; case HOUR: case HOUR_OF_DAY: - if (! isTimeSet) - computeTime(); - time += amount * (60 * 60 * 1000L); - areFieldsSet = false; - break; + if (! isTimeSet) + computeTime(); + time += amount * (60 * 60 * 1000L); + areFieldsSet = false; + break; case MINUTE: - if (! isTimeSet) - computeTime(); - time += amount * (60 * 1000L); - areFieldsSet = false; - break; + if (! isTimeSet) + computeTime(); + time += amount * (60 * 1000L); + areFieldsSet = false; + break; case SECOND: - if (! isTimeSet) - computeTime(); - time += amount * (1000L); - areFieldsSet = false; - break; + if (! isTimeSet) + computeTime(); + time += amount * (1000L); + areFieldsSet = false; + break; case MILLISECOND: - if (! isTimeSet) - computeTime(); - time += amount; - areFieldsSet = false; - break; + if (! isTimeSet) + computeTime(); + time += amount; + areFieldsSet = false; + break; case ZONE_OFFSET: case DST_OFFSET:default: - throw new IllegalArgumentException("Invalid or unknown field"); + throw new IllegalArgumentException("Invalid or unknown field"); } } @@ -1044,77 +1044,77 @@ public class GregorianCalendar extends Calendar case ERA: case YEAR: case MONTH: - // check that day of month is still in correct range - if (fields[DAY_OF_MONTH] > getActualMaximum(DAY_OF_MONTH)) - fields[DAY_OF_MONTH] = getActualMaximum(DAY_OF_MONTH); - isTimeSet = false; - isSet[WEEK_OF_MONTH] = false; - isSet[DAY_OF_WEEK] = false; - isSet[DAY_OF_WEEK_IN_MONTH] = false; - isSet[DAY_OF_YEAR] = false; - isSet[WEEK_OF_YEAR] = false; - break; + // check that day of month is still in correct range + if (fields[DAY_OF_MONTH] > getActualMaximum(DAY_OF_MONTH)) + fields[DAY_OF_MONTH] = getActualMaximum(DAY_OF_MONTH); + isTimeSet = false; + isSet[WEEK_OF_MONTH] = false; + isSet[DAY_OF_WEEK] = false; + isSet[DAY_OF_WEEK_IN_MONTH] = false; + isSet[DAY_OF_YEAR] = false; + isSet[WEEK_OF_YEAR] = false; + break; case DAY_OF_MONTH: - isSet[WEEK_OF_MONTH] = false; - isSet[DAY_OF_WEEK] = false; - isSet[DAY_OF_WEEK_IN_MONTH] = false; - isSet[DAY_OF_YEAR] = false; - isSet[WEEK_OF_YEAR] = false; - time += delta * (24 * 60 * 60 * 1000L); - break; + isSet[WEEK_OF_MONTH] = false; + isSet[DAY_OF_WEEK] = false; + isSet[DAY_OF_WEEK_IN_MONTH] = false; + isSet[DAY_OF_YEAR] = false; + isSet[WEEK_OF_YEAR] = false; + time += delta * (24 * 60 * 60 * 1000L); + break; case WEEK_OF_MONTH: - isSet[DAY_OF_MONTH] = false; - isSet[DAY_OF_WEEK_IN_MONTH] = false; - isSet[DAY_OF_YEAR] = false; - isSet[WEEK_OF_YEAR] = false; - time += delta * (7 * 24 * 60 * 60 * 1000L); - break; + isSet[DAY_OF_MONTH] = false; + isSet[DAY_OF_WEEK_IN_MONTH] = false; + isSet[DAY_OF_YEAR] = false; + isSet[WEEK_OF_YEAR] = false; + time += delta * (7 * 24 * 60 * 60 * 1000L); + break; case DAY_OF_WEEK_IN_MONTH: - isSet[DAY_OF_MONTH] = false; - isSet[WEEK_OF_MONTH] = false; - isSet[DAY_OF_YEAR] = false; - isSet[WEEK_OF_YEAR] = false; - time += delta * (7 * 24 * 60 * 60 * 1000L); - break; + isSet[DAY_OF_MONTH] = false; + isSet[WEEK_OF_MONTH] = false; + isSet[DAY_OF_YEAR] = false; + isSet[WEEK_OF_YEAR] = false; + time += delta * (7 * 24 * 60 * 60 * 1000L); + break; case DAY_OF_YEAR: - isSet[MONTH] = false; - isSet[DAY_OF_MONTH] = false; - isSet[WEEK_OF_MONTH] = false; - isSet[DAY_OF_WEEK_IN_MONTH] = false; - isSet[DAY_OF_WEEK] = false; - isSet[WEEK_OF_YEAR] = false; - time += delta * (24 * 60 * 60 * 1000L); - break; + isSet[MONTH] = false; + isSet[DAY_OF_MONTH] = false; + isSet[WEEK_OF_MONTH] = false; + isSet[DAY_OF_WEEK_IN_MONTH] = false; + isSet[DAY_OF_WEEK] = false; + isSet[WEEK_OF_YEAR] = false; + time += delta * (24 * 60 * 60 * 1000L); + break; case WEEK_OF_YEAR: - isSet[MONTH] = false; - isSet[DAY_OF_MONTH] = false; - isSet[WEEK_OF_MONTH] = false; - isSet[DAY_OF_WEEK_IN_MONTH] = false; - isSet[DAY_OF_YEAR] = false; - time += delta * (7 * 24 * 60 * 60 * 1000L); - break; + isSet[MONTH] = false; + isSet[DAY_OF_MONTH] = false; + isSet[WEEK_OF_MONTH] = false; + isSet[DAY_OF_WEEK_IN_MONTH] = false; + isSet[DAY_OF_YEAR] = false; + time += delta * (7 * 24 * 60 * 60 * 1000L); + break; case AM_PM: - isSet[HOUR_OF_DAY] = false; - time += delta * (12 * 60 * 60 * 1000L); - break; + isSet[HOUR_OF_DAY] = false; + time += delta * (12 * 60 * 60 * 1000L); + break; case HOUR: - isSet[HOUR_OF_DAY] = false; - time += delta * (60 * 60 * 1000L); - break; + isSet[HOUR_OF_DAY] = false; + time += delta * (60 * 60 * 1000L); + break; case HOUR_OF_DAY: - isSet[HOUR] = false; - isSet[AM_PM] = false; - time += delta * (60 * 60 * 1000L); - break; + isSet[HOUR] = false; + isSet[AM_PM] = false; + time += delta * (60 * 60 * 1000L); + break; case MINUTE: - time += delta * (60 * 1000L); - break; + time += delta * (60 * 1000L); + break; case SECOND: - time += delta * (1000L); - break; + time += delta * (1000L); + break; case MILLISECOND: - time += delta; - break; + time += delta; + break; } } @@ -1141,12 +1141,12 @@ public class GregorianCalendar extends Calendar switch (field) { case DAY_OF_WEEK: - // day of week is special: it rolls automatically - add(field, amount); - return; + // day of week is special: it rolls automatically + add(field, amount); + return; case ZONE_OFFSET: case DST_OFFSET: - throw new IllegalArgumentException("Can't roll time zone"); + throw new IllegalArgumentException("Can't roll time zone"); } complete(); int min = getActualMinimum(field); @@ -1162,7 +1162,7 @@ public class GregorianCalendar extends Calendar /** * The minimum values for the calendar fields. */ - private static final int[] minimums = + private static final int[] minimums = { BC, 1, 0, 0, 1, 1, 1, SUNDAY, 1, AM, 1, 0, 0, 0, 0, -(12 * 60 * 60 * 1000), @@ -1172,7 +1172,7 @@ public class GregorianCalendar extends Calendar /** * The maximum values for the calendar fields. */ - private static final int[] maximums = + private static final int[] maximums = { AD, 5000000, 11, 53, 6, 31, 366, SATURDAY, 5, PM, 12, 23, 59, 59, 999, @@ -1235,16 +1235,16 @@ public class GregorianCalendar extends Calendar switch (field) { case WEEK_OF_YEAR: - return 52; + return 52; case DAY_OF_MONTH: - return 28; + return 28; case DAY_OF_YEAR: - return 365; + return 365; case DAY_OF_WEEK_IN_MONTH: case WEEK_OF_MONTH: - return 4; + return 4; default: - return maximums[field]; + return maximums[field]; } } @@ -1263,17 +1263,17 @@ public class GregorianCalendar extends Calendar { if (field == WEEK_OF_YEAR) { - int min = getMinimalDaysInFirstWeek(); - if (min == 0) - return 1; - if (! areFieldsSet || ! isSet[ERA] || ! isSet[YEAR]) - complete(); - - int year = fields[ERA] == AD ? fields[YEAR] : 1 - fields[YEAR]; - int weekday = getWeekDay(year, min); - if ((7 + weekday - getFirstDayOfWeek()) % 7 >= min - 1) - return 1; - return 0; + int min = getMinimalDaysInFirstWeek(); + if (min == 0) + return 1; + if (! areFieldsSet || ! isSet[ERA] || ! isSet[YEAR]) + complete(); + + int year = fields[ERA] == AD ? fields[YEAR] : 1 - fields[YEAR]; + int weekday = getWeekDay(year, min); + if ((7 + weekday - getFirstDayOfWeek()) % 7 >= min - 1) + return 1; + return 0; } return minimums[field]; } @@ -1295,71 +1295,71 @@ public class GregorianCalendar extends Calendar { case WEEK_OF_YEAR: { - if (! areFieldsSet || ! isSet[ERA] || ! isSet[YEAR]) - complete(); - - // This is wrong for the year that contains the gregorian change. - // I.e it gives the weeks in the julian year or in the gregorian - // year in that case. - int year = fields[ERA] == AD ? fields[YEAR] : 1 - fields[YEAR]; - int lastDay = isLeapYear(year) ? 366 : 365; - int weekday = getWeekDay(year, lastDay); - int week = (lastDay + 6 - (7 + weekday - getFirstDayOfWeek()) % 7) / 7; - - int minimalDays = getMinimalDaysInFirstWeek(); - int firstWeekday = getWeekDay(year, minimalDays); - /* - * Is there a set of days at the beginning of the year, before the - * first day of the week, equal to or greater than the minimum number - * of days required in the first week? - */ - if (minimalDays - (7 + firstWeekday - getFirstDayOfWeek()) % 7 < 1) - return week + 1; /* Add week 1: firstWeekday through to firstDayOfWeek */ + if (! areFieldsSet || ! isSet[ERA] || ! isSet[YEAR]) + complete(); + + // This is wrong for the year that contains the gregorian change. + // I.e it gives the weeks in the julian year or in the gregorian + // year in that case. + int year = fields[ERA] == AD ? fields[YEAR] : 1 - fields[YEAR]; + int lastDay = isLeapYear(year) ? 366 : 365; + int weekday = getWeekDay(year, lastDay); + int week = (lastDay + 6 - (7 + weekday - getFirstDayOfWeek()) % 7) / 7; + + int minimalDays = getMinimalDaysInFirstWeek(); + int firstWeekday = getWeekDay(year, minimalDays); + /* + * Is there a set of days at the beginning of the year, before the + * first day of the week, equal to or greater than the minimum number + * of days required in the first week? + */ + if (minimalDays - (7 + firstWeekday - getFirstDayOfWeek()) % 7 < 1) + return week + 1; /* Add week 1: firstWeekday through to firstDayOfWeek */ } case DAY_OF_MONTH: { - if (! areFieldsSet || ! isSet[MONTH]) - complete(); - int month = fields[MONTH]; - - // If you change this, you should also change - // SimpleTimeZone.getDaysInMonth(); - if (month == FEBRUARY) - { - if (! isSet[YEAR] || ! isSet[ERA]) - complete(); - int year = fields[ERA] == AD ? fields[YEAR] : 1 - fields[YEAR]; - return isLeapYear(year) ? 29 : 28; - } - else if (month < AUGUST) - return 31 - (month & 1); - else - return 30 + (month & 1); + if (! areFieldsSet || ! isSet[MONTH]) + complete(); + int month = fields[MONTH]; + + // If you change this, you should also change + // SimpleTimeZone.getDaysInMonth(); + if (month == FEBRUARY) + { + if (! isSet[YEAR] || ! isSet[ERA]) + complete(); + int year = fields[ERA] == AD ? fields[YEAR] : 1 - fields[YEAR]; + return isLeapYear(year) ? 29 : 28; + } + else if (month < AUGUST) + return 31 - (month & 1); + else + return 30 + (month & 1); } case DAY_OF_YEAR: { - if (! areFieldsSet || ! isSet[ERA] || ! isSet[YEAR]) - complete(); - int year = fields[ERA] == AD ? fields[YEAR] : 1 - fields[YEAR]; - return isLeapYear(year) ? 366 : 365; + if (! areFieldsSet || ! isSet[ERA] || ! isSet[YEAR]) + complete(); + int year = fields[ERA] == AD ? fields[YEAR] : 1 - fields[YEAR]; + return isLeapYear(year) ? 366 : 365; } case DAY_OF_WEEK_IN_MONTH: { - // This is wrong for the month that contains the gregorian change. - int daysInMonth = getActualMaximum(DAY_OF_MONTH); + // This is wrong for the month that contains the gregorian change. + int daysInMonth = getActualMaximum(DAY_OF_MONTH); - // That's black magic, I know - return (daysInMonth - (fields[DAY_OF_MONTH] - 1) % 7 + 6) / 7; + // That's black magic, I know + return (daysInMonth - (fields[DAY_OF_MONTH] - 1) % 7 + 6) / 7; } case WEEK_OF_MONTH: { - int daysInMonth = getActualMaximum(DAY_OF_MONTH); - int weekday = (daysInMonth - fields[DAY_OF_MONTH] - + fields[DAY_OF_WEEK] - SUNDAY) % 7 + SUNDAY; - return (daysInMonth + 6 - (7 + weekday - getFirstDayOfWeek()) % 7) / 7; + int daysInMonth = getActualMaximum(DAY_OF_MONTH); + int weekday = (daysInMonth - fields[DAY_OF_MONTH] + + fields[DAY_OF_WEEK] - SUNDAY) % 7 + SUNDAY; + return (daysInMonth + 6 - (7 + weekday - getFirstDayOfWeek()) % 7) / 7; } default: - return maximums[field]; + return maximums[field]; } } } diff --git a/libjava/classpath/java/util/HashMap.java b/libjava/classpath/java/util/HashMap.java index eca3ad6..55d81c6 100644 --- a/libjava/classpath/java/util/HashMap.java +++ b/libjava/classpath/java/util/HashMap.java @@ -349,7 +349,7 @@ public class HashMap<K, V> extends AbstractMap<K, V> if (equals(key, e.key)) { e.access(); // Must call this for bookkeeping in LinkedHashMap. - V r = e.value; + V r = e.value; e.value = value; return r; } @@ -384,12 +384,12 @@ public class HashMap<K, V> extends AbstractMap<K, V> final Iterator<Map.Entry<K,V>> it = addMap.entrySet().iterator(); while (it.hasNext()) { - final Map.Entry<K,V> e = it.next(); + final Map.Entry<K,V> e = it.next(); // Optimize in case the Entry is one of our own. if (e instanceof AbstractMap.SimpleEntry) { AbstractMap.SimpleEntry<? extends K, ? extends V> entry - = (AbstractMap.SimpleEntry<? extends K, ? extends V>) e; + = (AbstractMap.SimpleEntry<? extends K, ? extends V>) e; put(entry.key, entry.value); } else @@ -702,8 +702,8 @@ public class HashMap<K, V> extends AbstractMap<K, V> } /** - * A simplified, more efficient internal implementation of putAll(). clone() - * should not call putAll or put, in order to be compatible with the JDK + * A simplified, more efficient internal implementation of putAll(). clone() + * should not call putAll or put, in order to be compatible with the JDK * implementation with respect to subclasses. * * @param m the map to initialize this from @@ -715,11 +715,11 @@ public class HashMap<K, V> extends AbstractMap<K, V> size = 0; while (it.hasNext()) { - final Map.Entry<K,V> e = it.next(); + final Map.Entry<K,V> e = it.next(); size++; - K key = e.getKey(); - int idx = hash(key); - addEntry(key, e.getValue(), idx, false); + K key = e.getKey(); + int idx = hash(key); + addEntry(key, e.getValue(), idx, false); } } diff --git a/libjava/classpath/java/util/Hashtable.java b/libjava/classpath/java/util/Hashtable.java index 0851de8..8f08e96 100644 --- a/libjava/classpath/java/util/Hashtable.java +++ b/libjava/classpath/java/util/Hashtable.java @@ -345,7 +345,7 @@ public class Hashtable<K, V> extends Dictionary<K, V> } } - return false; + return false; } /** @@ -362,7 +362,7 @@ public class Hashtable<K, V> extends Dictionary<K, V> */ public boolean containsValue(Object value) { - // Delegate to older method to make sure code overriding it continues + // Delegate to older method to make sure code overriding it continues // to work. return contains(value); } @@ -511,12 +511,12 @@ public class Hashtable<K, V> extends Dictionary<K, V> final Iterator<Map.Entry<K,V>> it = addMap.entrySet().iterator(); while (it.hasNext()) { - final Map.Entry<K,V> e = it.next(); + final Map.Entry<K,V> e = it.next(); // Optimize in case the Entry is one of our own. if (e instanceof AbstractMap.SimpleEntry) { AbstractMap.SimpleEntry<? extends K, ? extends V> entry - = (AbstractMap.SimpleEntry<? extends K, ? extends V>) e; + = (AbstractMap.SimpleEntry<? extends K, ? extends V>) e; put(entry.key, entry.value); } else @@ -850,8 +850,8 @@ public class Hashtable<K, V> extends Dictionary<K, V> } /** - * A simplified, more efficient internal implementation of putAll(). clone() - * should not call putAll or put, in order to be compatible with the JDK + * A simplified, more efficient internal implementation of putAll(). clone() + * should not call putAll or put, in order to be compatible with the JDK * implementation with respect to subclasses. * * @param m the map to initialize this from @@ -863,13 +863,13 @@ public class Hashtable<K, V> extends Dictionary<K, V> size = 0; while (it.hasNext()) { - final Map.Entry<K,V> e = it.next(); + final Map.Entry<K,V> e = it.next(); size++; - K key = e.getKey(); - int idx = hash(key); - HashEntry<K, V> he = new HashEntry<K, V>(key, e.getValue()); - he.next = buckets[idx]; - buckets[idx] = he; + K key = e.getKey(); + int idx = hash(key); + HashEntry<K, V> he = new HashEntry<K, V>(key, e.getValue()); + he.next = buckets[idx]; + buckets[idx] = he; } } @@ -991,7 +991,7 @@ public class Hashtable<K, V> extends Dictionary<K, V> * @author Jon Zeppieri * @author Fridjof Siebert */ - private class EntryIterator + private class EntryIterator implements Iterator<Entry<K,V>> { /** @@ -1044,10 +1044,10 @@ public class Hashtable<K, V> extends Dictionary<K, V> HashEntry<K, V> e = next; while (e == null) - if (idx <= 0) - return null; - else - e = buckets[--idx]; + if (idx <= 0) + return null; + else + e = buckets[--idx]; next = e.next; last = e; @@ -1081,7 +1081,7 @@ public class Hashtable<K, V> extends Dictionary<K, V> * @author Fridtjof Siebert * @author Andrew John Hughes (gnu_andrew@member.fsf.org) */ - private class KeyIterator + private class KeyIterator implements Iterator<K> { @@ -1097,7 +1097,7 @@ public class Hashtable<K, V> extends Dictionary<K, V> */ KeyIterator() { - iterator = new EntryIterator(); + iterator = new EntryIterator(); } @@ -1109,7 +1109,7 @@ public class Hashtable<K, V> extends Dictionary<K, V> */ public boolean hasNext() { - return iterator.hasNext(); + return iterator.hasNext(); } /** @@ -1137,7 +1137,7 @@ public class Hashtable<K, V> extends Dictionary<K, V> iterator.remove(); } } // class KeyIterator - + /** * A class which implements the Iterator interface and is used for * iterating over values in Hashtables. This class uses an @@ -1162,7 +1162,7 @@ public class Hashtable<K, V> extends Dictionary<K, V> */ ValueIterator() { - iterator = new EntryIterator(); + iterator = new EntryIterator(); } @@ -1174,7 +1174,7 @@ public class Hashtable<K, V> extends Dictionary<K, V> */ public boolean hasNext() { - return iterator.hasNext(); + return iterator.hasNext(); } /** @@ -1218,7 +1218,7 @@ public class Hashtable<K, V> extends Dictionary<K, V> * @author Jon Zeppieri * @author Fridjof Siebert */ - private class EntryEnumerator + private class EntryEnumerator implements Enumeration<Entry<K,V>> { /** The number of elements remaining to be returned by next(). */ @@ -1315,7 +1315,7 @@ public class Hashtable<K, V> extends Dictionary<K, V> */ public boolean hasMoreElements() { - return enumerator.hasMoreElements(); + return enumerator.hasMoreElements(); } /** @@ -1376,7 +1376,7 @@ public class Hashtable<K, V> extends Dictionary<K, V> */ public boolean hasMoreElements() { - return enumerator.hasMoreElements(); + return enumerator.hasMoreElements(); } /** diff --git a/libjava/classpath/java/util/IdentityHashMap.java b/libjava/classpath/java/util/IdentityHashMap.java index 8dead96..89a7525 100644 --- a/libjava/classpath/java/util/IdentityHashMap.java +++ b/libjava/classpath/java/util/IdentityHashMap.java @@ -789,10 +789,10 @@ public class IdentityHashMap<K,V> extends AbstractMap<K,V> key = table[loc]; } while (key == null); - - return (I) (type == KEYS ? unxform(key) - : (type == VALUES ? unxform(table[loc + 1]) - : new IdentityEntry(loc))); + + return (I) (type == KEYS ? unxform(key) + : (type == VALUES ? unxform(table[loc + 1]) + : new IdentityEntry(loc))); } /** diff --git a/libjava/classpath/java/util/IllegalFormatCodePointException.java b/libjava/classpath/java/util/IllegalFormatCodePointException.java index 001839f..f6d5c2f 100644 --- a/libjava/classpath/java/util/IllegalFormatCodePointException.java +++ b/libjava/classpath/java/util/IllegalFormatCodePointException.java @@ -38,16 +38,16 @@ exception statement from your version. */ package java.util; -/** +/** * Thrown when a {@link Formatter} receives a character with an * invalid Unicode codepoint, as defined by * {@link Character#isValidCodePoint(int)}. * * @author Tom Tromey (tromey@redhat.com) * @author Andrew John Hughes (gnu_andrew@member.fsf.org) - * @since 1.5 + * @since 1.5 */ -public class IllegalFormatCodePointException +public class IllegalFormatCodePointException extends IllegalFormatException { private static final long serialVersionUID = 19080630L; diff --git a/libjava/classpath/java/util/IllegalFormatConversionException.java b/libjava/classpath/java/util/IllegalFormatConversionException.java index d59c0a4..58aa918 100644 --- a/libjava/classpath/java/util/IllegalFormatConversionException.java +++ b/libjava/classpath/java/util/IllegalFormatConversionException.java @@ -38,16 +38,16 @@ exception statement from your version. */ package java.util; -/** +/** * Thrown when the type of an argument supplied to the * {@link Formatter#format()} method of a {@link Formatter} * does not match the conversion character specified for it. * * @author Tom Tromey (tromey@redhat.com) * @author Andrew John Hughes (gnu_andrew@member.fsf.org) - * @since 1.5 + * @since 1.5 */ -public class IllegalFormatConversionException +public class IllegalFormatConversionException extends IllegalFormatException { private static final long serialVersionUID = 17000126L; @@ -81,7 +81,7 @@ public class IllegalFormatConversionException public IllegalFormatConversionException(char c, Class<?> arg) { super("The type, " + arg + ", is invalid for the conversion character, " + - c + "."); + c + "."); if (arg == null) throw new NullPointerException("The supplied type was null."); this.c = c; diff --git a/libjava/classpath/java/util/IllegalFormatException.java b/libjava/classpath/java/util/IllegalFormatException.java index 4daafca..b5c740a 100644 --- a/libjava/classpath/java/util/IllegalFormatException.java +++ b/libjava/classpath/java/util/IllegalFormatException.java @@ -38,7 +38,7 @@ exception statement from your version. */ package java.util; -/** +/** * A general exception thrown when a format string is supplied * to a {@link Formatter} that contains either invalid syntax * or a mismatch between the format specification and the @@ -48,9 +48,9 @@ package java.util; * * @author Tom Tromey (tromey@redhat.com) * @author Andrew John Hughes (gnu_andrew@member.fsf.org) - * @since 1.5 + * @since 1.5 */ -public class IllegalFormatException +public class IllegalFormatException extends IllegalArgumentException { private static final long serialVersionUID = 18830826L; diff --git a/libjava/classpath/java/util/IllegalFormatFlagsException.java b/libjava/classpath/java/util/IllegalFormatFlagsException.java index 2a085c1..b53bfa5 100644 --- a/libjava/classpath/java/util/IllegalFormatFlagsException.java +++ b/libjava/classpath/java/util/IllegalFormatFlagsException.java @@ -38,15 +38,15 @@ exception statement from your version. */ package java.util; -/** +/** * Thrown when the flags supplied to the {@link Formatter#format()} * method of a {@link Formatter} form an illegal combination. * * @author Tom Tromey (tromey@redhat.com) * @author Andrew John Hughes (gnu_andrew@member.fsf.org) - * @since 1.5 + * @since 1.5 */ -public class IllegalFormatFlagsException +public class IllegalFormatFlagsException extends IllegalFormatException { private static final long serialVersionUID = 790824L; diff --git a/libjava/classpath/java/util/IllegalFormatPrecisionException.java b/libjava/classpath/java/util/IllegalFormatPrecisionException.java index a555f5d..a216dc1 100644 --- a/libjava/classpath/java/util/IllegalFormatPrecisionException.java +++ b/libjava/classpath/java/util/IllegalFormatPrecisionException.java @@ -38,7 +38,7 @@ exception statement from your version. */ package java.util; -/** +/** * Thrown when the specified precision for a {@link Formatter} * argument is illegal. This may be because the number is * a negative number (other than -1), the argument does not @@ -46,9 +46,9 @@ package java.util; * * @author Tom Tromey (tromey@redhat.com) * @author Andrew John Hughes (gnu_andrew@member.fsf.org) - * @since 1.5 + * @since 1.5 */ -public class IllegalFormatPrecisionException +public class IllegalFormatPrecisionException extends IllegalFormatException { private static final long serialVersionUID = 18711008L; diff --git a/libjava/classpath/java/util/IllegalFormatWidthException.java b/libjava/classpath/java/util/IllegalFormatWidthException.java index 95d3e15..7f2a625 100644 --- a/libjava/classpath/java/util/IllegalFormatWidthException.java +++ b/libjava/classpath/java/util/IllegalFormatWidthException.java @@ -38,16 +38,16 @@ exception statement from your version. */ package java.util; -/** +/** * Thrown when the specified width for a {@link Formatter} * argument is illegal. This may be because the number is * a negative number (other than -1) or for some other reason. * * @author Tom Tromey (tromey@redhat.com) * @author Andrew John Hughes (gnu_andrew@member.fsf.org) - * @since 1.5 + * @since 1.5 */ -public class IllegalFormatWidthException +public class IllegalFormatWidthException extends IllegalFormatException { private static final long serialVersionUID = 16660902L; diff --git a/libjava/classpath/java/util/InputMismatchException.java b/libjava/classpath/java/util/InputMismatchException.java index 39326c3..ee29e46 100644 --- a/libjava/classpath/java/util/InputMismatchException.java +++ b/libjava/classpath/java/util/InputMismatchException.java @@ -38,7 +38,7 @@ exception statement from your version. */ package java.util; -/** +/** * Thrown when a {@link Scanner} instance encounters a mismatch * between the input data and the pattern it is trying to match it * against. This could be because the input data represents an @@ -47,9 +47,9 @@ package java.util; * * @author Tom Tromey (tromey@redhat.com) * @author Andrew John Hughes (gnu_andrew@member.fsf.org) - * @since 1.5 + * @since 1.5 */ -public class InputMismatchException +public class InputMismatchException extends NoSuchElementException { /** diff --git a/libjava/classpath/java/util/LinkedHashMap.java b/libjava/classpath/java/util/LinkedHashMap.java index 6ec06a9..7701d77 100644 --- a/libjava/classpath/java/util/LinkedHashMap.java +++ b/libjava/classpath/java/util/LinkedHashMap.java @@ -76,9 +76,9 @@ package java.util; * things like keep the map at a fixed size. * <p> * - * Under ideal circumstances (no collisions), LinkedHashMap offers O(1) + * Under ideal circumstances (no collisions), LinkedHashMap offers O(1) * performance on most operations (<code>containsValue()</code> is, - * of course, O(n)). In the worst case (all keys map to the same + * of course, O(n)). In the worst case (all keys map to the same * hash code -- very unlikely), most operations are O(n). Traversal is * faster than in HashMap (proportional to the map size, and not the space * allocated for the map), but other operations may be slower because of the @@ -188,7 +188,7 @@ public class LinkedHashMap<K,V> extends HashMap<K,V> succ = null; pred = root.pred; pred.succ = this; - root.pred = this; + root.pred = this; } } } @@ -477,7 +477,7 @@ public class LinkedHashMap<K,V> extends HashMap<K,V> current = current.succ; return type == VALUES ? last.value : type == KEYS ? last.key : last; } - + /** * Removes from the backing HashMap the last element which was fetched * with the <code>next()</code> method. diff --git a/libjava/classpath/java/util/LinkedHashSet.java b/libjava/classpath/java/util/LinkedHashSet.java index 03b9556..2caebaf 100644 --- a/libjava/classpath/java/util/LinkedHashSet.java +++ b/libjava/classpath/java/util/LinkedHashSet.java @@ -62,7 +62,7 @@ import java.io.Serializable; * without needing the overhead of <code>TreeSet</code>. * <p> * - * Under ideal circumstances (no collisions), LinkedHashSet offers O(1) + * Under ideal circumstances (no collisions), LinkedHashSet offers O(1) * performance on most operations. In the worst case (all elements map * to the same hash code -- very unlikely), most operations are O(n). * <p> diff --git a/libjava/classpath/java/util/LinkedList.java b/libjava/classpath/java/util/LinkedList.java index 3f8b2ad..813d099 100644 --- a/libjava/classpath/java/util/LinkedList.java +++ b/libjava/classpath/java/util/LinkedList.java @@ -684,7 +684,7 @@ public class LinkedList<T> extends AbstractSequentialList<T> * Returns an Array whose component type is the runtime component type of * the passed-in Array. The returned Array is populated with all of the * elements in this LinkedList. If the passed-in Array is not large enough - * to store all of the elements in this List, a new Array will be created + * to store all of the elements in this List, a new Array will be created * and returned; if the passed-in Array is <i>larger</i> than the size * of this List, then size() index will be set to null. * @@ -1081,8 +1081,8 @@ public class LinkedList<T> extends AbstractSequentialList<T> if (next == null) throw new NoSuchElementException(); --position; - lastReturned = next; - next = lastReturned.previous; + lastReturned = next; + next = lastReturned.previous; return lastReturned.data; } @@ -1101,9 +1101,9 @@ public class LinkedList<T> extends AbstractSequentialList<T> checkMod(); if (lastReturned == null) throw new IllegalStateException(); - removeEntry(lastReturned); - lastReturned = null; - ++knownMod; + removeEntry(lastReturned); + lastReturned = null; + ++knownMod; } }; } @@ -1217,7 +1217,7 @@ public class LinkedList<T> extends AbstractSequentialList<T> { addFirst(value); } - + /** * Removes the first occurrence of the specified element * from the list, when traversing the list from head to @@ -1247,12 +1247,12 @@ public class LinkedList<T> extends AbstractSequentialList<T> Entry<T> e = last; while (e != null) { - if (equals(o, e.data)) - { - removeEntry(e); - return true; - } - e = e.previous; + if (equals(o, e.data)) + { + removeEntry(e); + return true; + } + e = e.previous; } return false; } diff --git a/libjava/classpath/java/util/List.java b/libjava/classpath/java/util/List.java index 0a1c409..3a437a5 100644 --- a/libjava/classpath/java/util/List.java +++ b/libjava/classpath/java/util/List.java @@ -232,7 +232,7 @@ public interface List<E> extends Collection<E> * Obtains a hash code for this list. In order to obey the general * contract of the hashCode method of class Object, this value is * calculated as follows: - * + * <p><pre>hashCode = 1; Iterator i = list.iterator(); while (i.hasNext()) diff --git a/libjava/classpath/java/util/Locale.java b/libjava/classpath/java/util/Locale.java index c28709f..ef11173 100644 --- a/libjava/classpath/java/util/Locale.java +++ b/libjava/classpath/java/util/Locale.java @@ -215,7 +215,7 @@ public final class Locale implements Serializable, Cloneable * got called. */ private static transient HashMap localeMap; - + /** * The default locale. Except for during bootstrapping, this should never be * null. Note the logic in the main constructor, to detect when @@ -249,12 +249,12 @@ public final class Locale implements Serializable, Cloneable * * @param language the language of the locale to retrieve. * @return the locale. - */ + */ private static Locale getLocale(String language) { return getLocale(language, "", ""); } - + /** * Retrieves the locale with the specified language and country * from the cache. @@ -262,12 +262,12 @@ public final class Locale implements Serializable, Cloneable * @param language the language of the locale to retrieve. * @param country the country of the locale to retrieve. * @return the locale. - */ + */ private static Locale getLocale(String language, String country) { return getLocale(language, country, ""); } - + /** * Retrieves the locale with the specified language, country * and variant from the cache. @@ -276,7 +276,7 @@ public final class Locale implements Serializable, Cloneable * @param country the country of the locale to retrieve. * @param variant the variant of the locale to retrieve. * @return the locale. - */ + */ private static Locale getLocale(String language, String country, String variant) { if (localeMap == null) @@ -287,13 +287,13 @@ public final class Locale implements Serializable, Cloneable if (locale == null) { - locale = new Locale(language, country, variant); - localeMap.put(name, locale); + locale = new Locale(language, country, variant); + localeMap.put(name, locale); } return locale; } - + /** * Convert new iso639 codes to the old ones. * @@ -418,17 +418,17 @@ public final class Locale implements Serializable, Cloneable if (name.length() > 2) country = name.substring(3); - int index = country.indexOf("_"); - if (index > 0) - { - variant = country.substring(index + 1); - country = country.substring(0, index - 1); - } + int index = country.indexOf("_"); + if (index > 0) + { + variant = country.substring(index + 1); + country = country.substring(0, index - 1); + } availableLocales[i] = getLocale(language, country, variant); } } - + return (Locale[]) availableLocales.clone(); } @@ -442,7 +442,7 @@ public final class Locale implements Serializable, Cloneable { if (countryCache == null) { - countryCache = getISOStrings("territories"); + countryCache = getISOStrings("territories"); } return (String[]) countryCache.clone(); @@ -458,7 +458,7 @@ public final class Locale implements Serializable, Cloneable { if (languageCache == null) { - languageCache = getISOStrings("languages"); + languageCache = getISOStrings("languages"); } return (String[]) languageCache.clone(); } @@ -480,27 +480,27 @@ public final class Locale implements Serializable, Cloneable while (e.hasMoreElements()) { - String key = (String) e.nextElement(); - - if (key.startsWith(tableName + ".")) - { - String str = key.substring(tableName.length() + 1); - - if (str.length() == 2 - && Character.isLetter(str.charAt(0)) - && Character.isLetter(str.charAt(1))) - { - tempList.add(str); - ++count; - } - } + String key = (String) e.nextElement(); + + if (key.startsWith(tableName + ".")) + { + String str = key.substring(tableName.length() + 1); + + if (str.length() == 2 + && Character.isLetter(str.charAt(0)) + && Character.isLetter(str.charAt(1))) + { + tempList.add(str); + ++count; + } + } } String[] strings = new String[count]; - + for (int a = 0; a < count; ++a) strings[a] = (String) tempList.get(a); - + return strings; } @@ -687,7 +687,7 @@ public final class Locale implements Serializable, Cloneable return ""; try { - ResourceBundle res = + ResourceBundle res = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", inLocale, ClassLoader.getSystemClassLoader()); @@ -696,23 +696,23 @@ public final class Locale implements Serializable, Cloneable } catch (MissingResourceException e) { - /* This means runtime support for the locale - * is not available, so we check providers. */ + /* This means runtime support for the locale + * is not available, so we check providers. */ } for (LocaleNameProvider p : - ServiceLoader.load(LocaleNameProvider.class)) + ServiceLoader.load(LocaleNameProvider.class)) { - for (Locale loc : p.getAvailableLocales()) - { - if (loc.equals(inLocale)) - { - String locLang = p.getDisplayLanguage(language, - inLocale); - if (locLang != null) - return locLang; - break; - } - } + for (Locale loc : p.getAvailableLocales()) + { + if (loc.equals(inLocale)) + { + String locLang = p.getDisplayLanguage(language, + inLocale); + if (locLang != null) + return locLang; + break; + } + } } if (inLocale.equals(Locale.ROOT)) // Base case return language; @@ -770,28 +770,28 @@ public final class Locale implements Serializable, Cloneable ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", inLocale, ClassLoader.getSystemClassLoader()); - + return res.getString("territories." + country); } catch (MissingResourceException e) { - /* This means runtime support for the locale - * is not available, so we check providers. */ + /* This means runtime support for the locale + * is not available, so we check providers. */ } for (LocaleNameProvider p : - ServiceLoader.load(LocaleNameProvider.class)) + ServiceLoader.load(LocaleNameProvider.class)) { - for (Locale loc : p.getAvailableLocales()) - { - if (loc.equals(inLocale)) - { - String locCountry = p.getDisplayCountry(country, - inLocale); - if (locCountry != null) - return locCountry; - break; - } - } + for (Locale loc : p.getAvailableLocales()) + { + if (loc.equals(inLocale)) + { + String locCountry = p.getDisplayCountry(country, + inLocale); + if (locCountry != null) + return locCountry; + break; + } + } } if (inLocale.equals(Locale.ROOT)) // Base case return country; @@ -850,28 +850,28 @@ public final class Locale implements Serializable, Cloneable ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", inLocale, ClassLoader.getSystemClassLoader()); - + return res.getString("variants." + variant); } catch (MissingResourceException e) { - /* This means runtime support for the locale - * is not available, so we check providers. */ + /* This means runtime support for the locale + * is not available, so we check providers. */ } for (LocaleNameProvider p : - ServiceLoader.load(LocaleNameProvider.class)) + ServiceLoader.load(LocaleNameProvider.class)) { - for (Locale loc : p.getAvailableLocales()) - { - if (loc.equals(inLocale)) - { - String locVar = p.getDisplayVariant(variant, - inLocale); - if (locVar != null) - return locVar; - break; - } - } + for (Locale loc : p.getAvailableLocales()) + { + if (loc.equals(inLocale)) + { + String locVar = p.getDisplayVariant(variant, + inLocale); + if (locVar != null) + return locVar; + break; + } + } } if (inLocale.equals(Locale.ROOT)) // Base case return country; @@ -989,8 +989,8 @@ public final class Locale implements Serializable, Cloneable return false; Locale l = (Locale) obj; - return (language == l.language - && country == l.country + return (language == l.language + && country == l.country && variant == l.variant); } @@ -1000,8 +1000,8 @@ public final class Locale implements Serializable, Cloneable * @param s the stream to write to * @throws IOException if the write fails * @serialData The first three fields are Strings representing language, - * country, and variant. The fourth field is a placeholder for - * the cached hashcode, but this is always written as -1, and + * country, and variant. The fourth field is a placeholder for + * the cached hashcode, but this is always written as -1, and * recomputed when reading it back. */ private void writeObject(ObjectOutputStream s) diff --git a/libjava/classpath/java/util/Map.java b/libjava/classpath/java/util/Map.java index 67b3d8a..1bcb1b2 100644 --- a/libjava/classpath/java/util/Map.java +++ b/libjava/classpath/java/util/Map.java @@ -310,7 +310,7 @@ public interface Map<K, V> * Returns the hash code of the entry. This is defined as the * exclusive-or of the hashcodes of the key and value (using 0 for * <code>null</code>). In other words, this must be: - * + * <p><pre>(getKey() == null ? 0 : getKey().hashCode()) ^ (getValue() == null ? 0 : getValue().hashCode())</pre> * @@ -322,7 +322,7 @@ public interface Map<K, V> * Compares the specified object with this entry. Returns true only if * the object is a mapping of identical key and value. In other words, * this must be: - * + * <p><pre>(o instanceof Map.Entry) && (getKey() == null ? ((Map.Entry) o).getKey() == null : getKey().equals(((Map.Entry) o).getKey())) diff --git a/libjava/classpath/java/util/MissingFormatArgumentException.java b/libjava/classpath/java/util/MissingFormatArgumentException.java index 4a9385e..e53de0a 100644 --- a/libjava/classpath/java/util/MissingFormatArgumentException.java +++ b/libjava/classpath/java/util/MissingFormatArgumentException.java @@ -38,16 +38,16 @@ exception statement from your version. */ package java.util; -/** +/** * Thrown when the a format specification for a {@link Formatter} * refers to an argument that is non-existent, or an argument index * references a non-existent argument. * * @author Tom Tromey (tromey@redhat.com) * @author Andrew John Hughes (gnu_andrew@member.fsf.org) - * @since 1.5 + * @since 1.5 */ -public class MissingFormatArgumentException +public class MissingFormatArgumentException extends IllegalFormatException { private static final long serialVersionUID = 19190115L; @@ -71,8 +71,8 @@ public class MissingFormatArgumentException */ public MissingFormatArgumentException(String s) { - super("The specification, " + s + - ", refers to a non-existent argument."); + super("The specification, " + s + + ", refers to a non-existent argument."); if (s == null) throw new NullPointerException("The specification is null."); this.s = s; diff --git a/libjava/classpath/java/util/MissingFormatWidthException.java b/libjava/classpath/java/util/MissingFormatWidthException.java index 55de620..e083172 100644 --- a/libjava/classpath/java/util/MissingFormatWidthException.java +++ b/libjava/classpath/java/util/MissingFormatWidthException.java @@ -38,15 +38,15 @@ exception statement from your version. */ package java.util; -/** +/** * Thrown when the a format specification for a {@link Formatter} * does not include a width for a value where one is required. * * @author Tom Tromey (tromey@redhat.com) * @author Andrew John Hughes (gnu_andrew@member.fsf.org) - * @since 1.5 + * @since 1.5 */ -public class MissingFormatWidthException +public class MissingFormatWidthException extends IllegalFormatException { private static final long serialVersionUID = 15560123L; diff --git a/libjava/classpath/java/util/PriorityQueue.java b/libjava/classpath/java/util/PriorityQueue.java index 9e738d6..5b6a368 100644 --- a/libjava/classpath/java/util/PriorityQueue.java +++ b/libjava/classpath/java/util/PriorityQueue.java @@ -79,23 +79,23 @@ public class PriorityQueue<E> extends AbstractQueue<E> implements Serializable // Special case where we can find the comparator to use. if (c instanceof SortedSet) { - SortedSet<? extends E> ss = (SortedSet<? extends E>) c; - this.comparator = (Comparator<? super E>) ss.comparator(); - // We can insert the elements directly, since they are sorted. - int i = 0; - for (E val : ss) - { - if (val == null) - throw new NullPointerException(); - storage[i++] = val; - } + SortedSet<? extends E> ss = (SortedSet<? extends E>) c; + this.comparator = (Comparator<? super E>) ss.comparator(); + // We can insert the elements directly, since they are sorted. + int i = 0; + for (E val : ss) + { + if (val == null) + throw new NullPointerException(); + storage[i++] = val; + } } else if (c instanceof PriorityQueue) { - PriorityQueue<? extends E> pq = (PriorityQueue<? extends E>) c; - this.comparator = (Comparator<? super E>)pq.comparator(); - // We can just copy the contents. - System.arraycopy(pq.storage, 0, storage, 0, pq.storage.length); + PriorityQueue<? extends E> pq = (PriorityQueue<? extends E>) c; + this.comparator = (Comparator<? super E>)pq.comparator(); + // We can just copy the contents. + System.arraycopy(pq.storage, 0, storage, 0, pq.storage.length); } addAll(c); @@ -109,7 +109,7 @@ public class PriorityQueue<E> extends AbstractQueue<E> implements Serializable public PriorityQueue(int cap, Comparator<? super E> comp) { if (cap < 1) - throw new IllegalArgumentException(); + throw new IllegalArgumentException(); this.used = 0; this.storage = (E[]) new Object[cap]; this.comparator = comp; @@ -118,7 +118,7 @@ public class PriorityQueue<E> extends AbstractQueue<E> implements Serializable public PriorityQueue(PriorityQueue<? extends E> c) { this(Math.max(1, (int) (1.1 * c.size())), - (Comparator<? super E>)c.comparator()); + (Comparator<? super E>)c.comparator()); // We can just copy the contents. System.arraycopy(c.storage, 0, storage, 0, c.storage.length); } @@ -126,14 +126,14 @@ public class PriorityQueue<E> extends AbstractQueue<E> implements Serializable public PriorityQueue(SortedSet<? extends E> c) { this(Math.max(1, (int) (1.1 * c.size())), - (Comparator<? super E>)c.comparator()); + (Comparator<? super E>)c.comparator()); // We can insert the elements directly, since they are sorted. int i = 0; for (E val : c) { - if (val == null) - throw new NullPointerException(); - storage[i++] = val; + if (val == null) + throw new NullPointerException(); + storage[i++] = val; } } @@ -157,22 +157,22 @@ public class PriorityQueue<E> extends AbstractQueue<E> implements Serializable public boolean hasNext() { - return count < used; + return count < used; } public E next() { - while (storage[++index] == null) - ; - - ++count; - return storage[index]; + while (storage[++index] == null) + ; + + ++count; + return storage[index]; } public void remove() { - PriorityQueue.this.remove(index); - index--; + PriorityQueue.this.remove(index); + index--; } }; } @@ -209,14 +209,14 @@ public class PriorityQueue<E> extends AbstractQueue<E> implements Serializable { if (o != null) { - for (int i = 0; i < storage.length; ++i) - { - if (o.equals(storage[i])) - { - remove(i); - return true; - } - } + for (int i = 0; i < storage.length; ++i) + { + if (o.equals(storage[i])) + { + remove(i); + return true; + } + } } return false; } @@ -237,12 +237,12 @@ public class PriorityQueue<E> extends AbstractQueue<E> implements Serializable int save = used; for (E val : c) { - if (val == null) - throw new NullPointerException(); - newSlot = findSlot(newSlot); - storage[newSlot] = val; - ++used; - bubbleUp(newSlot); + if (val == null) + throw new NullPointerException(); + newSlot = findSlot(newSlot); + storage[newSlot] = val; + ++used; + bubbleUp(newSlot); } return save != used; @@ -253,17 +253,17 @@ public class PriorityQueue<E> extends AbstractQueue<E> implements Serializable int slot; if (used == storage.length) { - resize(); - slot = used; + resize(); + slot = used; } else { - for (slot = start + 1; slot < storage.length; ++slot) - { - if (storage[slot] == null) - break; - } - // We'll always find a slot. + for (slot = start + 1; slot < storage.length; ++slot) + { + if (storage[slot] == null) + break; + } + // We'll always find a slot. } return slot; } @@ -275,28 +275,28 @@ public class PriorityQueue<E> extends AbstractQueue<E> implements Serializable // the bottom of the tree. while (storage[index] != null) { - int child = 2 * index + 1; - - // See if we went off the end. - if (child >= storage.length) - { - storage[index] = null; - break; - } - - // Find which child we want to promote. If one is not null, - // we pick it. If both are null, it doesn't matter, we're - // about to leave. If neither is null, pick the lesser. - if (child + 1 >= storage.length || storage[child + 1] == null) - { - // Nothing. - } - else if (storage[child] == null - || (Collections.compare(storage[child], storage[child + 1], - comparator) > 0)) - ++child; - storage[index] = storage[child]; - index = child; + int child = 2 * index + 1; + + // See if we went off the end. + if (child >= storage.length) + { + storage[index] = null; + break; + } + + // Find which child we want to promote. If one is not null, + // we pick it. If both are null, it doesn't matter, we're + // about to leave. If neither is null, pick the lesser. + if (child + 1 >= storage.length || storage[child + 1] == null) + { + // Nothing. + } + else if (storage[child] == null + || (Collections.compare(storage[child], storage[child + 1], + comparator) > 0)) + ++child; + storage[index] = storage[child]; + index = child; } --used; } @@ -307,23 +307,23 @@ public class PriorityQueue<E> extends AbstractQueue<E> implements Serializable // it up the tree to its natural resting place. while (index > 0) { - // This works regardless of whether we're at 2N+1 or 2N+2. - int parent = (index - 1) / 2; - if (Collections.compare(storage[parent], storage[index], comparator) - <= 0) - { - // Parent is the same or smaller than this element, so the - // invariant is preserved. Note that if the new element - // is smaller than the parent, then it is necessarily - // smaller than the parent's other child. - break; - } - - E temp = storage[index]; - storage[index] = storage[parent]; - storage[parent] = temp; - - index = parent; + // This works regardless of whether we're at 2N+1 or 2N+2. + int parent = (index - 1) / 2; + if (Collections.compare(storage[parent], storage[index], comparator) + <= 0) + { + // Parent is the same or smaller than this element, so the + // invariant is preserved. Note that if the new element + // is smaller than the parent, then it is necessarily + // smaller than the parent's other child. + break; + } + + E temp = storage[index]; + storage[index] = storage[parent]; + storage[parent] = temp; + + index = parent; } } diff --git a/libjava/classpath/java/util/Properties.java b/libjava/classpath/java/util/Properties.java index a57004b..b0f436f 100644 --- a/libjava/classpath/java/util/Properties.java +++ b/libjava/classpath/java/util/Properties.java @@ -75,7 +75,7 @@ import org.w3c.dom.ls.LSSerializer; * and put it in the CLASSPATH. (The character * <code>\</code><code>u00e4</code> is the german umlaut) * - * + * <pre>s1=3 s2=MeineDisk s3=3. M\<code></code>u00e4rz 96 @@ -179,7 +179,7 @@ public class Properties extends Hashtable<Object, Object> * <code>\\u</code><em>xxxx</em> notation are detected, and * converted to the corresponding single character. <br> * - * + * <pre># This is a comment key = value k\:5 \ a string starting with space and ending with newline\n @@ -204,21 +204,21 @@ label = Name:\\u0020</pre> { char c = 0; int pos = 0; - // Leading whitespaces must be deleted first. + // Leading whitespaces must be deleted first. while (pos < line.length() && Character.isWhitespace(c = line.charAt(pos))) pos++; // If empty line or begins with a comment character, skip this line. if ((line.length() - pos) == 0 - || line.charAt(pos) == '#' || line.charAt(pos) == '!') + || line.charAt(pos) == '#' || line.charAt(pos) == '!') continue; // The characters up to the next Whitespace, ':', or '=' // describe the key. But look for escape sequences. - // Try to short-circuit when there is no escape char. - int start = pos; - boolean needsEscape = line.indexOf('\\', pos) != -1; + // Try to short-circuit when there is no escape char. + int start = pos; + boolean needsEscape = line.indexOf('\\', pos) != -1; CPStringBuilder key = needsEscape ? new CPStringBuilder() : null; while (pos < line.length() && ! Character.isWhitespace(c = line.charAt(pos++)) @@ -232,8 +232,8 @@ label = Name:\\u0020</pre> // is no next line, just treat it as a key with an // empty value. line = reader.readLine(); - if (line == null) - line = ""; + if (line == null) + line = ""; pos = 0; while (pos < line.length() && Character.isWhitespace(c = line.charAt(pos))) @@ -274,13 +274,13 @@ label = Name:\\u0020</pre> boolean isDelim = (c == ':' || c == '='); - String keyString; - if (needsEscape) - keyString = key.toString(); - else if (isDelim || Character.isWhitespace(c)) - keyString = line.substring(start, pos - 1); - else - keyString = line.substring(start, pos); + String keyString; + if (needsEscape) + keyString = key.toString(); + else if (isDelim || Character.isWhitespace(c)) + keyString = line.substring(start, pos - 1); + else + keyString = line.substring(start, pos); while (pos < line.length() && Character.isWhitespace(c = line.charAt(pos))) @@ -294,14 +294,14 @@ label = Name:\\u0020</pre> pos++; } - // Short-circuit if no escape chars found. - if (!needsEscape) - { - put(keyString, line.substring(pos)); - continue; - } + // Short-circuit if no escape chars found. + if (!needsEscape) + { + put(keyString, line.substring(pos)); + continue; + } - // Escape char found so iterate through the rest of the line. + // Escape char found so iterate through the rest of the line. StringBuilder element = new StringBuilder(line.length() - pos); while (pos < line.length()) { @@ -313,11 +313,11 @@ label = Name:\\u0020</pre> // The line continues on the next line. line = reader.readLine(); - // We might have seen a backslash at the end of - // the file. The JDK ignores the backslash in - // this case, so we follow for compatibility. - if (line == null) - break; + // We might have seen a backslash at the end of + // the file. The JDK ignores the backslash in + // this case, so we follow for compatibility. + if (line == null) + break; pos = 0; while (pos < line.length() @@ -438,7 +438,7 @@ label = Name:\\u0020</pre> if (header != null) writer.println("#" + header); writer.println ("#" + Calendar.getInstance ().getTime ()); - + Iterator iter = entrySet ().iterator (); int i = size (); CPStringBuilder s = new CPStringBuilder (); // Reuse the same buffer. @@ -528,7 +528,7 @@ label = Name:\\u0020</pre> } /** - * Prints the key/value pairs to the given print stream. This is + * Prints the key/value pairs to the given print stream. This is * mainly useful for debugging purposes. * * @param out the print stream, where the key/value pairs are written to @@ -645,7 +645,7 @@ label = Name:\\u0020</pre> * Invoking this method provides the same behaviour as invoking * <code>storeToXML(os, comment, "UTF-8")</code>. * </p> - * + * * @param os the stream to output to. * @param comment a comment to include at the top of the XML file, or * <code>null</code> if one is not required. @@ -666,7 +666,7 @@ label = Name:\\u0020</pre> * <a href="http://java.sun.com/dtd/properties.dtd"> * http://java.sun.com/dtd/properties.dtd</a>. * </p> - * + * * @param os the stream to output to. * @param comment a comment to include at the top of the XML file, or * <code>null</code> if one is not required. @@ -685,53 +685,53 @@ label = Name:\\u0020</pre> throw new NullPointerException("Null encoding supplied."); try { - DOMImplementationRegistry registry = - DOMImplementationRegistry.newInstance(); - DOMImplementation domImpl = registry.getDOMImplementation("LS 3.0"); - DocumentType doctype = - domImpl.createDocumentType("properties", null, - "http://java.sun.com/dtd/properties.dtd"); - Document doc = domImpl.createDocument(null, "properties", doctype); - Element root = doc.getDocumentElement(); - if (comment != null) - { - Element commentElement = doc.createElement("comment"); - commentElement.appendChild(doc.createTextNode(comment)); - root.appendChild(commentElement); - } - Iterator iterator = entrySet().iterator(); - while (iterator.hasNext()) - { - Map.Entry entry = (Map.Entry) iterator.next(); - Element entryElement = doc.createElement("entry"); - entryElement.setAttribute("key", (String) entry.getKey()); - entryElement.appendChild(doc.createTextNode((String) - entry.getValue())); - root.appendChild(entryElement); - } - DOMImplementationLS loadAndSave = (DOMImplementationLS) domImpl; - LSSerializer serializer = loadAndSave.createLSSerializer(); - LSOutput output = loadAndSave.createLSOutput(); - output.setByteStream(os); - output.setEncoding(encoding); - serializer.write(doc, output); + DOMImplementationRegistry registry = + DOMImplementationRegistry.newInstance(); + DOMImplementation domImpl = registry.getDOMImplementation("LS 3.0"); + DocumentType doctype = + domImpl.createDocumentType("properties", null, + "http://java.sun.com/dtd/properties.dtd"); + Document doc = domImpl.createDocument(null, "properties", doctype); + Element root = doc.getDocumentElement(); + if (comment != null) + { + Element commentElement = doc.createElement("comment"); + commentElement.appendChild(doc.createTextNode(comment)); + root.appendChild(commentElement); + } + Iterator iterator = entrySet().iterator(); + while (iterator.hasNext()) + { + Map.Entry entry = (Map.Entry) iterator.next(); + Element entryElement = doc.createElement("entry"); + entryElement.setAttribute("key", (String) entry.getKey()); + entryElement.appendChild(doc.createTextNode((String) + entry.getValue())); + root.appendChild(entryElement); + } + DOMImplementationLS loadAndSave = (DOMImplementationLS) domImpl; + LSSerializer serializer = loadAndSave.createLSSerializer(); + LSOutput output = loadAndSave.createLSOutput(); + output.setByteStream(os); + output.setEncoding(encoding); + serializer.write(doc, output); } catch (ClassNotFoundException e) { - throw (IOException) - new IOException("The XML classes could not be found.").initCause(e); + throw (IOException) + new IOException("The XML classes could not be found.").initCause(e); } catch (InstantiationException e) { - throw (IOException) - new IOException("The XML classes could not be instantiated.") - .initCause(e); + throw (IOException) + new IOException("The XML classes could not be instantiated.") + .initCause(e); } catch (IllegalAccessException e) { - throw (IOException) - new IOException("The XML classes could not be accessed.") - .initCause(e); + throw (IOException) + new IOException("The XML classes could not be accessed.") + .initCause(e); } } @@ -813,9 +813,9 @@ label = Name:\\u0020</pre> } catch (XMLStreamException e) { - throw (InvalidPropertiesFormatException) - new InvalidPropertiesFormatException("Error in parsing XML."). - initCause(e); + throw (InvalidPropertiesFormatException) + new InvalidPropertiesFormatException("Error in parsing XML."). + initCause(e); } } diff --git a/libjava/classpath/java/util/PropertyPermission.java b/libjava/classpath/java/util/PropertyPermission.java index d1bdbd1..6ed4690 100644 --- a/libjava/classpath/java/util/PropertyPermission.java +++ b/libjava/classpath/java/util/PropertyPermission.java @@ -136,7 +136,7 @@ public final class PropertyPermission extends BasicPermission { // Initialising the class java.util.Locale ... // tries to initialise the Locale.defaultLocale static - // which calls System.getProperty, + // which calls System.getProperty, // which calls SecurityManager.checkPropertiesAccess, // which creates a PropertyPermission with action "read,write", // which calls setActions("read,write"). @@ -144,9 +144,9 @@ public final class PropertyPermission extends BasicPermission // this would call Locale.getDefault() which returns null // because Locale.defaultLocale hasn't been set yet // then toLowerCase will fail with a null pointer exception. - // + // // The solution is to take a punt on 'str' being lower case, and - // test accordingly. If that fails, we convert 'str' to lower case + // test accordingly. If that fails, we convert 'str' to lower case // and try the tests again. if ("read".equals(str)) actions = READ; @@ -156,15 +156,15 @@ public final class PropertyPermission extends BasicPermission actions = READ | WRITE; else { - String lstr = str.toLowerCase(); - if ("read".equals(lstr)) - actions = READ; - else if ("write".equals(lstr)) - actions = WRITE; - else if ("read,write".equals(lstr) || "write,read".equals(lstr)) - actions = READ | WRITE; - else - throw new IllegalArgumentException("illegal action " + str); + String lstr = str.toLowerCase(); + if ("read".equals(lstr)) + actions = READ; + else if ("write".equals(lstr)) + actions = WRITE; + else if ("read,write".equals(lstr) || "write,read".equals(lstr)) + actions = READ | WRITE; + else + throw new IllegalArgumentException("illegal action " + str); } } diff --git a/libjava/classpath/java/util/PropertyPermissionCollection.java b/libjava/classpath/java/util/PropertyPermissionCollection.java index c95fa4e..768b112 100644 --- a/libjava/classpath/java/util/PropertyPermissionCollection.java +++ b/libjava/classpath/java/util/PropertyPermissionCollection.java @@ -67,7 +67,7 @@ class PropertyPermissionCollection extends PermissionCollection /** * A flag to detect if "*" is in the collection. * - * @serial true if "*" is in the collection + * @serial true if "*" is in the collection */ private boolean all_allowed; diff --git a/libjava/classpath/java/util/Random.java b/libjava/classpath/java/util/Random.java index b016f78..999e895 100644 --- a/libjava/classpath/java/util/Random.java +++ b/libjava/classpath/java/util/Random.java @@ -227,7 +227,7 @@ public class Random implements Serializable * an int value whose 32 bits are independent chosen random bits * (0 and 1 are equally likely). The implementation for * java.util.Random is: - * + * <pre>public int nextInt() { return next(32); @@ -246,7 +246,7 @@ public class Random implements Serializable * each value has the same likelihodd (1/<code>n</code>). * (0 and 1 are equally likely). The implementation for * java.util.Random is: - * + * <pre> public int nextInt(int n) { @@ -266,7 +266,7 @@ public int nextInt(int n) return val; }</pre> - * + * * <p>This algorithm would return every value with exactly the same * probability, if the next()-method would be a perfect random number * generator. @@ -323,7 +323,7 @@ public int nextInt(int n) /** * Generates the next pseudorandom boolean. True and false have * the same probability. The implementation is: - * + * <pre>public boolean nextBoolean() { return next(1) != 0; @@ -341,7 +341,7 @@ public int nextInt(int n) * Generates the next pseudorandom float uniformly distributed * between 0.0f (inclusive) and 1.0f (exclusive). The * implementation is as follows. - * + * <pre>public float nextFloat() { return next(24) / ((float)(1 << 24)); @@ -375,7 +375,7 @@ public int nextInt(int n) * Generates the next pseudorandom, Gaussian (normally) distributed * double value, with mean 0.0 and standard deviation 1.0. * The algorithm is as follows. - * + * <pre>public synchronized double nextGaussian() { if (haveNextNextGaussian) diff --git a/libjava/classpath/java/util/ResourceBundle.java b/libjava/classpath/java/util/ResourceBundle.java index 2124340..966eb02 100644 --- a/libjava/classpath/java/util/ResourceBundle.java +++ b/libjava/classpath/java/util/ResourceBundle.java @@ -95,7 +95,7 @@ public abstract class ResourceBundle /** * Maximum size of our cache of <code>ResourceBundle</code>s keyed by * {@link BundleKey} instances. - * + * * @see BundleKey */ private static final int CACHE_SIZE = 100; @@ -120,7 +120,7 @@ public abstract class ResourceBundle * {@link #CACHE_SIZE} accessed <code>ResourceBundle</code>s keyed by the * tuple: default locale, resource-bundle name, resource-bundle locale, and * classloader. - * + * * @see BundleKey */ private static Map<BundleKey,Object> bundleCache = @@ -188,8 +188,8 @@ public abstract class ResourceBundle String className = getClass().getName(); throw new MissingResourceException("Key '" + key - + "'not found in Bundle: " - + className, className, key); + + "'not found in Bundle: " + + className, className, key); } /** @@ -270,7 +270,7 @@ public abstract class ResourceBundle { set(dl, s, l, cl); } - + void set(Locale dl, String s, Locale l, ClassLoader cl) { defaultLocale = dl; @@ -280,12 +280,12 @@ public abstract class ResourceBundle hashcode = defaultLocale.hashCode() ^ baseName.hashCode() ^ locale.hashCode() ^ classLoader.hashCode(); } - + public int hashCode() { return hashcode; } - + public boolean equals(Object o) { if (! (o instanceof BundleKey)) @@ -296,7 +296,7 @@ public abstract class ResourceBundle && baseName.equals(key.baseName) && locale.equals(key.locale) && classLoader.equals(key.classLoader); - } + } public String toString() { @@ -313,11 +313,11 @@ public abstract class ResourceBundle return builder.toString(); } } - + /** A cache lookup key. This avoids having to a new one for every * getBundle() call. */ private static final BundleKey lookupKey = new BundleKey(); - + /** Singleton cache entry to represent previous failed lookups. */ private static final Object nullEntry = new Object(); @@ -383,7 +383,7 @@ public abstract class ResourceBundle * <li>Locale("es", "ES"): result MyResources_es_ES.class, parent * MyResources.class</li> * </ul> - * + * * <p>The file MyResources_fr_CH.properties is never used because it is hidden * by MyResources_fr_CH.class.</p> * @@ -475,38 +475,38 @@ public abstract class ResourceBundle rbClass = Class.forName(localizedName); else rbClass = classloader.loadClass(localizedName); - // Note that we do the check up front instead of catching - // ClassCastException. The reason for this is that some crazy - // programs (Eclipse) have classes that do not extend - // ResourceBundle but that have the same name as a property - // bundle; in fact Eclipse relies on ResourceBundle not - // instantiating these classes. - if (ResourceBundle.class.isAssignableFrom(rbClass)) - bundle = (ResourceBundle) rbClass.newInstance(); + // Note that we do the check up front instead of catching + // ClassCastException. The reason for this is that some crazy + // programs (Eclipse) have classes that do not extend + // ResourceBundle but that have the same name as a property + // bundle; in fact Eclipse relies on ResourceBundle not + // instantiating these classes. + if (ResourceBundle.class.isAssignableFrom(rbClass)) + bundle = (ResourceBundle) rbClass.newInstance(); } catch (Exception ex) {} if (bundle == null) { - try - { - InputStream is; - String resourceName - = localizedName.replace('.', '/') + ".properties"; - if (classloader == null) - is = ClassLoader.getSystemResourceAsStream(resourceName); - else - is = classloader.getResourceAsStream(resourceName); - if (is != null) - bundle = new PropertyResourceBundle(is); - } - catch (IOException ex) - { - MissingResourceException mre = new MissingResourceException - ("Failed to load bundle: " + localizedName, localizedName, ""); - mre.initCause(ex); - throw mre; - } + try + { + InputStream is; + String resourceName + = localizedName.replace('.', '/') + ".properties"; + if (classloader == null) + is = ClassLoader.getSystemResourceAsStream(resourceName); + else + is = classloader.getResourceAsStream(resourceName); + if (is != null) + bundle = new PropertyResourceBundle(is); + } + catch (IOException ex) + { + MissingResourceException mre = new MissingResourceException + ("Failed to load bundle: " + localizedName, localizedName, ""); + mre.initCause(ex); + throw mre; + } } return bundle; @@ -524,13 +524,13 @@ public abstract class ResourceBundle * @return the resource bundle if it was loaded, otherwise the backup */ private static ResourceBundle tryBundle(String baseName, Locale locale, - ClassLoader classLoader, - boolean wantBase) + ClassLoader classLoader, + boolean wantBase) { String language = locale.getLanguage(); String country = locale.getCountry(); String variant = locale.getVariant(); - + int baseLen = baseName.length(); // Build up a CPStringBuilder containing the complete bundle name, fully @@ -538,23 +538,23 @@ public abstract class ResourceBundle CPStringBuilder sb = new CPStringBuilder(baseLen + variant.length() + 7); sb.append(baseName); - + if (language.length() > 0) { - sb.append('_'); - sb.append(language); - - if (country.length() > 0) - { - sb.append('_'); - sb.append(country); - - if (variant.length() > 0) - { - sb.append('_'); - sb.append(variant); - } - } + sb.append('_'); + sb.append(language); + + if (country.length() > 0) + { + sb.append('_'); + sb.append(country); + + if (variant.length() > 0) + { + sb.append('_'); + sb.append(variant); + } + } } // Now try to load bundles, starting with the most specialized name. @@ -562,28 +562,28 @@ public abstract class ResourceBundle String bundleName = sb.toString(); ResourceBundle first = null; // The most specialized bundle. ResourceBundle last = null; // The least specialized bundle. - + while (true) { ResourceBundle foundBundle = tryBundle(bundleName, classLoader); - if (foundBundle != null) - { - if (first == null) - first = foundBundle; - if (last != null) - last.parent = foundBundle; - foundBundle.locale = locale; - last = foundBundle; - } - int idx = bundleName.lastIndexOf('_'); - // Try the non-localized base name only if we already have a - // localized child bundle, or wantBase is true. - if (idx > baseLen || (idx == baseLen && (first != null || wantBase))) - bundleName = bundleName.substring(0, idx); - else - break; + if (foundBundle != null) + { + if (first == null) + first = foundBundle; + if (last != null) + last.parent = foundBundle; + foundBundle.locale = locale; + last = foundBundle; + } + int idx = bundleName.lastIndexOf('_'); + // Try the non-localized base name only if we already have a + // localized child bundle, or wantBase is true. + if (idx > baseLen || (idx == baseLen && (first != null || wantBase))) + bundleName = bundleName.substring(0, idx); + else + break; } - + return first; } @@ -611,14 +611,14 @@ public abstract class ResourceBundle if (loader == null) throw new NullPointerException("The loader can not be null."); synchronized (ResourceBundle.class) - { - Iterator<BundleKey> iter = bundleCache.keySet().iterator(); - while (iter.hasNext()) - { - BundleKey key = iter.next(); - if (key.classLoader == loader) - iter.remove(); - } + { + Iterator<BundleKey> iter = bundleCache.keySet().iterator(); + while (iter.hasNext()) + { + BundleKey key = iter.next(); + if (key.classLoader == loader) + iter.remove(); + } } } diff --git a/libjava/classpath/java/util/ServiceConfigurationError.java b/libjava/classpath/java/util/ServiceConfigurationError.java index 1d006c8..40d744c2 100644 --- a/libjava/classpath/java/util/ServiceConfigurationError.java +++ b/libjava/classpath/java/util/ServiceConfigurationError.java @@ -50,14 +50,14 @@ package java.util; * <li>A listed class does not implement the service</li> * <li>A listed class can not be instantiated</li> * </ul> - * + * * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.6 */ public class ServiceConfigurationError extends Error { - + /** * Compatible with JDK 1.6 */ @@ -86,7 +86,7 @@ public class ServiceConfigurationError * or inappropriate. */ public ServiceConfigurationError(String message, - Throwable cause) + Throwable cause) { super(message,cause); } diff --git a/libjava/classpath/java/util/ServiceLoader.java b/libjava/classpath/java/util/ServiceLoader.java index 9935416..bcac070 100644 --- a/libjava/classpath/java/util/ServiceLoader.java +++ b/libjava/classpath/java/util/ServiceLoader.java @@ -149,37 +149,37 @@ public final class ServiceLoader<S> { return new Iterator<S>() { - /** - * The cache iterator. - */ - private Iterator<S> cacheIt = cache.iterator(); + /** + * The cache iterator. + */ + private Iterator<S> cacheIt = cache.iterator(); - public boolean hasNext() - { - if (cacheIt.hasNext()) - return true; - if (serviceIt == null) - serviceIt = - ServiceFactory.lookupProviders(spi, loader, true); - return serviceIt.hasNext(); - } + public boolean hasNext() + { + if (cacheIt.hasNext()) + return true; + if (serviceIt == null) + serviceIt = + ServiceFactory.lookupProviders(spi, loader, true); + return serviceIt.hasNext(); + } - public S next() - { - if (cacheIt.hasNext()) - return cacheIt.next(); - if (serviceIt == null) - serviceIt = - ServiceFactory.lookupProviders(spi, loader, true); - S nextService = serviceIt.next(); - cache.add(nextService); - return nextService; - } + public S next() + { + if (cacheIt.hasNext()) + return cacheIt.next(); + if (serviceIt == null) + serviceIt = + ServiceFactory.lookupProviders(spi, loader, true); + S nextService = serviceIt.next(); + cache.add(nextService); + return nextService; + } - public void remove() - { - throw new UnsupportedOperationException(); - } + public void remove() + { + throw new UnsupportedOperationException(); + } }; } @@ -196,7 +196,7 @@ public final class ServiceLoader<S> public static <S> ServiceLoader<S> load(Class<S> service) { return load(service, - Thread.currentThread().getContextClassLoader()); + Thread.currentThread().getContextClassLoader()); } /** @@ -215,7 +215,7 @@ public final class ServiceLoader<S> * @return a new {@link ServiceLoader} instance. */ public static <S> ServiceLoader<S> load(Class<S> service, - ClassLoader loader) + ClassLoader loader) { if (loader == null) loader = ClassLoader.getSystemClassLoader(); @@ -244,7 +244,7 @@ public final class ServiceLoader<S> * of the system class loader, as in * ClassLoader.getDefaultSystemClassLoader() */ return load(service, - ClassLoader.getSystemClassLoader().getParent()); + ClassLoader.getSystemClassLoader().getParent()); } /** @@ -258,8 +258,8 @@ public final class ServiceLoader<S> /** * Returns a textual representation of this - * {@link ServiceLoader}. - * + * {@link ServiceLoader}. + * * @return a textual representation of the * service loader. */ diff --git a/libjava/classpath/java/util/SimpleTimeZone.java b/libjava/classpath/java/util/SimpleTimeZone.java index 4f18401..6b3b55f 100644 --- a/libjava/classpath/java/util/SimpleTimeZone.java +++ b/libjava/classpath/java/util/SimpleTimeZone.java @@ -211,7 +211,7 @@ public class SimpleTimeZone extends TimeZone * @serial */ private byte[] monthLength = monthArr; - private static final byte[] monthArr = + private static final byte[] monthArr = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 @@ -382,7 +382,7 @@ public class SimpleTimeZone extends TimeZone int endTime, int endTimeMode, int dstSavings) { this(rawOffset, id, startMonth, startDayOfWeekInMonth, startDayOfWeek, - startTime, endMonth, endDayOfWeekInMonth, endDayOfWeek, endTime); + startTime, endMonth, endDayOfWeekInMonth, endDayOfWeek, endTime); if (startTimeMode < WALL_TIME || startTimeMode > UTC_TIME) throw new IllegalArgumentException("startTimeMode must be one of WALL_TIME, STANDARD_TIME, or UTC_TIME"); @@ -425,28 +425,28 @@ public class SimpleTimeZone extends TimeZone int daysInMonth = getDaysInMonth(month, 1); if (dayOfWeek == 0) { - if (day <= 0 || day > daysInMonth) - throw new IllegalArgumentException("day out of range"); - return DOM_MODE; + if (day <= 0 || day > daysInMonth) + throw new IllegalArgumentException("day out of range"); + return DOM_MODE; } else if (dayOfWeek > 0) { - if (Math.abs(day) > (daysInMonth + 6) / 7) - throw new IllegalArgumentException("dayOfWeekInMonth out of range"); - if (dayOfWeek > Calendar.SATURDAY) - throw new IllegalArgumentException("dayOfWeek out of range"); - return DOW_IN_MONTH_MODE; + if (Math.abs(day) > (daysInMonth + 6) / 7) + throw new IllegalArgumentException("dayOfWeekInMonth out of range"); + if (dayOfWeek > Calendar.SATURDAY) + throw new IllegalArgumentException("dayOfWeek out of range"); + return DOW_IN_MONTH_MODE; } else { - if (day == 0 || Math.abs(day) > daysInMonth) - throw new IllegalArgumentException("day out of range"); - if (dayOfWeek < -Calendar.SATURDAY) - throw new IllegalArgumentException("dayOfWeek out of range"); - if (day < 0) - return DOW_LE_DOM_MODE; - else - return DOW_GE_DOM_MODE; + if (day == 0 || Math.abs(day) > daysInMonth) + throw new IllegalArgumentException("day out of range"); + if (dayOfWeek < -Calendar.SATURDAY) + throw new IllegalArgumentException("dayOfWeek out of range"); + if (day < 0) + return DOW_LE_DOM_MODE; + else + return DOW_GE_DOM_MODE; } } @@ -641,45 +641,45 @@ public class SimpleTimeZone extends TimeZone int daylightSavings = 0; if (useDaylight && era == GregorianCalendar.AD && year >= startYear) { - int orig_year = year; - int time = startTime + (startTimeMode == UTC_TIME ? rawOffset : 0); - // This does only work for Gregorian calendars :-( - // This is mainly because setStartYear doesn't take an era. - boolean afterStart = ! isBefore(year, month, day, dayOfWeek, millis, - startMode, startMonth, startDay, - startDayOfWeek, time); - millis += dstSavings; - if (millis >= 24 * 60 * 60 * 1000) - { - millis -= 24 * 60 * 60 * 1000; - dayOfWeek = (dayOfWeek % 7) + 1; - if (++day > daysInMonth) - { - day = 1; - if (month++ == Calendar.DECEMBER) - { - month = Calendar.JANUARY; - year++; - } - } - } - time = endTime + (endTimeMode == UTC_TIME ? rawOffset : 0); - if (endTimeMode != WALL_TIME) - time += dstSavings; - boolean beforeEnd = isBefore(year, month, day, dayOfWeek, millis, - endMode, endMonth, endDay, endDayOfWeek, - time); - - if (year != orig_year) - afterStart = false; - if (startMonth < endMonth) - // use daylight savings, if the date is after the start of - // savings, and before the end of savings. - daylightSavings = afterStart && beforeEnd ? dstSavings : 0; - else - // use daylight savings, if the date is before the end of - // savings, or after the start of savings. - daylightSavings = beforeEnd || afterStart ? dstSavings : 0; + int orig_year = year; + int time = startTime + (startTimeMode == UTC_TIME ? rawOffset : 0); + // This does only work for Gregorian calendars :-( + // This is mainly because setStartYear doesn't take an era. + boolean afterStart = ! isBefore(year, month, day, dayOfWeek, millis, + startMode, startMonth, startDay, + startDayOfWeek, time); + millis += dstSavings; + if (millis >= 24 * 60 * 60 * 1000) + { + millis -= 24 * 60 * 60 * 1000; + dayOfWeek = (dayOfWeek % 7) + 1; + if (++day > daysInMonth) + { + day = 1; + if (month++ == Calendar.DECEMBER) + { + month = Calendar.JANUARY; + year++; + } + } + } + time = endTime + (endTimeMode == UTC_TIME ? rawOffset : 0); + if (endTimeMode != WALL_TIME) + time += dstSavings; + boolean beforeEnd = isBefore(year, month, day, dayOfWeek, millis, + endMode, endMonth, endDay, endDayOfWeek, + time); + + if (year != orig_year) + afterStart = false; + if (startMonth < endMonth) + // use daylight savings, if the date is after the start of + // savings, and before the end of savings. + daylightSavings = afterStart && beforeEnd ? dstSavings : 0; + else + // use daylight savings, if the date is before the end of + // savings, or after the start of savings. + daylightSavings = beforeEnd || afterStart ? dstSavings : 0; } return rawOffset + daylightSavings; } @@ -748,19 +748,19 @@ public class SimpleTimeZone extends TimeZone * @param year The year. */ private int getDaysInMonth(int month, int year) - { + { if (month == Calendar.FEBRUARY) { - if ((year & 3) != 0) - return 28; + if ((year & 3) != 0) + return 28; - // Assume default Gregorian cutover, - // all years prior to this must be Julian - if (year < 1582) - return 29; + // Assume default Gregorian cutover, + // all years prior to this must be Julian + if (year < 1582) + return 29; - // Gregorian rules - return ((year % 100) != 0 || (year % 400) == 0) ? 29 : 28; + // Gregorian rules + return ((year % 100) != 0 || (year % 400) == 0) ? 29 : 28; } else return monthArr[month]; @@ -800,66 +800,66 @@ public class SimpleTimeZone extends TimeZone switch (mode) { case DOM_MODE: - if (calDayOfMonth != day) - return calDayOfMonth < day; - break; + if (calDayOfMonth != day) + return calDayOfMonth < day; + break; case DOW_IN_MONTH_MODE: { - // This computes the day of month of the day of type - // "dayOfWeek" that lies in the same (sunday based) week as cal. - calDayOfMonth += (dayOfWeek - calDayOfWeek); - - // Now we convert it to 7 based number (to get a one based offset - // after dividing by 7). If we count from the end of the - // month, we get want a -7 based number counting the days from - // the end: - if (day < 0) - calDayOfMonth -= getDaysInMonth(calMonth, calYear) + 7; - else - calDayOfMonth += 6; - - // day > 0 day < 0 - // S M T W T F S S M T W T F S - // 7 8 9 10 11 12 -36-35-34-33-32-31 - // 13 14 15 16 17 18 19 -30-29-28-27-26-25-24 - // 20 21 22 23 24 25 26 -23-22-21-20-19-18-17 - // 27 28 29 30 31 32 33 -16-15-14-13-12-11-10 - // 34 35 36 -9 -8 -7 - // Now we calculate the day of week in month: - int week = calDayOfMonth / 7; - - // day > 0 day < 0 - // S M T W T F S S M T W T F S - // 1 1 1 1 1 1 -5 -5 -4 -4 -4 -4 - // 1 2 2 2 2 2 2 -4 -4 -4 -3 -3 -3 -3 - // 2 3 3 3 3 3 3 -3 -3 -3 -2 -2 -2 -2 - // 3 4 4 4 4 4 4 -2 -2 -2 -1 -1 -1 -1 - // 4 5 5 -1 -1 -1 - if (week != day) - return week < day; - - if (calDayOfWeek != dayOfWeek) - return calDayOfWeek < dayOfWeek; - - // daylight savings starts/ends on the given day. - break; + // This computes the day of month of the day of type + // "dayOfWeek" that lies in the same (sunday based) week as cal. + calDayOfMonth += (dayOfWeek - calDayOfWeek); + + // Now we convert it to 7 based number (to get a one based offset + // after dividing by 7). If we count from the end of the + // month, we get want a -7 based number counting the days from + // the end: + if (day < 0) + calDayOfMonth -= getDaysInMonth(calMonth, calYear) + 7; + else + calDayOfMonth += 6; + + // day > 0 day < 0 + // S M T W T F S S M T W T F S + // 7 8 9 10 11 12 -36-35-34-33-32-31 + // 13 14 15 16 17 18 19 -30-29-28-27-26-25-24 + // 20 21 22 23 24 25 26 -23-22-21-20-19-18-17 + // 27 28 29 30 31 32 33 -16-15-14-13-12-11-10 + // 34 35 36 -9 -8 -7 + // Now we calculate the day of week in month: + int week = calDayOfMonth / 7; + + // day > 0 day < 0 + // S M T W T F S S M T W T F S + // 1 1 1 1 1 1 -5 -5 -4 -4 -4 -4 + // 1 2 2 2 2 2 2 -4 -4 -4 -3 -3 -3 -3 + // 2 3 3 3 3 3 3 -3 -3 -3 -2 -2 -2 -2 + // 3 4 4 4 4 4 4 -2 -2 -2 -1 -1 -1 -1 + // 4 5 5 -1 -1 -1 + if (week != day) + return week < day; + + if (calDayOfWeek != dayOfWeek) + return calDayOfWeek < dayOfWeek; + + // daylight savings starts/ends on the given day. + break; } case DOW_LE_DOM_MODE: - // The greatest sunday before or equal December, 12 - // is the same as smallest sunday after or equal December, 6. - day = Math.abs(day) - 6; + // The greatest sunday before or equal December, 12 + // is the same as smallest sunday after or equal December, 6. + day = Math.abs(day) - 6; case DOW_GE_DOM_MODE: - // Calculate the day of month of the day of type - // "dayOfWeek" that lies before (or on) the given date. - calDayOfMonth -= (calDayOfWeek < dayOfWeek ? 7 : 0) + calDayOfWeek - - dayOfWeek; - if (calDayOfMonth < day) - return true; - if (calDayOfWeek != dayOfWeek || calDayOfMonth >= day + 7) - return false; - - // now we have the same day - break; + // Calculate the day of month of the day of type + // "dayOfWeek" that lies before (or on) the given date. + calDayOfMonth -= (calDayOfWeek < dayOfWeek ? 7 : 0) + calDayOfWeek + - dayOfWeek; + if (calDayOfMonth < day) + return true; + if (calDayOfWeek != dayOfWeek || calDayOfMonth >= day + 7) + return false; + + // now we have the same day + break; } // the millis decides: @@ -971,28 +971,28 @@ public class SimpleTimeZone extends TimeZone input.defaultReadObject(); if (serialVersionOnStream == 0) { - // initialize the new fields to default values. - dstSavings = 60 * 60 * 1000; - endMode = DOW_IN_MONTH_MODE; - startMode = DOW_IN_MONTH_MODE; - startTimeMode = WALL_TIME; - endTimeMode = WALL_TIME; - serialVersionOnStream = 2; + // initialize the new fields to default values. + dstSavings = 60 * 60 * 1000; + endMode = DOW_IN_MONTH_MODE; + startMode = DOW_IN_MONTH_MODE; + startTimeMode = WALL_TIME; + endTimeMode = WALL_TIME; + serialVersionOnStream = 2; } else { - int length = input.readInt(); - byte[] byteArray = new byte[length]; - input.read(byteArray, 0, length); - if (length >= 4) - { - // Lets hope that Sun does extensions to the serialized - // form in a sane manner. - startDay = byteArray[0]; - startDayOfWeek = byteArray[1]; - endDay = byteArray[2]; - endDayOfWeek = byteArray[3]; - } + int length = input.readInt(); + byte[] byteArray = new byte[length]; + input.read(byteArray, 0, length); + if (length >= 4) + { + // Lets hope that Sun does extensions to the serialized + // form in a sane manner. + startDay = byteArray[0]; + startDayOfWeek = byteArray[1]; + endDay = byteArray[2]; + endDayOfWeek = byteArray[3]; + } } } @@ -1025,22 +1025,22 @@ public class SimpleTimeZone extends TimeZone switch (startMode) { case DOM_MODE: - startDayOfWeek = Calendar.SUNDAY; // random day of week + startDayOfWeek = Calendar.SUNDAY; // random day of week // fall through case DOW_GE_DOM_MODE: case DOW_LE_DOM_MODE: - startDay = (startDay + 6) / 7; + startDay = (startDay + 6) / 7; } switch (endMode) { case DOM_MODE: - endDayOfWeek = Calendar.SUNDAY; + endDayOfWeek = Calendar.SUNDAY; // fall through case DOW_GE_DOM_MODE: case DOW_LE_DOM_MODE: - endDay = (endDay + 6) / 7; + endDay = (endDay + 6) / 7; } // the required part: diff --git a/libjava/classpath/java/util/StringTokenizer.java b/libjava/classpath/java/util/StringTokenizer.java index b230c73..d16ec9b 100644 --- a/libjava/classpath/java/util/StringTokenizer.java +++ b/libjava/classpath/java/util/StringTokenizer.java @@ -189,7 +189,7 @@ public class StringTokenizer implements Enumeration<Object> int start = pos; while (++pos < len && delim.indexOf(str.charAt(pos)) < 0) ; - + return str.substring(start, pos); } throw new NoSuchElementException(); diff --git a/libjava/classpath/java/util/TimeZone.java b/libjava/classpath/java/util/TimeZone.java index 681a6a2..86a6291 100644 --- a/libjava/classpath/java/util/TimeZone.java +++ b/libjava/classpath/java/util/TimeZone.java @@ -50,7 +50,7 @@ import java.text.DateFormatSymbols; /** * This class represents a time zone offset and handles daylight savings. - * + * * You can get the default time zone with <code>getDefault</code>. * This represents the time zone where program is running. * @@ -100,36 +100,36 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable private static synchronized TimeZone defaultZone() { /* Look up default timezone */ - if (defaultZone0 == null) + if (defaultZone0 == null) { - defaultZone0 = (TimeZone) AccessController.doPrivileged - (new PrivilegedAction() - { - public Object run() - { - TimeZone zone = null; - - // Prefer System property user.timezone. - String tzid = System.getProperty("user.timezone"); - if (tzid != null && !tzid.equals("")) - zone = getDefaultTimeZone(tzid); - - // Try platfom specific way. - if (zone == null) - zone = VMTimeZone.getDefaultTimeZoneId(); - - // Fall back on GMT. - if (zone == null) - zone = getTimeZone ("GMT"); - - return zone; - } - }); + defaultZone0 = (TimeZone) AccessController.doPrivileged + (new PrivilegedAction() + { + public Object run() + { + TimeZone zone = null; + + // Prefer System property user.timezone. + String tzid = System.getProperty("user.timezone"); + if (tzid != null && !tzid.equals("")) + zone = getDefaultTimeZone(tzid); + + // Try platfom specific way. + if (zone == null) + zone = VMTimeZone.getDefaultTimeZoneId(); + + // Fall back on GMT. + if (zone == null) + zone = getTimeZone ("GMT"); + + return zone; + } + }); } - - return defaultZone0; + + return defaultZone0; } - + private static final long serialVersionUID = 3581463369166924961L; /** @@ -149,756 +149,756 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable private static HashMap aliases0; /** - * HashMap for timezones by ID. + * HashMap for timezones by ID. */ private static HashMap timezones0; /* initialize this static field lazily to overhead if - * it is not needed: + * it is not needed: */ // Package-private to avoid a trampoline. static HashMap timezones() { - if (timezones0 == null) + if (timezones0 == null) { - HashMap timezones = new HashMap(); - timezones0 = timezones; - - zoneinfo_dir = SystemProperties.getProperty("gnu.java.util.zoneinfo.dir"); - if (zoneinfo_dir != null && !new File(zoneinfo_dir).isDirectory()) - zoneinfo_dir = null; - - if (zoneinfo_dir != null) - { - aliases0 = new HashMap(); - - // These deprecated aliases for JDK 1.1.x compatibility - // should take precedence over data files read from - // /usr/share/zoneinfo. - aliases0.put("ACT", "Australia/Darwin"); - aliases0.put("AET", "Australia/Sydney"); - aliases0.put("AGT", "America/Argentina/Buenos_Aires"); - aliases0.put("ART", "Africa/Cairo"); - aliases0.put("AST", "America/Juneau"); - aliases0.put("BST", "Asia/Colombo"); - aliases0.put("CAT", "Africa/Gaborone"); - aliases0.put("CNT", "America/St_Johns"); - aliases0.put("CST", "CST6CDT"); - aliases0.put("CTT", "Asia/Brunei"); - aliases0.put("EAT", "Indian/Comoro"); - aliases0.put("ECT", "CET"); - aliases0.put("EST", "EST5EDT"); - aliases0.put("EST5", "EST5EDT"); - aliases0.put("IET", "EST5EDT"); - aliases0.put("IST", "Asia/Calcutta"); - aliases0.put("JST", "Asia/Seoul"); - aliases0.put("MIT", "Pacific/Niue"); - aliases0.put("MST", "MST7MDT"); - aliases0.put("MST7", "MST7MDT"); - aliases0.put("NET", "Indian/Mauritius"); - aliases0.put("NST", "Pacific/Auckland"); - aliases0.put("PLT", "Indian/Kerguelen"); - aliases0.put("PNT", "MST7MDT"); - aliases0.put("PRT", "America/Anguilla"); - aliases0.put("PST", "PST8PDT"); - aliases0.put("SST", "Pacific/Ponape"); - aliases0.put("VST", "Asia/Bangkok"); - return timezones; - } - - TimeZone tz; - // Automatically generated by scripts/timezones.pl - // XXX - Should we read this data from a file? - tz = new SimpleTimeZone(-11000 * 3600, "MIT"); - timezones0.put("MIT", tz); - timezones0.put("Pacific/Apia", tz); - timezones0.put("Pacific/Midway", tz); - timezones0.put("Pacific/Niue", tz); - timezones0.put("Pacific/Pago_Pago", tz); - tz = new SimpleTimeZone - (-10000 * 3600, "America/Adak", - Calendar.MARCH, 2, Calendar.SUNDAY, 2000 * 3600, - Calendar.NOVEMBER, 1, Calendar.SUNDAY, 2000 * 3600); - timezones0.put("America/Adak", tz); - tz = new SimpleTimeZone(-10000 * 3600, "HST"); - timezones0.put("HST", tz); - timezones0.put("Pacific/Fakaofo", tz); - timezones0.put("Pacific/Honolulu", tz); - timezones0.put("Pacific/Johnston", tz); - timezones0.put("Pacific/Rarotonga", tz); - timezones0.put("Pacific/Tahiti", tz); - tz = new SimpleTimeZone(-9500 * 3600, "Pacific/Marquesas"); - timezones0.put("Pacific/Marquesas", tz); - tz = new SimpleTimeZone - (-9000 * 3600, "AST", - Calendar.MARCH, 2, Calendar.SUNDAY, 2000 * 3600, - Calendar.NOVEMBER, 1, Calendar.SUNDAY, 2000 * 3600); - timezones0.put("AST", tz); - timezones0.put("America/Anchorage", tz); - timezones0.put("America/Juneau", tz); - timezones0.put("America/Nome", tz); - timezones0.put("America/Yakutat", tz); - tz = new SimpleTimeZone(-9000 * 3600, "Pacific/Gambier"); - timezones0.put("Pacific/Gambier", tz); - tz = new SimpleTimeZone - (-8000 * 3600, "America/Tijuana", - Calendar.APRIL, 1, Calendar.SUNDAY, 2000 * 3600, - Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); - timezones0.put("America/Tijuana", tz); - tz = new SimpleTimeZone - (-8000 * 3600, "PST", - Calendar.MARCH, 2, Calendar.SUNDAY, 2000 * 3600, - Calendar.NOVEMBER, 1, Calendar.SUNDAY, 2000 * 3600); - timezones0.put("PST", tz); - timezones0.put("PST8PDT", tz); - timezones0.put("America/Dawson", tz); - timezones0.put("America/Los_Angeles", tz); - timezones0.put("America/Vancouver", tz); - timezones0.put("America/Whitehorse", tz); - timezones0.put("US/Pacific-New", tz); - tz = new SimpleTimeZone(-8000 * 3600, "Pacific/Pitcairn"); - timezones0.put("Pacific/Pitcairn", tz); - tz = new SimpleTimeZone - (-7000 * 3600, "America/Chihuahua", - Calendar.APRIL, 1, Calendar.SUNDAY, 2000 * 3600, - Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); - timezones0.put("America/Chihuahua", tz); - timezones0.put("America/Mazatlan", tz); - tz = new SimpleTimeZone(-7000 * 3600, "MST7"); - timezones0.put("MST7", tz); - timezones0.put("PNT", tz); - timezones0.put("America/Dawson_Creek", tz); - timezones0.put("America/Hermosillo", tz); - timezones0.put("America/Phoenix", tz); - tz = new SimpleTimeZone - (-7000 * 3600, "MST", - Calendar.MARCH, 2, Calendar.SUNDAY, 2000 * 3600, - Calendar.NOVEMBER, 1, Calendar.SUNDAY, 2000 * 3600); - timezones0.put("MST", tz); - timezones0.put("MST7MDT", tz); - timezones0.put("America/Boise", tz); - timezones0.put("America/Cambridge_Bay", tz); - timezones0.put("America/Denver", tz); - timezones0.put("America/Edmonton", tz); - timezones0.put("America/Inuvik", tz); - timezones0.put("America/Shiprock", tz); - timezones0.put("America/Yellowknife", tz); - tz = new SimpleTimeZone - (-6000 * 3600, "America/Cancun", - Calendar.APRIL, 1, Calendar.SUNDAY, 2000 * 3600, - Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); - timezones0.put("America/Cancun", tz); - timezones0.put("America/Merida", tz); - timezones0.put("America/Mexico_City", tz); - timezones0.put("America/Monterrey", tz); - tz = new SimpleTimeZone(-6000 * 3600, "America/Belize"); - timezones0.put("America/Belize", tz); - timezones0.put("America/Costa_Rica", tz); - timezones0.put("America/El_Salvador", tz); - timezones0.put("America/Guatemala", tz); - timezones0.put("America/Managua", tz); - timezones0.put("America/Regina", tz); - timezones0.put("America/Swift_Current", tz); - timezones0.put("America/Tegucigalpa", tz); - timezones0.put("Pacific/Galapagos", tz); - tz = new SimpleTimeZone - (-6000 * 3600, "CST", - Calendar.MARCH, 2, Calendar.SUNDAY, 2000 * 3600, - Calendar.NOVEMBER, 1, Calendar.SUNDAY, 2000 * 3600); - timezones0.put("CST", tz); - timezones0.put("CST6CDT", tz); - timezones0.put("America/Chicago", tz); - timezones0.put("America/Indiana/Knox", tz); - timezones0.put("America/Indiana/Petersburg", tz); - timezones0.put("America/Indiana/Vincennes", tz); - timezones0.put("America/Menominee", tz); - timezones0.put("America/North_Dakota/Center", tz); - timezones0.put("America/North_Dakota/New_Salem", tz); - timezones0.put("America/Rainy_River", tz); - timezones0.put("America/Rankin_Inlet", tz); - timezones0.put("America/Winnipeg", tz); - tz = new SimpleTimeZone - (-6000 * 3600, "Pacific/Easter", - Calendar.OCTOBER, 2, Calendar.SATURDAY, 22000 * 3600, - Calendar.MARCH, 2, Calendar.SATURDAY, 22000 * 3600); - timezones0.put("Pacific/Easter", tz); - tz = new SimpleTimeZone(-5000 * 3600, "EST5"); - timezones0.put("EST5", tz); - timezones0.put("IET", tz); - timezones0.put("America/Atikokan", tz); - timezones0.put("America/Bogota", tz); - timezones0.put("America/Cayman", tz); - timezones0.put("America/Eirunepe", tz); - timezones0.put("America/Guayaquil", tz); - timezones0.put("America/Jamaica", tz); - timezones0.put("America/Lima", tz); - timezones0.put("America/Panama", tz); - timezones0.put("America/Rio_Branco", tz); - tz = new SimpleTimeZone - (-5000 * 3600, "America/Havana", - Calendar.APRIL, 1, Calendar.SUNDAY, 0 * 3600, - Calendar.OCTOBER, -1, Calendar.SUNDAY, 1000 * 3600); - timezones0.put("America/Havana", tz); - tz = new SimpleTimeZone - (-5000 * 3600, "America/Grand_Turk", - Calendar.APRIL, 1, Calendar.SUNDAY, 0 * 3600, - Calendar.OCTOBER, -1, Calendar.SUNDAY, 0 * 3600); - timezones0.put("America/Grand_Turk", tz); - timezones0.put("America/Port-au-Prince", tz); - tz = new SimpleTimeZone - (-5000 * 3600, "EST", - Calendar.MARCH, 2, Calendar.SUNDAY, 2000 * 3600, - Calendar.NOVEMBER, 1, Calendar.SUNDAY, 2000 * 3600); - timezones0.put("EST", tz); - timezones0.put("EST5EDT", tz); - timezones0.put("America/Detroit", tz); - timezones0.put("America/Indiana/Indianapolis", tz); - timezones0.put("America/Indiana/Marengo", tz); - timezones0.put("America/Indiana/Vevay", tz); - timezones0.put("America/Iqaluit", tz); - timezones0.put("America/Kentucky/Louisville", tz); - timezones0.put("America/Kentucky/Monticello", tz); - timezones0.put("America/Montreal", tz); - timezones0.put("America/Nassau", tz); - timezones0.put("America/New_York", tz); - timezones0.put("America/Nipigon", tz); - timezones0.put("America/Pangnirtung", tz); - timezones0.put("America/Thunder_Bay", tz); - timezones0.put("America/Toronto", tz); - tz = new SimpleTimeZone - (-4000 * 3600, "America/Asuncion", - Calendar.OCTOBER, 3, Calendar.SUNDAY, 0 * 3600, - Calendar.MARCH, 2, Calendar.SUNDAY, 0 * 3600); - timezones0.put("America/Asuncion", tz); - tz = new SimpleTimeZone(-4000 * 3600, "PRT"); - timezones0.put("PRT", tz); - timezones0.put("America/Anguilla", tz); - timezones0.put("America/Antigua", tz); - timezones0.put("America/Aruba", tz); - timezones0.put("America/Barbados", tz); - timezones0.put("America/Blanc-Sablon", tz); - timezones0.put("America/Boa_Vista", tz); - timezones0.put("America/Caracas", tz); - timezones0.put("America/Curacao", tz); - timezones0.put("America/Dominica", tz); - timezones0.put("America/Grenada", tz); - timezones0.put("America/Guadeloupe", tz); - timezones0.put("America/Guyana", tz); - timezones0.put("America/La_Paz", tz); - timezones0.put("America/Manaus", tz); - timezones0.put("America/Martinique", tz); - timezones0.put("America/Montserrat", tz); - timezones0.put("America/Port_of_Spain", tz); - timezones0.put("America/Porto_Velho", tz); - timezones0.put("America/Puerto_Rico", tz); - timezones0.put("America/Santo_Domingo", tz); - timezones0.put("America/St_Kitts", tz); - timezones0.put("America/St_Lucia", tz); - timezones0.put("America/St_Thomas", tz); - timezones0.put("America/St_Vincent", tz); - timezones0.put("America/Tortola", tz); - tz = new SimpleTimeZone - (-4000 * 3600, "America/Campo_Grande", - Calendar.NOVEMBER, 1, Calendar.SUNDAY, 0 * 3600, - Calendar.FEBRUARY, -1, Calendar.SUNDAY, 0 * 3600); - timezones0.put("America/Campo_Grande", tz); - timezones0.put("America/Cuiaba", tz); - tz = new SimpleTimeZone - (-4000 * 3600, "America/Goose_Bay", - Calendar.MARCH, 2, Calendar.SUNDAY, 60000, - Calendar.NOVEMBER, 1, Calendar.SUNDAY, 60000); - timezones0.put("America/Goose_Bay", tz); - tz = new SimpleTimeZone - (-4000 * 3600, "America/Glace_Bay", - Calendar.MARCH, 2, Calendar.SUNDAY, 2000 * 3600, - Calendar.NOVEMBER, 1, Calendar.SUNDAY, 2000 * 3600); - timezones0.put("America/Glace_Bay", tz); - timezones0.put("America/Halifax", tz); - timezones0.put("America/Moncton", tz); - timezones0.put("America/Thule", tz); - timezones0.put("Atlantic/Bermuda", tz); - tz = new SimpleTimeZone - (-4000 * 3600, "America/Santiago", - Calendar.OCTOBER, 9, -Calendar.SUNDAY, 0 * 3600, - Calendar.MARCH, 9, -Calendar.SUNDAY, 0 * 3600); - timezones0.put("America/Santiago", tz); - timezones0.put("Antarctica/Palmer", tz); - tz = new SimpleTimeZone - (-4000 * 3600, "Atlantic/Stanley", - Calendar.SEPTEMBER, 1, Calendar.SUNDAY, 2000 * 3600, - Calendar.APRIL, 3, Calendar.SUNDAY, 2000 * 3600); - timezones0.put("Atlantic/Stanley", tz); - tz = new SimpleTimeZone - (-3500 * 3600, "CNT", - Calendar.MARCH, 2, Calendar.SUNDAY, 60000, - Calendar.NOVEMBER, 1, Calendar.SUNDAY, 60000); - timezones0.put("CNT", tz); - timezones0.put("America/St_Johns", tz); - tz = new SimpleTimeZone - (-3000 * 3600, "America/Godthab", - Calendar.MARCH, 30, -Calendar.SATURDAY, 22000 * 3600, - Calendar.OCTOBER, 30, -Calendar.SATURDAY, 23000 * 3600); - timezones0.put("America/Godthab", tz); - tz = new SimpleTimeZone - (-3000 * 3600, "America/Miquelon", - Calendar.MARCH, 2, Calendar.SUNDAY, 2000 * 3600, - Calendar.NOVEMBER, 1, Calendar.SUNDAY, 2000 * 3600); - timezones0.put("America/Miquelon", tz); - tz = new SimpleTimeZone - (-3000 * 3600, "America/Montevideo", - Calendar.OCTOBER, 1, Calendar.SUNDAY, 2000 * 3600, - Calendar.MARCH, 2, Calendar.SUNDAY, 2000 * 3600); - timezones0.put("America/Montevideo", tz); - tz = new SimpleTimeZone - (-3000 * 3600, "America/Sao_Paulo", - Calendar.NOVEMBER, 1, Calendar.SUNDAY, 0 * 3600, - Calendar.FEBRUARY, -1, Calendar.SUNDAY, 0 * 3600); - timezones0.put("America/Sao_Paulo", tz); - tz = new SimpleTimeZone(-3000 * 3600, "AGT"); - timezones0.put("AGT", tz); - timezones0.put("America/Araguaina", tz); - timezones0.put("America/Argentina/Buenos_Aires", tz); - timezones0.put("America/Argentina/Catamarca", tz); - timezones0.put("America/Argentina/Cordoba", tz); - timezones0.put("America/Argentina/Jujuy", tz); - timezones0.put("America/Argentina/La_Rioja", tz); - timezones0.put("America/Argentina/Mendoza", tz); - timezones0.put("America/Argentina/Rio_Gallegos", tz); - timezones0.put("America/Argentina/San_Juan", tz); - timezones0.put("America/Argentina/Tucuman", tz); - timezones0.put("America/Argentina/Ushuaia", tz); - timezones0.put("America/Bahia", tz); - timezones0.put("America/Belem", tz); - timezones0.put("America/Cayenne", tz); - timezones0.put("America/Fortaleza", tz); - timezones0.put("America/Maceio", tz); - timezones0.put("America/Paramaribo", tz); - timezones0.put("America/Recife", tz); - timezones0.put("Antarctica/Rothera", tz); - tz = new SimpleTimeZone(-2000 * 3600, "America/Noronha"); - timezones0.put("America/Noronha", tz); - timezones0.put("Atlantic/South_Georgia", tz); - tz = new SimpleTimeZone - (-1000 * 3600, "America/Scoresbysund", - Calendar.MARCH, -1, Calendar.SUNDAY, 0 * 3600, - Calendar.OCTOBER, -1, Calendar.SUNDAY, 1000 * 3600); - timezones0.put("America/Scoresbysund", tz); - timezones0.put("Atlantic/Azores", tz); - tz = new SimpleTimeZone(-1000 * 3600, "Atlantic/Cape_Verde"); - timezones0.put("Atlantic/Cape_Verde", tz); - tz = new SimpleTimeZone(0 * 3600, "GMT"); - timezones0.put("GMT", tz); - timezones0.put("UTC", tz); - timezones0.put("Africa/Abidjan", tz); - timezones0.put("Africa/Accra", tz); - timezones0.put("Africa/Bamako", tz); - timezones0.put("Africa/Banjul", tz); - timezones0.put("Africa/Bissau", tz); - timezones0.put("Africa/Casablanca", tz); - timezones0.put("Africa/Conakry", tz); - timezones0.put("Africa/Dakar", tz); - timezones0.put("Africa/El_Aaiun", tz); - timezones0.put("Africa/Freetown", tz); - timezones0.put("Africa/Lome", tz); - timezones0.put("Africa/Monrovia", tz); - timezones0.put("Africa/Nouakchott", tz); - timezones0.put("Africa/Ouagadougou", tz); - timezones0.put("Africa/Sao_Tome", tz); - timezones0.put("America/Danmarkshavn", tz); - timezones0.put("Atlantic/Reykjavik", tz); - timezones0.put("Atlantic/St_Helena", tz); - tz = new SimpleTimeZone - (0 * 3600, "WET", - Calendar.MARCH, -1, Calendar.SUNDAY, 1000 * 3600, - Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); - timezones0.put("WET", tz); - timezones0.put("Atlantic/Canary", tz); - timezones0.put("Atlantic/Faroe", tz); - timezones0.put("Atlantic/Madeira", tz); - timezones0.put("Europe/Dublin", tz); - timezones0.put("Europe/Guernsey", tz); - timezones0.put("Europe/Isle_of_Man", tz); - timezones0.put("Europe/Jersey", tz); - timezones0.put("Europe/Lisbon", tz); - timezones0.put("Europe/London", tz); - tz = new SimpleTimeZone(1000 * 3600, "Africa/Algiers"); - timezones0.put("Africa/Algiers", tz); - timezones0.put("Africa/Bangui", tz); - timezones0.put("Africa/Brazzaville", tz); - timezones0.put("Africa/Douala", tz); - timezones0.put("Africa/Kinshasa", tz); - timezones0.put("Africa/Lagos", tz); - timezones0.put("Africa/Libreville", tz); - timezones0.put("Africa/Luanda", tz); - timezones0.put("Africa/Malabo", tz); - timezones0.put("Africa/Ndjamena", tz); - timezones0.put("Africa/Niamey", tz); - timezones0.put("Africa/Porto-Novo", tz); - tz = new SimpleTimeZone - (1000 * 3600, "Africa/Windhoek", - Calendar.SEPTEMBER, 1, Calendar.SUNDAY, 2000 * 3600, - Calendar.APRIL, 1, Calendar.SUNDAY, 2000 * 3600); - timezones0.put("Africa/Windhoek", tz); - tz = new SimpleTimeZone - (1000 * 3600, "CET", - Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, - Calendar.OCTOBER, -1, Calendar.SUNDAY, 3000 * 3600); - timezones0.put("CET", tz); - timezones0.put("ECT", tz); - timezones0.put("MET", tz); - timezones0.put("Africa/Ceuta", tz); - timezones0.put("Africa/Tunis", tz); - timezones0.put("Arctic/Longyearbyen", tz); - timezones0.put("Atlantic/Jan_Mayen", tz); - timezones0.put("Europe/Amsterdam", tz); - timezones0.put("Europe/Andorra", tz); - timezones0.put("Europe/Belgrade", tz); - timezones0.put("Europe/Berlin", tz); - timezones0.put("Europe/Bratislava", tz); - timezones0.put("Europe/Brussels", tz); - timezones0.put("Europe/Budapest", tz); - timezones0.put("Europe/Copenhagen", tz); - timezones0.put("Europe/Gibraltar", tz); - timezones0.put("Europe/Ljubljana", tz); - timezones0.put("Europe/Luxembourg", tz); - timezones0.put("Europe/Madrid", tz); - timezones0.put("Europe/Malta", tz); - timezones0.put("Europe/Monaco", tz); - timezones0.put("Europe/Oslo", tz); - timezones0.put("Europe/Paris", tz); - timezones0.put("Europe/Podgorica", tz); - timezones0.put("Europe/Prague", tz); - timezones0.put("Europe/Rome", tz); - timezones0.put("Europe/San_Marino", tz); - timezones0.put("Europe/Sarajevo", tz); - timezones0.put("Europe/Skopje", tz); - timezones0.put("Europe/Stockholm", tz); - timezones0.put("Europe/Tirane", tz); - timezones0.put("Europe/Vaduz", tz); - timezones0.put("Europe/Vatican", tz); - timezones0.put("Europe/Vienna", tz); - timezones0.put("Europe/Warsaw", tz); - timezones0.put("Europe/Zagreb", tz); - timezones0.put("Europe/Zurich", tz); - tz = new SimpleTimeZone - (2000 * 3600, "ART", - Calendar.APRIL, -1, Calendar.FRIDAY, 0 * 3600, - Calendar.SEPTEMBER, -1, Calendar.THURSDAY, 24000 * 3600); - timezones0.put("ART", tz); - timezones0.put("Africa/Cairo", tz); - tz = new SimpleTimeZone(2000 * 3600, "CAT"); - timezones0.put("CAT", tz); - timezones0.put("Africa/Blantyre", tz); - timezones0.put("Africa/Bujumbura", tz); - timezones0.put("Africa/Gaborone", tz); - timezones0.put("Africa/Harare", tz); - timezones0.put("Africa/Johannesburg", tz); - timezones0.put("Africa/Kigali", tz); - timezones0.put("Africa/Lubumbashi", tz); - timezones0.put("Africa/Lusaka", tz); - timezones0.put("Africa/Maputo", tz); - timezones0.put("Africa/Maseru", tz); - timezones0.put("Africa/Mbabane", tz); - timezones0.put("Africa/Tripoli", tz); - timezones0.put("Asia/Jerusalem", tz); - tz = new SimpleTimeZone - (2000 * 3600, "Asia/Amman", - Calendar.MARCH, -1, Calendar.THURSDAY, 0 * 3600, - Calendar.OCTOBER, -1, Calendar.FRIDAY, 1000 * 3600); - timezones0.put("Asia/Amman", tz); - tz = new SimpleTimeZone - (2000 * 3600, "Asia/Beirut", - Calendar.MARCH, -1, Calendar.SUNDAY, 0 * 3600, - Calendar.OCTOBER, -1, Calendar.SUNDAY, 0 * 3600); - timezones0.put("Asia/Beirut", tz); - tz = new SimpleTimeZone - (2000 * 3600, "Asia/Damascus", - Calendar.APRIL, 1, 0, 0 * 3600, - Calendar.OCTOBER, 1, 0, 0 * 3600); - timezones0.put("Asia/Damascus", tz); - tz = new SimpleTimeZone - (2000 * 3600, "Asia/Gaza", - Calendar.APRIL, 1, 0, 0 * 3600, - Calendar.OCTOBER, 3, Calendar.FRIDAY, 0 * 3600); - timezones0.put("Asia/Gaza", tz); - tz = new SimpleTimeZone - (2000 * 3600, "EET", - Calendar.MARCH, -1, Calendar.SUNDAY, 3000 * 3600, - Calendar.OCTOBER, -1, Calendar.SUNDAY, 4000 * 3600); - timezones0.put("EET", tz); - timezones0.put("Asia/Istanbul", tz); - timezones0.put("Asia/Nicosia", tz); - timezones0.put("Europe/Athens", tz); - timezones0.put("Europe/Bucharest", tz); - timezones0.put("Europe/Chisinau", tz); - timezones0.put("Europe/Helsinki", tz); - timezones0.put("Europe/Istanbul", tz); - timezones0.put("Europe/Kiev", tz); - timezones0.put("Europe/Mariehamn", tz); - timezones0.put("Europe/Nicosia", tz); - timezones0.put("Europe/Riga", tz); - timezones0.put("Europe/Simferopol", tz); - timezones0.put("Europe/Sofia", tz); - timezones0.put("Europe/Tallinn", tz); - timezones0.put("Europe/Uzhgorod", tz); - timezones0.put("Europe/Vilnius", tz); - timezones0.put("Europe/Zaporozhye", tz); - tz = new SimpleTimeZone - (2000 * 3600, "Europe/Kaliningrad", - Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, - Calendar.OCTOBER, -1, Calendar.SUNDAY, 3000 * 3600); - timezones0.put("Europe/Kaliningrad", tz); - timezones0.put("Europe/Minsk", tz); - tz = new SimpleTimeZone - (3000 * 3600, "Asia/Baghdad", - Calendar.APRIL, 1, 0, 3000 * 3600, - Calendar.OCTOBER, 1, 0, 4000 * 3600); - timezones0.put("Asia/Baghdad", tz); - tz = new SimpleTimeZone - (3000 * 3600, "Europe/Moscow", - Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, - Calendar.OCTOBER, -1, Calendar.SUNDAY, 3000 * 3600); - timezones0.put("Europe/Moscow", tz); - timezones0.put("Europe/Volgograd", tz); - tz = new SimpleTimeZone(3000 * 3600, "EAT"); - timezones0.put("EAT", tz); - timezones0.put("Africa/Addis_Ababa", tz); - timezones0.put("Africa/Asmara", tz); - timezones0.put("Africa/Dar_es_Salaam", tz); - timezones0.put("Africa/Djibouti", tz); - timezones0.put("Africa/Kampala", tz); - timezones0.put("Africa/Khartoum", tz); - timezones0.put("Africa/Mogadishu", tz); - timezones0.put("Africa/Nairobi", tz); - timezones0.put("Antarctica/Syowa", tz); - timezones0.put("Asia/Aden", tz); - timezones0.put("Asia/Bahrain", tz); - timezones0.put("Asia/Kuwait", tz); - timezones0.put("Asia/Qatar", tz); - timezones0.put("Asia/Riyadh", tz); - timezones0.put("Indian/Antananarivo", tz); - timezones0.put("Indian/Comoro", tz); - timezones0.put("Indian/Mayotte", tz); - tz = new SimpleTimeZone(3500 * 3600, "Asia/Tehran"); - timezones0.put("Asia/Tehran", tz); - tz = new SimpleTimeZone - (4000 * 3600, "Asia/Baku", - Calendar.MARCH, -1, Calendar.SUNDAY, 4000 * 3600, - Calendar.OCTOBER, -1, Calendar.SUNDAY, 5000 * 3600); - timezones0.put("Asia/Baku", tz); - tz = new SimpleTimeZone - (4000 * 3600, "Asia/Yerevan", - Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, - Calendar.OCTOBER, -1, Calendar.SUNDAY, 3000 * 3600); - timezones0.put("Asia/Yerevan", tz); - timezones0.put("Europe/Samara", tz); - tz = new SimpleTimeZone(4000 * 3600, "NET"); - timezones0.put("NET", tz); - timezones0.put("Asia/Dubai", tz); - timezones0.put("Asia/Muscat", tz); - timezones0.put("Asia/Tbilisi", tz); - timezones0.put("Indian/Mahe", tz); - timezones0.put("Indian/Mauritius", tz); - timezones0.put("Indian/Reunion", tz); - tz = new SimpleTimeZone(4500 * 3600, "Asia/Kabul"); - timezones0.put("Asia/Kabul", tz); - tz = new SimpleTimeZone - (5000 * 3600, "Asia/Yekaterinburg", - Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, - Calendar.OCTOBER, -1, Calendar.SUNDAY, 3000 * 3600); - timezones0.put("Asia/Yekaterinburg", tz); - tz = new SimpleTimeZone(5000 * 3600, "PLT"); - timezones0.put("PLT", tz); - timezones0.put("Asia/Aqtau", tz); - timezones0.put("Asia/Aqtobe", tz); - timezones0.put("Asia/Ashgabat", tz); - timezones0.put("Asia/Dushanbe", tz); - timezones0.put("Asia/Karachi", tz); - timezones0.put("Asia/Oral", tz); - timezones0.put("Asia/Samarkand", tz); - timezones0.put("Asia/Tashkent", tz); - timezones0.put("Indian/Kerguelen", tz); - timezones0.put("Indian/Maldives", tz); - tz = new SimpleTimeZone(5500 * 3600, "BST"); - timezones0.put("BST", tz); - timezones0.put("IST", tz); - timezones0.put("Asia/Calcutta", tz); - timezones0.put("Asia/Colombo", tz); - tz = new SimpleTimeZone(5750 * 3600, "Asia/Katmandu"); - timezones0.put("Asia/Katmandu", tz); - tz = new SimpleTimeZone(6000 * 3600, "Antarctica/Mawson"); - timezones0.put("Antarctica/Mawson", tz); - timezones0.put("Antarctica/Vostok", tz); - timezones0.put("Asia/Almaty", tz); - timezones0.put("Asia/Bishkek", tz); - timezones0.put("Asia/Dhaka", tz); - timezones0.put("Asia/Qyzylorda", tz); - timezones0.put("Asia/Thimphu", tz); - timezones0.put("Indian/Chagos", tz); - tz = new SimpleTimeZone - (6000 * 3600, "Asia/Novosibirsk", - Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, - Calendar.OCTOBER, -1, Calendar.SUNDAY, 3000 * 3600); - timezones0.put("Asia/Novosibirsk", tz); - timezones0.put("Asia/Omsk", tz); - tz = new SimpleTimeZone(6500 * 3600, "Asia/Rangoon"); - timezones0.put("Asia/Rangoon", tz); - timezones0.put("Indian/Cocos", tz); - tz = new SimpleTimeZone(7000 * 3600, "VST"); - timezones0.put("VST", tz); - timezones0.put("Antarctica/Davis", tz); - timezones0.put("Asia/Bangkok", tz); - timezones0.put("Asia/Jakarta", tz); - timezones0.put("Asia/Phnom_Penh", tz); - timezones0.put("Asia/Pontianak", tz); - timezones0.put("Asia/Saigon", tz); - timezones0.put("Asia/Vientiane", tz); - timezones0.put("Indian/Christmas", tz); - tz = new SimpleTimeZone - (7000 * 3600, "Asia/Hovd", - Calendar.MARCH, -1, Calendar.SATURDAY, 2000 * 3600, - Calendar.SEPTEMBER, -1, Calendar.SATURDAY, 2000 * 3600); - timezones0.put("Asia/Hovd", tz); - tz = new SimpleTimeZone - (7000 * 3600, "Asia/Krasnoyarsk", - Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, - Calendar.OCTOBER, -1, Calendar.SUNDAY, 3000 * 3600); - timezones0.put("Asia/Krasnoyarsk", tz); - tz = new SimpleTimeZone(8000 * 3600, "CTT"); - timezones0.put("CTT", tz); - timezones0.put("Antarctica/Casey", tz); - timezones0.put("Asia/Brunei", tz); - timezones0.put("Asia/Chongqing", tz); - timezones0.put("Asia/Harbin", tz); - timezones0.put("Asia/Hong_Kong", tz); - timezones0.put("Asia/Kashgar", tz); - timezones0.put("Asia/Kuala_Lumpur", tz); - timezones0.put("Asia/Kuching", tz); - timezones0.put("Asia/Macau", tz); - timezones0.put("Asia/Makassar", tz); - timezones0.put("Asia/Manila", tz); - timezones0.put("Asia/Shanghai", tz); - timezones0.put("Asia/Singapore", tz); - timezones0.put("Asia/Taipei", tz); - timezones0.put("Asia/Urumqi", tz); - timezones0.put("Australia/Perth", tz); - tz = new SimpleTimeZone - (8000 * 3600, "Asia/Irkutsk", - Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, - Calendar.OCTOBER, -1, Calendar.SUNDAY, 3000 * 3600); - timezones0.put("Asia/Irkutsk", tz); - tz = new SimpleTimeZone - (8000 * 3600, "Asia/Ulaanbaatar", - Calendar.MARCH, -1, Calendar.SATURDAY, 2000 * 3600, - Calendar.SEPTEMBER, -1, Calendar.SATURDAY, 2000 * 3600); - timezones0.put("Asia/Ulaanbaatar", tz); - tz = new SimpleTimeZone(8750 * 3600, "Australia/Eucla"); - timezones0.put("Australia/Eucla", tz); - tz = new SimpleTimeZone - (9000 * 3600, "Asia/Choibalsan", - Calendar.MARCH, -1, Calendar.SATURDAY, 2000 * 3600, - Calendar.SEPTEMBER, -1, Calendar.SATURDAY, 2000 * 3600); - timezones0.put("Asia/Choibalsan", tz); - tz = new SimpleTimeZone(9000 * 3600, "JST"); - timezones0.put("JST", tz); - timezones0.put("Asia/Dili", tz); - timezones0.put("Asia/Jayapura", tz); - timezones0.put("Asia/Pyongyang", tz); - timezones0.put("Asia/Seoul", tz); - timezones0.put("Asia/Tokyo", tz); - timezones0.put("Pacific/Palau", tz); - tz = new SimpleTimeZone - (9000 * 3600, "Asia/Yakutsk", - Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, - Calendar.OCTOBER, -1, Calendar.SUNDAY, 3000 * 3600); - timezones0.put("Asia/Yakutsk", tz); - tz = new SimpleTimeZone - (9500 * 3600, "Australia/Adelaide", - Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600, - Calendar.MARCH, -1, Calendar.SUNDAY, 3000 * 3600); - timezones0.put("Australia/Adelaide", tz); - timezones0.put("Australia/Broken_Hill", tz); - tz = new SimpleTimeZone(9500 * 3600, "ACT"); - timezones0.put("ACT", tz); - timezones0.put("Australia/Darwin", tz); - tz = new SimpleTimeZone(10000 * 3600, "Antarctica/DumontDUrville"); - timezones0.put("Antarctica/DumontDUrville", tz); - timezones0.put("Australia/Brisbane", tz); - timezones0.put("Australia/Lindeman", tz); - timezones0.put("Pacific/Guam", tz); - timezones0.put("Pacific/Port_Moresby", tz); - timezones0.put("Pacific/Saipan", tz); - timezones0.put("Pacific/Truk", tz); - tz = new SimpleTimeZone - (10000 * 3600, "Asia/Sakhalin", - Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, - Calendar.OCTOBER, -1, Calendar.SUNDAY, 3000 * 3600); - timezones0.put("Asia/Sakhalin", tz); - timezones0.put("Asia/Vladivostok", tz); - tz = new SimpleTimeZone - (10000 * 3600, "Australia/Currie", - Calendar.OCTOBER, 1, Calendar.SUNDAY, 2000 * 3600, - Calendar.MARCH, -1, Calendar.SUNDAY, 3000 * 3600); - timezones0.put("Australia/Currie", tz); - timezones0.put("Australia/Hobart", tz); - tz = new SimpleTimeZone - (10000 * 3600, "AET", - Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600, - Calendar.MARCH, -1, Calendar.SUNDAY, 3000 * 3600); - timezones0.put("AET", tz); - timezones0.put("Australia/Melbourne", tz); - timezones0.put("Australia/Sydney", tz); - tz = new SimpleTimeZone - (10500 * 3600, "Australia/Lord_Howe", - Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600, - Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, 500 * 3600); - timezones0.put("Australia/Lord_Howe", tz); - tz = new SimpleTimeZone - (11000 * 3600, "Asia/Magadan", - Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, - Calendar.OCTOBER, -1, Calendar.SUNDAY, 3000 * 3600); - timezones0.put("Asia/Magadan", tz); - tz = new SimpleTimeZone(11000 * 3600, "SST"); - timezones0.put("SST", tz); - timezones0.put("Pacific/Efate", tz); - timezones0.put("Pacific/Guadalcanal", tz); - timezones0.put("Pacific/Kosrae", tz); - timezones0.put("Pacific/Noumea", tz); - timezones0.put("Pacific/Ponape", tz); - tz = new SimpleTimeZone(11500 * 3600, "Pacific/Norfolk"); - timezones0.put("Pacific/Norfolk", tz); - tz = new SimpleTimeZone - (12000 * 3600, "NST", - Calendar.OCTOBER, 1, Calendar.SUNDAY, 2000 * 3600, - Calendar.MARCH, 3, Calendar.SUNDAY, 3000 * 3600); - timezones0.put("NST", tz); - timezones0.put("Antarctica/McMurdo", tz); - timezones0.put("Antarctica/South_Pole", tz); - timezones0.put("Pacific/Auckland", tz); - tz = new SimpleTimeZone - (12000 * 3600, "Asia/Anadyr", - Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, - Calendar.OCTOBER, -1, Calendar.SUNDAY, 3000 * 3600); - timezones0.put("Asia/Anadyr", tz); - timezones0.put("Asia/Kamchatka", tz); - tz = new SimpleTimeZone(12000 * 3600, "Pacific/Fiji"); - timezones0.put("Pacific/Fiji", tz); - timezones0.put("Pacific/Funafuti", tz); - timezones0.put("Pacific/Kwajalein", tz); - timezones0.put("Pacific/Majuro", tz); - timezones0.put("Pacific/Nauru", tz); - timezones0.put("Pacific/Tarawa", tz); - timezones0.put("Pacific/Wake", tz); - timezones0.put("Pacific/Wallis", tz); - tz = new SimpleTimeZone - (12750 * 3600, "Pacific/Chatham", - Calendar.OCTOBER, 1, Calendar.SUNDAY, 2750 * 3600, - Calendar.MARCH, 3, Calendar.SUNDAY, 3750 * 3600); - timezones0.put("Pacific/Chatham", tz); - tz = new SimpleTimeZone(13000 * 3600, "Pacific/Enderbury"); - timezones0.put("Pacific/Enderbury", tz); - timezones0.put("Pacific/Tongatapu", tz); - tz = new SimpleTimeZone(14000 * 3600, "Pacific/Kiritimati"); - timezones0.put("Pacific/Kiritimati", tz); + HashMap timezones = new HashMap(); + timezones0 = timezones; + + zoneinfo_dir = SystemProperties.getProperty("gnu.java.util.zoneinfo.dir"); + if (zoneinfo_dir != null && !new File(zoneinfo_dir).isDirectory()) + zoneinfo_dir = null; + + if (zoneinfo_dir != null) + { + aliases0 = new HashMap(); + + // These deprecated aliases for JDK 1.1.x compatibility + // should take precedence over data files read from + // /usr/share/zoneinfo. + aliases0.put("ACT", "Australia/Darwin"); + aliases0.put("AET", "Australia/Sydney"); + aliases0.put("AGT", "America/Argentina/Buenos_Aires"); + aliases0.put("ART", "Africa/Cairo"); + aliases0.put("AST", "America/Juneau"); + aliases0.put("BST", "Asia/Colombo"); + aliases0.put("CAT", "Africa/Gaborone"); + aliases0.put("CNT", "America/St_Johns"); + aliases0.put("CST", "CST6CDT"); + aliases0.put("CTT", "Asia/Brunei"); + aliases0.put("EAT", "Indian/Comoro"); + aliases0.put("ECT", "CET"); + aliases0.put("EST", "EST5EDT"); + aliases0.put("EST5", "EST5EDT"); + aliases0.put("IET", "EST5EDT"); + aliases0.put("IST", "Asia/Calcutta"); + aliases0.put("JST", "Asia/Seoul"); + aliases0.put("MIT", "Pacific/Niue"); + aliases0.put("MST", "MST7MDT"); + aliases0.put("MST7", "MST7MDT"); + aliases0.put("NET", "Indian/Mauritius"); + aliases0.put("NST", "Pacific/Auckland"); + aliases0.put("PLT", "Indian/Kerguelen"); + aliases0.put("PNT", "MST7MDT"); + aliases0.put("PRT", "America/Anguilla"); + aliases0.put("PST", "PST8PDT"); + aliases0.put("SST", "Pacific/Ponape"); + aliases0.put("VST", "Asia/Bangkok"); + return timezones; + } + + TimeZone tz; + // Automatically generated by scripts/timezones.pl + // XXX - Should we read this data from a file? + tz = new SimpleTimeZone(-11000 * 3600, "MIT"); + timezones0.put("MIT", tz); + timezones0.put("Pacific/Apia", tz); + timezones0.put("Pacific/Midway", tz); + timezones0.put("Pacific/Niue", tz); + timezones0.put("Pacific/Pago_Pago", tz); + tz = new SimpleTimeZone + (-10000 * 3600, "America/Adak", + Calendar.MARCH, 2, Calendar.SUNDAY, 2000 * 3600, + Calendar.NOVEMBER, 1, Calendar.SUNDAY, 2000 * 3600); + timezones0.put("America/Adak", tz); + tz = new SimpleTimeZone(-10000 * 3600, "HST"); + timezones0.put("HST", tz); + timezones0.put("Pacific/Fakaofo", tz); + timezones0.put("Pacific/Honolulu", tz); + timezones0.put("Pacific/Johnston", tz); + timezones0.put("Pacific/Rarotonga", tz); + timezones0.put("Pacific/Tahiti", tz); + tz = new SimpleTimeZone(-9500 * 3600, "Pacific/Marquesas"); + timezones0.put("Pacific/Marquesas", tz); + tz = new SimpleTimeZone + (-9000 * 3600, "AST", + Calendar.MARCH, 2, Calendar.SUNDAY, 2000 * 3600, + Calendar.NOVEMBER, 1, Calendar.SUNDAY, 2000 * 3600); + timezones0.put("AST", tz); + timezones0.put("America/Anchorage", tz); + timezones0.put("America/Juneau", tz); + timezones0.put("America/Nome", tz); + timezones0.put("America/Yakutat", tz); + tz = new SimpleTimeZone(-9000 * 3600, "Pacific/Gambier"); + timezones0.put("Pacific/Gambier", tz); + tz = new SimpleTimeZone + (-8000 * 3600, "America/Tijuana", + Calendar.APRIL, 1, Calendar.SUNDAY, 2000 * 3600, + Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); + timezones0.put("America/Tijuana", tz); + tz = new SimpleTimeZone + (-8000 * 3600, "PST", + Calendar.MARCH, 2, Calendar.SUNDAY, 2000 * 3600, + Calendar.NOVEMBER, 1, Calendar.SUNDAY, 2000 * 3600); + timezones0.put("PST", tz); + timezones0.put("PST8PDT", tz); + timezones0.put("America/Dawson", tz); + timezones0.put("America/Los_Angeles", tz); + timezones0.put("America/Vancouver", tz); + timezones0.put("America/Whitehorse", tz); + timezones0.put("US/Pacific-New", tz); + tz = new SimpleTimeZone(-8000 * 3600, "Pacific/Pitcairn"); + timezones0.put("Pacific/Pitcairn", tz); + tz = new SimpleTimeZone + (-7000 * 3600, "America/Chihuahua", + Calendar.APRIL, 1, Calendar.SUNDAY, 2000 * 3600, + Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); + timezones0.put("America/Chihuahua", tz); + timezones0.put("America/Mazatlan", tz); + tz = new SimpleTimeZone(-7000 * 3600, "MST7"); + timezones0.put("MST7", tz); + timezones0.put("PNT", tz); + timezones0.put("America/Dawson_Creek", tz); + timezones0.put("America/Hermosillo", tz); + timezones0.put("America/Phoenix", tz); + tz = new SimpleTimeZone + (-7000 * 3600, "MST", + Calendar.MARCH, 2, Calendar.SUNDAY, 2000 * 3600, + Calendar.NOVEMBER, 1, Calendar.SUNDAY, 2000 * 3600); + timezones0.put("MST", tz); + timezones0.put("MST7MDT", tz); + timezones0.put("America/Boise", tz); + timezones0.put("America/Cambridge_Bay", tz); + timezones0.put("America/Denver", tz); + timezones0.put("America/Edmonton", tz); + timezones0.put("America/Inuvik", tz); + timezones0.put("America/Shiprock", tz); + timezones0.put("America/Yellowknife", tz); + tz = new SimpleTimeZone + (-6000 * 3600, "America/Cancun", + Calendar.APRIL, 1, Calendar.SUNDAY, 2000 * 3600, + Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); + timezones0.put("America/Cancun", tz); + timezones0.put("America/Merida", tz); + timezones0.put("America/Mexico_City", tz); + timezones0.put("America/Monterrey", tz); + tz = new SimpleTimeZone(-6000 * 3600, "America/Belize"); + timezones0.put("America/Belize", tz); + timezones0.put("America/Costa_Rica", tz); + timezones0.put("America/El_Salvador", tz); + timezones0.put("America/Guatemala", tz); + timezones0.put("America/Managua", tz); + timezones0.put("America/Regina", tz); + timezones0.put("America/Swift_Current", tz); + timezones0.put("America/Tegucigalpa", tz); + timezones0.put("Pacific/Galapagos", tz); + tz = new SimpleTimeZone + (-6000 * 3600, "CST", + Calendar.MARCH, 2, Calendar.SUNDAY, 2000 * 3600, + Calendar.NOVEMBER, 1, Calendar.SUNDAY, 2000 * 3600); + timezones0.put("CST", tz); + timezones0.put("CST6CDT", tz); + timezones0.put("America/Chicago", tz); + timezones0.put("America/Indiana/Knox", tz); + timezones0.put("America/Indiana/Petersburg", tz); + timezones0.put("America/Indiana/Vincennes", tz); + timezones0.put("America/Menominee", tz); + timezones0.put("America/North_Dakota/Center", tz); + timezones0.put("America/North_Dakota/New_Salem", tz); + timezones0.put("America/Rainy_River", tz); + timezones0.put("America/Rankin_Inlet", tz); + timezones0.put("America/Winnipeg", tz); + tz = new SimpleTimeZone + (-6000 * 3600, "Pacific/Easter", + Calendar.OCTOBER, 2, Calendar.SATURDAY, 22000 * 3600, + Calendar.MARCH, 2, Calendar.SATURDAY, 22000 * 3600); + timezones0.put("Pacific/Easter", tz); + tz = new SimpleTimeZone(-5000 * 3600, "EST5"); + timezones0.put("EST5", tz); + timezones0.put("IET", tz); + timezones0.put("America/Atikokan", tz); + timezones0.put("America/Bogota", tz); + timezones0.put("America/Cayman", tz); + timezones0.put("America/Eirunepe", tz); + timezones0.put("America/Guayaquil", tz); + timezones0.put("America/Jamaica", tz); + timezones0.put("America/Lima", tz); + timezones0.put("America/Panama", tz); + timezones0.put("America/Rio_Branco", tz); + tz = new SimpleTimeZone + (-5000 * 3600, "America/Havana", + Calendar.APRIL, 1, Calendar.SUNDAY, 0 * 3600, + Calendar.OCTOBER, -1, Calendar.SUNDAY, 1000 * 3600); + timezones0.put("America/Havana", tz); + tz = new SimpleTimeZone + (-5000 * 3600, "America/Grand_Turk", + Calendar.APRIL, 1, Calendar.SUNDAY, 0 * 3600, + Calendar.OCTOBER, -1, Calendar.SUNDAY, 0 * 3600); + timezones0.put("America/Grand_Turk", tz); + timezones0.put("America/Port-au-Prince", tz); + tz = new SimpleTimeZone + (-5000 * 3600, "EST", + Calendar.MARCH, 2, Calendar.SUNDAY, 2000 * 3600, + Calendar.NOVEMBER, 1, Calendar.SUNDAY, 2000 * 3600); + timezones0.put("EST", tz); + timezones0.put("EST5EDT", tz); + timezones0.put("America/Detroit", tz); + timezones0.put("America/Indiana/Indianapolis", tz); + timezones0.put("America/Indiana/Marengo", tz); + timezones0.put("America/Indiana/Vevay", tz); + timezones0.put("America/Iqaluit", tz); + timezones0.put("America/Kentucky/Louisville", tz); + timezones0.put("America/Kentucky/Monticello", tz); + timezones0.put("America/Montreal", tz); + timezones0.put("America/Nassau", tz); + timezones0.put("America/New_York", tz); + timezones0.put("America/Nipigon", tz); + timezones0.put("America/Pangnirtung", tz); + timezones0.put("America/Thunder_Bay", tz); + timezones0.put("America/Toronto", tz); + tz = new SimpleTimeZone + (-4000 * 3600, "America/Asuncion", + Calendar.OCTOBER, 3, Calendar.SUNDAY, 0 * 3600, + Calendar.MARCH, 2, Calendar.SUNDAY, 0 * 3600); + timezones0.put("America/Asuncion", tz); + tz = new SimpleTimeZone(-4000 * 3600, "PRT"); + timezones0.put("PRT", tz); + timezones0.put("America/Anguilla", tz); + timezones0.put("America/Antigua", tz); + timezones0.put("America/Aruba", tz); + timezones0.put("America/Barbados", tz); + timezones0.put("America/Blanc-Sablon", tz); + timezones0.put("America/Boa_Vista", tz); + timezones0.put("America/Caracas", tz); + timezones0.put("America/Curacao", tz); + timezones0.put("America/Dominica", tz); + timezones0.put("America/Grenada", tz); + timezones0.put("America/Guadeloupe", tz); + timezones0.put("America/Guyana", tz); + timezones0.put("America/La_Paz", tz); + timezones0.put("America/Manaus", tz); + timezones0.put("America/Martinique", tz); + timezones0.put("America/Montserrat", tz); + timezones0.put("America/Port_of_Spain", tz); + timezones0.put("America/Porto_Velho", tz); + timezones0.put("America/Puerto_Rico", tz); + timezones0.put("America/Santo_Domingo", tz); + timezones0.put("America/St_Kitts", tz); + timezones0.put("America/St_Lucia", tz); + timezones0.put("America/St_Thomas", tz); + timezones0.put("America/St_Vincent", tz); + timezones0.put("America/Tortola", tz); + tz = new SimpleTimeZone + (-4000 * 3600, "America/Campo_Grande", + Calendar.NOVEMBER, 1, Calendar.SUNDAY, 0 * 3600, + Calendar.FEBRUARY, -1, Calendar.SUNDAY, 0 * 3600); + timezones0.put("America/Campo_Grande", tz); + timezones0.put("America/Cuiaba", tz); + tz = new SimpleTimeZone + (-4000 * 3600, "America/Goose_Bay", + Calendar.MARCH, 2, Calendar.SUNDAY, 60000, + Calendar.NOVEMBER, 1, Calendar.SUNDAY, 60000); + timezones0.put("America/Goose_Bay", tz); + tz = new SimpleTimeZone + (-4000 * 3600, "America/Glace_Bay", + Calendar.MARCH, 2, Calendar.SUNDAY, 2000 * 3600, + Calendar.NOVEMBER, 1, Calendar.SUNDAY, 2000 * 3600); + timezones0.put("America/Glace_Bay", tz); + timezones0.put("America/Halifax", tz); + timezones0.put("America/Moncton", tz); + timezones0.put("America/Thule", tz); + timezones0.put("Atlantic/Bermuda", tz); + tz = new SimpleTimeZone + (-4000 * 3600, "America/Santiago", + Calendar.OCTOBER, 9, -Calendar.SUNDAY, 0 * 3600, + Calendar.MARCH, 9, -Calendar.SUNDAY, 0 * 3600); + timezones0.put("America/Santiago", tz); + timezones0.put("Antarctica/Palmer", tz); + tz = new SimpleTimeZone + (-4000 * 3600, "Atlantic/Stanley", + Calendar.SEPTEMBER, 1, Calendar.SUNDAY, 2000 * 3600, + Calendar.APRIL, 3, Calendar.SUNDAY, 2000 * 3600); + timezones0.put("Atlantic/Stanley", tz); + tz = new SimpleTimeZone + (-3500 * 3600, "CNT", + Calendar.MARCH, 2, Calendar.SUNDAY, 60000, + Calendar.NOVEMBER, 1, Calendar.SUNDAY, 60000); + timezones0.put("CNT", tz); + timezones0.put("America/St_Johns", tz); + tz = new SimpleTimeZone + (-3000 * 3600, "America/Godthab", + Calendar.MARCH, 30, -Calendar.SATURDAY, 22000 * 3600, + Calendar.OCTOBER, 30, -Calendar.SATURDAY, 23000 * 3600); + timezones0.put("America/Godthab", tz); + tz = new SimpleTimeZone + (-3000 * 3600, "America/Miquelon", + Calendar.MARCH, 2, Calendar.SUNDAY, 2000 * 3600, + Calendar.NOVEMBER, 1, Calendar.SUNDAY, 2000 * 3600); + timezones0.put("America/Miquelon", tz); + tz = new SimpleTimeZone + (-3000 * 3600, "America/Montevideo", + Calendar.OCTOBER, 1, Calendar.SUNDAY, 2000 * 3600, + Calendar.MARCH, 2, Calendar.SUNDAY, 2000 * 3600); + timezones0.put("America/Montevideo", tz); + tz = new SimpleTimeZone + (-3000 * 3600, "America/Sao_Paulo", + Calendar.NOVEMBER, 1, Calendar.SUNDAY, 0 * 3600, + Calendar.FEBRUARY, -1, Calendar.SUNDAY, 0 * 3600); + timezones0.put("America/Sao_Paulo", tz); + tz = new SimpleTimeZone(-3000 * 3600, "AGT"); + timezones0.put("AGT", tz); + timezones0.put("America/Araguaina", tz); + timezones0.put("America/Argentina/Buenos_Aires", tz); + timezones0.put("America/Argentina/Catamarca", tz); + timezones0.put("America/Argentina/Cordoba", tz); + timezones0.put("America/Argentina/Jujuy", tz); + timezones0.put("America/Argentina/La_Rioja", tz); + timezones0.put("America/Argentina/Mendoza", tz); + timezones0.put("America/Argentina/Rio_Gallegos", tz); + timezones0.put("America/Argentina/San_Juan", tz); + timezones0.put("America/Argentina/Tucuman", tz); + timezones0.put("America/Argentina/Ushuaia", tz); + timezones0.put("America/Bahia", tz); + timezones0.put("America/Belem", tz); + timezones0.put("America/Cayenne", tz); + timezones0.put("America/Fortaleza", tz); + timezones0.put("America/Maceio", tz); + timezones0.put("America/Paramaribo", tz); + timezones0.put("America/Recife", tz); + timezones0.put("Antarctica/Rothera", tz); + tz = new SimpleTimeZone(-2000 * 3600, "America/Noronha"); + timezones0.put("America/Noronha", tz); + timezones0.put("Atlantic/South_Georgia", tz); + tz = new SimpleTimeZone + (-1000 * 3600, "America/Scoresbysund", + Calendar.MARCH, -1, Calendar.SUNDAY, 0 * 3600, + Calendar.OCTOBER, -1, Calendar.SUNDAY, 1000 * 3600); + timezones0.put("America/Scoresbysund", tz); + timezones0.put("Atlantic/Azores", tz); + tz = new SimpleTimeZone(-1000 * 3600, "Atlantic/Cape_Verde"); + timezones0.put("Atlantic/Cape_Verde", tz); + tz = new SimpleTimeZone(0 * 3600, "GMT"); + timezones0.put("GMT", tz); + timezones0.put("UTC", tz); + timezones0.put("Africa/Abidjan", tz); + timezones0.put("Africa/Accra", tz); + timezones0.put("Africa/Bamako", tz); + timezones0.put("Africa/Banjul", tz); + timezones0.put("Africa/Bissau", tz); + timezones0.put("Africa/Casablanca", tz); + timezones0.put("Africa/Conakry", tz); + timezones0.put("Africa/Dakar", tz); + timezones0.put("Africa/El_Aaiun", tz); + timezones0.put("Africa/Freetown", tz); + timezones0.put("Africa/Lome", tz); + timezones0.put("Africa/Monrovia", tz); + timezones0.put("Africa/Nouakchott", tz); + timezones0.put("Africa/Ouagadougou", tz); + timezones0.put("Africa/Sao_Tome", tz); + timezones0.put("America/Danmarkshavn", tz); + timezones0.put("Atlantic/Reykjavik", tz); + timezones0.put("Atlantic/St_Helena", tz); + tz = new SimpleTimeZone + (0 * 3600, "WET", + Calendar.MARCH, -1, Calendar.SUNDAY, 1000 * 3600, + Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600); + timezones0.put("WET", tz); + timezones0.put("Atlantic/Canary", tz); + timezones0.put("Atlantic/Faroe", tz); + timezones0.put("Atlantic/Madeira", tz); + timezones0.put("Europe/Dublin", tz); + timezones0.put("Europe/Guernsey", tz); + timezones0.put("Europe/Isle_of_Man", tz); + timezones0.put("Europe/Jersey", tz); + timezones0.put("Europe/Lisbon", tz); + timezones0.put("Europe/London", tz); + tz = new SimpleTimeZone(1000 * 3600, "Africa/Algiers"); + timezones0.put("Africa/Algiers", tz); + timezones0.put("Africa/Bangui", tz); + timezones0.put("Africa/Brazzaville", tz); + timezones0.put("Africa/Douala", tz); + timezones0.put("Africa/Kinshasa", tz); + timezones0.put("Africa/Lagos", tz); + timezones0.put("Africa/Libreville", tz); + timezones0.put("Africa/Luanda", tz); + timezones0.put("Africa/Malabo", tz); + timezones0.put("Africa/Ndjamena", tz); + timezones0.put("Africa/Niamey", tz); + timezones0.put("Africa/Porto-Novo", tz); + tz = new SimpleTimeZone + (1000 * 3600, "Africa/Windhoek", + Calendar.SEPTEMBER, 1, Calendar.SUNDAY, 2000 * 3600, + Calendar.APRIL, 1, Calendar.SUNDAY, 2000 * 3600); + timezones0.put("Africa/Windhoek", tz); + tz = new SimpleTimeZone + (1000 * 3600, "CET", + Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, + Calendar.OCTOBER, -1, Calendar.SUNDAY, 3000 * 3600); + timezones0.put("CET", tz); + timezones0.put("ECT", tz); + timezones0.put("MET", tz); + timezones0.put("Africa/Ceuta", tz); + timezones0.put("Africa/Tunis", tz); + timezones0.put("Arctic/Longyearbyen", tz); + timezones0.put("Atlantic/Jan_Mayen", tz); + timezones0.put("Europe/Amsterdam", tz); + timezones0.put("Europe/Andorra", tz); + timezones0.put("Europe/Belgrade", tz); + timezones0.put("Europe/Berlin", tz); + timezones0.put("Europe/Bratislava", tz); + timezones0.put("Europe/Brussels", tz); + timezones0.put("Europe/Budapest", tz); + timezones0.put("Europe/Copenhagen", tz); + timezones0.put("Europe/Gibraltar", tz); + timezones0.put("Europe/Ljubljana", tz); + timezones0.put("Europe/Luxembourg", tz); + timezones0.put("Europe/Madrid", tz); + timezones0.put("Europe/Malta", tz); + timezones0.put("Europe/Monaco", tz); + timezones0.put("Europe/Oslo", tz); + timezones0.put("Europe/Paris", tz); + timezones0.put("Europe/Podgorica", tz); + timezones0.put("Europe/Prague", tz); + timezones0.put("Europe/Rome", tz); + timezones0.put("Europe/San_Marino", tz); + timezones0.put("Europe/Sarajevo", tz); + timezones0.put("Europe/Skopje", tz); + timezones0.put("Europe/Stockholm", tz); + timezones0.put("Europe/Tirane", tz); + timezones0.put("Europe/Vaduz", tz); + timezones0.put("Europe/Vatican", tz); + timezones0.put("Europe/Vienna", tz); + timezones0.put("Europe/Warsaw", tz); + timezones0.put("Europe/Zagreb", tz); + timezones0.put("Europe/Zurich", tz); + tz = new SimpleTimeZone + (2000 * 3600, "ART", + Calendar.APRIL, -1, Calendar.FRIDAY, 0 * 3600, + Calendar.SEPTEMBER, -1, Calendar.THURSDAY, 24000 * 3600); + timezones0.put("ART", tz); + timezones0.put("Africa/Cairo", tz); + tz = new SimpleTimeZone(2000 * 3600, "CAT"); + timezones0.put("CAT", tz); + timezones0.put("Africa/Blantyre", tz); + timezones0.put("Africa/Bujumbura", tz); + timezones0.put("Africa/Gaborone", tz); + timezones0.put("Africa/Harare", tz); + timezones0.put("Africa/Johannesburg", tz); + timezones0.put("Africa/Kigali", tz); + timezones0.put("Africa/Lubumbashi", tz); + timezones0.put("Africa/Lusaka", tz); + timezones0.put("Africa/Maputo", tz); + timezones0.put("Africa/Maseru", tz); + timezones0.put("Africa/Mbabane", tz); + timezones0.put("Africa/Tripoli", tz); + timezones0.put("Asia/Jerusalem", tz); + tz = new SimpleTimeZone + (2000 * 3600, "Asia/Amman", + Calendar.MARCH, -1, Calendar.THURSDAY, 0 * 3600, + Calendar.OCTOBER, -1, Calendar.FRIDAY, 1000 * 3600); + timezones0.put("Asia/Amman", tz); + tz = new SimpleTimeZone + (2000 * 3600, "Asia/Beirut", + Calendar.MARCH, -1, Calendar.SUNDAY, 0 * 3600, + Calendar.OCTOBER, -1, Calendar.SUNDAY, 0 * 3600); + timezones0.put("Asia/Beirut", tz); + tz = new SimpleTimeZone + (2000 * 3600, "Asia/Damascus", + Calendar.APRIL, 1, 0, 0 * 3600, + Calendar.OCTOBER, 1, 0, 0 * 3600); + timezones0.put("Asia/Damascus", tz); + tz = new SimpleTimeZone + (2000 * 3600, "Asia/Gaza", + Calendar.APRIL, 1, 0, 0 * 3600, + Calendar.OCTOBER, 3, Calendar.FRIDAY, 0 * 3600); + timezones0.put("Asia/Gaza", tz); + tz = new SimpleTimeZone + (2000 * 3600, "EET", + Calendar.MARCH, -1, Calendar.SUNDAY, 3000 * 3600, + Calendar.OCTOBER, -1, Calendar.SUNDAY, 4000 * 3600); + timezones0.put("EET", tz); + timezones0.put("Asia/Istanbul", tz); + timezones0.put("Asia/Nicosia", tz); + timezones0.put("Europe/Athens", tz); + timezones0.put("Europe/Bucharest", tz); + timezones0.put("Europe/Chisinau", tz); + timezones0.put("Europe/Helsinki", tz); + timezones0.put("Europe/Istanbul", tz); + timezones0.put("Europe/Kiev", tz); + timezones0.put("Europe/Mariehamn", tz); + timezones0.put("Europe/Nicosia", tz); + timezones0.put("Europe/Riga", tz); + timezones0.put("Europe/Simferopol", tz); + timezones0.put("Europe/Sofia", tz); + timezones0.put("Europe/Tallinn", tz); + timezones0.put("Europe/Uzhgorod", tz); + timezones0.put("Europe/Vilnius", tz); + timezones0.put("Europe/Zaporozhye", tz); + tz = new SimpleTimeZone + (2000 * 3600, "Europe/Kaliningrad", + Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, + Calendar.OCTOBER, -1, Calendar.SUNDAY, 3000 * 3600); + timezones0.put("Europe/Kaliningrad", tz); + timezones0.put("Europe/Minsk", tz); + tz = new SimpleTimeZone + (3000 * 3600, "Asia/Baghdad", + Calendar.APRIL, 1, 0, 3000 * 3600, + Calendar.OCTOBER, 1, 0, 4000 * 3600); + timezones0.put("Asia/Baghdad", tz); + tz = new SimpleTimeZone + (3000 * 3600, "Europe/Moscow", + Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, + Calendar.OCTOBER, -1, Calendar.SUNDAY, 3000 * 3600); + timezones0.put("Europe/Moscow", tz); + timezones0.put("Europe/Volgograd", tz); + tz = new SimpleTimeZone(3000 * 3600, "EAT"); + timezones0.put("EAT", tz); + timezones0.put("Africa/Addis_Ababa", tz); + timezones0.put("Africa/Asmara", tz); + timezones0.put("Africa/Dar_es_Salaam", tz); + timezones0.put("Africa/Djibouti", tz); + timezones0.put("Africa/Kampala", tz); + timezones0.put("Africa/Khartoum", tz); + timezones0.put("Africa/Mogadishu", tz); + timezones0.put("Africa/Nairobi", tz); + timezones0.put("Antarctica/Syowa", tz); + timezones0.put("Asia/Aden", tz); + timezones0.put("Asia/Bahrain", tz); + timezones0.put("Asia/Kuwait", tz); + timezones0.put("Asia/Qatar", tz); + timezones0.put("Asia/Riyadh", tz); + timezones0.put("Indian/Antananarivo", tz); + timezones0.put("Indian/Comoro", tz); + timezones0.put("Indian/Mayotte", tz); + tz = new SimpleTimeZone(3500 * 3600, "Asia/Tehran"); + timezones0.put("Asia/Tehran", tz); + tz = new SimpleTimeZone + (4000 * 3600, "Asia/Baku", + Calendar.MARCH, -1, Calendar.SUNDAY, 4000 * 3600, + Calendar.OCTOBER, -1, Calendar.SUNDAY, 5000 * 3600); + timezones0.put("Asia/Baku", tz); + tz = new SimpleTimeZone + (4000 * 3600, "Asia/Yerevan", + Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, + Calendar.OCTOBER, -1, Calendar.SUNDAY, 3000 * 3600); + timezones0.put("Asia/Yerevan", tz); + timezones0.put("Europe/Samara", tz); + tz = new SimpleTimeZone(4000 * 3600, "NET"); + timezones0.put("NET", tz); + timezones0.put("Asia/Dubai", tz); + timezones0.put("Asia/Muscat", tz); + timezones0.put("Asia/Tbilisi", tz); + timezones0.put("Indian/Mahe", tz); + timezones0.put("Indian/Mauritius", tz); + timezones0.put("Indian/Reunion", tz); + tz = new SimpleTimeZone(4500 * 3600, "Asia/Kabul"); + timezones0.put("Asia/Kabul", tz); + tz = new SimpleTimeZone + (5000 * 3600, "Asia/Yekaterinburg", + Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, + Calendar.OCTOBER, -1, Calendar.SUNDAY, 3000 * 3600); + timezones0.put("Asia/Yekaterinburg", tz); + tz = new SimpleTimeZone(5000 * 3600, "PLT"); + timezones0.put("PLT", tz); + timezones0.put("Asia/Aqtau", tz); + timezones0.put("Asia/Aqtobe", tz); + timezones0.put("Asia/Ashgabat", tz); + timezones0.put("Asia/Dushanbe", tz); + timezones0.put("Asia/Karachi", tz); + timezones0.put("Asia/Oral", tz); + timezones0.put("Asia/Samarkand", tz); + timezones0.put("Asia/Tashkent", tz); + timezones0.put("Indian/Kerguelen", tz); + timezones0.put("Indian/Maldives", tz); + tz = new SimpleTimeZone(5500 * 3600, "BST"); + timezones0.put("BST", tz); + timezones0.put("IST", tz); + timezones0.put("Asia/Calcutta", tz); + timezones0.put("Asia/Colombo", tz); + tz = new SimpleTimeZone(5750 * 3600, "Asia/Katmandu"); + timezones0.put("Asia/Katmandu", tz); + tz = new SimpleTimeZone(6000 * 3600, "Antarctica/Mawson"); + timezones0.put("Antarctica/Mawson", tz); + timezones0.put("Antarctica/Vostok", tz); + timezones0.put("Asia/Almaty", tz); + timezones0.put("Asia/Bishkek", tz); + timezones0.put("Asia/Dhaka", tz); + timezones0.put("Asia/Qyzylorda", tz); + timezones0.put("Asia/Thimphu", tz); + timezones0.put("Indian/Chagos", tz); + tz = new SimpleTimeZone + (6000 * 3600, "Asia/Novosibirsk", + Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, + Calendar.OCTOBER, -1, Calendar.SUNDAY, 3000 * 3600); + timezones0.put("Asia/Novosibirsk", tz); + timezones0.put("Asia/Omsk", tz); + tz = new SimpleTimeZone(6500 * 3600, "Asia/Rangoon"); + timezones0.put("Asia/Rangoon", tz); + timezones0.put("Indian/Cocos", tz); + tz = new SimpleTimeZone(7000 * 3600, "VST"); + timezones0.put("VST", tz); + timezones0.put("Antarctica/Davis", tz); + timezones0.put("Asia/Bangkok", tz); + timezones0.put("Asia/Jakarta", tz); + timezones0.put("Asia/Phnom_Penh", tz); + timezones0.put("Asia/Pontianak", tz); + timezones0.put("Asia/Saigon", tz); + timezones0.put("Asia/Vientiane", tz); + timezones0.put("Indian/Christmas", tz); + tz = new SimpleTimeZone + (7000 * 3600, "Asia/Hovd", + Calendar.MARCH, -1, Calendar.SATURDAY, 2000 * 3600, + Calendar.SEPTEMBER, -1, Calendar.SATURDAY, 2000 * 3600); + timezones0.put("Asia/Hovd", tz); + tz = new SimpleTimeZone + (7000 * 3600, "Asia/Krasnoyarsk", + Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, + Calendar.OCTOBER, -1, Calendar.SUNDAY, 3000 * 3600); + timezones0.put("Asia/Krasnoyarsk", tz); + tz = new SimpleTimeZone(8000 * 3600, "CTT"); + timezones0.put("CTT", tz); + timezones0.put("Antarctica/Casey", tz); + timezones0.put("Asia/Brunei", tz); + timezones0.put("Asia/Chongqing", tz); + timezones0.put("Asia/Harbin", tz); + timezones0.put("Asia/Hong_Kong", tz); + timezones0.put("Asia/Kashgar", tz); + timezones0.put("Asia/Kuala_Lumpur", tz); + timezones0.put("Asia/Kuching", tz); + timezones0.put("Asia/Macau", tz); + timezones0.put("Asia/Makassar", tz); + timezones0.put("Asia/Manila", tz); + timezones0.put("Asia/Shanghai", tz); + timezones0.put("Asia/Singapore", tz); + timezones0.put("Asia/Taipei", tz); + timezones0.put("Asia/Urumqi", tz); + timezones0.put("Australia/Perth", tz); + tz = new SimpleTimeZone + (8000 * 3600, "Asia/Irkutsk", + Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, + Calendar.OCTOBER, -1, Calendar.SUNDAY, 3000 * 3600); + timezones0.put("Asia/Irkutsk", tz); + tz = new SimpleTimeZone + (8000 * 3600, "Asia/Ulaanbaatar", + Calendar.MARCH, -1, Calendar.SATURDAY, 2000 * 3600, + Calendar.SEPTEMBER, -1, Calendar.SATURDAY, 2000 * 3600); + timezones0.put("Asia/Ulaanbaatar", tz); + tz = new SimpleTimeZone(8750 * 3600, "Australia/Eucla"); + timezones0.put("Australia/Eucla", tz); + tz = new SimpleTimeZone + (9000 * 3600, "Asia/Choibalsan", + Calendar.MARCH, -1, Calendar.SATURDAY, 2000 * 3600, + Calendar.SEPTEMBER, -1, Calendar.SATURDAY, 2000 * 3600); + timezones0.put("Asia/Choibalsan", tz); + tz = new SimpleTimeZone(9000 * 3600, "JST"); + timezones0.put("JST", tz); + timezones0.put("Asia/Dili", tz); + timezones0.put("Asia/Jayapura", tz); + timezones0.put("Asia/Pyongyang", tz); + timezones0.put("Asia/Seoul", tz); + timezones0.put("Asia/Tokyo", tz); + timezones0.put("Pacific/Palau", tz); + tz = new SimpleTimeZone + (9000 * 3600, "Asia/Yakutsk", + Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, + Calendar.OCTOBER, -1, Calendar.SUNDAY, 3000 * 3600); + timezones0.put("Asia/Yakutsk", tz); + tz = new SimpleTimeZone + (9500 * 3600, "Australia/Adelaide", + Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600, + Calendar.MARCH, -1, Calendar.SUNDAY, 3000 * 3600); + timezones0.put("Australia/Adelaide", tz); + timezones0.put("Australia/Broken_Hill", tz); + tz = new SimpleTimeZone(9500 * 3600, "ACT"); + timezones0.put("ACT", tz); + timezones0.put("Australia/Darwin", tz); + tz = new SimpleTimeZone(10000 * 3600, "Antarctica/DumontDUrville"); + timezones0.put("Antarctica/DumontDUrville", tz); + timezones0.put("Australia/Brisbane", tz); + timezones0.put("Australia/Lindeman", tz); + timezones0.put("Pacific/Guam", tz); + timezones0.put("Pacific/Port_Moresby", tz); + timezones0.put("Pacific/Saipan", tz); + timezones0.put("Pacific/Truk", tz); + tz = new SimpleTimeZone + (10000 * 3600, "Asia/Sakhalin", + Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, + Calendar.OCTOBER, -1, Calendar.SUNDAY, 3000 * 3600); + timezones0.put("Asia/Sakhalin", tz); + timezones0.put("Asia/Vladivostok", tz); + tz = new SimpleTimeZone + (10000 * 3600, "Australia/Currie", + Calendar.OCTOBER, 1, Calendar.SUNDAY, 2000 * 3600, + Calendar.MARCH, -1, Calendar.SUNDAY, 3000 * 3600); + timezones0.put("Australia/Currie", tz); + timezones0.put("Australia/Hobart", tz); + tz = new SimpleTimeZone + (10000 * 3600, "AET", + Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600, + Calendar.MARCH, -1, Calendar.SUNDAY, 3000 * 3600); + timezones0.put("AET", tz); + timezones0.put("Australia/Melbourne", tz); + timezones0.put("Australia/Sydney", tz); + tz = new SimpleTimeZone + (10500 * 3600, "Australia/Lord_Howe", + Calendar.OCTOBER, -1, Calendar.SUNDAY, 2000 * 3600, + Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, 500 * 3600); + timezones0.put("Australia/Lord_Howe", tz); + tz = new SimpleTimeZone + (11000 * 3600, "Asia/Magadan", + Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, + Calendar.OCTOBER, -1, Calendar.SUNDAY, 3000 * 3600); + timezones0.put("Asia/Magadan", tz); + tz = new SimpleTimeZone(11000 * 3600, "SST"); + timezones0.put("SST", tz); + timezones0.put("Pacific/Efate", tz); + timezones0.put("Pacific/Guadalcanal", tz); + timezones0.put("Pacific/Kosrae", tz); + timezones0.put("Pacific/Noumea", tz); + timezones0.put("Pacific/Ponape", tz); + tz = new SimpleTimeZone(11500 * 3600, "Pacific/Norfolk"); + timezones0.put("Pacific/Norfolk", tz); + tz = new SimpleTimeZone + (12000 * 3600, "NST", + Calendar.OCTOBER, 1, Calendar.SUNDAY, 2000 * 3600, + Calendar.MARCH, 3, Calendar.SUNDAY, 3000 * 3600); + timezones0.put("NST", tz); + timezones0.put("Antarctica/McMurdo", tz); + timezones0.put("Antarctica/South_Pole", tz); + timezones0.put("Pacific/Auckland", tz); + tz = new SimpleTimeZone + (12000 * 3600, "Asia/Anadyr", + Calendar.MARCH, -1, Calendar.SUNDAY, 2000 * 3600, + Calendar.OCTOBER, -1, Calendar.SUNDAY, 3000 * 3600); + timezones0.put("Asia/Anadyr", tz); + timezones0.put("Asia/Kamchatka", tz); + tz = new SimpleTimeZone(12000 * 3600, "Pacific/Fiji"); + timezones0.put("Pacific/Fiji", tz); + timezones0.put("Pacific/Funafuti", tz); + timezones0.put("Pacific/Kwajalein", tz); + timezones0.put("Pacific/Majuro", tz); + timezones0.put("Pacific/Nauru", tz); + timezones0.put("Pacific/Tarawa", tz); + timezones0.put("Pacific/Wake", tz); + timezones0.put("Pacific/Wallis", tz); + tz = new SimpleTimeZone + (12750 * 3600, "Pacific/Chatham", + Calendar.OCTOBER, 1, Calendar.SUNDAY, 2750 * 3600, + Calendar.MARCH, 3, Calendar.SUNDAY, 3750 * 3600); + timezones0.put("Pacific/Chatham", tz); + tz = new SimpleTimeZone(13000 * 3600, "Pacific/Enderbury"); + timezones0.put("Pacific/Enderbury", tz); + timezones0.put("Pacific/Tongatapu", tz); + tz = new SimpleTimeZone(14000 * 3600, "Pacific/Kiritimati"); + timezones0.put("Pacific/Kiritimati", tz); } return timezones0; } @@ -909,7 +909,7 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable * with the result of <code>System.getProperty("user.timezone")</code> * or <code>getDefaultTimeZoneId()</code>. Note that giving one of * the standard tz data names from ftp://elsie.nci.nih.gov/pub/ is - * preferred. + * preferred. * The time zone name can be given as follows: * <code>(standard zone name)[(GMT offset)[(DST zone name)[DST offset]]] * </code> @@ -954,175 +954,175 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable int dstOffs; try { - int idLength = sysTimeZoneId.length(); - - int index = 0; - int prevIndex; - char c; - - // get std - do - c = sysTimeZoneId.charAt(index); - while (c != '+' && c != '-' && c != ',' && c != ':' - && ! Character.isDigit(c) && c != '\0' && ++index < idLength); - - if (index >= idLength) - return getTimeZoneInternal(sysTimeZoneId); - - stdName = sysTimeZoneId.substring(0, index); - prevIndex = index; - - // get the std offset - do - c = sysTimeZoneId.charAt(index++); - while ((c == '-' || c == '+' || c == ':' || Character.isDigit(c)) - && index < idLength); - if (index < idLength) - index--; - - { // convert the dst string to a millis number - String offset = sysTimeZoneId.substring(prevIndex, index); - prevIndex = index; - - if (offset.charAt(0) == '+' || offset.charAt(0) == '-') - stdOffs = parseTime(offset.substring(1)); - else - stdOffs = parseTime(offset); - - if (offset.charAt(0) == '-') - stdOffs = -stdOffs; - - // TZ timezone offsets are positive when WEST of the meridian. - stdOffs = -stdOffs; - } - - // Done yet? (Format: std offset) - if (index >= idLength) - { - // Do we have an existing timezone with that name and offset? - TimeZone tz = getTimeZoneInternal(stdName); - if (tz != null) - if (tz.getRawOffset() == stdOffs) - return tz; - - // Custom then. - return new SimpleTimeZone(stdOffs, stdName); - } - - // get dst - do - c = sysTimeZoneId.charAt(index); - while (c != '+' && c != '-' && c != ',' && c != ':' - && ! Character.isDigit(c) && c != '\0' && ++index < idLength); - - // Done yet? (Format: std offset dst) - if (index >= idLength) - { - // Do we have an existing timezone with that name and offset - // which has DST? - TimeZone tz = getTimeZoneInternal(stdName); - if (tz != null) - if (tz.getRawOffset() == stdOffs && tz.useDaylightTime()) - return tz; - - // Custom then. - return new SimpleTimeZone(stdOffs, stdName); - } - - // get the dst offset - prevIndex = index; - do - c = sysTimeZoneId.charAt(index++); - while ((c == '-' || c == '+' || c == ':' || Character.isDigit(c)) - && index < idLength); - if (index < idLength) - index--; - - if (index == prevIndex && (c == ',' || c == ';')) - { - // Missing dst offset defaults to one hour ahead of standard - // time. - dstOffs = stdOffs + 60 * 60 * 1000; - } - else - { // convert the dst string to a millis number - String offset = sysTimeZoneId.substring(prevIndex, index); - prevIndex = index; - - if (offset.charAt(0) == '+' || offset.charAt(0) == '-') - dstOffs = parseTime(offset.substring(1)); - else - dstOffs = parseTime(offset); - - if (offset.charAt(0) == '-') - dstOffs = -dstOffs; - - // TZ timezone offsets are positive when WEST of the meridian. - dstOffs = -dstOffs; - } - - // Done yet? (Format: std offset dst offset) - // FIXME: We don't support DST without a rule given. Should we? - if (index >= idLength) - { - // Time Zone existing with same name, dst and offsets? - TimeZone tz = getTimeZoneInternal(stdName); - if (tz != null) - if (tz.getRawOffset() == stdOffs && tz.useDaylightTime() - && tz.getDSTSavings() == (dstOffs - stdOffs)) - return tz; - - return new SimpleTimeZone(stdOffs, stdName); - } - - // get the DST rule - if (sysTimeZoneId.charAt(index) == ',' - || sysTimeZoneId.charAt(index) == ';') - { - index++; - int offs = index; - while (sysTimeZoneId.charAt(index) != ',' - && sysTimeZoneId.charAt(index) != ';') - index++; - String startTime = sysTimeZoneId.substring(offs, index); - index++; - String endTime = sysTimeZoneId.substring(index); - - index = startTime.indexOf('/'); - int startMillis; - int endMillis; - String startDate; - String endDate; - if (index != -1) - { - startDate = startTime.substring(0, index); - startMillis = parseTime(startTime.substring(index + 1)); - } - else - { - startDate = startTime; - // if time isn't given, default to 2:00:00 AM. - startMillis = 2 * 60 * 60 * 1000; - } - index = endTime.indexOf('/'); - if (index != -1) - { - endDate = endTime.substring(0, index); - endMillis = parseTime(endTime.substring(index + 1)); - } - else - { - endDate = endTime; - // if time isn't given, default to 2:00:00 AM. - endMillis = 2 * 60 * 60 * 1000; - } - - int[] start = getDateParams(startDate); - int[] end = getDateParams(endDate); - return new SimpleTimeZone(stdOffs, stdName, start[0], start[1], - start[2], startMillis, end[0], end[1], - end[2], endMillis, (dstOffs - stdOffs)); - } + int idLength = sysTimeZoneId.length(); + + int index = 0; + int prevIndex; + char c; + + // get std + do + c = sysTimeZoneId.charAt(index); + while (c != '+' && c != '-' && c != ',' && c != ':' + && ! Character.isDigit(c) && c != '\0' && ++index < idLength); + + if (index >= idLength) + return getTimeZoneInternal(sysTimeZoneId); + + stdName = sysTimeZoneId.substring(0, index); + prevIndex = index; + + // get the std offset + do + c = sysTimeZoneId.charAt(index++); + while ((c == '-' || c == '+' || c == ':' || Character.isDigit(c)) + && index < idLength); + if (index < idLength) + index--; + + { // convert the dst string to a millis number + String offset = sysTimeZoneId.substring(prevIndex, index); + prevIndex = index; + + if (offset.charAt(0) == '+' || offset.charAt(0) == '-') + stdOffs = parseTime(offset.substring(1)); + else + stdOffs = parseTime(offset); + + if (offset.charAt(0) == '-') + stdOffs = -stdOffs; + + // TZ timezone offsets are positive when WEST of the meridian. + stdOffs = -stdOffs; + } + + // Done yet? (Format: std offset) + if (index >= idLength) + { + // Do we have an existing timezone with that name and offset? + TimeZone tz = getTimeZoneInternal(stdName); + if (tz != null) + if (tz.getRawOffset() == stdOffs) + return tz; + + // Custom then. + return new SimpleTimeZone(stdOffs, stdName); + } + + // get dst + do + c = sysTimeZoneId.charAt(index); + while (c != '+' && c != '-' && c != ',' && c != ':' + && ! Character.isDigit(c) && c != '\0' && ++index < idLength); + + // Done yet? (Format: std offset dst) + if (index >= idLength) + { + // Do we have an existing timezone with that name and offset + // which has DST? + TimeZone tz = getTimeZoneInternal(stdName); + if (tz != null) + if (tz.getRawOffset() == stdOffs && tz.useDaylightTime()) + return tz; + + // Custom then. + return new SimpleTimeZone(stdOffs, stdName); + } + + // get the dst offset + prevIndex = index; + do + c = sysTimeZoneId.charAt(index++); + while ((c == '-' || c == '+' || c == ':' || Character.isDigit(c)) + && index < idLength); + if (index < idLength) + index--; + + if (index == prevIndex && (c == ',' || c == ';')) + { + // Missing dst offset defaults to one hour ahead of standard + // time. + dstOffs = stdOffs + 60 * 60 * 1000; + } + else + { // convert the dst string to a millis number + String offset = sysTimeZoneId.substring(prevIndex, index); + prevIndex = index; + + if (offset.charAt(0) == '+' || offset.charAt(0) == '-') + dstOffs = parseTime(offset.substring(1)); + else + dstOffs = parseTime(offset); + + if (offset.charAt(0) == '-') + dstOffs = -dstOffs; + + // TZ timezone offsets are positive when WEST of the meridian. + dstOffs = -dstOffs; + } + + // Done yet? (Format: std offset dst offset) + // FIXME: We don't support DST without a rule given. Should we? + if (index >= idLength) + { + // Time Zone existing with same name, dst and offsets? + TimeZone tz = getTimeZoneInternal(stdName); + if (tz != null) + if (tz.getRawOffset() == stdOffs && tz.useDaylightTime() + && tz.getDSTSavings() == (dstOffs - stdOffs)) + return tz; + + return new SimpleTimeZone(stdOffs, stdName); + } + + // get the DST rule + if (sysTimeZoneId.charAt(index) == ',' + || sysTimeZoneId.charAt(index) == ';') + { + index++; + int offs = index; + while (sysTimeZoneId.charAt(index) != ',' + && sysTimeZoneId.charAt(index) != ';') + index++; + String startTime = sysTimeZoneId.substring(offs, index); + index++; + String endTime = sysTimeZoneId.substring(index); + + index = startTime.indexOf('/'); + int startMillis; + int endMillis; + String startDate; + String endDate; + if (index != -1) + { + startDate = startTime.substring(0, index); + startMillis = parseTime(startTime.substring(index + 1)); + } + else + { + startDate = startTime; + // if time isn't given, default to 2:00:00 AM. + startMillis = 2 * 60 * 60 * 1000; + } + index = endTime.indexOf('/'); + if (index != -1) + { + endDate = endTime.substring(0, index); + endMillis = parseTime(endTime.substring(index + 1)); + } + else + { + endDate = endTime; + // if time isn't given, default to 2:00:00 AM. + endMillis = 2 * 60 * 60 * 1000; + } + + int[] start = getDateParams(startDate); + int[] end = getDateParams(endDate); + return new SimpleTimeZone(stdOffs, stdName, start[0], start[1], + start[2], startMillis, end[0], end[1], + end[2], endMillis, (dstOffs - stdOffs)); + } } // FIXME: Produce a warning here? @@ -1148,50 +1148,50 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable if (date.charAt(0) == 'M' || date.charAt(0) == 'm') { - int day; - - // Month, week of month, day of week - - // "Mm.w.d". d is between 0 (Sunday) and 6. Week w is - // between 1 and 5; Week 1 is the first week in which day d - // occurs and Week 5 specifies the last d day in the month. - // Month m is between 1 and 12. - - month = Integer.parseInt(date.substring(1, date.indexOf('.'))); - int week = Integer.parseInt(date.substring(date.indexOf('.') + 1, - date.lastIndexOf('.'))); - int dayOfWeek = Integer.parseInt(date.substring(date.lastIndexOf('.') - + 1)); - dayOfWeek++; // Java day of week is one-based, Sunday is first day. - - if (week == 5) - day = -1; // last day of month is -1 in java, 5 in TZ - else - { - // First day of week starting on or after. For example, - // to specify the second Sunday of April, set month to - // APRIL, day-of-month to 8, and day-of-week to -SUNDAY. - day = (week - 1) * 7 + 1; - dayOfWeek = -dayOfWeek; - } - - month--; // Java month is zero-based. - return new int[] { month, day, dayOfWeek }; + int day; + + // Month, week of month, day of week + + // "Mm.w.d". d is between 0 (Sunday) and 6. Week w is + // between 1 and 5; Week 1 is the first week in which day d + // occurs and Week 5 specifies the last d day in the month. + // Month m is between 1 and 12. + + month = Integer.parseInt(date.substring(1, date.indexOf('.'))); + int week = Integer.parseInt(date.substring(date.indexOf('.') + 1, + date.lastIndexOf('.'))); + int dayOfWeek = Integer.parseInt(date.substring(date.lastIndexOf('.') + + 1)); + dayOfWeek++; // Java day of week is one-based, Sunday is first day. + + if (week == 5) + day = -1; // last day of month is -1 in java, 5 in TZ + else + { + // First day of week starting on or after. For example, + // to specify the second Sunday of April, set month to + // APRIL, day-of-month to 8, and day-of-week to -SUNDAY. + day = (week - 1) * 7 + 1; + dayOfWeek = -dayOfWeek; + } + + month--; // Java month is zero-based. + return new int[] { month, day, dayOfWeek }; } // julian day, either zero-based 0<=n<=365 (incl feb 29) // or one-based 1<=n<=365 (no feb 29) - int julianDay; // Julian day, + int julianDay; // Julian day, if (date.charAt(0) != 'J' || date.charAt(0) != 'j') { - julianDay = Integer.parseInt(date.substring(1)); - julianDay++; // make 1-based - // Adjust day count to include feb 29. - dayCount = new int[] - { - 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335 - }; + julianDay = Integer.parseInt(date.substring(1)); + julianDay++; // make 1-based + // Adjust day count to include feb 29. + dayCount = new int[] + { + 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335 + }; } else // 1-based julian day @@ -1200,9 +1200,9 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable int i = 11; while (i > 0) if (dayCount[i] < julianDay) - break; + break; else - i--; + i--; julianDay -= dayCount[i]; month = i; return new int[] { month, julianDay, 0 }; @@ -1219,9 +1219,9 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable while (i < time.length()) if (time.charAt(i) == ':') - break; + break; else - i++; + i++; millis = 60 * 60 * 1000 * Integer.parseInt(time.substring(0, i)); if (i >= time.length()) return millis; @@ -1229,9 +1229,9 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable int iprev = ++i; while (i < time.length()) if (time.charAt(i) == ':') - break; + break; else - i++; + i++; millis += 60 * 1000 * Integer.parseInt(time.substring(iprev, i)); if (i >= time.length()) return millis; @@ -1241,7 +1241,7 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable } /** - * Gets the time zone offset, for current date, modified in case of + * Gets the time zone offset, for current date, modified in case of * daylight savings. This is the offset to add to UTC to get the local * time. * @param era the era of the given date @@ -1253,7 +1253,7 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable * @return the time zone offset in milliseconds. */ public abstract int getOffset(int era, int year, int month, - int day, int dayOfWeek, int milliseconds); + int day, int dayOfWeek, int milliseconds); /** * Get the time zone offset for the specified date, modified in case of @@ -1269,11 +1269,11 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable ? getRawOffset() + getDSTSavings() : getRawOffset()); } - + /** * Gets the time zone offset, ignoring daylight savings. This is * the offset to add to UTC to get the local time. - * @return the time zone offset in milliseconds. + * @return the time zone offset in milliseconds. */ public abstract int getRawOffset(); @@ -1287,7 +1287,7 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable /** * Gets the identifier of this time zone. For instance, PST for * Pacific Standard Time. - * @returns the ID of this time zone. + * @returns the ID of this time zone. */ public String getID() { @@ -1304,7 +1304,7 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable { if (id == null) throw new NullPointerException(); - + this.ID = id; } @@ -1339,7 +1339,7 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable /** * This method returns a string name of the time zone suitable * for displaying to the user. The string returned will be of the - * specified type in the current locale. + * specified type in the current locale. * * @param dst Whether or not daylight savings time is in effect. * @param style <code>LONG</code> for a long name, <code>SHORT</code> for @@ -1356,7 +1356,7 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable /** * This method returns a string name of the time zone suitable * for displaying to the user. The string returned will be of the - * specified type in the specified locale. + * specified type in the specified locale. * * @param dst Whether or not daylight savings time is in effect. * @param style <code>LONG</code> for a long name, <code>SHORT</code> for @@ -1370,30 +1370,30 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable DateFormatSymbols dfs; try { - dfs = new DateFormatSymbols(locale); - - // The format of the value returned is defined by us. - String[][]zoneinfo = dfs.getZoneStrings(); - for (int i = 0; i < zoneinfo.length; i++) - { - if (zoneinfo[i][0].equals(getID())) - { - if (!dst) - { - if (style == SHORT) - return (zoneinfo[i][2]); - else - return (zoneinfo[i][1]); - } - else - { - if (style == SHORT) - return (zoneinfo[i][4]); - else - return (zoneinfo[i][3]); - } - } - } + dfs = new DateFormatSymbols(locale); + + // The format of the value returned is defined by us. + String[][]zoneinfo = dfs.getZoneStrings(); + for (int i = 0; i < zoneinfo.length; i++) + { + if (zoneinfo[i][0].equals(getID())) + { + if (!dst) + { + if (style == SHORT) + return (zoneinfo[i][2]); + else + return (zoneinfo[i][1]); + } + else + { + if (style == SHORT) + return (zoneinfo[i][4]); + else + return (zoneinfo[i][3]); + } + } + } } catch (MissingResourceException e) { @@ -1415,18 +1415,18 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable if (minutes != 0 || hours != 0) { - sb.append(offset >= 0 ? '+' : '-'); - sb.append((char) ('0' + hours / 10)); - sb.append((char) ('0' + hours % 10)); - sb.append(':'); - sb.append((char) ('0' + minutes / 10)); - sb.append((char) ('0' + minutes % 10)); + sb.append(offset >= 0 ? '+' : '-'); + sb.append((char) ('0' + hours / 10)); + sb.append((char) ('0' + hours % 10)); + sb.append(':'); + sb.append((char) ('0' + minutes / 10)); + sb.append((char) ('0' + minutes % 10)); } return sb.toString(); } - /** + /** * Returns true, if this time zone uses Daylight Savings Time. */ public abstract boolean useDaylightTime(); @@ -1467,45 +1467,45 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable TimeZone tznew = null; for (int pass = 0; pass < 2; pass++) { - synchronized (TimeZone.class) - { - tz = (TimeZone) timezones().get(ID); - if (tz != null) - { - if (!tz.getID().equals(ID)) - { - // We always return a timezone with the requested ID. - // This is the same behaviour as with JDK1.2. - tz = (TimeZone) tz.clone(); - tz.setID(ID); - // We also save the alias, so that we return the same - // object again if getTimeZone is called with the same - // alias. - timezones().put(ID, tz); - } - return tz; - } - else if (tznew != null) - { - timezones().put(ID, tznew); - return tznew; - } - } - - if (pass == 1 || zoneinfo_dir == null) - return null; - - // aliases0 is never changing after first timezones(), so should - // be safe without synchronization. - String zonename = (String) aliases0.get(ID); - if (zonename == null) - zonename = ID; - - // Read the file outside of the critical section, it is expensive. - tznew = ZoneInfo.readTZFile (ID, zoneinfo_dir - + File.separatorChar + zonename); - if (tznew == null) - return null; + synchronized (TimeZone.class) + { + tz = (TimeZone) timezones().get(ID); + if (tz != null) + { + if (!tz.getID().equals(ID)) + { + // We always return a timezone with the requested ID. + // This is the same behaviour as with JDK1.2. + tz = (TimeZone) tz.clone(); + tz.setID(ID); + // We also save the alias, so that we return the same + // object again if getTimeZone is called with the same + // alias. + timezones().put(ID, tz); + } + return tz; + } + else if (tznew != null) + { + timezones().put(ID, tznew); + return tznew; + } + } + + if (pass == 1 || zoneinfo_dir == null) + return null; + + // aliases0 is never changing after first timezones(), so should + // be safe without synchronization. + String zonename = (String) aliases0.get(ID); + if (zonename == null) + zonename = ID; + + // Read the file outside of the critical section, it is expensive. + tznew = ZoneInfo.readTZFile (ID, zoneinfo_dir + + File.separatorChar + zonename); + if (tznew == null) + return null; } return null; @@ -1522,68 +1522,68 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable // Check for custom IDs first if (ID.startsWith("GMT") && ID.length() > 3) { - int pos = 3; - int offset_direction = 1; - - if (ID.charAt(pos) == '-') - { - offset_direction = -1; - pos++; - } - else if (ID.charAt(pos) == '+') - { - pos++; - } - - try - { - int hour, minute; - - String offset_str = ID.substring(pos); - int idx = offset_str.indexOf(":"); - if (idx != -1) - { - hour = Integer.parseInt(offset_str.substring(0, idx)); - minute = Integer.parseInt(offset_str.substring(idx + 1)); - } - else - { - int offset_length = offset_str.length(); - if (offset_length <= 2) - { - // Only hour - hour = Integer.parseInt(offset_str); - minute = 0; - } - else - { - // hour and minute, not separated by colon - hour = Integer.parseInt - (offset_str.substring(0, offset_length - 2)); - minute = Integer.parseInt - (offset_str.substring(offset_length - 2)); - } - } - - // Custom IDs have to be normalized - CPStringBuilder sb = new CPStringBuilder(9); - sb.append("GMT"); - - sb.append(offset_direction >= 0 ? '+' : '-'); - sb.append((char) ('0' + hour / 10)); - sb.append((char) ('0' + hour % 10)); - sb.append(':'); - sb.append((char) ('0' + minute / 10)); - sb.append((char) ('0' + minute % 10)); - ID = sb.toString(); - - return new SimpleTimeZone((hour * (60 * 60 * 1000) - + minute * (60 * 1000)) - * offset_direction, ID); - } - catch (NumberFormatException e) - { - } + int pos = 3; + int offset_direction = 1; + + if (ID.charAt(pos) == '-') + { + offset_direction = -1; + pos++; + } + else if (ID.charAt(pos) == '+') + { + pos++; + } + + try + { + int hour, minute; + + String offset_str = ID.substring(pos); + int idx = offset_str.indexOf(":"); + if (idx != -1) + { + hour = Integer.parseInt(offset_str.substring(0, idx)); + minute = Integer.parseInt(offset_str.substring(idx + 1)); + } + else + { + int offset_length = offset_str.length(); + if (offset_length <= 2) + { + // Only hour + hour = Integer.parseInt(offset_str); + minute = 0; + } + else + { + // hour and minute, not separated by colon + hour = Integer.parseInt + (offset_str.substring(0, offset_length - 2)); + minute = Integer.parseInt + (offset_str.substring(offset_length - 2)); + } + } + + // Custom IDs have to be normalized + CPStringBuilder sb = new CPStringBuilder(9); + sb.append("GMT"); + + sb.append(offset_direction >= 0 ? '+' : '-'); + sb.append((char) ('0' + hour / 10)); + sb.append((char) ('0' + hour % 10)); + sb.append(':'); + sb.append((char) ('0' + minute / 10)); + sb.append((char) ('0' + minute % 10)); + ID = sb.toString(); + + return new SimpleTimeZone((hour * (60 * 60 * 1000) + + minute * (60 * 1000)) + * offset_direction, ID); + } + catch (NumberFormatException e) + { + } } TimeZone tz = getTimeZoneInternal(ID); @@ -1595,7 +1595,7 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable /** * Gets the available IDs according to the given time zone - * offset. + * offset. * @param rawOffset the given time zone GMT offset. * @return An array of IDs, where the time zone has the specified GMT * offset. For example <code>{"Phoenix", "Denver"}</code>, since both have @@ -1605,42 +1605,42 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable { synchronized (TimeZone.class) { - HashMap h = timezones(); - int count = 0; - if (zoneinfo_dir == null) - { - Iterator iter = h.entrySet().iterator(); - while (iter.hasNext()) - { - // Don't iterate the values, since we want to count - // doubled values (aliases) - Map.Entry entry = (Map.Entry) iter.next(); - if (((TimeZone) entry.getValue()).getRawOffset() == rawOffset) - count++; - } - - String[] ids = new String[count]; - count = 0; - iter = h.entrySet().iterator(); - while (iter.hasNext()) - { - Map.Entry entry = (Map.Entry) iter.next(); - if (((TimeZone) entry.getValue()).getRawOffset() == rawOffset) - ids[count++] = (String) entry.getKey(); - } - return ids; - } + HashMap h = timezones(); + int count = 0; + if (zoneinfo_dir == null) + { + Iterator iter = h.entrySet().iterator(); + while (iter.hasNext()) + { + // Don't iterate the values, since we want to count + // doubled values (aliases) + Map.Entry entry = (Map.Entry) iter.next(); + if (((TimeZone) entry.getValue()).getRawOffset() == rawOffset) + count++; + } + + String[] ids = new String[count]; + count = 0; + iter = h.entrySet().iterator(); + while (iter.hasNext()) + { + Map.Entry entry = (Map.Entry) iter.next(); + if (((TimeZone) entry.getValue()).getRawOffset() == rawOffset) + ids[count++] = (String) entry.getKey(); + } + return ids; + } } String[] s = getAvailableIDs(); int count = 0; for (int i = 0; i < s.length; i++) { - TimeZone t = getTimeZoneInternal(s[i]); - if (t == null || t.getRawOffset() != rawOffset) - s[i] = null; - else - count++; + TimeZone t = getTimeZoneInternal(s[i]); + if (t == null || t.getRawOffset() != rawOffset) + s[i] = null; + else + count++; } String[] ids = new String[count]; count = 0; @@ -1658,28 +1658,28 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable boolean top = prefix.length() == 0; list.add (files); for (int i = 0; i < files.length; i++) - { - if (top - && (files[i].equals("posix") - || files[i].equals("right") - || files[i].endsWith(".tab") - || aliases0.get(files[i]) != null)) - { - files[i] = null; - count--; - continue; - } - - File f = new File(d, files[i]); - if (f.isDirectory()) - { - count += getAvailableIDs(f, prefix + files[i] - + File.separatorChar, list) - 1; - files[i] = null; - } - else - files[i] = prefix + files[i]; - } + { + if (top + && (files[i].equals("posix") + || files[i].equals("right") + || files[i].endsWith(".tab") + || aliases0.get(files[i]) != null)) + { + files[i] = null; + count--; + continue; + } + + File f = new File(d, files[i]); + if (f.isDirectory()) + { + count += getAvailableIDs(f, prefix + files[i] + + File.separatorChar, list) - 1; + files[i] = null; + } + else + files[i] = prefix + files[i]; + } return count; } @@ -1691,45 +1691,45 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable { synchronized (TimeZone.class) { - HashMap h = timezones(); - if (zoneinfo_dir == null) - return (String[]) h.keySet().toArray(new String[h.size()]); - - if (availableIDs != null) - { - String[] ids = new String[availableIDs.length]; - for (int i = 0; i < availableIDs.length; i++) - ids[i] = availableIDs[i]; - return ids; - } - - File d = new File(zoneinfo_dir); - ArrayList list = new ArrayList(30); - int count = getAvailableIDs(d, "", list) + aliases0.size(); - availableIDs = new String[count]; - String[] ids = new String[count]; - - count = 0; - for (int i = 0; i < list.size(); i++) - { - String[] s = (String[]) list.get(i); - for (int j = 0; j < s.length; j++) - if (s[j] != null) - { - availableIDs[count] = s[j]; - ids[count++] = s[j]; - } - } - - Iterator iter = aliases0.entrySet().iterator(); - while (iter.hasNext()) - { - Map.Entry entry = (Map.Entry) iter.next(); - availableIDs[count] = (String) entry.getKey(); - ids[count++] = (String) entry.getKey(); - } - - return ids; + HashMap h = timezones(); + if (zoneinfo_dir == null) + return (String[]) h.keySet().toArray(new String[h.size()]); + + if (availableIDs != null) + { + String[] ids = new String[availableIDs.length]; + for (int i = 0; i < availableIDs.length; i++) + ids[i] = availableIDs[i]; + return ids; + } + + File d = new File(zoneinfo_dir); + ArrayList list = new ArrayList(30); + int count = getAvailableIDs(d, "", list) + aliases0.size(); + availableIDs = new String[count]; + String[] ids = new String[count]; + + count = 0; + for (int i = 0; i < list.size(); i++) + { + String[] s = (String[]) list.get(i); + for (int j = 0; j < s.length; j++) + if (s[j] != null) + { + availableIDs[count] = s[j]; + ids[count++] = s[j]; + } + } + + Iterator iter = aliases0.entrySet().iterator(); + while (iter.hasNext()) + { + Map.Entry entry = (Map.Entry) iter.next(); + availableIDs[count] = (String) entry.getKey(); + ids[count++] = (String) entry.getKey(); + } + + return ids; } } @@ -1771,11 +1771,11 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable { try { - return super.clone(); + return super.clone(); } catch (CloneNotSupportedException ex) { - return null; + return null; } } } diff --git a/libjava/classpath/java/util/Timer.java b/libjava/classpath/java/util/Timer.java index 9b23a8f..9902755 100644 --- a/libjava/classpath/java/util/Timer.java +++ b/libjava/classpath/java/util/Timer.java @@ -111,11 +111,11 @@ public class Timer { elements++; if (elements == heap.length) - { - TimerTask new_heap[] = new TimerTask[heap.length * 2]; - System.arraycopy(heap, 0, new_heap, 0, heap.length); - heap = new_heap; - } + { + TimerTask new_heap[] = new TimerTask[heap.length * 2]; + System.arraycopy(heap, 0, new_heap, 0, heap.length); + heap = new_heap; + } heap[elements] = task; } @@ -130,11 +130,11 @@ public class Timer heap[elements] = null; elements--; if (elements + DEFAULT_SIZE / 2 <= (heap.length / 4)) - { - TimerTask new_heap[] = new TimerTask[heap.length / 2]; - System.arraycopy(heap, 0, new_heap, 0, elements + 1); - heap = new_heap; - } + { + TimerTask new_heap[] = new TimerTask[heap.length / 2]; + System.arraycopy(heap, 0, new_heap, 0, elements + 1); + heap = new_heap; + } } /** @@ -145,25 +145,25 @@ public class Timer { // Check if it is legal to add another element if (heap == null) - { - throw new IllegalStateException - ("cannot enqueue when stop() has been called on queue"); - } + { + throw new IllegalStateException + ("cannot enqueue when stop() has been called on queue"); + } - heap[0] = task; // sentinel - add(task); // put the new task at the end + heap[0] = task; // sentinel + add(task); // put the new task at the end // Now push the task up in the heap until it has reached its place int child = elements; int parent = child / 2; while (heap[parent].scheduled > task.scheduled) - { - heap[child] = heap[parent]; - child = parent; - parent = child / 2; - } + { + heap[child] = heap[parent]; + child = parent; + parent = child / 2; + } // This is the correct place for the new task heap[child] = task; - heap[0] = null; // clear sentinel + heap[0] = null; // clear sentinel // Maybe sched() is waiting for a new element this.notify(); } @@ -175,13 +175,13 @@ public class Timer private TimerTask top() { if (elements == 0) - { - return null; - } + { + return null; + } else - { - return heap[1]; - } + { + return heap[1]; + } } /** @@ -195,50 +195,50 @@ public class Timer TimerTask task = null; while (task == null) - { - // Get the next task - task = top(); - - // return null when asked to stop - // or if asked to return null when the queue is empty - if ((heap == null) || (task == null && nullOnEmpty)) - { - return null; - } - - // Do we have a task? - if (task != null) - { - // The time to wait until the task should be served - long time = task.scheduled - System.currentTimeMillis(); - if (time > 0) - { - // This task should not yet be served - // So wait until this task is ready - // or something else happens to the queue - task = null; // set to null to make sure we call top() - try - { - this.wait(time); - } - catch (InterruptedException _) - { - } - } - } - else - { - // wait until a task is added - // or something else happens to the queue - try - { - this.wait(); - } - catch (InterruptedException _) - { - } - } - } + { + // Get the next task + task = top(); + + // return null when asked to stop + // or if asked to return null when the queue is empty + if ((heap == null) || (task == null && nullOnEmpty)) + { + return null; + } + + // Do we have a task? + if (task != null) + { + // The time to wait until the task should be served + long time = task.scheduled - System.currentTimeMillis(); + if (time > 0) + { + // This task should not yet be served + // So wait until this task is ready + // or something else happens to the queue + task = null; // set to null to make sure we call top() + try + { + this.wait(time); + } + catch (InterruptedException _) + { + } + } + } + else + { + // wait until a task is added + // or something else happens to the queue + try + { + this.wait(); + } + catch (InterruptedException _) + { + } + } + } // reconstruct the heap TimerTask lastTask = heap[elements]; @@ -249,22 +249,22 @@ public class Timer int child = 2; heap[1] = lastTask; while (child <= elements) - { - if (child < elements) - { - if (heap[child].scheduled > heap[child + 1].scheduled) - { - child++; - } - } - - if (lastTask.scheduled <= heap[child].scheduled) - break; // found the correct place (the parent) - done - - heap[parent] = heap[child]; - parent = child; - child = parent * 2; - } + { + if (child < elements) + { + if (heap[child].scheduled > heap[child + 1].scheduled) + { + child++; + } + } + + if (lastTask.scheduled <= heap[child].scheduled) + break; // found the correct place (the parent) - done + + heap[parent] = heap[child]; + parent = child; + child = parent * 2; + } // this is the correct new place for the lastTask heap[parent] = lastTask; @@ -306,53 +306,53 @@ public class Timer // Null out any elements that are canceled. Skip element 0 as // it is the sentinel. for (int i = elements; i > 0; --i) - { - if (heap[i].scheduled < 0) - { - ++removed; - - // Remove an element by pushing the appropriate child - // into place, and then iterating to the bottom of the - // tree. - int index = i; - while (heap[index] != null) - { - int child = 2 * index; - if (child >= heap.length) - { - // Off end; we're done. - heap[index] = null; - break; - } - - if (child + 1 >= heap.length || heap[child + 1] == null) - { - // Nothing -- we're done. - } - else if (heap[child] == null - || (heap[child].scheduled - > heap[child + 1].scheduled)) - ++child; - heap[index] = heap[child]; - index = child; - } - } - } + { + if (heap[i].scheduled < 0) + { + ++removed; + + // Remove an element by pushing the appropriate child + // into place, and then iterating to the bottom of the + // tree. + int index = i; + while (heap[index] != null) + { + int child = 2 * index; + if (child >= heap.length) + { + // Off end; we're done. + heap[index] = null; + break; + } + + if (child + 1 >= heap.length || heap[child + 1] == null) + { + // Nothing -- we're done. + } + else if (heap[child] == null + || (heap[child].scheduled + > heap[child + 1].scheduled)) + ++child; + heap[index] = heap[child]; + index = child; + } + } + } // Make a new heap if we shrank enough. int newLen = heap.length; while (elements - removed + DEFAULT_SIZE / 2 <= newLen / 4) - newLen /= 2; + newLen /= 2; if (newLen != heap.length) - { - TimerTask[] newHeap = new TimerTask[newLen]; - System.arraycopy(heap, 0, newHeap, 0, elements + 1); - heap = newHeap; - } + { + TimerTask[] newHeap = new TimerTask[newLen]; + System.arraycopy(heap, 0, newHeap, 0, elements + 1); + heap = newHeap; + } return removed; } - } // TaskQueue + } // TaskQueue /** * The scheduler that executes all the tasks on a particular TaskQueue, @@ -378,63 +378,63 @@ public class Timer { TimerTask task; while ((task = queue.serve()) != null) - { - // If this task has not been canceled - if (task.scheduled >= 0) - { - - // Mark execution time - task.lastExecutionTime = task.scheduled; - - // Repeatable task? - if (task.period < 0) - { - // Last time this task is executed - task.scheduled = -1; - } - - // Run the task - try - { - task.run(); - } + { + // If this task has not been canceled + if (task.scheduled >= 0) + { + + // Mark execution time + task.lastExecutionTime = task.scheduled; + + // Repeatable task? + if (task.period < 0) + { + // Last time this task is executed + task.scheduled = -1; + } + + // Run the task + try + { + task.run(); + } catch (ThreadDeath death) { // If an exception escapes, the Timer becomes invalid. queue.stop(); throw death; } - catch (Throwable t) - { - // If an exception escapes, the Timer becomes invalid. + catch (Throwable t) + { + // If an exception escapes, the Timer becomes invalid. queue.stop(); - } - } - - // Calculate next time and possibly re-enqueue. - if (task.scheduled >= 0) - { - if (task.fixed) - { - task.scheduled += task.period; - } - else - { - task.scheduled = task.period + System.currentTimeMillis(); - } - - try - { - queue.enqueue(task); - } - catch (IllegalStateException ise) - { - // Ignore. Apparently the Timer queue has been stopped. - } - } - } + } + } + + // Calculate next time and possibly re-enqueue. + if (task.scheduled >= 0) + { + if (task.fixed) + { + task.scheduled += task.period; + } + else + { + task.scheduled = task.period + System.currentTimeMillis(); + } + + try + { + queue.enqueue(task); + } + catch (IllegalStateException ise) + { + // Ignore. Apparently the Timer queue has been stopped. + } + } + } } - } // Scheduler + } // Scheduler // Number of Timers created. // Used for creating nice Thread names. @@ -474,11 +474,11 @@ public class Timer this(daemon, Thread.NORM_PRIORITY); } - /** - * Create a new Timer whose Thread has the indicated name. It will have - * normal priority and will not be a daemon thread. + /** + * Create a new Timer whose Thread has the indicated name. It will have + * normal priority and will not be a daemon thread. * @param name the name of the Thread - * @since 1.5 + * @since 1.5 */ public Timer(String name) { @@ -486,7 +486,7 @@ public class Timer } /** - * Create a new Timer whose Thread has the indicated name. It will have + * Create a new Timer whose Thread has the indicated name. It will have * normal priority. The boolean argument controls whether or not it * will be a daemon thread. * @param name the name of the Thread @@ -548,24 +548,24 @@ public class Timer if (task.scheduled == 0 && task.lastExecutionTime == -1) { - task.scheduled = time; - task.period = period; - task.fixed = fixed; + task.scheduled = time; + task.period = period; + task.fixed = fixed; } else { - throw new IllegalStateException - ("task was already scheduled or canceled"); + throw new IllegalStateException + ("task was already scheduled or canceled"); } if (!this.canceled && this.thread != null) { - queue.enqueue(task); + queue.enqueue(task); } else { - throw new IllegalStateException - ("timer was canceled or scheduler thread has died"); + throw new IllegalStateException + ("timer was canceled or scheduler thread has died"); } } @@ -573,7 +573,7 @@ public class Timer { if (delay < 0) { - throw new IllegalArgumentException("delay is negative"); + throw new IllegalArgumentException("delay is negative"); } } @@ -581,7 +581,7 @@ public class Timer { if (period < 0) { - throw new IllegalArgumentException("period is negative"); + throw new IllegalArgumentException("period is negative"); } } diff --git a/libjava/classpath/java/util/TreeMap.java b/libjava/classpath/java/util/TreeMap.java index 99a42cb..87c532f 100644 --- a/libjava/classpath/java/util/TreeMap.java +++ b/libjava/classpath/java/util/TreeMap.java @@ -446,7 +446,7 @@ public class TreeMap<K, V> extends AbstractMap<K, V> * (or equal to, if <code>inclusive</code> is true) <code>toKey</code>. * The returned map is backed by the original, so changes in one appear * in the other. The submap will throw an {@link IllegalArgumentException} - * for any attempt to access or add an element beyond the specified cutoff. + * for any attempt to access or add an element beyond the specified cutoff. * * @param toKey the cutoff point * @param inclusive true if the cutoff point should be included. @@ -459,8 +459,8 @@ public class TreeMap<K, V> extends AbstractMap<K, V> */ public NavigableMap<K, V> headMap(K toKey, boolean inclusive) { - return new SubMap((K)(Object)nil, inclusive - ? successor(getNode(toKey)).key : toKey); + return new SubMap((K)(Object)nil, inclusive + ? successor(getNode(toKey)).key : toKey); } /** @@ -641,7 +641,7 @@ public class TreeMap<K, V> extends AbstractMap<K, V> * <code>toKey</code>. The returned map is backed by the original, so * changes in one appear in the other. The submap will throw an * {@link IllegalArgumentException} for any attempt to access or add an - * element beyond the specified cutoffs. + * element beyond the specified cutoffs. * * @param fromKey the low cutoff point * @param fromInclusive true if the low cutoff point should be included. @@ -655,10 +655,10 @@ public class TreeMap<K, V> extends AbstractMap<K, V> * @throws IllegalArgumentException if fromKey is greater than toKey */ public NavigableMap<K, V> subMap(K fromKey, boolean fromInclusive, - K toKey, boolean toInclusive) + K toKey, boolean toInclusive) { return new SubMap(fromInclusive ? fromKey : successor(getNode(fromKey)).key, - toInclusive ? successor(getNode(toKey)).key : toKey); + toInclusive ? successor(getNode(toKey)).key : toKey); } /** @@ -701,7 +701,7 @@ public class TreeMap<K, V> extends AbstractMap<K, V> public NavigableMap<K, V> tailMap(K fromKey, boolean inclusive) { return new SubMap(inclusive ? fromKey : successor(getNode(fromKey)).key, - (K)(Object)nil); + (K)(Object)nil); } /** @@ -873,9 +873,9 @@ public class TreeMap<K, V> extends AbstractMap<K, V> { if (count == 0) { - root = nil; - size = 0; - return; + root = nil; + size = 0; + return; } // We color every row of nodes black, except for the overflow nodes. @@ -1601,7 +1601,7 @@ public class TreeMap<K, V> extends AbstractMap<K, V> { Entry<K,V> n = TreeMap.this.ceilingEntry(key); if (n != null && keyInRange(n.getKey())) - return n; + return n; return null; } @@ -1609,9 +1609,9 @@ public class TreeMap<K, V> extends AbstractMap<K, V> { K found = TreeMap.this.ceilingKey(key); if (keyInRange(found)) - return found; + return found; else - return null; + return null; } public NavigableSet<K> descendingKeySet() @@ -1622,10 +1622,10 @@ public class TreeMap<K, V> extends AbstractMap<K, V> public NavigableMap<K,V> descendingMap() { if (descendingMap == null) - descendingMap = new DescendingMap(this); + descendingMap = new DescendingMap(this); return descendingMap; } - + public void clear() { Node next = lowestGreaterThan(minKey, true); @@ -1674,7 +1674,7 @@ public class TreeMap<K, V> extends AbstractMap<K, V> { Node<K,V> node = lowestGreaterThan(minKey, true); if (node == nil || ! keyInRange(node.key)) - return null; + return null; return node; } @@ -1690,7 +1690,7 @@ public class TreeMap<K, V> extends AbstractMap<K, V> { Entry<K,V> n = TreeMap.this.floorEntry(key); if (n != null && keyInRange(n.getKey())) - return n; + return n; return null; } @@ -1698,9 +1698,9 @@ public class TreeMap<K, V> extends AbstractMap<K, V> { K found = TreeMap.this.floorKey(key); if (keyInRange(found)) - return found; + return found; else - return null; + return null; } public V get(Object key) @@ -1719,8 +1719,8 @@ public class TreeMap<K, V> extends AbstractMap<K, V> { if (!keyInRange(toKey)) throw new IllegalArgumentException("Key outside submap range"); - return new SubMap(minKey, (inclusive ? - successor(getNode(toKey)).key : toKey)); + return new SubMap(minKey, (inclusive ? + successor(getNode(toKey)).key : toKey)); } public Set<K> keySet() @@ -1736,7 +1736,7 @@ public class TreeMap<K, V> extends AbstractMap<K, V> { Entry<K,V> n = TreeMap.this.higherEntry(key); if (n != null && keyInRange(n.getKey())) - return n; + return n; return null; } @@ -1744,9 +1744,9 @@ public class TreeMap<K, V> extends AbstractMap<K, V> { K found = TreeMap.this.higherKey(key); if (keyInRange(found)) - return found; + return found; else - return null; + return null; } public Entry<K,V> lastEntry() @@ -1766,7 +1766,7 @@ public class TreeMap<K, V> extends AbstractMap<K, V> { Entry<K,V> n = TreeMap.this.lowerEntry(key); if (n != null && keyInRange(n.getKey())) - return n; + return n; return null; } @@ -1774,9 +1774,9 @@ public class TreeMap<K, V> extends AbstractMap<K, V> { K found = TreeMap.this.lowerKey(key); if (keyInRange(found)) - return found; + return found; else - return null; + return null; } public NavigableSet<K> navigableKeySet() @@ -1785,14 +1785,14 @@ public class TreeMap<K, V> extends AbstractMap<K, V> // Create an AbstractSet with custom implementations of those methods // that can be overriden easily and efficiently. this.nKeys = new SubMap.NavigableKeySet(); - return this.nKeys; + return this.nKeys; } public Entry<K,V> pollFirstEntry() { Entry<K,V> e = firstEntry(); if (e != null) - removeNode((Node<K,V>) e); + removeNode((Node<K,V>) e); return e; } @@ -1800,7 +1800,7 @@ public class TreeMap<K, V> extends AbstractMap<K, V> { Entry<K,V> e = lastEntry(); if (e != null) - removeNode((Node<K,V>) e); + removeNode((Node<K,V>) e); return e; } @@ -1837,25 +1837,25 @@ public class TreeMap<K, V> extends AbstractMap<K, V> } public NavigableMap<K,V> subMap(K fromKey, boolean fromInclusive, - K toKey, boolean toInclusive) + K toKey, boolean toInclusive) { if (! keyInRange(fromKey) || ! keyInRange(toKey)) throw new IllegalArgumentException("key outside range"); - return new SubMap(fromInclusive ? fromKey : successor(getNode(fromKey)).key, - toInclusive ? successor(getNode(toKey)).key : toKey); + return new SubMap(fromInclusive ? fromKey : successor(getNode(fromKey)).key, + toInclusive ? successor(getNode(toKey)).key : toKey); } public SortedMap<K, V> tailMap(K fromKey) { return tailMap(fromKey, true); } - + public NavigableMap<K,V> tailMap(K fromKey, boolean inclusive) { if (! keyInRange(fromKey)) throw new IllegalArgumentException("key outside range"); return new SubMap(inclusive ? fromKey : successor(getNode(fromKey)).key, - maxKey); + maxKey); } public Collection<V> values() @@ -1884,47 +1884,47 @@ public class TreeMap<K, V> extends AbstractMap<K, V> }; return this.values; } - + private class KeySet extends AbstractSet<K> { public int size() { - return SubMap.this.size(); + return SubMap.this.size(); } - + public Iterator<K> iterator() { - Node first = lowestGreaterThan(minKey, true); - Node max = lowestGreaterThan(maxKey, false); - return new TreeIterator(KEYS, first, max); + Node first = lowestGreaterThan(minKey, true); + Node max = lowestGreaterThan(maxKey, false); + return new TreeIterator(KEYS, first, max); } - + public void clear() { - SubMap.this.clear(); + SubMap.this.clear(); } - + public boolean contains(Object o) { - if (! keyInRange((K) o)) - return false; - return getNode((K) o) != nil; + if (! keyInRange((K) o)) + return false; + return getNode((K) o) != nil; } - + public boolean remove(Object o) { - if (! keyInRange((K) o)) - return false; - Node n = getNode((K) o); - if (n != nil) - { - removeNode(n); - return true; - } - return false; - } - + if (! keyInRange((K) o)) + return false; + Node n = getNode((K) o); + if (n != nil) + { + removeNode(n); + return true; + } + return false; + } + } // class SubMap.KeySet private final class NavigableKeySet @@ -1934,91 +1934,91 @@ public class TreeMap<K, V> extends AbstractMap<K, V> public K ceiling(K k) { - return SubMap.this.ceilingKey(k); + return SubMap.this.ceilingKey(k); } - + public Comparator<? super K> comparator() { - return comparator; + return comparator; } - + public Iterator<K> descendingIterator() { - return descendingSet().iterator(); + return descendingSet().iterator(); } - + public NavigableSet<K> descendingSet() { - return new DescendingSet(this); + return new DescendingSet(this); } - + public K first() { - return SubMap.this.firstKey(); + return SubMap.this.firstKey(); } - + public K floor(K k) { - return SubMap.this.floorKey(k); + return SubMap.this.floorKey(k); } - + public SortedSet<K> headSet(K to) { - return headSet(to, false); + return headSet(to, false); } public NavigableSet<K> headSet(K to, boolean inclusive) { - return SubMap.this.headMap(to, inclusive).navigableKeySet(); + return SubMap.this.headMap(to, inclusive).navigableKeySet(); } public K higher(K k) { - return SubMap.this.higherKey(k); + return SubMap.this.higherKey(k); } public K last() { - return SubMap.this.lastKey(); + return SubMap.this.lastKey(); } public K lower(K k) { - return SubMap.this.lowerKey(k); + return SubMap.this.lowerKey(k); } public K pollFirst() { - return SubMap.this.pollFirstEntry().getKey(); + return SubMap.this.pollFirstEntry().getKey(); } public K pollLast() { - return SubMap.this.pollLastEntry().getKey(); + return SubMap.this.pollLastEntry().getKey(); } public SortedSet<K> subSet(K from, K to) { - return subSet(from, true, to, false); + return subSet(from, true, to, false); } - + public NavigableSet<K> subSet(K from, boolean fromInclusive, - K to, boolean toInclusive) + K to, boolean toInclusive) { - return SubMap.this.subMap(from, fromInclusive, - to, toInclusive).navigableKeySet(); + return SubMap.this.subMap(from, fromInclusive, + to, toInclusive).navigableKeySet(); } public SortedSet<K> tailSet(K from) { - return tailSet(from, true); + return tailSet(from, true); } - + public NavigableSet<K> tailSet(K from, boolean inclusive) { - return SubMap.this.tailMap(from, inclusive).navigableKeySet(); + return SubMap.this.tailMap(from, inclusive).navigableKeySet(); } - + } // class SubMap.NavigableKeySet /** @@ -2027,54 +2027,54 @@ public class TreeMap<K, V> extends AbstractMap<K, V> private class EntrySet extends AbstractSet<Entry<K,V>> { - + public int size() { return SubMap.this.size(); } - + public Iterator<Map.Entry<K,V>> iterator() { Node first = lowestGreaterThan(minKey, true); Node max = lowestGreaterThan(maxKey, false); return new TreeIterator(ENTRIES, first, max); } - + public void clear() { SubMap.this.clear(); } - + public boolean contains(Object o) { if (! (o instanceof Map.Entry)) - return false; + return false; Map.Entry<K,V> me = (Map.Entry<K,V>) o; K key = me.getKey(); if (! keyInRange(key)) - return false; + return false; Node<K,V> n = getNode(key); return n != nil && AbstractSet.equals(me.getValue(), n.value); } - + public boolean remove(Object o) { if (! (o instanceof Map.Entry)) - return false; + return false; Map.Entry<K,V> me = (Map.Entry<K,V>) o; K key = me.getKey(); if (! keyInRange(key)) - return false; + return false; Node<K,V> n = getNode(key); if (n != nil && AbstractSet.equals(me.getValue(), n.value)) - { - removeNode(n); - return true; - } + { + removeNode(n); + return true; + } return false; } } // class SubMap.EntrySet - + private final class NavigableEntrySet extends EntrySet implements NavigableSet<Entry<K,V>> @@ -2082,103 +2082,103 @@ public class TreeMap<K, V> extends AbstractMap<K, V> public Entry<K,V> ceiling(Entry<K,V> e) { - return SubMap.this.ceilingEntry(e.getKey()); + return SubMap.this.ceilingEntry(e.getKey()); } - + public Comparator<? super Entry<K,V>> comparator() { - return new Comparator<Entry<K,V>>() - { - public int compare(Entry<K,V> t1, Entry<K,V> t2) - { - return comparator.compare(t1.getKey(), t2.getKey()); - } - }; + return new Comparator<Entry<K,V>>() + { + public int compare(Entry<K,V> t1, Entry<K,V> t2) + { + return comparator.compare(t1.getKey(), t2.getKey()); + } + }; } - + public Iterator<Entry<K,V>> descendingIterator() { - return descendingSet().iterator(); + return descendingSet().iterator(); } - + public NavigableSet<Entry<K,V>> descendingSet() { - return new DescendingSet(this); + return new DescendingSet(this); } - + public Entry<K,V> first() { - return SubMap.this.firstEntry(); + return SubMap.this.firstEntry(); } - + public Entry<K,V> floor(Entry<K,V> e) { - return SubMap.this.floorEntry(e.getKey()); + return SubMap.this.floorEntry(e.getKey()); } - + public SortedSet<Entry<K,V>> headSet(Entry<K,V> to) { - return headSet(to, false); + return headSet(to, false); } public NavigableSet<Entry<K,V>> headSet(Entry<K,V> to, boolean inclusive) { - return (NavigableSet<Entry<K,V>>) - SubMap.this.headMap(to.getKey(), inclusive).entrySet(); + return (NavigableSet<Entry<K,V>>) + SubMap.this.headMap(to.getKey(), inclusive).entrySet(); } public Entry<K,V> higher(Entry<K,V> e) { - return SubMap.this.higherEntry(e.getKey()); + return SubMap.this.higherEntry(e.getKey()); } public Entry<K,V> last() { - return SubMap.this.lastEntry(); + return SubMap.this.lastEntry(); } public Entry<K,V> lower(Entry<K,V> e) { - return SubMap.this.lowerEntry(e.getKey()); + return SubMap.this.lowerEntry(e.getKey()); } public Entry<K,V> pollFirst() { - return SubMap.this.pollFirstEntry(); + return SubMap.this.pollFirstEntry(); } public Entry<K,V> pollLast() { - return SubMap.this.pollLastEntry(); + return SubMap.this.pollLastEntry(); } public SortedSet<Entry<K,V>> subSet(Entry<K,V> from, Entry<K,V> to) { - return subSet(from, true, to, false); + return subSet(from, true, to, false); } - + public NavigableSet<Entry<K,V>> subSet(Entry<K,V> from, boolean fromInclusive, - Entry<K,V> to, boolean toInclusive) + Entry<K,V> to, boolean toInclusive) { - return (NavigableSet<Entry<K,V>>) - SubMap.this.subMap(from.getKey(), fromInclusive, - to.getKey(), toInclusive).entrySet(); + return (NavigableSet<Entry<K,V>>) + SubMap.this.subMap(from.getKey(), fromInclusive, + to.getKey(), toInclusive).entrySet(); } public SortedSet<Entry<K,V>> tailSet(Entry<K,V> from) { - return tailSet(from, true); + return tailSet(from, true); } - + public NavigableSet<Entry<K,V>> tailSet(Entry<K,V> from, boolean inclusive) { - return (NavigableSet<Entry<K,V>>) - SubMap.this.tailMap(from.getKey(), inclusive).navigableKeySet(); + return (NavigableSet<Entry<K,V>>) + SubMap.this.tailMap(from.getKey(), inclusive).navigableKeySet(); } - + } // class SubMap.NavigableEntrySet -} // class SubMap +} // class SubMap /** * Returns the entry associated with the least or lowest key @@ -2326,7 +2326,7 @@ public class TreeMap<K, V> extends AbstractMap<K, V> * <code>null</code> if there is no such key. * * @param key the key relative to the returned entry. - * @return the entry with the least key greater than + * @return the entry with the least key greater than * the given key, or <code>null</code> if there is * no such key. * @throws ClassCastException if the specified key can not @@ -2385,7 +2385,7 @@ public class TreeMap<K, V> extends AbstractMap<K, V> * <code>null</code> if there is no such key. * * @param key the key relative to the returned entry. - * @return the entry with the greatest key less than + * @return the entry with the greatest key less than * the given key, or <code>null</code> if there is * no such key. * @throws ClassCastException if the specified key can not @@ -2473,7 +2473,7 @@ public class TreeMap<K, V> extends AbstractMap<K, V> Entry<K,V> e = lastEntry(); if (e != null) removeNode((Node<K,V>)e); - return e; + return e; } /** @@ -2524,7 +2524,7 @@ public class TreeMap<K, V> extends AbstractMap<K, V> { this.map = map; } - + public Map.Entry<DK,DV> ceilingEntry(DK key) { return map.floorEntry(key); @@ -2549,7 +2549,7 @@ public class TreeMap<K, V> extends AbstractMap<K, V> { return map.containsKey(o); } - + public boolean containsValue(Object o) { return map.containsValue(o); @@ -2568,9 +2568,9 @@ public class TreeMap<K, V> extends AbstractMap<K, V> public Set<Entry<DK,DV>> entrySet() { if (entries == null) - entries = - new DescendingSet<Entry<DK,DV>>((NavigableSet<Entry<DK,DV>>) - map.entrySet()); + entries = + new DescendingSet<Entry<DK,DV>>((NavigableSet<Entry<DK,DV>>) + map.entrySet()); return entries; } @@ -2632,7 +2632,7 @@ public class TreeMap<K, V> extends AbstractMap<K, V> public Set<DK> keySet() { if (keys == null) - keys = new DescendingSet<DK>(map.navigableKeySet()); + keys = new DescendingSet<DK>(map.navigableKeySet()); return keys; } @@ -2664,7 +2664,7 @@ public class TreeMap<K, V> extends AbstractMap<K, V> public NavigableSet<DK> navigableKeySet() { if (nKeys == null) - nKeys = new DescendingSet<DK>(map.navigableKeySet()); + nKeys = new DescendingSet<DK>(map.navigableKeySet()); return nKeys; } @@ -2704,10 +2704,10 @@ public class TreeMap<K, V> extends AbstractMap<K, V> } public NavigableMap<DK,DV> subMap(DK fromKey, boolean fromInclusive, - DK toKey, boolean toInclusive) + DK toKey, boolean toInclusive) { return new DescendingMap(map.subMap(fromKey, fromInclusive, - toKey, toInclusive)); + toKey, toInclusive)); } public SortedMap<DK,DV> tailMap(DK fromKey) @@ -2726,11 +2726,11 @@ public class TreeMap<K, V> extends AbstractMap<K, V> final Iterator<Entry<DK,DV>> it = entrySet().iterator(); while (it.hasNext()) { - final Entry<DK,DV> e = it.next(); + final Entry<DK,DV> e = it.next(); r.append(e.getKey()); r.append('='); r.append(e.getValue()); - r.append(", "); + r.append(", "); } r.replace(r.length() - 2, r.length(), "}"); return r.toString(); @@ -2742,53 +2742,53 @@ public class TreeMap<K, V> extends AbstractMap<K, V> // Create an AbstractCollection with custom implementations of those // methods that can be overriden easily and efficiently. values = new AbstractCollection() - { - public int size() - { - return DescendingMap.this.size(); - } - - public Iterator<DV> iterator() - { - return new Iterator<DV>() - { - /** The last Entry returned by a next() call. */ - private Entry<DK,DV> last; - - /** The next entry that should be returned by next(). */ - private Entry<DK,DV> next = firstEntry(); - - public boolean hasNext() - { - return next != null; - } - - public DV next() - { - if (next == null) - throw new NoSuchElementException(); - last = next; - next = higherEntry(last.getKey()); - - return last.getValue(); - } - - public void remove() - { - if (last == null) - throw new IllegalStateException(); - - DescendingMap.this.remove(last.getKey()); - last = null; - } - }; - } - - public void clear() - { - DescendingMap.this.clear(); - } - }; + { + public int size() + { + return DescendingMap.this.size(); + } + + public Iterator<DV> iterator() + { + return new Iterator<DV>() + { + /** The last Entry returned by a next() call. */ + private Entry<DK,DV> last; + + /** The next entry that should be returned by next(). */ + private Entry<DK,DV> next = firstEntry(); + + public boolean hasNext() + { + return next != null; + } + + public DV next() + { + if (next == null) + throw new NoSuchElementException(); + last = next; + next = higherEntry(last.getKey()); + + return last.getValue(); + } + + public void remove() + { + if (last == null) + throw new IllegalStateException(); + + DescendingMap.this.remove(last.getKey()); + last = null; + } + }; + } + + public void clear() + { + DescendingMap.this.clear(); + } + }; return values; } @@ -2815,17 +2815,17 @@ public class TreeMap<K, V> extends AbstractMap<K, V> { TreeMap.this.clear(); } - + public boolean contains(Object o) { return containsKey(o); } - + public boolean remove(Object key) { Node<K,V> n = getNode((K) key); if (n == nil) - return false; + return false; removeNode(n); return true; } @@ -2912,10 +2912,10 @@ public class TreeMap<K, V> extends AbstractMap<K, V> } public NavigableSet<K> subSet(K from, boolean fromInclusive, - K to, boolean toInclusive) + K to, boolean toInclusive) { return subMap(from, fromInclusive, - to, toInclusive).navigableKeySet(); + to, toInclusive).navigableKeySet(); } public SortedSet<K> tailSet(K from) @@ -2959,7 +2959,7 @@ public class TreeMap<K, V> extends AbstractMap<K, V> { this.set = set; } - + public boolean add(D e) { return set.add(e); @@ -3048,38 +3048,38 @@ public class TreeMap<K, V> extends AbstractMap<K, V> public Iterator<D> iterator() { return new Iterator<D>() - { - - /** The last element returned by a next() call. */ - private D last; - - /** The next element that should be returned by next(). */ - private D next = first(); - - public boolean hasNext() - { - return next != null; - } - - public D next() - { - if (next == null) - throw new NoSuchElementException(); - last = next; - next = higher(last); - - return last; - } - - public void remove() - { - if (last == null) - throw new IllegalStateException(); - - DescendingSet.this.remove(last); - last = null; - } - }; + { + + /** The last element returned by a next() call. */ + private D last; + + /** The next element that should be returned by next(). */ + private D next = first(); + + public boolean hasNext() + { + return next != null; + } + + public D next() + { + if (next == null) + throw new NoSuchElementException(); + last = next; + next = higher(last); + + return last; + } + + public void remove() + { + if (last == null) + throw new IllegalStateException(); + + DescendingSet.this.remove(last); + last = null; + } + }; } public D last() @@ -3128,10 +3128,10 @@ public class TreeMap<K, V> extends AbstractMap<K, V> } public NavigableSet<D> subSet(D from, boolean fromInclusive, - D to, boolean toInclusive) + D to, boolean toInclusive) { return new DescendingSet(set.subSet(from, fromInclusive, - to, toInclusive)); + to, toInclusive)); } public SortedSet<D> tailSet(D from) @@ -3164,12 +3164,12 @@ public class TreeMap<K, V> extends AbstractMap<K, V> final Iterator<D> it = iterator(); while (it.hasNext()) { - final D o = it.next(); - if (o == this) - r.append("<this>"); - else - r.append(o); - r.append(", "); + final D o = it.next(); + if (o == this) + r.append("<this>"); + else + r.append(o); + r.append(", "); } r.replace(r.length() - 2, r.length(), "]"); return r.toString(); @@ -3184,12 +3184,12 @@ public class TreeMap<K, V> extends AbstractMap<K, V> { return size; } - + public Iterator<Map.Entry<K,V>> iterator() { return new TreeIterator(ENTRIES); } - + public void clear() { TreeMap.this.clear(); @@ -3198,68 +3198,68 @@ public class TreeMap<K, V> extends AbstractMap<K, V> public boolean contains(Object o) { if (! (o instanceof Map.Entry)) - return false; + return false; Map.Entry<K,V> me = (Map.Entry<K,V>) o; Node<K,V> n = getNode(me.getKey()); return n != nil && AbstractSet.equals(me.getValue(), n.value); } - + public boolean remove(Object o) { if (! (o instanceof Map.Entry)) - return false; + return false; Map.Entry<K,V> me = (Map.Entry<K,V>) o; Node<K,V> n = getNode(me.getKey()); if (n != nil && AbstractSet.equals(me.getValue(), n.value)) - { - removeNode(n); - return true; - } + { + removeNode(n); + return true; + } return false; } } - + private final class NavigableEntrySet extends EntrySet implements NavigableSet<Entry<K,V>> { - + public Entry<K,V> ceiling(Entry<K,V> e) { return ceilingEntry(e.getKey()); } - + public Comparator<? super Entry<K,V>> comparator() { return new Comparator<Entry<K,V>>() - { - public int compare(Entry<K,V> t1, Entry<K,V> t2) - { - return comparator.compare(t1.getKey(), t2.getKey()); - } - }; - } - + { + public int compare(Entry<K,V> t1, Entry<K,V> t2) + { + return comparator.compare(t1.getKey(), t2.getKey()); + } + }; + } + public Iterator<Entry<K,V>> descendingIterator() { return descendingSet().iterator(); } - + public NavigableSet<Entry<K,V>> descendingSet() { return new DescendingSet(this); } - + public Entry<K,V> first() { return firstEntry(); } - + public Entry<K,V> floor(Entry<K,V> e) { return floorEntry(e.getKey()); } - + public SortedSet<Entry<K,V>> headSet(Entry<K,V> to) { return headSet(to, false); @@ -3269,7 +3269,7 @@ public class TreeMap<K, V> extends AbstractMap<K, V> { return (NavigableSet<Entry<K,V>>) headMap(to.getKey(), inclusive).entrySet(); } - + public Entry<K,V> higher(Entry<K,V> e) { return higherEntry(e.getKey()); @@ -3299,24 +3299,24 @@ public class TreeMap<K, V> extends AbstractMap<K, V> { return subSet(from, true, to, false); } - + public NavigableSet<Entry<K,V>> subSet(Entry<K,V> from, boolean fromInclusive, - Entry<K,V> to, boolean toInclusive) + Entry<K,V> to, boolean toInclusive) { return (NavigableSet<Entry<K,V>>) subMap(from.getKey(), fromInclusive, - to.getKey(), toInclusive).entrySet(); + to.getKey(), toInclusive).entrySet(); } public SortedSet<Entry<K,V>> tailSet(Entry<K,V> from) { return tailSet(from, true); } - + public NavigableSet<Entry<K,V>> tailSet(Entry<K,V> from, boolean inclusive) { return (NavigableSet<Entry<K,V>>) tailMap(from.getKey(), inclusive).navigableKeySet(); } - + } // class NavigableEntrySet } // class TreeMap diff --git a/libjava/classpath/java/util/TreeSet.java b/libjava/classpath/java/util/TreeSet.java index 572cda6..06f4fa5 100644 --- a/libjava/classpath/java/util/TreeSet.java +++ b/libjava/classpath/java/util/TreeSet.java @@ -291,7 +291,7 @@ public class TreeSet<T> extends AbstractSet<T> * The returned set is backed by the original, so changes * in one appear in the other. The subset will throw an * {@link IllegalArgumentException} for any attempt to access or add an - * element beyond the specified cutoff. + * element beyond the specified cutoff. * * @param to the cutoff point * @param inclusive true if <code>to</code> should be included. @@ -406,10 +406,10 @@ public class TreeSet<T> extends AbstractSet<T> * @throws IllegalArgumentException if from is greater than to */ public NavigableSet<T> subSet(T from, boolean fromInclusive, - T to, boolean toInclusive) + T to, boolean toInclusive) { return new TreeSet<T>(map.subMap(from, fromInclusive, - to, toInclusive)); + to, toInclusive)); } /** @@ -574,7 +574,7 @@ public class TreeSet<T> extends AbstractSet<T> * no such element. * * @param e the element relative to the returned element. - * @return the least element greater than + * @return the least element greater than * the given element, or <code>null</code> if there is * no such element. * @throws ClassCastException if the specified element can not @@ -596,7 +596,7 @@ public class TreeSet<T> extends AbstractSet<T> * no such element. * * @param e the element relative to the returned element. - * @return the greatest element less than + * @return the greatest element less than * the given element, or <code>null</code> if there is * no such element. * @throws ClassCastException if the specified element can not diff --git a/libjava/classpath/java/util/UUID.java b/libjava/classpath/java/util/UUID.java index 9a402d1..bb25e07 100644 --- a/libjava/classpath/java/util/UUID.java +++ b/libjava/classpath/java/util/UUID.java @@ -44,29 +44,29 @@ import java.security.NoSuchAlgorithmException; /** * This class represents a 128-bit UUID value. - * + * * There are several types of UUID, and while this class can be used to store - * them, only the Leach-Salz (variant 2) UUID specified in RFC-4122 will + * them, only the Leach-Salz (variant 2) UUID specified in RFC-4122 will * give meaningful results from the method calls. * See: http://tools.ietf.org/html/4122 for the details * - * The format of a Leach-Salz (variant 2) time-based (version 1) UUID + * The format of a Leach-Salz (variant 2) time-based (version 1) UUID * is as follows: * time_low - upper 32 bits of the most significant 64 bits, * this is the least-significant part of the timestamp. * * time_mid - bits 16-31 of the most significant 64 bits, - * this is the middle portion of the timestamp. + * this is the middle portion of the timestamp. * - * version - bits 8-15 of the most significant 64 bits. + * version - bits 8-15 of the most significant 64 bits. * * time_hi - bits 0-7 of the most significant 64 bits, * the most significant portion of the timestamp. * * clock_and_reserved - bits 48-63 of the least significant 64 bits. - * a variable number of bits hold the variant + * a variable number of bits hold the variant * (see the spec) - * + * * node identifier - bits 0-47 of the least signficant 64 bits. * * These fields are valid only for version 1, in the remaining versions, @@ -75,8 +75,8 @@ import java.security.NoSuchAlgorithmException; * @since 1.5 * @author Sven de Marothy */ -public final class UUID - extends Object +public final class UUID + extends Object implements Serializable, Comparable<UUID> { private static final long serialVersionUID = -4856846361193249489L; @@ -106,7 +106,7 @@ public final class UUID this.mostSigBits = mostSigBits; this.leastSigBits = leastSigBits; } - + /** * Returns the clock-sequence value of this UUID. * This field only exists in a time-based (version 1) UUID. @@ -147,8 +147,8 @@ public final class UUID { if( !(obj instanceof UUID ) ) return false; - return ( ((UUID)obj).mostSigBits == mostSigBits && - ((UUID)obj).leastSigBits == leastSigBits ); + return ( ((UUID)obj).mostSigBits == mostSigBits && + ((UUID)obj).leastSigBits == leastSigBits ); } /** @@ -164,7 +164,7 @@ public final class UUID StringTokenizer st = new StringTokenizer( name.trim(), "-" ); if( st.countTokens() < 5 ) throw new IllegalArgumentException( "Incorrect UUID string"+ - " representation:"+name ); + " representation:"+name ); long msb = (Long.parseLong(st.nextToken(), 16) << 32); // time low msb |= (Long.parseLong(st.nextToken(), 16) << 16); // time mid @@ -195,18 +195,18 @@ public final class UUID return // time-low first padHex( (( mostSigBits & 0xFFFFFFFF00000000L) >> 32) & 0xFFFFFFFFL, 8) + "-" + // then time-mid - padHex( (( mostSigBits & 0xFFFF0000L ) >> 16), 4 ) + padHex( (( mostSigBits & 0xFFFF0000L ) >> 16), 4 ) + "-" + // time-high - padHex( ( mostSigBits & 0x0000000000000000FFFFL ), 4 ) + padHex( ( mostSigBits & 0x0000000000000000FFFFL ), 4 ) + "-" + // clock (note - no reason to separate high and low here) - padHex( (((leastSigBits & 0xFFFF000000000000L) >> 48) & 0xFFFF), 4 ) + padHex( (((leastSigBits & 0xFFFF000000000000L) >> 48) & 0xFFFF), 4 ) + "-" + // finally the node value. - padHex(leastSigBits & 0xFFFFFFFFFFFFL, 12); + padHex(leastSigBits & 0xFFFFFFFFFFFFL, 12); } /** * Returns the least significant 64 bits of the UUID as a <code>long</code>. - */ + */ public long getLeastSignificantBits() { return leastSigBits; @@ -214,7 +214,7 @@ public final class UUID /** * Returns the most significant 64 bits of the UUID as a <code>long</code>. - */ + */ public long getMostSignificantBits() { return mostSigBits; @@ -238,20 +238,20 @@ public final class UUID * from a series of bytes representing a name. */ public static UUID nameUUIDFromBytes(byte[] name) - { + { long msb, lsb; byte[] hash; try { - MessageDigest md5 = MessageDigest.getInstance("MD5"); - hash = md5.digest( name ); - } - catch (NoSuchAlgorithmException e) + MessageDigest md5 = MessageDigest.getInstance("MD5"); + hash = md5.digest( name ); + } + catch (NoSuchAlgorithmException e) { - throw new UnsupportedOperationException("No MD5 algorithm available."); + throw new UnsupportedOperationException("No MD5 algorithm available."); } - + msb = ((hash[0] & 0xFFL) << 56) | ((hash[1] & 0xFFL) << 48) | ((hash[2] & 0xFFL) << 40) | ((hash[3] & 0xFFL) << 32) | ((hash[4] & 0xFFL) << 24) | ((hash[5] & 0xFFL) << 16) | @@ -262,23 +262,23 @@ public final class UUID ((hash[12] & 0xFFL) << 24) | ((hash[13] & 0xFFL) << 16) | ((hash[14] & 0xFFL) << 8) | (hash[15] & 0xFFL); - lsb &= 0x3FFFFFFFFFFFFFFFL; + lsb &= 0x3FFFFFFFFFFFFFFFL; lsb |= 0x8000000000000000L; // set top two bits to variant 2 - msb &= 0xFFFFFFFFFFFF0FFFL; - msb |= 0x3000; // Version 3; + msb &= 0xFFFFFFFFFFFF0FFFL; + msb |= 0x3000; // Version 3; return new UUID(msb, lsb); } /** - * Returns the 48-bit node value in a long. + * Returns the 48-bit node value in a long. * This field only exists in a time-based (version 1) UUID. * * @throws UnsupportedOperationException if the UUID type is not 1. * @returns a long with the node value in the lower 48 bits. */ - public long node() + public long node() { if( version() != 1 ) throw new UnsupportedOperationException("Not a type 1 UUID"); @@ -286,7 +286,7 @@ public final class UUID } /** - * Returns the 60-bit timestamp value of the UUID in a long. + * Returns the 60-bit timestamp value of the UUID in a long. * This field only exists in a time-based (version 1) UUID. * * @throws UnsupportedOperationException if the UUID type is not 1. @@ -309,15 +309,15 @@ public final class UUID * */ public static UUID randomUUID() - { - long lsb = r.nextLong(); + { + long lsb = r.nextLong(); long msb = r.nextLong(); - lsb &= 0x3FFFFFFFFFFFFFFFL; + lsb &= 0x3FFFFFFFFFFFFFFFL; lsb |= 0x8000000000000000L; // set top two bits to variant 2 - msb &= 0xFFFFFFFFFFFF0FFFL; - msb |= 0x4000; // Version 4; + msb &= 0xFFFFFFFFFFFF0FFFL; + msb |= 0x4000; // Version 4; return new UUID( msb, lsb ); } @@ -350,7 +350,7 @@ public final class UUID return 0; if( (v & 0x02) == 0 ) // variant is 0 1 (Leach-Salz) return 2; - return v; // 6 or 7 + return v; // 6 or 7 } /** diff --git a/libjava/classpath/java/util/UnknownFormatConversionException.java b/libjava/classpath/java/util/UnknownFormatConversionException.java index e37d9d3..7326a82 100644 --- a/libjava/classpath/java/util/UnknownFormatConversionException.java +++ b/libjava/classpath/java/util/UnknownFormatConversionException.java @@ -38,15 +38,15 @@ exception statement from your version. */ package java.util; -/** +/** * Thrown when a {@link Formatter} is supplied with an * unknown conversion. * * @author Tom Tromey (tromey@redhat.com) * @author Andrew John Hughes (gnu_andrew@member.fsf.org) - * @since 1.5 + * @since 1.5 */ -public class UnknownFormatConversionException +public class UnknownFormatConversionException extends IllegalFormatException { private static final long serialVersionUID = 19060418L; diff --git a/libjava/classpath/java/util/UnknownFormatFlagsException.java b/libjava/classpath/java/util/UnknownFormatFlagsException.java index b8f939e..a7f4fc6 100644 --- a/libjava/classpath/java/util/UnknownFormatFlagsException.java +++ b/libjava/classpath/java/util/UnknownFormatFlagsException.java @@ -38,15 +38,15 @@ exception statement from your version. */ package java.util; -/** +/** * Thrown when a {@link Formatter} is supplied with an * unknown flag. * * @author Tom Tromey (tromey@redhat.com) * @author Andrew John Hughes (gnu_andrew@member.fsf.org) - * @since 1.5 + * @since 1.5 */ -public class UnknownFormatFlagsException +public class UnknownFormatFlagsException extends IllegalFormatException { private static final long serialVersionUID = 19370506L; @@ -72,7 +72,7 @@ public class UnknownFormatFlagsException super("Unknown flag passed in " + s); if (s == null) throw new - NullPointerException("Null flags value passed to constructor."); + NullPointerException("Null flags value passed to constructor."); this.flags = s; } diff --git a/libjava/classpath/java/util/Vector.java b/libjava/classpath/java/util/Vector.java index 101a78d..44370a1 100644 --- a/libjava/classpath/java/util/Vector.java +++ b/libjava/classpath/java/util/Vector.java @@ -1,5 +1,5 @@ /* Vector.java -- Class that provides growable arrays. - Copyright (C) 1998, 1999, 2000, 2001, 2004, 2005, 2006, + Copyright (C) 1998, 1999, 2000, 2001, 2004, 2005, 2006, Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -167,8 +167,8 @@ public class Vector<T> extends AbstractList<T> /** * Copies the contents of the Vector into the provided array. If the - * array is too small to fit all the elements in the Vector, an - * {@link IndexOutOfBoundsException} is thrown without modifying the array. + * array is too small to fit all the elements in the Vector, an + * {@link IndexOutOfBoundsException} is thrown without modifying the array. * Old elements in the array are overwritten by the new elements. * * @param a target array for the copy @@ -578,7 +578,7 @@ public class Vector<T> extends AbstractList<T> { if (a.length < elementCount) a = (S[]) Array.newInstance(a.getClass().getComponentType(), - elementCount); + elementCount); else if (a.length > elementCount) a[elementCount] = null; System.arraycopy(elementData, 0, a, 0, elementCount); @@ -800,7 +800,7 @@ public class Vector<T> extends AbstractList<T> int end = index + csize; if (elementCount > 0 && index != elementCount) System.arraycopy(elementData, index, - elementData, end, elementCount - index); + elementData, end, elementCount - index); elementCount += csize; for ( ; index < end; index++) elementData[index] = itr.next(); @@ -941,7 +941,7 @@ public class Vector<T> extends AbstractList<T> // do so). throw new ArrayIndexOutOfBoundsException(index + operator + elementCount); } - + /** * Serializes this object to the given stream. * diff --git a/libjava/classpath/java/util/WeakHashMap.java b/libjava/classpath/java/util/WeakHashMap.java index 1f46029..3e4d347 100644 --- a/libjava/classpath/java/util/WeakHashMap.java +++ b/libjava/classpath/java/util/WeakHashMap.java @@ -86,7 +86,7 @@ import java.lang.ref.WeakReference; * @since 1.2 * @status updated to 1.4 (partial 1.5) */ -public class WeakHashMap<K,V> extends AbstractMap<K,V> +public class WeakHashMap<K,V> extends AbstractMap<K,V> { // WARNING: WeakHashMap is a CORE class in the bootstrap cycle. See the // comments in vm/reference/java/lang/Runtime for implications of this fact. @@ -704,12 +704,12 @@ public class WeakHashMap<K,V> extends AbstractMap<K,V> while (next != bucket) { if (next == null) throw new InternalError("WeakHashMap in incosistent state"); - prev = next; + prev = next; next = prev.next; } if (prev == null) buckets[slot] = bucket.next; - else + else prev.next = bucket.next; size--; diff --git a/libjava/classpath/java/util/concurrent/CopyOnWriteArrayList.java b/libjava/classpath/java/util/concurrent/CopyOnWriteArrayList.java index 0207182..f9f1ac1 100644 --- a/libjava/classpath/java/util/concurrent/CopyOnWriteArrayList.java +++ b/libjava/classpath/java/util/concurrent/CopyOnWriteArrayList.java @@ -75,12 +75,12 @@ import java.util.RandomAccess; * This class is especially useful when used with event handling, like the * following code demonstrates:<br /> * <code><pre> - * + * * CopyOnWriteArrayList<EventListener> listeners = * new CopyOnWriteArrayList<EventListener>(); - * + * * [...] - * + * * for (final EventListener listener : listeners) * { * Runnable dispatcher = new Runnable() { @@ -89,22 +89,22 @@ import java.util.RandomAccess; * listener.preferenceChange(event); * } * }; - * + * * Executor executor = Executors.newSingleThreadExecutor(); * executor.execute(dispatcher); * } * </pre></code> - * + * * @since 1.5 */ -public class CopyOnWriteArrayList<E> +public class CopyOnWriteArrayList<E> implements List<E>, RandomAccess, Cloneable, Serializable { /** - * + * */ private static final long serialVersionUID = 8673264195747942595L; - + /** * Where the data is stored. */ @@ -121,7 +121,7 @@ public class CopyOnWriteArrayList<E> /** * Construct a new ArrayList, and initialize it with the elements in the * supplied Collection. The initial capacity is 110% of the Collection's size. - * + * * @param c * the collection whose elements will initialize this list * @throws NullPointerException @@ -139,7 +139,7 @@ public class CopyOnWriteArrayList<E> /** * Construct a new ArrayList, and initialize it with the elements in the * supplied array. - * + * * @param array * the array used to initialize this list * @throws NullPointerException @@ -152,7 +152,7 @@ public class CopyOnWriteArrayList<E> /** * Returns the number of elements in this list. - * + * * @return the list size */ public int size() @@ -162,7 +162,7 @@ public class CopyOnWriteArrayList<E> /** * Checks if the list is empty. - * + * * @return true if there are no elements */ public boolean isEmpty() @@ -172,7 +172,7 @@ public class CopyOnWriteArrayList<E> /** * Returns true if element is in this ArrayList. - * + * * @param e * the element whose inclusion in the List is being tested * @return true if the list contains e @@ -207,7 +207,7 @@ public class CopyOnWriteArrayList<E> /** * Returns the lowest index at which element appears in this List, or -1 if it * does not appear. - * + * * @param e * the element whose inclusion in the List is being tested * @return the index where e was found @@ -243,7 +243,7 @@ public class CopyOnWriteArrayList<E> /** * Returns the highest index at which element appears in this List, or -1 if * it does not appear. - * + * * @param e * the element whose inclusion in the List is being tested * @return the index where e was found @@ -278,7 +278,7 @@ public class CopyOnWriteArrayList<E> /** * Creates a shallow copy of this ArrayList (elements are not cloned). - * + * * @return the cloned object */ public Object clone() @@ -298,7 +298,7 @@ public class CopyOnWriteArrayList<E> /** * Returns an Object array containing all of the elements in this ArrayList. * The array is independent of this list. - * + * * @return an array representation of this list */ public Object[] toArray() @@ -316,7 +316,7 @@ public class CopyOnWriteArrayList<E> * of the elements in this List, a new Array will be created and returned; if * the passed-in Array is <i>larger</i> than the size of this List, then * size() index will be set to null. - * + * * @param a * the passed-in Array * @return an array representation of this list @@ -338,7 +338,7 @@ public class CopyOnWriteArrayList<E> /** * Retrieves the element at the user-supplied index. - * + * * @param index * the index of the element we are fetching * @throws IndexOutOfBoundsException @@ -352,7 +352,7 @@ public class CopyOnWriteArrayList<E> /** * Sets the element at the specified index. The new element, e, can be an * object of any type or null. - * + * * @param index * the index at which the element is being set * @param e @@ -373,7 +373,7 @@ public class CopyOnWriteArrayList<E> /** * Appends the supplied element to the end of this list. The element, e, can * be an object of any type or null. - * + * * @param e * the element to be appended to this list * @return true, the add will always succeed @@ -392,7 +392,7 @@ public class CopyOnWriteArrayList<E> * Adds the supplied element at the specified index, shifting all elements * currently at that index or higher one to the right. The element, e, can be * an object of any type or null. - * + * * @param index * the index at which the element is being added * @param e @@ -412,7 +412,7 @@ public class CopyOnWriteArrayList<E> /** * Removes the element at the user-supplied index. - * + * * @param index * the index of the element to be removed * @return the removed Object @@ -423,20 +423,20 @@ public class CopyOnWriteArrayList<E> { if (index < 0 || index >= this.size()) throw new IndexOutOfBoundsException("index = " + index); - + E[] snapshot = this.data; E[] newData = (E[]) new Object[snapshot.length - 1]; - + E result = snapshot[index]; - + if (index > 0) System.arraycopy(snapshot, 0, newData, 0, index); - + System.arraycopy(snapshot, index + 1, newData, index, snapshot.length - index - 1); - + this.data = newData; - + return result; } @@ -444,7 +444,7 @@ public class CopyOnWriteArrayList<E> * Remove the first occurrence, if any, of the given object from this list, * returning <code>true</code> if the object was removed, <code>false</code> * otherwise. - * + * * @param element the object to be removed. * @return true if element was removed, false otherwise. false means also that * the underlying storage was unchanged after this operation concluded. @@ -458,7 +458,7 @@ public class CopyOnWriteArrayList<E> return false; E[] newData = (E[]) new Object[len - 1]; - + // search the element to remove while filling the backup array // this way we can run this method in O(n) int elementIndex = -1; @@ -469,40 +469,40 @@ public class CopyOnWriteArrayList<E> elementIndex = i; break; } - + if (i < newData.length) newData[i] = snapshot[i]; } - + if (elementIndex < 0) return false; - + System.arraycopy(snapshot, elementIndex + 1, newData, elementIndex, snapshot.length - elementIndex - 1); this.data = newData; - + return true; } - + /** * Removes all the elements contained in the given collection. * This method removes the elements that are contained in both * this list and in the given collection. - * + * * @param c the collection containing the elements to be removed from this * list. * @return true if at least one element was removed, indicating that - * the list internal storage changed as a result, false otherwise. + * the list internal storage changed as a result, false otherwise. */ public synchronized boolean removeAll(Collection<?> c) { if (c.size() == 0) return false; - + E [] snapshot = this.data; - E [] storage = (E[]) new Object[this.data.length]; + E [] storage = (E[]) new Object[this.data.length]; boolean changed = false; - + int length = 0; for (E element : snapshot) { @@ -514,18 +514,18 @@ public class CopyOnWriteArrayList<E> else storage[length++] = element; } - + if (!changed) return false; - + E[] newData = (E[]) new Object[length]; System.arraycopy(storage, 0, newData, 0, length); - + this.data = newData; - + return true; } - + /** * Removes all the elements that are not in the passed collection. * If the collection is void, this method has the same effect of @@ -533,7 +533,7 @@ public class CopyOnWriteArrayList<E> * Please, note that this method is extremely slow (unless the argument has * <code>size == 0</code>) and has bad performance is both space and time * usage. - * + * * @param c the collection containing the elements to be retained by this * list. * @return true the list internal storage changed as a result of this @@ -548,31 +548,31 @@ public class CopyOnWriteArrayList<E> this.clear(); return true; } - + E [] snapshot = this.data; - E [] storage = (E[]) new Object[this.data.length]; - + E [] storage = (E[]) new Object[this.data.length]; + int length = 0; for (E element : snapshot) { if (c.contains(element)) storage[length++] = element; } - + // means we retained all the elements previously in our storage // we are running already slow here, but at least we avoid copying // another array and changing the internal storage if (length == snapshot.length) return false; - + E[] newData = (E[]) new Object[length]; System.arraycopy(storage, 0, newData, 0, length); - + this.data = newData; - + return true; } - + /** * Removes all elements from this List */ @@ -586,7 +586,7 @@ public class CopyOnWriteArrayList<E> * what happens if you modify the list while this is taking place; for * example, if the collection contains this list. c can contain objects of any * type, as well as null values. - * + * * @param c * a Collection containing elements to be added to this List * @return true if the list was modified, in other words c is not empty @@ -602,7 +602,7 @@ public class CopyOnWriteArrayList<E> * Add all elements in the supplied collection, inserting them beginning at * the specified index. c can contain objects of any type, as well as null * values. - * + * * @param index * the index at which the elements will be inserted * @param c @@ -616,37 +616,37 @@ public class CopyOnWriteArrayList<E> { if (index < 0 || index > this.size()) throw new IndexOutOfBoundsException("index = " + index); - + int csize = c.size(); if (csize == 0) return false; - + E[] data = this.data; Iterator<? extends E> itr = c.iterator(); - + E[] newData = (E[]) new Object[data.length + csize]; - + // avoid this call at all if we were asked to put the elements at the // beginning of our storage if (index != 0) System.arraycopy(data, 0, newData, 0, index); - + int itemsLeft = index; - + for (E value : c) newData[index++] = value; - + // now copy the remaining elements System.arraycopy(data, itemsLeft, newData, 0, data.length - itemsLeft); - + this.data = newData; - + return true; } - + /** * Adds an element if the list does not contains it already. - * + * * @param val the element to add to the list. * @return true if the element was added, false otherwise. */ @@ -661,7 +661,7 @@ public class CopyOnWriteArrayList<E> /** * Adds all the element from the given collection that are not already * in this list. - * + * * @param c the Collection containing the elements to be inserted * @return true the list internal storage changed as a result of this * operation, false otherwise. @@ -671,28 +671,28 @@ public class CopyOnWriteArrayList<E> int size = c.size(); if (size == 0) return 0; - + E [] snapshot = this.data; E [] storage = (E[]) new Object[size]; - + size = 0; for (E val : c) { if (!this.contains(val)) storage[size++] = val; } - + if (size == 0) return 0; - + // append storage to data E [] newData = (E[]) new Object[snapshot.length + size]; - + System.arraycopy(snapshot, 0, newData, 0, snapshot.length); System.arraycopy(storage, 0, newData, snapshot.length, size); - + this.data = newData; - + return size; } @@ -705,19 +705,19 @@ public class CopyOnWriteArrayList<E> { if (o == null) return false; - + if (this == o) return true; - + // let's see if 'o' is a list, if so, we need to compare the elements // as returned by the iterator if (o instanceof List) { List<?> source = (List<?>) o; - + if (source.size() != this.size()) return false; - + Iterator<?> sourceIterator = source.iterator(); for (E element : this) { @@ -727,10 +727,10 @@ public class CopyOnWriteArrayList<E> return true; } - + return false; } - + public int hashCode() { // see http://java.sun.com/6/docs/api/java/util/List.html#hashcode() @@ -741,14 +741,14 @@ public class CopyOnWriteArrayList<E> } return hashcode; } - + /** * Return an Iterator containing the elements of this list. * The Iterator uses a snapshot of the state of the internal storage * at the moment this method is called and does <strong>not</strong> support * update operations, so no synchronization is needed to traverse the * iterator. - * + * * @return an Iterator containing the elements of this list in sequence. */ public Iterator<E> iterator() @@ -757,7 +757,7 @@ public class CopyOnWriteArrayList<E> { E [] iteratorData = CopyOnWriteArrayList.this.data; int currentElement = 0; - + public boolean hasNext() { return (currentElement < iteratorData.length); @@ -776,14 +776,14 @@ public class CopyOnWriteArrayList<E> } }; } - + /** * Return a ListIterator containing the elements of this list. * The Iterator uses a snapshot of the state of the internal storage * at the moment this method is called and does <strong>not</strong> support * update operations, so no synchronization is needed to traverse the * iterator. - * + * * @return a ListIterator containing the elements of this list in sequence. */ public ListIterator<E> listIterator() @@ -800,7 +800,7 @@ public class CopyOnWriteArrayList<E> * at the moment this method is called and does <strong>not</strong> support * update operations, so no synchronization is needed to traverse the * iterator. - * + * * @param index the index at which to start iterating. * @return a ListIterator containing the elements of this list in sequence. */ @@ -814,7 +814,7 @@ public class CopyOnWriteArrayList<E> { E [] iteratorData = CopyOnWriteArrayList.this.data; int currentElement = index; - + public void add(E o) { throw new UnsupportedOperationException("updating of elements in " + @@ -836,7 +836,7 @@ public class CopyOnWriteArrayList<E> { if (hasNext() == false) throw new java.util.NoSuchElementException(); - + return iteratorData[currentElement++]; } @@ -849,7 +849,7 @@ public class CopyOnWriteArrayList<E> { if (hasPrevious() == false) throw new java.util.NoSuchElementException(); - + return iteratorData[--currentElement]; } @@ -871,10 +871,10 @@ public class CopyOnWriteArrayList<E> "iterators is not supported " + "by this class"); } - + }; } - + /** * Obtain a List view of a subsection of this list, from fromIndex * (inclusive) to toIndex (exclusive). If the two indices are equal, the @@ -907,7 +907,7 @@ public class CopyOnWriteArrayList<E> * * All methods first check to see if the actual modCount of the backing * list is equal to its expected value, and throw a - * ConcurrentModificationException if it is not. + * ConcurrentModificationException if it is not. * * @param fromIndex the index that the returned list should start from * (inclusive) @@ -941,7 +941,7 @@ public class CopyOnWriteArrayList<E> * @author Original author unknown * @author Eric Blake (ebb9@email.byu.edu) */ - private static class SubList<E> + private static class SubList<E> extends AbstractList<E> { // Package visible, for use by iterator. @@ -968,7 +968,7 @@ public class CopyOnWriteArrayList<E> offset = fromIndex; size = toIndex - fromIndex; } - + /** * This method checks the two modCount fields to ensure that there has * not been a concurrent modification, returning if all is okay. @@ -982,7 +982,7 @@ public class CopyOnWriteArrayList<E> if (data != backingList.data) throw new ConcurrentModificationException(); } - + /** * This method checks that a value is between 0 and size (inclusive). If * it is not, an exception is thrown. @@ -997,7 +997,7 @@ public class CopyOnWriteArrayList<E> throw new IndexOutOfBoundsException("Index: " + index + ", Size:" + size); } - + /** * This method checks that a value is between 0 (inclusive) and size * (exclusive). If it is not, an exception is thrown. @@ -1012,7 +1012,7 @@ public class CopyOnWriteArrayList<E> throw new IndexOutOfBoundsException("Index: " + index + ", Size:" + size); } - + /** * Specified by AbstractList.subList to return the private field size. * @@ -1028,7 +1028,7 @@ public class CopyOnWriteArrayList<E> return size; } } - + public void clear() { synchronized (backingList) @@ -1037,17 +1037,17 @@ public class CopyOnWriteArrayList<E> E[] newData = (E[]) new Object[snapshot.length - size]; int toIndex = size + offset; - + System.arraycopy(snapshot, 0, newData, 0, offset); System.arraycopy(snapshot, toIndex, newData, offset, snapshot.length - toIndex); - + backingList.data = newData; this.data = backingList.data; this.size = 0; } } - + /** * Specified by AbstractList.subList to delegate to the backing list. * @@ -1070,14 +1070,14 @@ public class CopyOnWriteArrayList<E> { checkMod(); checkBoundsExclusive(index); - + E el = backingList.set(index + offset, o); this.data = backingList.data; - + return el; } } - + /** * Specified by AbstractList.subList to delegate to the backing list. * @@ -1093,11 +1093,11 @@ public class CopyOnWriteArrayList<E> { checkMod(); checkBoundsExclusive(index); - + return backingList.get(index + offset); } } - + /** * Specified by AbstractList.subList to delegate to the backing list. * @@ -1119,14 +1119,14 @@ public class CopyOnWriteArrayList<E> { checkMod(); checkBoundsInclusive(index); - + backingList.add(index + offset, o); - + this.data = backingList.data; size++; } } - + /** * Specified by AbstractList.subList to delegate to the backing list. * @@ -1145,14 +1145,14 @@ public class CopyOnWriteArrayList<E> checkMod(); checkBoundsExclusive(index); E o = backingList.remove(index + offset); - + this.data = backingList.data; size--; - + return o; } } - + /** * Specified by AbstractList.subList to delegate to the backing list. * @@ -1178,14 +1178,14 @@ public class CopyOnWriteArrayList<E> checkBoundsInclusive(index); int csize = c.size(); boolean result = backingList.addAll(offset + index, c); - + this.data = backingList.data; size += csize; - + return result; } } - + /** * Specified by AbstractList.subList to return addAll(size, c). * @@ -1208,7 +1208,7 @@ public class CopyOnWriteArrayList<E> return addAll(size, c); } } - + /** * Specified by AbstractList.subList to return listIterator(). * @@ -1218,7 +1218,7 @@ public class CopyOnWriteArrayList<E> { return listIterator(); } - + /** * Specified by AbstractList.subList to return a wrapper around the * backing list's iterator. @@ -1363,7 +1363,7 @@ public class CopyOnWriteArrayList<E> /** * Adds the supplied object before the element that would be returned * by a call to <code>next()</code>, if the list supports addition. - * + * * @param o The object to add to the list. * @throws UnsupportedOperationException if the list doesn't support * the addition of new elements. @@ -1378,7 +1378,7 @@ public class CopyOnWriteArrayList<E> { throw new UnsupportedOperationException("Modification not supported " + "on CopyOnWriteArrayList iterators"); - } + } }; } } // class SubList @@ -1407,7 +1407,7 @@ public class CopyOnWriteArrayList<E> /** * Serializes this object to the given stream. - * + * * @param s * the stream to write to * @throws IOException @@ -1430,7 +1430,7 @@ public class CopyOnWriteArrayList<E> /** * Deserializes this object from the given stream. - * + * * @param s * the stream to read from * @throws ClassNotFoundException @@ -1455,7 +1455,7 @@ public class CopyOnWriteArrayList<E> { return o1 == null ? o2 == null : o1.equals(o2); } - + Object[] getArray() { return data; diff --git a/libjava/classpath/java/util/jar/Attributes.java b/libjava/classpath/java/util/jar/Attributes.java index 329fe63..8880029 100644 --- a/libjava/classpath/java/util/jar/Attributes.java +++ b/libjava/classpath/java/util/jar/Attributes.java @@ -67,7 +67,7 @@ import java.util.Set; * @see java.util.jar.Attributes.Name * @author Mark Wielaard (mark@klomp.org) */ -public class Attributes +public class Attributes implements Cloneable, Map<Object, Object> { @@ -87,16 +87,16 @@ public class Attributes * know names for the general main attributes, stand alone application * attributes, applet attributes, extension identification attributes, * package versioning and sealing attributes, file contents attributes, - * bean objects attribute and signing attributes. See the - * + * bean objects attribute and signing attributes. See the + * * <p>The characters of a Name must obey the following restrictions:</p> - * + * * <ul> * <li>Must contain at least one character</li> * <li>The first character must be alphanumeric (a-z, A-Z, 0-9)</li> * <li>All other characters must be alphanumeric, a '-' or a '_'</li> * </ul> - * + * * <p>When comparing Names (with <code>equals</code>) all characters are * converted to lowercase. But you can get the original case sensitive * string with the <code>toString()</code> method.</p> @@ -125,13 +125,13 @@ public class Attributes * the version of this Manifest file. */ public static final Name MANIFEST_VERSION = new Name(JarUtils.MANIFEST_VERSION); - + /** * General main attribute - * the version of the jar file signature. */ public static final Name SIGNATURE_VERSION = new Name(JarUtils.SIGNATURE_VERSION); - + /** * General main attribute - * (relative) file paths of the libraries/classpaths that the Classes in @@ -172,7 +172,7 @@ public class Attributes * the name if the extension library contained in the jar. */ public static final Name EXTENSION_NAME = new Name("Extension-Name"); - + /** * Extension identification attribute - * synonym for <code>EXTENSTION_NAME</code>. @@ -180,42 +180,42 @@ public class Attributes public static final Name EXTENSION_INSTALLATION = EXTENSION_NAME; // Package versioning and sealing attributes - + /** * Package versioning - * name of extension library contained in this jar. */ public static final Name IMPLEMENTATION_TITLE = new Name("Implementation-Title"); - + /** * Package versioning - * version of the extension library contained in this jar. */ public static final Name IMPLEMENTATION_VERSION = new Name("Implementation-Version"); - + /** * Package versioning - * name of extension library creator contained in this jar. */ public static final Name IMPLEMENTATION_VENDOR = new Name("Implementation-Vendor"); - + /** * Package versioning - * unique id of extension library creator. */ public static final Name IMPLEMENTATION_VENDOR_ID = new Name("Implementation-Vendor-Id"); - + /** * Package versioning - * location where this implementation can be downloaded. */ public static final Name IMPLEMENTATION_URL = new Name("Implementation-URL"); - + /** * Package versioning - * title of the specification contained in this jar. @@ -263,7 +263,7 @@ public class Attributes * Creates a new Name from the given String. * Throws an IllegalArgumentException if the given String is empty or * contains any illegal Name characters. - * + * * @param name the name of the new Name * @exception IllegalArgumentException if name isn't a valid String * representation of a Name @@ -278,28 +278,28 @@ public class Attributes // there must be at least one character if (chars.length == 0) - throw new - IllegalArgumentException - ("There must be at least one character in a name"); + throw new + IllegalArgumentException + ("There must be at least one character in a name"); // first character must be alphanum char c = chars[0]; if (!((c >= 'a' && c <= 'z') || - (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9'))) - throw new - IllegalArgumentException("First character must be alphanum"); + (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9'))) + throw new + IllegalArgumentException("First character must be alphanum"); // all other characters must be alphanums, '-' or '_' for (int i = 1; i < chars.length; i++) - { - c = chars[i]; - if (!((c >= 'a' && c <= 'z') || - (c >= 'A' && c <= 'Z') || - (c >= '0' && c <= '9') || (c == '-') || (c == '_'))) - throw new - IllegalArgumentException - ("Characters must be alphanums, '-' or '_'"); - } + { + c = chars[i]; + if (!((c >= 'a' && c <= 'z') || + (c >= 'A' && c <= 'Z') || + (c >= '0' && c <= '9') || (c == '-') || (c == '_'))) + throw new + IllegalArgumentException + ("Characters must be alphanums, '-' or '_'"); + } // Still here? Then convert to lower case and be done. // Store the original name for toString(); @@ -325,23 +325,23 @@ public class Attributes { // Quick and dirty check if (name == o) - return true; + return true; try - { - // Note that the constructor already converts the strings to - // lowercase. - String otherName = ((Name) o).name; - return name.equals(otherName); - } + { + // Note that the constructor already converts the strings to + // lowercase. + String otherName = ((Name) o).name; + return name.equals(otherName); + } catch (ClassCastException cce) - { - return false; - } + { + return false; + } catch (NullPointerException npe) - { - return false; - } + { + return false; + } } /** @@ -514,15 +514,15 @@ public class Attributes try { - return map.equals(((Attributes) o).map); + return map.equals(((Attributes) o).map); } catch (ClassCastException cce) { - return false; + return false; } catch (NullPointerException npe) { - return false; + return false; } } @@ -591,8 +591,8 @@ public class Attributes { if (!(attr instanceof Attributes)) { - throw new - ClassCastException("Supplied Map is not an instance of Attributes"); + throw new + ClassCastException("Supplied Map is not an instance of Attributes"); } map.putAll(attr); } diff --git a/libjava/classpath/java/util/jar/JarEntry.java b/libjava/classpath/java/util/jar/JarEntry.java index 515b45f..52cb2c3 100644 --- a/libjava/classpath/java/util/jar/JarEntry.java +++ b/libjava/classpath/java/util/jar/JarEntry.java @@ -108,7 +108,7 @@ public class JarEntry extends ZipEntry super(entry); try { - attr = entry.getAttributes(); + attr = entry.getAttributes(); } catch (IOException _) { @@ -130,11 +130,11 @@ public class JarEntry extends ZipEntry { if (attr != null) { - return (Attributes) attr.clone(); + return (Attributes) attr.clone(); } else { - return null; + return null; } } diff --git a/libjava/classpath/java/util/jar/JarFile.java b/libjava/classpath/java/util/jar/JarFile.java index 6807736..b67c953 100644 --- a/libjava/classpath/java/util/jar/JarFile.java +++ b/libjava/classpath/java/util/jar/JarFile.java @@ -199,8 +199,8 @@ public class JarFile extends ZipFile super(fileName); if (verify) { - manifest = readManifest(); - verify(); + manifest = readManifest(); + verify(); } } @@ -236,8 +236,8 @@ public class JarFile extends ZipFile super(file); if (verify) { - manifest = readManifest(); - verify(); + manifest = readManifest(); + verify(); } } @@ -256,7 +256,7 @@ public class JarFile extends ZipFile * @exception FileNotFoundException if the file does not exist * @exception IOException if another IO exception occurs while reading * @exception IllegalArgumentException when given an illegal mode - * + * * @since 1.3 */ public JarFile(File file, boolean verify, int mode) throws @@ -265,8 +265,8 @@ public class JarFile extends ZipFile super(file, mode); if (verify) { - manifest = readManifest(); - verify(); + manifest = readManifest(); + verify(); } } @@ -280,8 +280,8 @@ public class JarFile extends ZipFile // only check if manifest is not null if (manifest == null) { - verify = false; - return; + verify = false; + return; } verify = true; @@ -295,23 +295,23 @@ public class JarFile extends ZipFile { try { - ZipEntry manEntry = super.getEntry(MANIFEST_NAME); - if (manEntry != null) - { - InputStream in = super.getInputStream(manEntry); - manifestRead = true; - return new Manifest(in); - } - else - { - manifestRead = true; - return null; - } + ZipEntry manEntry = super.getEntry(MANIFEST_NAME); + if (manEntry != null) + { + InputStream in = super.getInputStream(manEntry); + manifestRead = true; + return new Manifest(in); + } + else + { + manifestRead = true; + return null; + } } catch (IOException ioe) { - manifestRead = true; - return null; + manifestRead = true; + return null; } } @@ -353,36 +353,36 @@ public class JarFile extends ZipFile JarEntry jar = new JarEntry(zip); Manifest manifest; try - { - manifest = jarfile.getManifest(); - } + { + manifest = jarfile.getManifest(); + } catch (IOException ioe) - { - manifest = null; - } + { + manifest = null; + } if (manifest != null) - { - jar.attr = manifest.getAttributes(jar.getName()); - } + { + jar.attr = manifest.getAttributes(jar.getName()); + } synchronized(jarfile) - { - if (jarfile.verify && !jarfile.signaturesRead) - try - { - jarfile.readSignatures(); - } - catch (IOException ioe) - { - if (JarFile.DEBUG) - { - JarFile.debug(ioe); - ioe.printStackTrace(); - } - jarfile.signaturesRead = true; // fudge it. - } - } + { + if (jarfile.verify && !jarfile.signaturesRead) + try + { + jarfile.readSignatures(); + } + catch (IOException ioe) + { + if (JarFile.DEBUG) + { + JarFile.debug(ioe); + ioe.printStackTrace(); + } + jarfile.signaturesRead = true; // fudge it. + } + } jar.jarfile = jarfile; return jar; } @@ -398,38 +398,38 @@ public class JarFile extends ZipFile ZipEntry entry = super.getEntry(name); if (entry != null) { - JarEntry jarEntry = new JarEntry(entry); - Manifest manifest; - try - { - manifest = getManifest(); - } - catch (IOException ioe) - { - manifest = null; - } - - if (manifest != null) - { - jarEntry.attr = manifest.getAttributes(name); + JarEntry jarEntry = new JarEntry(entry); + Manifest manifest; + try + { + manifest = getManifest(); + } + catch (IOException ioe) + { + manifest = null; } - if (verify && !signaturesRead) - try - { - readSignatures(); - } - catch (IOException ioe) - { - if (DEBUG) - { - debug(ioe); - ioe.printStackTrace(); - } - signaturesRead = true; - } + if (manifest != null) + { + jarEntry.attr = manifest.getAttributes(name); + } + + if (verify && !signaturesRead) + try + { + readSignatures(); + } + catch (IOException ioe) + { + if (DEBUG) + { + debug(ioe); + ioe.printStackTrace(); + } + signaturesRead = true; + } jarEntry.jarfile = this; - return jarEntry; + return jarEntry; } return null; } @@ -734,11 +734,11 @@ public class JarFile extends ZipFile /** * Verifies that the digest(s) in a signature file were, in fact, made over * the manifest entry for ENTRY. - * + * * @param entry The entry name. * @param attr The attributes from the signature file to verify. * @param hmManifestEntries Mappings of Jar file entry names to their manifest - * entry text; i.e. the base-64 encoding of their + * entry text; i.e. the base-64 encoding of their */ private boolean verifyHashes(String entry, Attributes attr, HashMap hmManifestEntries) @@ -820,8 +820,8 @@ public class JarFile extends ZipFile private boolean checked; EntryInputStream(final ZipEntry entry, - final InputStream in, - final JarFile jar) + final InputStream in, + final JarFile jar) throws IOException { super(in); @@ -835,9 +835,9 @@ public class JarFile extends ZipFile Attributes attr; Manifest manifest = jarfile.getManifest(); if (manifest != null) - attr = manifest.getAttributes(entry.getName()); + attr = manifest.getAttributes(entry.getName()); else - attr = null; + attr = null; if (DEBUG) debug("verifying entry " + entry + " attr=" + attr); if (attr == null) @@ -958,24 +958,24 @@ public class JarFile extends ZipFile + " comp=" + new java.math.BigInteger(hash).toString(16)); if (!Arrays.equals(hash, hashes[i])) { - synchronized(jarfile) - { - if (DEBUG) - debug(entry + " could NOT be verified"); - jarfile.verified.put(entry.getName(), Boolean.FALSE); - } - return; - // XXX ??? what do we do here? - // throw new ZipException("message digest mismatch"); + synchronized(jarfile) + { + if (DEBUG) + debug(entry + " could NOT be verified"); + jarfile.verified.put(entry.getName(), Boolean.FALSE); + } + return; + // XXX ??? what do we do here? + // throw new ZipException("message digest mismatch"); } } synchronized(jarfile) - { - if (DEBUG) - debug(entry + " has been VERIFIED"); - jarfile.verified.put(entry.getName(), Boolean.TRUE); - } + { + if (DEBUG) + debug(entry + " has been VERIFIED"); + jarfile.verified.put(entry.getName(), Boolean.TRUE); + } } } } diff --git a/libjava/classpath/java/util/jar/JarInputStream.java b/libjava/classpath/java/util/jar/JarInputStream.java index 1788af6..4de6609 100644 --- a/libjava/classpath/java/util/jar/JarInputStream.java +++ b/libjava/classpath/java/util/jar/JarInputStream.java @@ -108,18 +108,18 @@ public class JarInputStream extends ZipInputStream { firstEntry = (JarEntry) super.getNextEntry(); while ((firstEntry != null) && - firstEntry.getName().startsWith("META-INF/")) + firstEntry.getName().startsWith("META-INF/")) { - if (firstEntry.getName().equals(JarFile.MANIFEST_NAME)) - { - manifest = new Manifest(this); - } - firstEntry = (JarEntry) super.getNextEntry(); + if (firstEntry.getName().equals(JarFile.MANIFEST_NAME)) + { + manifest = new Manifest(this); + } + firstEntry = (JarEntry) super.getNextEntry(); } if (verify) { - // XXX + // XXX } } @@ -136,7 +136,7 @@ public class JarInputStream extends ZipInputStream JarEntry jarEntry = new JarEntry(zipEntry); if (manifest != null) { - jarEntry.attr = manifest.getAttributes(name); + jarEntry.attr = manifest.getAttributes(name); } return jarEntry; } @@ -163,12 +163,12 @@ public class JarInputStream extends ZipInputStream ZipEntry entry; if (firstEntry != null) { - entry = firstEntry; - firstEntry = null; + entry = firstEntry; + firstEntry = null; } else { - entry = super.getNextEntry(); + entry = super.getNextEntry(); } return entry; } diff --git a/libjava/classpath/java/util/jar/JarOutputStream.java b/libjava/classpath/java/util/jar/JarOutputStream.java index 46c71b3..0ba6002 100644 --- a/libjava/classpath/java/util/jar/JarOutputStream.java +++ b/libjava/classpath/java/util/jar/JarOutputStream.java @@ -100,7 +100,7 @@ public class JarOutputStream extends ZipOutputStream } /** - * Prepares the JarOutputStream for writing the next entry. + * Prepares the JarOutputStream for writing the next entry. * This implementation just calls <code>super.putNextEntry()</code>. * * @param entry The information for the next entry @@ -108,6 +108,6 @@ public class JarOutputStream extends ZipOutputStream */ public void putNextEntry(ZipEntry entry) throws IOException { - super.putNextEntry(entry); // XXX + super.putNextEntry(entry); // XXX } } diff --git a/libjava/classpath/java/util/jar/Manifest.java b/libjava/classpath/java/util/jar/Manifest.java index 980cfc6..f266d82 100644 --- a/libjava/classpath/java/util/jar/Manifest.java +++ b/libjava/classpath/java/util/jar/Manifest.java @@ -38,7 +38,7 @@ exception statement from your version. */ package java.util.jar; import gnu.java.util.jar.JarUtils; - + import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -48,7 +48,7 @@ import java.util.Map; /** * Reads, writes and manipulaties jar manifest files. * XXX - * + * * @since 1.2 * @author Mark Wielaard (mark@klomp.org) */ @@ -153,7 +153,7 @@ public class Manifest implements Cloneable /** * Read and merge a <code>Manifest</code> from the designated input stream. - * + * * @param in the input stream to read from. * @throws IOException if an I/O related exception occurs during the process. */ @@ -166,7 +166,7 @@ public class Manifest implements Cloneable * Writes the contents of this <code>Manifest</code> to the designated * output stream. Line-endings are platform-independent and consist of the * 2-codepoint sequence <code>0x0D</code> and <code>0x0A</code>. - * + * * @param out the output stream to write this <code>Manifest</code> to. * @throws IOException if an I/O related exception occurs during the process. */ diff --git a/libjava/classpath/java/util/logging/ConsoleHandler.java b/libjava/classpath/java/util/logging/ConsoleHandler.java index 3cf4bca..9f6bb72 100644 --- a/libjava/classpath/java/util/logging/ConsoleHandler.java +++ b/libjava/classpath/java/util/logging/ConsoleHandler.java @@ -81,7 +81,7 @@ public class ConsoleHandler public ConsoleHandler() { super(System.err, "java.util.logging.ConsoleHandler", Level.INFO, - /* formatter */ null, SimpleFormatter.class); + /* formatter */ null, SimpleFormatter.class); } diff --git a/libjava/classpath/java/util/logging/ErrorManager.java b/libjava/classpath/java/util/logging/ErrorManager.java index 57c079f..291efb2f 100644 --- a/libjava/classpath/java/util/logging/ErrorManager.java +++ b/libjava/classpath/java/util/logging/ErrorManager.java @@ -82,7 +82,7 @@ public class ErrorManager */ public static final int CLOSE_FAILURE = 3; - + /** * Indicates that there was a problem upon opening * an output stream. @@ -146,7 +146,7 @@ public class ErrorManager * widespread acceptance. See Classpath bug #2944. */ if (everUsed) - return; + return; everUsed = true; } @@ -191,4 +191,3 @@ public class ErrorManager ex.printStackTrace(); } } - diff --git a/libjava/classpath/java/util/logging/FileHandler.java b/libjava/classpath/java/util/logging/FileHandler.java index deba5c2..00d967f 100644 --- a/libjava/classpath/java/util/logging/FileHandler.java +++ b/libjava/classpath/java/util/logging/FileHandler.java @@ -120,7 +120,7 @@ import java.util.ListIterator; * system property <code>user.home</code>.</li> * * <li><code>%g</code> - replaced by a generation number for - * distinguisthing the individual items in the rotating set + * distinguisthing the individual items in the rotating set * of log files. The generation number cycles through the * sequence 0, 1, ..., <code>count</code> - 1.</li> * @@ -160,7 +160,7 @@ import java.util.ListIterator; * step is performed after any generation number has been * appended. * - * <p><em>Examples for the GNU platform:</em> + * <p><em>Examples for the GNU platform:</em> * * <p><ul> * @@ -269,7 +269,7 @@ public class FileHandler /** * A linked list of files we are, or have written to. The entries - * are file path strings, kept in the order + * are file path strings, kept in the order */ private LinkedList logFiles; @@ -291,9 +291,9 @@ public class FileHandler throws IOException, SecurityException { this(LogManager.getLogManager().getProperty(PATTERN_KEY), - LogManager.getIntProperty(LIMIT_KEY, DEFAULT_LIMIT), - LogManager.getIntProperty(COUNT_KEY, DEFAULT_COUNT), - LogManager.getBooleanProperty(APPEND_KEY, DEFAULT_APPEND)); + LogManager.getIntProperty(LIMIT_KEY, DEFAULT_LIMIT), + LogManager.getIntProperty(COUNT_KEY, DEFAULT_COUNT), + LogManager.getBooleanProperty(APPEND_KEY, DEFAULT_APPEND)); } @@ -317,8 +317,8 @@ public class FileHandler public FileHandler(String pattern, int limit, int count) throws IOException, SecurityException { - this(pattern, limit, count, - LogManager.getBooleanProperty(APPEND_KEY, DEFAULT_APPEND)); + this(pattern, limit, count, + LogManager.getBooleanProperty(APPEND_KEY, DEFAULT_APPEND)); } @@ -368,16 +368,16 @@ public class FileHandler * the Sun reference implementation. */ public FileHandler(String pattern, - int limit, - int count, - boolean append) + int limit, + int count, + boolean append) throws IOException, SecurityException { super(/* output stream, created below */ null, - PROPERTY_PREFIX, - /* default level */ Level.ALL, - /* formatter */ null, - /* default formatter */ XMLFormatter.class); + PROPERTY_PREFIX, + /* default level */ Level.ALL, + /* formatter */ null, + /* default formatter */ XMLFormatter.class); if ((limit <0) || (count < 1)) throw new IllegalArgumentException(); @@ -426,7 +426,7 @@ public class FileHandler try { - File file = new File(path); + File file = new File(path); if (!file.exists () || append) { FileOutputStream fout = new FileOutputStream (file, append); @@ -476,9 +476,9 @@ public class FileHandler * <code>pattern</code>. */ private static String replaceFileNameEscapes(String pattern, - int generation, - int uniqueNumber, - int count) + int generation, + int uniqueNumber, + int count) { CPStringBuilder buf = new CPStringBuilder(pattern); String replaceWith; @@ -489,49 +489,49 @@ public class FileHandler { // Uncomment the next line for finding bugs. // System.out.println(buf.substring(0,pos) + '|' + buf.substring(pos)); - + if (buf.charAt(pos) == '/') { - /* The same value is also provided by java.io.File.separator. */ - replaceWith = System.getProperty("file.separator"); - buf.replace(pos, pos + 1, replaceWith); - pos = pos + replaceWith.length() - 1; - continue; + /* The same value is also provided by java.io.File.separator. */ + replaceWith = System.getProperty("file.separator"); + buf.replace(pos, pos + 1, replaceWith); + pos = pos + replaceWith.length() - 1; + continue; } if (buf.charAt(pos) == '%') { switch (buf.charAt(pos + 1)) - { - case 't': - replaceWith = System.getProperty("java.io.tmpdir"); - break; - - case 'h': - replaceWith = System.getProperty("user.home"); - break; - - case 'g': - replaceWith = Integer.toString(generation); - foundGeneration = true; - break; - - case 'u': - replaceWith = Integer.toString(uniqueNumber); - break; - - case '%': - replaceWith = "%"; - break; - - default: - replaceWith = "??"; - break; // FIXME: Throw exception? - } - - buf.replace(pos, pos + 2, replaceWith); - pos = pos + replaceWith.length() - 1; - continue; + { + case 't': + replaceWith = System.getProperty("java.io.tmpdir"); + break; + + case 'h': + replaceWith = System.getProperty("user.home"); + break; + + case 'g': + replaceWith = Integer.toString(generation); + foundGeneration = true; + break; + + case 'u': + replaceWith = Integer.toString(uniqueNumber); + break; + + case '%': + replaceWith = "%"; + break; + + default: + replaceWith = "??"; + break; // FIXME: Throw exception? + } + + buf.replace(pos, pos + 2, replaceWith); + pos = pos + replaceWith.length() - 1; + continue; } } while (++pos < buf.length() - 1); diff --git a/libjava/classpath/java/util/logging/Formatter.java b/libjava/classpath/java/util/logging/Formatter.java index ee747b0..feaf553 100644 --- a/libjava/classpath/java/util/logging/Formatter.java +++ b/libjava/classpath/java/util/logging/Formatter.java @@ -150,7 +150,7 @@ public abstract class Formatter { try { - msg = bundle.getString(msg); + msg = bundle.getString(msg); } catch (java.util.MissingResourceException _) { @@ -160,8 +160,8 @@ public abstract class Formatter /* Format the message if there are parameters. */ params = record.getParameters(); if ((params != null) - && (params.length > 0) - && (msg.indexOf("{0") >= 0)) + && (params.length > 0) + && (msg.indexOf("{0") >= 0)) { msg = MessageFormat.format(msg, params); } diff --git a/libjava/classpath/java/util/logging/Handler.java b/libjava/classpath/java/util/logging/Handler.java index 616b502..e254b4d 100644 --- a/libjava/classpath/java/util/logging/Handler.java +++ b/libjava/classpath/java/util/logging/Handler.java @@ -179,7 +179,7 @@ h.setFormatter(h.getFormatter());</pre> throws SecurityException { LogManager.getLogManager().checkAccess(); - + /* Throws a NullPointerException if formatter is null. */ formatter.getClass(); @@ -377,7 +377,7 @@ h.setFormatter(h.getFormatter());</pre> { if (record.getLevel().intValue() < level.intValue()) return false; - + if (filter != null) return filter.isLoggable(record); else diff --git a/libjava/classpath/java/util/logging/Level.java b/libjava/classpath/java/util/logging/Level.java index 48ff318..ea2c83f 100644 --- a/libjava/classpath/java/util/logging/Level.java +++ b/libjava/classpath/java/util/logging/Level.java @@ -180,12 +180,12 @@ public class Level implements Serializable * @param value the integer value of the level. Please note * that the Java<small><sup>TM</sup></small> * Logging API does not specify integer - * values for standard levels (such as - * Level.FINE). Therefore, a custom - * level should pass an integer value that - * is calculated at run-time, e.g. - * <code>(Level.FINE.intValue() + Level.CONFIG.intValue()) - * / 2</code> for a level between FINE and CONFIG. + * values for standard levels (such as + * Level.FINE). Therefore, a custom + * level should pass an integer value that + * is calculated at run-time, e.g. + * <code>(Level.FINE.intValue() + Level.CONFIG.intValue()) + * / 2</code> for a level between FINE and CONFIG. */ protected Level(String name, int value) { @@ -205,13 +205,13 @@ public class Level implements Serializable * * @param value the integer value of the level. Please note * that the Java<small><sup>TM</sup></small> - * Logging API does not specify integer - * values for standard levels (such as - * Level.FINE). Therefore, a custom - * level should pass an integer value that - * is calculated at run-time, e.g. - * <code>(Level.FINE.intValue() + Level.CONFIG.intValue()) - * / 2</code> for a level between FINE and CONFIG. + * Logging API does not specify integer + * values for standard levels (such as + * Level.FINE). Therefore, a custom + * level should pass an integer value that + * is calculated at run-time, e.g. + * <code>(Level.FINE.intValue() + Level.CONFIG.intValue()) + * / 2</code> for a level between FINE and CONFIG. * * @param resourceBundleName the name of a resource bundle * for localizing the level name, or <code>null</code> @@ -243,7 +243,7 @@ public class Level implements Serializable { for (int i = 0; i < knownLevels.length; i++) if (value == knownLevels[i].intValue()) - return knownLevels[i]; + return knownLevels[i]; return this; } @@ -286,7 +286,7 @@ public class Level implements Serializable try { ResourceBundle b = ResourceBundle.getBundle(resourceBundleName); - localizedName = b.getString(name); + localizedName = b.getString(name); } catch (Exception _) { @@ -345,15 +345,15 @@ public class Level implements Serializable // standard logging levels will be returned by this method, and // they are all created using string literals. if (name == knownLevels[i].name) - return knownLevels[i]; + return knownLevels[i]; } - + try { int num = Integer.parseInt(name); for (int i = 0; i < knownLevels.length; i++) - if (num == knownLevels[i].value) - return knownLevels[i]; + if (num == knownLevels[i].value) + return knownLevels[i]; } catch (NumberFormatException _) { @@ -369,7 +369,7 @@ public class Level implements Serializable * another object. * * @return <code>true</code> if <code>other</code> is an instance of - * <code>java.util.logging.Level</code> and has the same integer + * <code>java.util.logging.Level</code> and has the same integer * value, <code>false</code> otherwise. */ public boolean equals(Object other) @@ -388,7 +388,7 @@ public class Level implements Serializable public int hashCode() { return value; - } + } /** @@ -409,9 +409,8 @@ public class Level implements Serializable { for (int i = 0; i < knownLevels.length; i++) if (knownLevels[i] == this) - return true; + return true; return false; } } - diff --git a/libjava/classpath/java/util/logging/LogManager.java b/libjava/classpath/java/util/logging/LogManager.java index 6daf3db..dffa44d 100644 --- a/libjava/classpath/java/util/logging/LogManager.java +++ b/libjava/classpath/java/util/logging/LogManager.java @@ -150,7 +150,7 @@ public class LogManager * this case. */ private final PropertyChangeSupport pcs = new PropertyChangeSupport( /* source bean */ - LogManager.class); + LogManager.class); protected LogManager() { @@ -272,13 +272,13 @@ public class LogManager ref = loggers.get(name); if (ref != null) { - if (ref.get() != null) - return false; + if (ref.get() != null) + return false; - /* There has been a logger under this name in the past, - * but it has been garbage collected. - */ - loggers.remove(ref); + /* There has been a logger under this name in the past, + * but it has been garbage collected. + */ + loggers.remove(ref); } /* Adding a named logger requires a security permission. */ @@ -292,10 +292,10 @@ public class LogManager // The level of the newly added logger must be specified. // The easiest case is if there is a level for exactly this logger - // in the properties. If no such level exists the level needs to be + // in the properties. If no such level exists the level needs to be // searched along the hirachy. So if there is a new logger 'foo.blah.blub' // and an existing parent logger 'foo' the properties 'foo.blah.blub.level' - // and 'foo.blah.level' need to be checked. If both do not exist in the + // and 'foo.blah.level' need to be checked. If both do not exist in the // properties the level of the new logger is set to 'null' (i.e. it uses the // level of its parent 'foo'). Level logLevel = logger.getLevel(); @@ -320,21 +320,21 @@ public class LogManager */ for (Iterator iter = loggers.keySet().iterator(); iter.hasNext();) { - Logger possChild = (Logger) ((WeakReference) loggers.get(iter.next())) - .get(); - if ((possChild == null) || (possChild == logger) - || (possChild.getParent() != parent)) - continue; - - if (! possChild.getName().startsWith(name)) - continue; - - if (possChild.getName().charAt(name.length()) != '.') - continue; - - possChild.setParent(logger); - } - + Logger possChild = (Logger) ((WeakReference) loggers.get(iter.next())) + .get(); + if ((possChild == null) || (possChild == logger) + || (possChild.getParent() != parent)) + continue; + + if (! possChild.getName().startsWith(name)) + continue; + + if (possChild.getName().charAt(name.length()) != '.') + continue; + + possChild.setParent(logger); + } + return true; } @@ -369,20 +369,20 @@ public class LogManager for (String candName : loggers.keySet()) { - candNameLength = candName.length(); + candNameLength = candName.length(); - if (candNameLength > bestNameLength - && childNameLength > candNameLength - && childName.startsWith(candName) - && childName.charAt(candNameLength) == '.') - { - cand = loggers.get(candName).get(); - if ((cand == null) || (cand == child)) - continue; + if (candNameLength > bestNameLength + && childNameLength > candNameLength + && childName.startsWith(candName) + && childName.charAt(candNameLength) == '.') + { + cand = loggers.get(candName).get(); + if ((cand == null) || (cand == child)) + continue; - bestNameLength = candName.length(); - best = cand; - } + bestNameLength = candName.length(); + best = cand; + } } return best; @@ -447,22 +447,22 @@ public class LogManager Iterator<WeakReference<Logger>> iter = loggers.values().iterator(); while (iter.hasNext()) { - WeakReference<Logger> ref; - Logger logger; + WeakReference<Logger> ref; + Logger logger; - ref = iter.next(); - if (ref != null) - { - logger = ref.get(); + ref = iter.next(); + if (ref != null) + { + logger = ref.get(); - if (logger == null) - iter.remove(); - else if (logger != Logger.root) - { - logger.resetLogger(); - logger.setLevel(null); - } - } + if (logger == null) + iter.remove(); + else if (logger != Logger.root) + { + logger.resetLogger(); + logger.setLevel(null); + } + } } Logger.root.setLevel(Level.INFO); @@ -505,7 +505,7 @@ public class LogManager try { inputStream = new URL(url).openStream(); - } + } catch (Exception e) { inputStream=null; @@ -549,46 +549,46 @@ public class LogManager while (keys.hasMoreElements()) { - String key = ((String) keys.nextElement()).trim(); - String value = newProperties.getProperty(key); - - if (value == null) - continue; - - value = value.trim(); - - if ("handlers".equals(key)) - { - // In Java 5 and earlier this was specified to be - // whitespace-separated, but in reality it also accepted - // commas (tomcat relied on this), and in Java 6 the - // documentation was updated to fit the implementation. - StringTokenizer tokenizer = new StringTokenizer(value, - " \t\n\r\f,"); - while (tokenizer.hasMoreTokens()) - { - String handlerName = tokenizer.nextToken(); + String key = ((String) keys.nextElement()).trim(); + String value = newProperties.getProperty(key); + + if (value == null) + continue; + + value = value.trim(); + + if ("handlers".equals(key)) + { + // In Java 5 and earlier this was specified to be + // whitespace-separated, but in reality it also accepted + // commas (tomcat relied on this), and in Java 6 the + // documentation was updated to fit the implementation. + StringTokenizer tokenizer = new StringTokenizer(value, + " \t\n\r\f,"); + while (tokenizer.hasMoreTokens()) + { + String handlerName = tokenizer.nextToken(); Handler handler = (Handler) createInstance(handlerName, Handler.class, key); - // Tomcat also relies on the implementation ignoring - // items in 'handlers' which are not class names. - if (handler != null) - Logger.root.addHandler(handler); - } - } - - if (key.endsWith(".level")) - { - String loggerName = key.substring(0, key.length() - 6); - Logger logger = getLogger(loggerName); - - if (logger == null) - { - logger = Logger.getLogger(loggerName); - addLogger(logger); - } + // Tomcat also relies on the implementation ignoring + // items in 'handlers' which are not class names. + if (handler != null) + Logger.root.addHandler(handler); + } + } + + if (key.endsWith(".level")) + { + String loggerName = key.substring(0, key.length() - 6); + Logger logger = getLogger(loggerName); + + if (logger == null) + { + logger = Logger.getLogger(loggerName); + addLogger(logger); + } Level level = null; - try + try { level = Level.parse(value); } @@ -600,8 +600,8 @@ public class LogManager { logger.setLevel(level); } - continue; - } + continue; + } } /* The API specification does not talk about the @@ -640,11 +640,11 @@ public class LogManager { try { - return Integer.parseInt(getLogManager().getProperty(name)); + return Integer.parseInt(getLogManager().getProperty(name)); } catch (Exception ex) { - return defaultValue; + return defaultValue; } } @@ -691,11 +691,11 @@ public class LogManager { try { - return (Boolean.valueOf(getLogManager().getProperty(name))).booleanValue(); + return (Boolean.valueOf(getLogManager().getProperty(name))).booleanValue(); } catch (Exception ex) { - return defaultValue; + return defaultValue; } } @@ -717,14 +717,14 @@ public class LogManager try { String value = getLogManager().getProperty(propertyName); - if (value != null) - return Level.parse(getLogManager().getProperty(propertyName)); + if (value != null) + return Level.parse(getLogManager().getProperty(propertyName)); else - return defaultValue; + return defaultValue; } catch (Exception ex) { - return defaultValue; + return defaultValue; } } @@ -784,15 +784,15 @@ public class LogManager try { - return defaultClass.newInstance(); + return defaultClass.newInstance(); } catch (java.lang.InstantiationException ex) { - throw new RuntimeException(ex.getMessage()); + throw new RuntimeException(ex.getMessage()); } catch (java.lang.IllegalAccessException ex) { - throw new RuntimeException(ex.getMessage()); + throw new RuntimeException(ex.getMessage()); } } diff --git a/libjava/classpath/java/util/logging/LogRecord.java b/libjava/classpath/java/util/logging/LogRecord.java index af7f2058..ee99ee6 100644 --- a/libjava/classpath/java/util/logging/LogRecord.java +++ b/libjava/classpath/java/util/logging/LogRecord.java @@ -140,7 +140,7 @@ public class LogRecord * * @param message the message text (which will be used as key * for looking up the localized message text - * if a resource bundle has been associated). + * if a resource bundle has been associated). */ public LogRecord(Level level, String message) { @@ -182,7 +182,7 @@ public class LogRecord { parameters = new Object[numParams]; for (int i = 0; i < numParams; i++) - parameters[i] = in.readObject(); + parameters[i] = in.readObject(); } } @@ -220,10 +220,10 @@ public class LogRecord out.writeInt(parameters.length); for (int i = 0; i < parameters.length; i++) { - if (parameters[i] == null) - out.writeObject(null); - else - out.writeObject(parameters[i].toString()); + if (parameters[i] == null) + out.writeObject(null); + else + out.writeObject(parameters[i].toString()); } } } @@ -331,11 +331,11 @@ public class LogRecord { resourceBundleName = name; bundle = null; - + try { if (resourceBundleName != null) - bundle = ResourceBundle.getBundle(resourceBundleName); + bundle = ResourceBundle.getBundle(resourceBundleName); } catch (java.util.MissingResourceException _) { @@ -427,7 +427,7 @@ public class LogRecord * parameter to some logging calls, and in certain cases, the * logging framework tries to determine an approximation * (which may or may not be accurate). - * + * * @return the name of the class that issued the logging request, * or <code>null</code> if this information could not * be obtained. @@ -450,7 +450,7 @@ public class LogRecord * to the logging framework, applications should not modify it * anymore. Therefore, this method should only be called on * freshly constructed LogRecords. - * + * * @param sourceClassName the name of the class that issued the * logging request, or <code>null</code> to indicate that * this information could not be obtained. @@ -467,7 +467,7 @@ public class LogRecord * parameter to some logging calls, and in certain cases, the * logging framework tries to determine an approximation * (which may or may not be accurate). - * + * * @return the name of the method that issued the logging request, * or <code>null</code> if this information could not * be obtained. @@ -490,7 +490,7 @@ public class LogRecord * to the logging framework, applications should not modify it * anymore. Therefore, this method should only be called on * freshly constructed LogRecords. - * + * * @param sourceMethodName the name of the method that issued the * logging request, or <code>null</code> to indicate that * this information could not be obtained. @@ -543,7 +543,7 @@ public class LogRecord * * @param message the message text (which will be used as key * for looking up the localized message text - * if a resource bundle has been associated). + * if a resource bundle has been associated). */ public void setMessage(String message) { diff --git a/libjava/classpath/java/util/logging/Logger.java b/libjava/classpath/java/util/logging/Logger.java index cddc02d..c55e133 100644 --- a/libjava/classpath/java/util/logging/Logger.java +++ b/libjava/classpath/java/util/logging/Logger.java @@ -65,7 +65,7 @@ import java.security.PrivilegedAction; * to perform any modifications to the logger. * <p> * FIXME: Write more documentation. - * + * * @author Sascha Brawer (brawer@acm.org) */ public class Logger @@ -85,7 +85,7 @@ public class Logger * to avoid deadlocks. Yeah, no kidding, we got them :) */ private static final Object[] lock = new Object[0]; - + static { // Our class might be initialized from an unprivileged context @@ -159,7 +159,7 @@ public class Logger * (with ResourceBundle for localization) or * {@link #getLogger(java.lang.String) getLogger} (without ResourceBundle), * respectively. - * + * * @param name the name for the logger, for example "java.awt" or * "com.foo.bar". The name should be based on the name of the * package issuing log records and consist of dot-separated Java @@ -196,7 +196,7 @@ public class Logger /** * Finds a registered logger for a subsystem, or creates one in case no logger * has been registered yet. - * + * * @param name the name for the logger, for example "java.awt" or * "com.foo.bar". The name should be based on the name of the * package issuing log records and consist of dot-separated Java @@ -232,7 +232,7 @@ public class Logger * a different one than specified by <code>resourceBundleName</code>, an * <code>IllegalArgumentException</code> is thrown.</li> * </ul> - * + * * @param name the name for the logger, for example "java.awt" or * "org.gnu.foo". The name should be based on the name of the * package issuing log records and consist of dot-separated Java @@ -351,7 +351,7 @@ public class Logger * <p> * The parent of the newly created logger will the the root logger, from which * the level threshold and the handlers are inherited. - * + * * @param resourceBundleName the name of a resource bundle for localizing * messages, or <code>null</code> to indicate that messages do * not need to be localized. @@ -372,7 +372,7 @@ public class Logger /** * Returns the name of the resource bundle that is being used for localizing * messages. - * + * * @return the name of the resource bundle used for localizing messages, or * <code>null</code> if the parent's resource bundle is used for * this purpose. @@ -387,7 +387,7 @@ public class Logger /** * Returns the resource bundle that is being used for localizing messages. - * + * * @return the resource bundle used for localizing messages, or * <code>null</code> if the parent's resource bundle is used for * this purpose. @@ -405,7 +405,7 @@ public class Logger * log records with a lower severity level will be discarded; a log record of * the same or a higher level will be published unless an installed * <code>Filter</code> decides to discard it. - * + * * @return the severity level below which all log messages will be discarded, * or <code>null</code> if the logger inherits the threshold from * its parent. @@ -421,7 +421,7 @@ public class Logger /** * Returns whether or not a message of the specified level would be logged by * this logger. - * + * * @throws NullPointerException if <code>level</code> is <code>null</code>. */ public boolean isLoggable(Level level) @@ -443,7 +443,7 @@ public class Logger * records with a lower severity level will be discarded immediately. A log * record of the same or a higher level will be published unless an installed * <code>Filter</code> decides to discard it. - * + * * @param level the severity level below which all log messages will be * discarded, or <code>null</code> to indicate that the logger * should inherit the threshold from its parent. @@ -502,7 +502,7 @@ public class Logger /** * Returns the name of this logger. - * + * * @return the name of this logger, or <code>null</code> if the logger is * anonymous. */ @@ -528,7 +528,7 @@ public class Logger * create a new LogRecord and pass it to this method. Therefore, subclasses * usually just need to override this single method for customizing the * logging behavior. - * + * * @param record the log record to be inspected and possibly forwarded. */ public void log(LogRecord record) @@ -825,7 +825,7 @@ public class Logger * understandable to an inexperienced, non-technical end user. Ideally, they * explain in simple words what actions the user can take in order to resolve * the problem. - * + * * @see Level#SEVERE * @param message the message text, also used as look-up key if the logger is * localizing messages with a resource bundle. While it is possible @@ -847,7 +847,7 @@ public class Logger * should be understandable to an inexperienced, non-technical end user. * Ideally, they explain in simple words what actions the user can take in * order to resolve the problem. - * + * * @see Level#WARNING * @param message the message text, also used as look-up key if the logger is * localizing messages with a resource bundle. While it is possible @@ -871,7 +871,7 @@ public class Logger * used only for messages that are important to end users and system * administrators. Messages at this level should be understandable to an * inexperienced, non-technical user. - * + * * @param message the message text, also used as look-up key if the logger is * localizing messages with a resource bundle. While it is possible * to pass <code>null</code>, this is not recommended, since a @@ -890,7 +890,7 @@ public class Logger * Logs a message with severity level CONFIG. {@link Level#CONFIG} is intended * for static configuration messages, for example about the windowing * environment, the operating system version, etc. - * + * * @param message the message text, also used as look-up key if the logger is * localizing messages with a resource bundle. While it is possible * to pass <code>null</code>, this is not recommended, since a @@ -910,7 +910,7 @@ public class Logger * messages that are relevant for developers using the component generating * log messages. Examples include minor, recoverable failures, or possible * inefficiencies. - * + * * @param message the message text, also used as look-up key if the logger is * localizing messages with a resource bundle. While it is possible * to pass <code>null</code>, this is not recommended, since a @@ -929,7 +929,7 @@ public class Logger * Logs a message with severity level FINER. {@link Level#FINER} is intended * for rather detailed tracing, for example entering a method, returning from * a method, or throwing an exception. - * + * * @param message the message text, also used as look-up key if the logger is * localizing messages with a resource bundle. While it is possible * to pass <code>null</code>, this is not recommended, since a @@ -948,7 +948,7 @@ public class Logger * Logs a message with severity level FINEST. {@link Level#FINEST} is intended * for highly detailed tracing, for example reaching a certain point inside * the body of a method. - * + * * @param message the message text, also used as look-up key if the logger is * localizing messages with a resource bundle. While it is possible * to pass <code>null</code>, this is not recommended, since a @@ -966,7 +966,7 @@ public class Logger /** * Adds a handler to the set of handlers that get notified when a log record * is to be published. - * + * * @param handler the handler to be added. * @throws NullPointerException if <code>handler</code> is <code>null</code>. * @throws SecurityException if this logger is not anonymous, a security @@ -1001,7 +1001,7 @@ public class Logger /** * Removes a handler from the set of handlers that get notified when a log * record is to be published. - * + * * @param handler the handler to be removed. * @throws SecurityException if this logger is not anonymous, a security * manager exists, and the caller is not granted the permission to @@ -1053,7 +1053,7 @@ public class Logger /** * Returns whether or not this Logger forwards log records to handlers * registered for its parent loggers. - * + * * @return <code>false</code> if this Logger sends log records merely to * Handlers registered with itself; <code>true</code> if this Logger * sends log records not only to Handlers registered with itself, but @@ -1070,7 +1070,7 @@ public class Logger /** * Sets whether or not this Logger forwards log records to handlers registered * for its parent loggers. - * + * * @param useParentHandlers <code>false</code> to let this Logger send log * records merely to Handlers registered with itself; * <code>true</code> to let this Logger send log records not only @@ -1101,7 +1101,7 @@ public class Logger /** * Returns the parent of this logger. By default, the parent is assigned by * the LogManager by inspecting the logger's name. - * + * * @return the parent of this logger (as detemined by the LogManager by * inspecting logger names), the root logger if no other logger has a * name which is a prefix of this logger's name, or <code>null</code> @@ -1121,7 +1121,7 @@ public class Logger * loggers reflects the hierarchical logger namespace. Basically, this method * should not be public at all, but the GNU implementation follows the API * specification. - * + * * @throws NullPointerException if <code>parent</code> is <code>null</code>. * @throws SecurityException if this logger is not anonymous, a security * manager exists, and the caller is not granted the permission to @@ -1155,7 +1155,7 @@ public class Logger /** * Gets the StackTraceElement of the first class that is not this class. That * should be the initial caller of a logging method. - * + * * @return caller of the initial logging method or null if unknown. */ private StackTraceElement getCallerStackFrame() diff --git a/libjava/classpath/java/util/logging/LoggingMXBean.java b/libjava/classpath/java/util/logging/LoggingMXBean.java index 3e0a727..24d8834 100644 --- a/libjava/classpath/java/util/logging/LoggingMXBean.java +++ b/libjava/classpath/java/util/logging/LoggingMXBean.java @@ -44,7 +44,7 @@ import java.util.List; * This interface represents the management interface for logging. * There is a single logging bean per VM instance, which can be * retrieved via {@link LogManager#getLoggingMXBean()}. - * + * * @since 1.5 */ public interface LoggingMXBean @@ -73,7 +73,7 @@ public interface LoggingMXBean /** * Sets the logging level for a particular logger. - * + * * @param logger the name of the logger * @param level the name of the new logging level, or null * @throws IllegalArgumentException if the level is not diff --git a/libjava/classpath/java/util/logging/LoggingPermission.java b/libjava/classpath/java/util/logging/LoggingPermission.java index 1139a79..804fb94 100644 --- a/libjava/classpath/java/util/logging/LoggingPermission.java +++ b/libjava/classpath/java/util/logging/LoggingPermission.java @@ -59,17 +59,17 @@ public final class LoggingPermission public LoggingPermission(String name, String actions) { super("control", ""); - + if (!"control".equals(name)) { throw new IllegalArgumentException( "name of LoggingPermission must be \"control\""); } - + if ((actions != null) && (actions.length() != 0)) { throw new IllegalArgumentException( - "actions of LoggingPermissions must be null or empty"); - } + "actions of LoggingPermissions must be null or empty"); + } } } diff --git a/libjava/classpath/java/util/logging/MemoryHandler.java b/libjava/classpath/java/util/logging/MemoryHandler.java index ffa589f..e5c258b 100644 --- a/libjava/classpath/java/util/logging/MemoryHandler.java +++ b/libjava/classpath/java/util/logging/MemoryHandler.java @@ -122,19 +122,19 @@ public class MemoryHandler public MemoryHandler() { this((Handler) LogManager.getInstanceProperty( - "java.util.logging.MemoryHandler.target", - Handler.class, /* default */ null), - LogManager.getIntPropertyClamped( - "java.util.logging.MemoryHandler.size", - /* default */ 1000, - /* minimum value */ 1, - /* maximum value */ Integer.MAX_VALUE), - LogManager.getLevelProperty( - "java.util.logging.MemoryHandler.push", - /* default push level */ Level.SEVERE)); + "java.util.logging.MemoryHandler.target", + Handler.class, /* default */ null), + LogManager.getIntPropertyClamped( + "java.util.logging.MemoryHandler.size", + /* default */ 1000, + /* minimum value */ 1, + /* maximum value */ Integer.MAX_VALUE), + LogManager.getLevelProperty( + "java.util.logging.MemoryHandler.push", + /* default push level */ Level.SEVERE)); } - + /** * Constructs a <code>MemoryHandler</code> for keeping a circular * buffer of LogRecords, given some parameters. The values of the @@ -162,7 +162,7 @@ public class MemoryHandler * in those cases. */ public MemoryHandler(Handler target, int size, Level pushLevel) - { + { if ((target == null) || (size <= 0) || (pushLevel == null)) throw new IllegalArgumentException(); @@ -235,9 +235,9 @@ public class MemoryHandler else { for (i = position; i < buffer.length; i++) - target.publish(buffer[i]); + target.publish(buffer[i]); for (i = 0; i < position; i++) - target.publish(buffer[i]); + target.publish(buffer[i]); } numPublished = 0; @@ -298,7 +298,7 @@ public class MemoryHandler target.close(); } - + /** * Returns the push level threshold for this <code>Handler</code>. diff --git a/libjava/classpath/java/util/logging/SocketHandler.java b/libjava/classpath/java/util/logging/SocketHandler.java index 002dfdb..3c17b9b 100644 --- a/libjava/classpath/java/util/logging/SocketHandler.java +++ b/libjava/classpath/java/util/logging/SocketHandler.java @@ -104,10 +104,10 @@ public class SocketHandler throws java.io.IOException { this(LogManager.getLogManager().getProperty("java.util.logging.SocketHandler.host"), - getPortNumber()); + getPortNumber()); } - + /** * Constructs a <code>SocketHandler</code> that publishes log * records to a TCP/IP socket. With the exception of the internet @@ -131,10 +131,10 @@ public class SocketHandler throws java.io.IOException { super(createSocket(host, port), - "java.util.logging.SocketHandler", - /* default level */ Level.ALL, - /* formatter */ null, - /* default formatter */ XMLFormatter.class); + "java.util.logging.SocketHandler", + /* default level */ Level.ALL, + /* formatter */ null, + /* default formatter */ XMLFormatter.class); } @@ -218,4 +218,3 @@ public class SocketHandler flush(); } } - diff --git a/libjava/classpath/java/util/logging/StreamHandler.java b/libjava/classpath/java/util/logging/StreamHandler.java index 5c35c1e..d74dfac 100644 --- a/libjava/classpath/java/util/logging/StreamHandler.java +++ b/libjava/classpath/java/util/logging/StreamHandler.java @@ -114,7 +114,7 @@ public class StreamHandler public StreamHandler(OutputStream out, Formatter formatter) { this(out, "java.util.logging.StreamHandler", Level.INFO, - formatter, SimpleFormatter.class); + formatter, SimpleFormatter.class); } @@ -125,7 +125,7 @@ public class StreamHandler Formatter formatter, Class defaultFormatterClass) { this.level = LogManager.getLevelProperty(propertyPrefix + ".level", - defaultLevel); + defaultLevel); this.filter = (Filter) LogManager.getInstanceProperty( propertyPrefix + ".filter", @@ -136,14 +136,14 @@ public class StreamHandler this.formatter = formatter; else this.formatter = (Formatter) LogManager.getInstanceProperty( - propertyPrefix + ".formatter", + propertyPrefix + ".formatter", /* must be instance of */ Formatter.class, /* default: new instance of */ defaultFormatterClass); try { String enc = LogManager.getLogManager().getProperty(propertyPrefix - + ".encoding"); + + ".encoding"); /* make sure enc actually is a valid encoding */ if ((enc != null) && (enc.length() > 0)) @@ -163,10 +163,10 @@ public class StreamHandler } catch (UnsupportedEncodingException uex) { - /* This should never happen, since the validity of the encoding - * name has been checked above. - */ - throw new RuntimeException(uex.getMessage()); + /* This should never happen, since the validity of the encoding + * name has been checked above. + */ + throw new RuntimeException(uex.getMessage()); } } } @@ -263,9 +263,9 @@ public class StreamHandler * null would throw an exception. */ if (encoding == null) - writer = new OutputStreamWriter(out); + writer = new OutputStreamWriter(out); else - writer = new OutputStreamWriter(out, encoding); + writer = new OutputStreamWriter(out, encoding); } } @@ -330,7 +330,7 @@ public class StreamHandler * would depend on the exact behavior in this rather obscure, * erroneous case -- especially since the API specification does not * prescribe what is supposed to happen. - * + * * @param record the log event to be published. */ public void publish(LogRecord record) @@ -348,13 +348,13 @@ public class StreamHandler } catch (java.io.IOException ex) { - reportError(null, ex, ErrorManager.WRITE_FAILURE); - return; + reportError(null, ex, ErrorManager.WRITE_FAILURE); + return; } catch (Exception ex) { - reportError(null, ex, ErrorManager.GENERIC_FAILURE); - return; + reportError(null, ex, ErrorManager.GENERIC_FAILURE); + return; } streamState = STATE_PUBLISHED; @@ -449,7 +449,7 @@ public class StreamHandler /** * Closes this <code>StreamHandler</code> after having forced any * data that may have been buffered to the underlying output - * device. + * device. * * <p>As soon as <code>close</code> has been called, * a <code>Handler</code> should not be used anymore. Attempts @@ -496,20 +496,20 @@ public class StreamHandler if (writer != null) { - if (formatter != null) - { - /* Even if the StreamHandler has never published a record, - * it emits head and tail upon closing. An earlier version - * of the GNU Classpath implementation did not emitted - * anything. However, this had caused XML log files to be - * entirely empty instead of containing no log records. - */ - if (streamState == STATE_FRESH) + if (formatter != null) + { + /* Even if the StreamHandler has never published a record, + * it emits head and tail upon closing. An earlier version + * of the GNU Classpath implementation did not emitted + * anything. However, this had caused XML log files to be + * entirely empty instead of containing no log records. + */ + if (streamState == STATE_FRESH) writer.write(formatter.getHead(this)); - if (streamState != STATE_CLOSED) - writer.write(formatter.getTail(this)); - } - streamState = STATE_CLOSED; + if (streamState != STATE_CLOSED) + writer.write(formatter.getTail(this)); + } + streamState = STATE_CLOSED; writer.close(); } } diff --git a/libjava/classpath/java/util/logging/XMLFormatter.java b/libjava/classpath/java/util/logging/XMLFormatter.java index 194fcd2..da7c6ef 100644 --- a/libjava/classpath/java/util/logging/XMLFormatter.java +++ b/libjava/classpath/java/util/logging/XMLFormatter.java @@ -75,7 +75,7 @@ public class XMLFormatter */ private static final String lineSep = SimpleFormatter.lineSep; - + /** * A DateFormat for emitting time in the ISO 8601 format. * Since the API specification of SimpleDateFormat does not talk @@ -129,29 +129,29 @@ public class XMLFormatter switch (c) { case '&': - buf.append("&"); - break; + buf.append("&"); + break; case '<': - buf.append("<"); - break; + buf.append("<"); + break; case '>': - buf.append(">"); - break; + buf.append(">"); + break; default: - if (((c >= 0x20) && (c <= 0x7e)) - || (c == /* line feed */ 10) - || (c == /* carriage return */ 13)) - buf.append(c); - else - { - buf.append("&#"); - buf.append((int) c); - buf.append(';'); - } - break; + if (((c >= 0x20) && (c <= 0x7e)) + || (c == /* line feed */ 10) + || (c == /* carriage return */ 13)) + buf.append(c); + else + { + buf.append("&#"); + buf.append((int) c); + buf.append(';'); + } + break; } /* switch (c) */ } /* for i */ @@ -190,11 +190,11 @@ public class XMLFormatter Object[] params = record.getParameters(); ResourceBundle bundle = record.getResourceBundle(); String message; - + buf.append("<record>"); buf.append(lineSep); - - + + appendTag(buf, 1, "date", iso8601.format(new Date(millis))); appendTag(buf, 1, "millis", millis); appendTag(buf, 1, "sequence", record.getSequenceNumber()); @@ -346,7 +346,7 @@ public class XMLFormatter */ if (encoding == null) encoding = "UTF-8"; - + /* On Windows XP localized for Swiss German (this is one of * my [Sascha Brawer's] test machines), the default encoding * has the canonical name "windows-1252". The "historical" name diff --git a/libjava/classpath/java/util/prefs/AbstractPreferences.java b/libjava/classpath/java/util/prefs/AbstractPreferences.java index 9562e1b..14fed38 100644 --- a/libjava/classpath/java/util/prefs/AbstractPreferences.java +++ b/libjava/classpath/java/util/prefs/AbstractPreferences.java @@ -7,7 +7,7 @@ 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 @@ -118,7 +118,7 @@ public abstract class AbstractPreferences extends Preferences { /** * Creates a new AbstractPreferences node with the given parent and name. - * + * * @param parent the parent of this node or null when this is the root node * @param name the name of this node, can not be null, only 80 characters * maximum, must be empty when parent is null and cannot @@ -174,9 +174,9 @@ public abstract class AbstractPreferences extends Preferences { */ public boolean isUserNode() { AbstractPreferences root = this; - while (root.parent != null) - root = root.parent; - return root == Preferences.userRoot(); + while (root.parent != null) + root = root.parent; + return root == Preferences.userRoot(); } /** @@ -238,7 +238,7 @@ public abstract class AbstractPreferences extends Preferences { // First get all cached node names childrenNames.addAll(childCache.keySet()); - + // Then add any others String names[] = childrenNamesSpi(); for (int i = 0; i < names.length; i++) { @@ -339,7 +339,7 @@ public abstract class AbstractPreferences extends Preferences { if (child == null) { if (childName.length() > MAX_NAME_LENGTH) - throw new IllegalArgumentException(childName); + throw new IllegalArgumentException(childName); // Not in childCache yet so create a new sub node child = childSpi(childName); @@ -457,7 +457,7 @@ public abstract class AbstractPreferences extends Preferences { for (int i=0; i < names.length; i++) if (name.equals(names[i])) return childSpi(name); - + // No child with that name found return null; } @@ -523,8 +523,8 @@ public abstract class AbstractPreferences extends Preferences { * This method locks this node and checks if the node has not been * removed, if it has been removed it throws an exception, then it returns * the result of calling <code>keysSpi()</code>. - * - * @exception BackingStoreException when the backing store cannot be + * + * @exception BackingStoreException when the backing store cannot be * reached * @exception IllegalStateException if this node has been removed */ @@ -597,7 +597,7 @@ public abstract class AbstractPreferences extends Preferences { if ("false".equalsIgnoreCase(value)) return false; - + return defaultVal; } @@ -625,7 +625,7 @@ public abstract class AbstractPreferences extends Preferences { else return defaultVal; } - + /** * Helper method for decoding a Base64 string as an byte array. * Returns null on encoding error. This method does not allow any other @@ -807,7 +807,7 @@ public abstract class AbstractPreferences extends Preferences { if (preferenceListeners != null) fire(new PreferenceChangeEvent(this, key, value)); } - + } /** @@ -948,7 +948,7 @@ public abstract class AbstractPreferences extends Preferences { /** * Removes the preferences entry from this preferences node. - * <p> + * <p> * The result will be immediately visible in this VM, but may not be * immediately written to the backing store. * <p> @@ -1040,7 +1040,7 @@ public abstract class AbstractPreferences extends Preferences { public void sync() throws BackingStoreException { flushNode(true); } - + /** * Private helper method that locks this node and calls either @@ -1247,7 +1247,7 @@ public abstract class AbstractPreferences extends Preferences { listener.preferenceChange(event); } }; - + Executor executor = Executors.newSingleThreadExecutor(new DefaultDaemonThreadFactory()); executor.execute(dispatcher); @@ -1273,7 +1273,7 @@ public abstract class AbstractPreferences extends Preferences { listener.childRemoved(event); } }; - + Executor executor = Executors.newSingleThreadExecutor(new DefaultDaemonThreadFactory()); executor.execute(dispatcher); @@ -1316,11 +1316,11 @@ public abstract class AbstractPreferences extends Preferences { * not been removed. May throw an exception when the backing store cannot * be accessed. * - * @exception BackingStoreException when the backing store cannot be + * @exception BackingStoreException when the backing store cannot be * reached */ protected abstract String[] keysSpi() throws BackingStoreException; - + /** * Returns the value associated with the key in this preferences node or * null when the key does not exist in this preferences node. diff --git a/libjava/classpath/java/util/prefs/NodeChangeEvent.java b/libjava/classpath/java/util/prefs/NodeChangeEvent.java index 8c48fb2..5bdeb33 100644 --- a/libjava/classpath/java/util/prefs/NodeChangeEvent.java +++ b/libjava/classpath/java/util/prefs/NodeChangeEvent.java @@ -7,7 +7,7 @@ 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 @@ -58,8 +58,8 @@ import java.util.EventObject; public class NodeChangeEvent extends EventObject { // We have this to placate the compiler. - private static final long serialVersionUID =8068949086596572957L; - + private static final long serialVersionUID =8068949086596572957L; + /** * The sub node that was added or removed. * Defined transient just like <code>EventObject.source</code> since @@ -102,7 +102,7 @@ public class NodeChangeEvent extends EventObject { { throw new NotSerializableException("LineEvent is not serializable"); } - + private void writeObject(ObjectOutputStream oos) throws IOException { diff --git a/libjava/classpath/java/util/prefs/NodeChangeListener.java b/libjava/classpath/java/util/prefs/NodeChangeListener.java index 19664c6..8d018ab 100644 --- a/libjava/classpath/java/util/prefs/NodeChangeListener.java +++ b/libjava/classpath/java/util/prefs/NodeChangeListener.java @@ -7,7 +7,7 @@ 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 diff --git a/libjava/classpath/java/util/prefs/PreferenceChangeEvent.java b/libjava/classpath/java/util/prefs/PreferenceChangeEvent.java index 41c3a47..f273361 100644 --- a/libjava/classpath/java/util/prefs/PreferenceChangeEvent.java +++ b/libjava/classpath/java/util/prefs/PreferenceChangeEvent.java @@ -7,7 +7,7 @@ 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 @@ -62,7 +62,7 @@ public class PreferenceChangeEvent extends EventObject { // We have this to placate the compiler. private static final long serialVersionUID = 793724513368024975L; - + /** * The key of the changed entry. */ @@ -116,7 +116,7 @@ public class PreferenceChangeEvent extends EventObject { { throw new NotSerializableException("LineEvent is not serializable"); } - + private void writeObject(ObjectOutputStream oos) throws IOException { diff --git a/libjava/classpath/java/util/prefs/PreferenceChangeListener.java b/libjava/classpath/java/util/prefs/PreferenceChangeListener.java index adff358..e6118bc 100644 --- a/libjava/classpath/java/util/prefs/PreferenceChangeListener.java +++ b/libjava/classpath/java/util/prefs/PreferenceChangeListener.java @@ -7,7 +7,7 @@ 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 diff --git a/libjava/classpath/java/util/prefs/Preferences.java b/libjava/classpath/java/util/prefs/Preferences.java index e8cdda8..3ff9c85 100644 --- a/libjava/classpath/java/util/prefs/Preferences.java +++ b/libjava/classpath/java/util/prefs/Preferences.java @@ -7,7 +7,7 @@ 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 @@ -213,28 +213,28 @@ public abstract class Preferences { { Iterator iter = ServiceFactory.lookupProviders (PreferencesFactory.class, null); - + if (iter != null && iter.hasNext()) factory = (PreferencesFactory) iter.next(); } - + // Still no factory? Use our default. if (factory == null) - { + { try - { + { Class cls = Class.forName (defaultFactoryClass); factory = (PreferencesFactory) cls.newInstance(); } - catch (Exception e) - { + catch (Exception e) + { throw new RuntimeException ("Couldn't load default factory" + " '"+ defaultFactoryClass +"'", e); } } } - + return factory; } @@ -305,7 +305,7 @@ public abstract class Preferences { * @throws InvalidPreferencesFormatException if the XML is not properly * formatted */ - public static void importPreferences(InputStream is) + public static void importPreferences(InputStream is) throws InvalidPreferencesFormatException, IOException { @@ -318,7 +318,7 @@ public abstract class Preferences { /** * Returns the absolute path name of this preference node. - * The absolute path name of a node is the path name of its parent node + * The absolute path name of a node is the path name of its parent node * plus a '/' plus its own name. If the node is the root node and has no * parent then its name is "" and its absolute path name is "/". */ @@ -400,8 +400,8 @@ public abstract class Preferences { // abstract methods (export) /** - * Export this node, but not its descendants, as XML to the - * indicated output stream. The XML will be encoded using UTF-8 + * Export this node, but not its descendants, as XML to the + * indicated output stream. The XML will be encoded using UTF-8 * and will use a specified document type:<br> * <code><!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd"></code><br> * @param os the output stream to which the XML is sent @@ -414,8 +414,8 @@ public abstract class Preferences { IOException; /** - * Export this node and all its descendants as XML to the - * indicated output stream. The XML will be encoded using UTF-8 + * Export this node and all its descendants as XML to the + * indicated output stream. The XML will be encoded using UTF-8 * and will use a specified document type:<br> * <code><!DOCTYPE preferences SYSTEM "http://java.sun.com/dtd/preferences.dtd"></code><br> * @param os the output stream to which the XML is sent @@ -670,7 +670,7 @@ public abstract class Preferences { * <p> * Note that according to the specification an implementation may delay * removal of the node from the backing store till the <code>flush()</code> - * method is called. But the <code>flush()</code> method may throw a + * method is called. But the <code>flush()</code> method may throw a * <code>IllegalStateException</code> when the node has been removed. * So most implementations will actually remove the node and any subnodes * from the backing store immediatly. @@ -694,4 +694,3 @@ public abstract class Preferences { public abstract void removePreferenceChangeListener (PreferenceChangeListener listener); } - diff --git a/libjava/classpath/java/util/prefs/PreferencesFactory.java b/libjava/classpath/java/util/prefs/PreferencesFactory.java index f4fe7e3..5674f80 100644 --- a/libjava/classpath/java/util/prefs/PreferencesFactory.java +++ b/libjava/classpath/java/util/prefs/PreferencesFactory.java @@ -7,7 +7,7 @@ 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 diff --git a/libjava/classpath/java/util/regex/MatchResult.java b/libjava/classpath/java/util/regex/MatchResult.java index c82d8cc..605873d 100644 --- a/libjava/classpath/java/util/regex/MatchResult.java +++ b/libjava/classpath/java/util/regex/MatchResult.java @@ -48,25 +48,25 @@ public interface MatchResult { /** Returns the index just after the last matched character. */ int end(); - + /** * Returns the index just after the last matched character of the * given sub-match group. * @param group the sub-match group - */ + */ int end(int group); /** Returns the substring of the input which was matched. */ String group(); - - /** + + /** * Returns the substring of the input which was matched by the * given sub-match group. * @param group the sub-match group */ String group(int group); - /** Returns the number of sub-match groups in the matching pattern. */ + /** Returns the number of sub-match groups in the matching pattern. */ int groupCount(); /** Returns the index of the first character of the match. */ diff --git a/libjava/classpath/java/util/regex/Pattern.java b/libjava/classpath/java/util/regex/Pattern.java index 35ec0b8..7d1fc84 100644 --- a/libjava/classpath/java/util/regex/Pattern.java +++ b/libjava/classpath/java/util/regex/Pattern.java @@ -46,14 +46,14 @@ import java.util.ArrayList; /** - * Compiled regular expression ready to be applied. + * Compiled regular expression ready to be applied. * * @since 1.4 */ public final class Pattern implements Serializable { private static final long serialVersionUID = 5073258162644648461L; - + public static final int CANON_EQ = 128; public static final int CASE_INSENSITIVE = 2; public static final int COMMENTS = 4; @@ -61,7 +61,7 @@ public final class Pattern implements Serializable public static final int MULTILINE = 8; public static final int UNICODE_CASE = 64; public static final int UNIX_LINES = 1; - + private final String regex; private final int flags; @@ -93,30 +93,30 @@ public final class Pattern implements Serializable if ((flags & UNIX_LINES) != 0) { - // Use a syntax set with \n for linefeeds? - syntax = new RESyntax(syntax); - syntax.setLineSeparator("\n"); + // Use a syntax set with \n for linefeeds? + syntax = new RESyntax(syntax); + syntax.setLineSeparator("\n"); } if ((flags & COMMENTS) != 0) { - gnuFlags |= RE.REG_X_COMMENTS; + gnuFlags |= RE.REG_X_COMMENTS; } try { - this.re = new RE(regex, gnuFlags, syntax); + this.re = new RE(regex, gnuFlags, syntax); } catch (REException e) { - PatternSyntaxException pse; - pse = new PatternSyntaxException(e.getMessage(), - regex, e.getPosition()); - pse.initCause(e); - throw pse; + PatternSyntaxException pse; + pse = new PatternSyntaxException(e.getMessage(), + regex, e.getPosition()); + pse.initCause(e); + throw pse; } } - + // package private accessor method RE getRE() { @@ -133,7 +133,7 @@ public final class Pattern implements Serializable { return compile(regex, 0); } - + /** * @param regex The regular expression * @param flags The match flags, a bit mask @@ -148,26 +148,26 @@ public final class Pattern implements Serializable // FIXME: check which flags are really accepted if ((flags & ~0xEF) != 0) throw new IllegalArgumentException (); - - return new Pattern (regex, flags); + + return new Pattern (regex, flags); } - + public int flags () { return this.flags; } - + /** * @param regex The regular expression * @param input The character sequence to be matched * * @exception PatternSyntaxException If the expression's syntax is invalid */ - public static boolean matches (String regex, CharSequence input) + public static boolean matches (String regex, CharSequence input) { return compile(regex).matcher(input).matches(); } - + /** * @param input The character sequence to be matched */ @@ -175,7 +175,7 @@ public final class Pattern implements Serializable { return new Matcher(this, input); } - + /** * @param input The character sequence to be matched */ @@ -183,7 +183,7 @@ public final class Pattern implements Serializable { return split(input, 0); } - + /** * @param input The character sequence to be matched * @param limit The result threshold @@ -200,60 +200,60 @@ public final class Pattern implements Serializable while (matched && (limit <= 0 || count < limit - 1)) { - ++count; - end = matcher.start(); - if (start == end) - empties++; - else - { - while (empties > 0) - { - list.add(""); - empties--; - } - - String text = input.subSequence(start, end).toString(); - list.add(text); - } - start = matcher.end(); - matched = matcher.find(); + ++count; + end = matcher.start(); + if (start == end) + empties++; + else + { + while (empties > 0) + { + list.add(""); + empties--; + } + + String text = input.subSequence(start, end).toString(); + list.add(text); + } + start = matcher.end(); + matched = matcher.find(); } // We matched nothing. if (!matched && count == 0) return new String[] { input.toString() }; - + // Is the last token empty? boolean emptyLast = (start == input.length()); // Can/Must we add empties or an extra last token at the end? if (list.size() < limit || limit < 0 || (limit == 0 && !emptyLast)) { - if (limit > list.size()) - { - int max = limit - list.size(); - empties = (empties > max) ? max : empties; - } - while (empties > 0) - { - list.add(""); - empties--; - } + if (limit > list.size()) + { + int max = limit - list.size(); + empties = (empties > max) ? max : empties; + } + while (empties > 0) + { + list.add(""); + empties--; + } } // last token at end if (limit != 0 || (limit == 0 && !emptyLast)) { - String t = input.subSequence(start, input.length()).toString(); - if ("".equals(t) && limit == 0) - { /* Don't add. */ } - else - list.add(t); + String t = input.subSequence(start, input.length()).toString(); + if ("".equals(t) && limit == 0) + { /* Don't add. */ } + else + list.add(t); } return list.toArray(new String[list.size()]); } - + public String pattern () { return regex; diff --git a/libjava/classpath/java/util/regex/PatternSyntaxException.java b/libjava/classpath/java/util/regex/PatternSyntaxException.java index 38e27db..db73d06 100644 --- a/libjava/classpath/java/util/regex/PatternSyntaxException.java +++ b/libjava/classpath/java/util/regex/PatternSyntaxException.java @@ -58,7 +58,7 @@ public class PatternSyntaxException extends IllegalArgumentException * The original pattern that contained the syntax error. */ private final String pattern; - + /** * Index of the first character in the String that was probably invalid, * or -1 when unknown. @@ -74,8 +74,8 @@ public class PatternSyntaxException extends IllegalArgumentException * probably invalid, or -1 when unknown. */ public PatternSyntaxException(String description, - String pattern, - int index) + String pattern, + int index) { super(description); this.desc = description; @@ -123,11 +123,11 @@ public class PatternSyntaxException extends IllegalArgumentException sb.append(pattern); if (index != -1) { - sb.append(lineSep); - sb.append('\t'); - for (int i=0; i<index; i++) - sb.append(' '); - sb.append('^'); + sb.append(lineSep); + sb.append('\t'); + for (int i=0; i<index; i++) + sb.append(' '); + sb.append('^'); } return sb.toString(); } diff --git a/libjava/classpath/java/util/spi/LocaleNameProvider.java b/libjava/classpath/java/util/spi/LocaleNameProvider.java index dfd2e4c..44250fe 100644 --- a/libjava/classpath/java/util/spi/LocaleNameProvider.java +++ b/libjava/classpath/java/util/spi/LocaleNameProvider.java @@ -85,7 +85,7 @@ public abstract class LocaleNameProvider * @see java.util.Locale#getDisplayCountry(java.util.Locale) */ public abstract String getDisplayCountry(String countryCode, - Locale locale); + Locale locale); /** * Returns the localized name for the specified ISO 639 @@ -111,7 +111,7 @@ public abstract class LocaleNameProvider * @see java.util.Locale#getDisplayLanguage(java.util.Locale) */ public abstract String getDisplayLanguage(String langCode, - Locale locale); + Locale locale); /** * Returns the localized name for the specified variant @@ -130,6 +130,6 @@ public abstract class LocaleNameProvider * @see java.util.Locale#getDisplayVariant(java.util.Locale) */ public abstract String getDisplayVariant(String variant, - Locale locale); + Locale locale); } diff --git a/libjava/classpath/java/util/spi/TimeZoneNameProvider.java b/libjava/classpath/java/util/spi/TimeZoneNameProvider.java index 2815670..afd56eb 100644 --- a/libjava/classpath/java/util/spi/TimeZoneNameProvider.java +++ b/libjava/classpath/java/util/spi/TimeZoneNameProvider.java @@ -92,6 +92,6 @@ public abstract class TimeZoneNameProvider * @see java.util.TimeZone#getDisplayName(boolean,int,java.util.Locale) */ public abstract String getDisplayName(String id, boolean daylight, - int style, Locale locale); + int style, Locale locale); } diff --git a/libjava/classpath/java/util/zip/Adler32.java b/libjava/classpath/java/util/zip/Adler32.java index 7c41138..cc27da9 100644 --- a/libjava/classpath/java/util/zip/Adler32.java +++ b/libjava/classpath/java/util/zip/Adler32.java @@ -45,8 +45,8 @@ package java.util.zip; */ /** - * Computes Adler32 checksum for a stream of data. An Adler32 - * checksum is not as reliable as a CRC32 checksum, but a lot faster to + * Computes Adler32 checksum for a stream of data. An Adler32 + * checksum is not as reliable as a CRC32 checksum, but a lot faster to * compute. *<p> * The specification for Adler32 may be found in RFC 1950. @@ -60,7 +60,7 @@ package java.util.zip; * (excluding any dictionary data) computed according to Adler-32 * algorithm. This algorithm is a 32-bit extension and improvement * of the Fletcher algorithm, used in the ITU-T X.224 / ISO 8073 - * standard. + * standard. *<p> * Adler-32 is composed of two sums accumulated per byte: s1 is * the sum of all bytes, s2 is the sum of all s1 values. Both sums @@ -103,13 +103,13 @@ public class Adler32 implements Checksum private int checksum; //we do all in int. //Note that java doesn't have unsigned integers, - //so we have to be careful with what arithmetic - //we do. We return the checksum as a long to + //so we have to be careful with what arithmetic + //we do. We return the checksum as a long to //avoid sign confusion. /** - * Creates a new instance of the <code>Adler32</code> class. - * The checksum starts off with a value of 1. + * Creates a new instance of the <code>Adler32</code> class. + * The checksum starts off with a value of 1. */ public Adler32 () { @@ -119,13 +119,13 @@ public class Adler32 implements Checksum /** * Resets the Adler32 checksum to the initial value. */ - public void reset () + public void reset () { - checksum = 1; //Initialize to 1 + checksum = 1; //Initialize to 1 } /** - * Updates the checksum with the byte b. + * Updates the checksum with the byte b. * * @param bval the data value to add. The high byte of the int is ignored. */ @@ -135,16 +135,16 @@ public class Adler32 implements Checksum //would rather not have that overhead int s1 = checksum & 0xffff; int s2 = checksum >>> 16; - + s1 = (s1 + (bval & 0xFF)) % BASE; s2 = (s1 + s2) % BASE; - + checksum = (s2 << 16) + s1; } /** - * Updates the checksum with the bytes taken from the array. - * + * Updates the checksum with the bytes taken from the array. + * * @param buffer an array of bytes */ public void update (byte[] buffer) @@ -153,8 +153,8 @@ public class Adler32 implements Checksum } /** - * Updates the checksum with the bytes taken from the array. - * + * Updates the checksum with the bytes taken from the array. + * * @param buf an array of bytes * @param off the start of the data used for this update * @param len the number of bytes to use for this update @@ -167,31 +167,31 @@ public class Adler32 implements Checksum while (len > 0) { - // We can defer the modulo operation: - // s1 maximally grows from 65521 to 65521 + 255 * 3800 - // s2 maximally grows by 3800 * median(s1) = 2090079800 < 2^31 - int n = 3800; - if (n > len) - n = len; - len -= n; - while (--n >= 0) - { - s1 = s1 + (buf[off++] & 0xFF); - s2 = s2 + s1; - } - s1 %= BASE; - s2 %= BASE; + // We can defer the modulo operation: + // s1 maximally grows from 65521 to 65521 + 255 * 3800 + // s2 maximally grows by 3800 * median(s1) = 2090079800 < 2^31 + int n = 3800; + if (n > len) + n = len; + len -= n; + while (--n >= 0) + { + s1 = s1 + (buf[off++] & 0xFF); + s2 = s2 + s1; + } + s1 %= BASE; + s2 %= BASE; } /*Old implementation, borrowed from somewhere: int n; - + while (len-- > 0) { - s1 = (s1 + (bs[offset++] & 0xff)) % BASE; + s1 = (s1 + (bs[offset++] & 0xff)) % BASE; s2 = (s2 + s1) % BASE; }*/ - + checksum = (s2 << 16) | s1; } diff --git a/libjava/classpath/java/util/zip/CRC32.java b/libjava/classpath/java/util/zip/CRC32.java index 1c2b397..de2e708 100644 --- a/libjava/classpath/java/util/zip/CRC32.java +++ b/libjava/classpath/java/util/zip/CRC32.java @@ -71,15 +71,15 @@ public class CRC32 implements Checksum int[] crc_table = new int[256]; for (int n = 0; n < 256; n++) { - int c = n; - for (int k = 8; --k >= 0; ) - { - if ((c & 1) != 0) - c = 0xedb88320 ^ (c >>> 1); - else - c = c >>> 1; - } - crc_table[n] = c; + int c = n; + for (int k = 8; --k >= 0; ) + { + if ((c & 1) != 0) + c = 0xedb88320 ^ (c >>> 1); + else + c = c >>> 1; + } + crc_table[n] = c; } return crc_table; } @@ -98,7 +98,7 @@ public class CRC32 implements Checksum public void reset () { crc = 0; } /** - * Updates the checksum with the int bval. + * Updates the checksum with the int bval. * * @param bval (the byte is taken as the lower 8 bits of bval) */ diff --git a/libjava/classpath/java/util/zip/CheckedInputStream.java b/libjava/classpath/java/util/zip/CheckedInputStream.java index d743fbb..163a4c4 100644 --- a/libjava/classpath/java/util/zip/CheckedInputStream.java +++ b/libjava/classpath/java/util/zip/CheckedInputStream.java @@ -7,7 +7,7 @@ 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 @@ -118,13 +118,13 @@ public class CheckedInputStream extends FilterInputStream long s = 0; while (n > 0) { - int r = in.read(buf, 0, min); - if (r == -1) - break; - n -= r; - s += r; - min = (int) Math.min(n, 1024); - sum.update(buf, 0, r); + int r = in.read(buf, 0, min); + if (r == -1) + break; + n -= r; + s += r; + min = (int) Math.min(n, 1024); + sum.update(buf, 0, r); } return s; diff --git a/libjava/classpath/java/util/zip/CheckedOutputStream.java b/libjava/classpath/java/util/zip/CheckedOutputStream.java index a3c1929..e022225 100644 --- a/libjava/classpath/java/util/zip/CheckedOutputStream.java +++ b/libjava/classpath/java/util/zip/CheckedOutputStream.java @@ -7,7 +7,7 @@ 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 diff --git a/libjava/classpath/java/util/zip/Deflater.java b/libjava/classpath/java/util/zip/Deflater.java index 41d9881..dd81fe7 100644 --- a/libjava/classpath/java/util/zip/Deflater.java +++ b/libjava/classpath/java/util/zip/Deflater.java @@ -41,10 +41,10 @@ package java.util.zip; * This is the Deflater class. The deflater class compresses input * with the deflate algorithm described in RFC 1951. It has several * compression levels and three different strategies described below. - * + * * This class is <i>not</i> thread safe. This is inherent in the API, due * to the split of deflate and setInput. - * + * * @author Jochen Hoenicke * @author Tom Tromey */ @@ -52,11 +52,11 @@ public class Deflater { /** * The best and slowest compression level. This tries to find very - * long and distant string repetitions. + * long and distant string repetitions. */ public static final int BEST_COMPRESSION = 9; /** - * The worst but fastest compression level. + * The worst but fastest compression level. */ public static final int BEST_SPEED = 1; /** @@ -78,10 +78,10 @@ public class Deflater */ public static final int FILTERED = 1; - /** + /** * This strategy will not look for string repetitions at all. It * only encodes with Huffman trees (which means, that more common - * characters get a smaller encoding. + * characters get a smaller encoding. */ public static final int HUFFMAN_ONLY = 2; @@ -123,13 +123,13 @@ public class Deflater * (6) FINISHED_STATE is entered, when everything has been flushed to the * internal pending output buffer. * (7) At any time (7) - * + * */ private static final int IS_SETDICT = 0x01; private static final int IS_FLUSHING = 0x04; private static final int IS_FINISHING = 0x08; - + private static final int INIT_STATE = 0x00; private static final int SETDICT_STATE = 0x01; private static final int INIT_FINISHING_STATE = 0x08; @@ -151,7 +151,7 @@ public class Deflater /** The total bytes of output written. */ private long totalOut; - + /** The pending output. */ private DeflaterPending pending; @@ -169,7 +169,7 @@ public class Deflater /** * Creates a new deflater with given compression level. * @param lvl the compression level, a value between NO_COMPRESSION - * and BEST_COMPRESSION, or DEFAULT_COMPRESSION. + * and BEST_COMPRESSION, or DEFAULT_COMPRESSION. * @exception IllegalArgumentException if lvl is out of range. */ public Deflater(int lvl) @@ -180,7 +180,7 @@ public class Deflater /** * Creates a new deflater with given compression level. * @param lvl the compression level, a value between NO_COMPRESSION - * and BEST_COMPRESSION. + * and BEST_COMPRESSION. * @param nowrap true, iff we should suppress the deflate header at the * beginning and the adler checksum at the end of the output. This is * useful for the GZIP format. @@ -201,26 +201,26 @@ public class Deflater reset(); } - /** + /** * Resets the deflater. The deflater acts afterwards as if it was * just created with the same compression level and strategy as it - * had before. + * had before. */ - public void reset() + public void reset() { state = (noHeader ? BUSY_STATE : INIT_STATE); totalOut = 0; pending.reset(); engine.reset(); } - + /** * Frees all objects allocated by the compressor. There's no * reason to call this, since you can just rely on garbage * collection. Exists only for compatibility against Sun's JDK, * where the compressor allocates native memory. * If you call any method (even reset) afterwards the behaviour is - * <i>undefined</i>. + * <i>undefined</i>. */ public void end() { @@ -229,7 +229,7 @@ public class Deflater state = CLOSED_STATE; } - /** + /** * Gets the current adler checksum of the data that was processed so * far. */ @@ -238,7 +238,7 @@ public class Deflater return engine.getAdler(); } - /** + /** * Gets the number of input bytes processed so far. */ public int getTotalIn() @@ -246,7 +246,7 @@ public class Deflater return (int) engine.getTotalIn(); } - /** + /** * Gets the number of input bytes processed so far. * @since 1.5 */ @@ -255,7 +255,7 @@ public class Deflater return engine.getTotalIn(); } - /** + /** * Gets the number of output bytes so far. */ public int getTotalOut() @@ -263,7 +263,7 @@ public class Deflater return (int) totalOut; } - /** + /** * Gets the number of output bytes so far. * @since 1.5 */ @@ -272,7 +272,7 @@ public class Deflater return totalOut; } - /** + /** * Finalizes this object. */ protected void finalize() @@ -280,7 +280,7 @@ public class Deflater /* Exists solely for compatibility. We don't have any native state. */ } - /** + /** * Flushes the current input block. Further calls to deflate() will * produce enough output to inflate everything in the current input * block. This is not part of Sun's JDK so I have made it package @@ -291,7 +291,7 @@ public class Deflater state |= IS_FLUSHING; } - /** + /** * Finishes the deflater with the current input block. It is an error * to give more input after this method was called. This method must * be called to force all bytes to be flushed. @@ -300,7 +300,7 @@ public class Deflater state |= IS_FLUSHING | IS_FINISHING; } - /** + /** * Returns true iff the stream was finished and no more output bytes * are available. */ @@ -314,7 +314,7 @@ public class Deflater * You should then call setInput(). <br> * * <em>NOTE</em>: This method can also return true when the stream - * was finished. + * was finished. */ public boolean needsInput() { @@ -344,7 +344,7 @@ public class Deflater * true again. * @param input the buffer containing the input data. * @param off the start of the data. - * @param len the length of the data. + * @param len the length of the data. * @exception IllegalStateException if the buffer was finished() or ended() * or if previous input is still pending. */ @@ -355,11 +355,11 @@ public class Deflater engine.setInput(input, off, len); } - /** + /** * Sets the compression level. There is no guarantee of the exact * position of the change, but if you call this when needsInput is * true the change of compression level will occur somewhere near - * before the end of the so far given input. + * before the end of the so far given input. * @param lvl the new compression level. */ public void setLevel(int lvl) @@ -372,12 +372,12 @@ public class Deflater if (level != lvl) { - level = lvl; - engine.setLevel(lvl); + level = lvl; + engine.setLevel(lvl); } } - /** + /** * Sets the compression strategy. Strategy is one of * DEFAULT_STRATEGY, HUFFMAN_ONLY and FILTERED. For the exact * position where the strategy is changed, the same as for @@ -387,14 +387,14 @@ public class Deflater public void setStrategy(int stgy) { if (stgy != DEFAULT_STRATEGY && stgy != FILTERED - && stgy != HUFFMAN_ONLY) + && stgy != HUFFMAN_ONLY) throw new IllegalArgumentException(); engine.setStrategy(stgy); } /** - * Deflates the current input block to the given array. It returns - * the number of bytes compressed, or 0 if either + * Deflates the current input block to the given array. It returns + * the number of bytes compressed, or 0 if either * needsInput() or finished() returns true or length is zero. * @param output the buffer where to write the compressed data. */ @@ -404,15 +404,15 @@ public class Deflater } /** - * Deflates the current input block to the given array. It returns - * the number of bytes compressed, or 0 if either + * Deflates the current input block to the given array. It returns + * the number of bytes compressed, or 0 if either * needsInput() or finished() returns true or length is zero. * @param output the buffer where to write the compressed data. * @param offset the offset into the output array. * @param length the maximum number of bytes that may be written. * @exception IllegalStateException if end() was called. * @exception IndexOutOfBoundsException if offset and/or length - * don't match the array length. + * don't match the array length. */ public int deflate(byte[] output, int offset, int length) { @@ -423,78 +423,78 @@ public class Deflater if (state < BUSY_STATE) { - /* output header */ - int header = (DEFLATED + - ((DeflaterConstants.MAX_WBITS - 8) << 4)) << 8; - int level_flags = (level - 1) >> 1; - if (level_flags < 0 || level_flags > 3) - level_flags = 3; - header |= level_flags << 6; - if ((state & IS_SETDICT) != 0) - /* Dictionary was set */ - header |= DeflaterConstants.PRESET_DICT; - header += 31 - (header % 31); - - pending.writeShortMSB(header); - if ((state & IS_SETDICT) != 0) - { - int chksum = engine.getAdler(); - engine.resetAdler(); - pending.writeShortMSB(chksum >> 16); - pending.writeShortMSB(chksum & 0xffff); - } - - state = BUSY_STATE | (state & (IS_FLUSHING | IS_FINISHING)); + /* output header */ + int header = (DEFLATED + + ((DeflaterConstants.MAX_WBITS - 8) << 4)) << 8; + int level_flags = (level - 1) >> 1; + if (level_flags < 0 || level_flags > 3) + level_flags = 3; + header |= level_flags << 6; + if ((state & IS_SETDICT) != 0) + /* Dictionary was set */ + header |= DeflaterConstants.PRESET_DICT; + header += 31 - (header % 31); + + pending.writeShortMSB(header); + if ((state & IS_SETDICT) != 0) + { + int chksum = engine.getAdler(); + engine.resetAdler(); + pending.writeShortMSB(chksum >> 16); + pending.writeShortMSB(chksum & 0xffff); + } + + state = BUSY_STATE | (state & (IS_FLUSHING | IS_FINISHING)); } for (;;) { - int count = pending.flush(output, offset, length); - offset += count; - totalOut += count; - length -= count; - if (length == 0 || state == FINISHED_STATE) - break; - - if (!engine.deflate((state & IS_FLUSHING) != 0, - (state & IS_FINISHING) != 0)) - { - if (state == BUSY_STATE) - /* We need more input now */ - return origLength - length; - else if (state == FLUSHING_STATE) - { - if (level != NO_COMPRESSION) - { - /* We have to supply some lookahead. 8 bit lookahead - * are needed by the zlib inflater, and we must fill - * the next byte, so that all bits are flushed. - */ - int neededbits = 8 + ((-pending.getBitCount()) & 7); - while (neededbits > 0) - { - /* write a static tree block consisting solely of - * an EOF: - */ - pending.writeBits(2, 10); - neededbits -= 10; - } - } - state = BUSY_STATE; - } - else if (state == FINISHING_STATE) - { - pending.alignToByte(); - /* We have completed the stream */ - if (!noHeader) - { - int adler = engine.getAdler(); - pending.writeShortMSB(adler >> 16); - pending.writeShortMSB(adler & 0xffff); - } - state = FINISHED_STATE; - } - } + int count = pending.flush(output, offset, length); + offset += count; + totalOut += count; + length -= count; + if (length == 0 || state == FINISHED_STATE) + break; + + if (!engine.deflate((state & IS_FLUSHING) != 0, + (state & IS_FINISHING) != 0)) + { + if (state == BUSY_STATE) + /* We need more input now */ + return origLength - length; + else if (state == FLUSHING_STATE) + { + if (level != NO_COMPRESSION) + { + /* We have to supply some lookahead. 8 bit lookahead + * are needed by the zlib inflater, and we must fill + * the next byte, so that all bits are flushed. + */ + int neededbits = 8 + ((-pending.getBitCount()) & 7); + while (neededbits > 0) + { + /* write a static tree block consisting solely of + * an EOF: + */ + pending.writeBits(2, 10); + neededbits -= 10; + } + } + state = BUSY_STATE; + } + else if (state == FINISHING_STATE) + { + pending.alignToByte(); + /* We have completed the stream */ + if (!noHeader) + { + int adler = engine.getAdler(); + pending.writeShortMSB(adler >> 16); + pending.writeShortMSB(adler & 0xffff); + } + state = FINISHED_STATE; + } + } } return origLength - length; @@ -503,10 +503,10 @@ public class Deflater /** * Sets the dictionary which should be used in the deflate process. * This call is equivalent to <code>setDictionary(dict, 0, - * dict.length)</code>. - * @param dict the dictionary. + * dict.length)</code>. + * @param dict the dictionary. * @exception IllegalStateException if setInput () or deflate () - * were already called or another dictionary was already set. + * were already called or another dictionary was already set. */ public void setDictionary(byte[] dict) { diff --git a/libjava/classpath/java/util/zip/DeflaterEngine.java b/libjava/classpath/java/util/zip/DeflaterEngine.java index 38a82d8..287558e 100644 --- a/libjava/classpath/java/util/zip/DeflaterEngine.java +++ b/libjava/classpath/java/util/zip/DeflaterEngine.java @@ -45,7 +45,7 @@ class DeflaterEngine implements DeflaterConstants /** * Hashtable, hashing three characters to an index for window, so - * that window[index]..window[index+2] have this hash code. + * that window[index]..window[index+2] have this hash code. * Note that the array should really be unsigned short, so you need * to and the values with 0xffff. */ @@ -53,7 +53,7 @@ class DeflaterEngine implements DeflaterConstants /** * prev[index & WMASK] points to the previous index that has the - * same hash code as the string starting at index. This way + * same hash code as the string starting at index. This way * entries with the same hash code are in a linked list. * Note that the array should really be unsigned short, so you need * to and the values with 0xffff. @@ -78,7 +78,7 @@ class DeflaterEngine implements DeflaterConstants private int lookahead; /** - * This array contains the part of the uncompressed stream that + * This array contains the part of the uncompressed stream that * is of relevance. The current character is indexed by strstart. */ private byte[] window; @@ -113,12 +113,12 @@ class DeflaterEngine implements DeflaterConstants * second half is copied to the beginning. * * The head array is a hash table. Three characters build a hash value - * and they the value points to the corresponding index in window of + * and they the value points to the corresponding index in window of * the last string with this hash. The prev array implements a * linked list of matches with the same hash: prev[index & WMASK] points * to the previous index with the same hash. - * - * + * + * */ @@ -180,44 +180,44 @@ class DeflaterEngine implements DeflaterConstants niceLength = DeflaterConstants.NICE_LENGTH[lvl]; max_chain = DeflaterConstants.MAX_CHAIN[lvl]; - if (DeflaterConstants.COMPR_FUNC[lvl] != comprFunc) + if (DeflaterConstants.COMPR_FUNC[lvl] != comprFunc) { - if (DeflaterConstants.DEBUGGING) - System.err.println("Change from "+comprFunc +" to " - + DeflaterConstants.COMPR_FUNC[lvl]); - switch (comprFunc) - { - case DEFLATE_STORED: - if (strstart > blockStart) - { - huffman.flushStoredBlock(window, blockStart, - strstart - blockStart, false); - blockStart = strstart; - } - updateHash(); - break; - case DEFLATE_FAST: - if (strstart > blockStart) - { - huffman.flushBlock(window, blockStart, strstart - blockStart, - false); - blockStart = strstart; - } - break; - case DEFLATE_SLOW: - if (prevAvailable) - huffman.tallyLit(window[strstart-1] & 0xff); - if (strstart > blockStart) - { - huffman.flushBlock(window, blockStart, strstart - blockStart, - false); - blockStart = strstart; - } - prevAvailable = false; - matchLen = MIN_MATCH - 1; - break; - } - comprFunc = COMPR_FUNC[lvl]; + if (DeflaterConstants.DEBUGGING) + System.err.println("Change from "+comprFunc +" to " + + DeflaterConstants.COMPR_FUNC[lvl]); + switch (comprFunc) + { + case DEFLATE_STORED: + if (strstart > blockStart) + { + huffman.flushStoredBlock(window, blockStart, + strstart - blockStart, false); + blockStart = strstart; + } + updateHash(); + break; + case DEFLATE_FAST: + if (strstart > blockStart) + { + huffman.flushBlock(window, blockStart, strstart - blockStart, + false); + blockStart = strstart; + } + break; + case DEFLATE_SLOW: + if (prevAvailable) + huffman.tallyLit(window[strstart-1] & 0xff); + if (strstart > blockStart) + { + huffman.flushBlock(window, blockStart, strstart - blockStart, + false); + blockStart = strstart; + } + prevAvailable = false; + matchLen = MIN_MATCH - 1; + break; + } + comprFunc = COMPR_FUNC[lvl]; } } @@ -225,7 +225,7 @@ class DeflaterEngine implements DeflaterConstants if (DEBUGGING) System.err.println("updateHash: "+strstart); ins_h = (window[strstart] << HASH_SHIFT) ^ window[strstart + 1]; - } + } /** * Inserts the current string in the head hash and returns the previous @@ -238,13 +238,13 @@ class DeflaterEngine implements DeflaterConstants if (DEBUGGING) { - if (hash != (((window[strstart] << (2*HASH_SHIFT)) - ^ (window[strstart + 1] << HASH_SHIFT) - ^ (window[strstart + 2])) & HASH_MASK)) - throw new InternalError("hash inconsistent: "+hash+"/" - +window[strstart]+"," - +window[strstart+1]+"," - +window[strstart+2]+","+HASH_SHIFT); + if (hash != (((window[strstart] << (2*HASH_SHIFT)) + ^ (window[strstart + 1] << HASH_SHIFT) + ^ (window[strstart + 2])) & HASH_MASK)) + throw new InternalError("hash inconsistent: "+hash+"/" + +window[strstart]+"," + +window[strstart+1]+"," + +window[strstart+2]+","+HASH_SHIFT); } prev[strstart & WMASK] = match = head[hash]; @@ -259,22 +259,22 @@ class DeflaterEngine implements DeflaterConstants matchStart -= WSIZE; strstart -= WSIZE; blockStart -= WSIZE; - + /* Slide the hash table (could be avoided with 32 bit values * at the expense of memory usage). */ - for (int i = 0; i < HASH_SIZE; i++) + for (int i = 0; i < HASH_SIZE; i++) { - int m = head[i] & 0xffff; - head[i] = m >= WSIZE ? (short) (m - WSIZE) : 0; + int m = head[i] & 0xffff; + head[i] = m >= WSIZE ? (short) (m - WSIZE) : 0; } /* Slide the prev table. */ - for (int i = 0; i < WSIZE; i++) + for (int i = 0; i < WSIZE; i++) { - int m = prev[i] & 0xffff; - prev[i] = m >= WSIZE ? (short) (m - WSIZE) : 0; + int m = prev[i] & 0xffff; + prev[i] = m >= WSIZE ? (short) (m - WSIZE) : 0; } } @@ -298,30 +298,30 @@ class DeflaterEngine implements DeflaterConstants */ while (lookahead < DeflaterConstants.MIN_LOOKAHEAD && inputOff < inputEnd) { - int more = 2*WSIZE - lookahead - strstart; - - if (more > inputEnd - inputOff) - more = inputEnd - inputOff; - - System.arraycopy(inputBuf, inputOff, - window, strstart + lookahead, more); - adler.update(inputBuf, inputOff, more); - inputOff += more; - totalIn += more; - lookahead += more; + int more = 2*WSIZE - lookahead - strstart; + + if (more > inputEnd - inputOff) + more = inputEnd - inputOff; + + System.arraycopy(inputBuf, inputOff, + window, strstart + lookahead, more); + adler.update(inputBuf, inputOff, more); + inputOff += more; + totalIn += more; + lookahead += more; } - if (lookahead >= MIN_MATCH) + if (lookahead >= MIN_MATCH) updateHash(); } /** - * Find the best (longest) string in the window matching the + * Find the best (longest) string in the window matching the * string starting at strstart. * * Preconditions: * strstart + MAX_MATCH <= window.length. - * + * * * @param curMatch */ @@ -333,7 +333,7 @@ class DeflaterEngine implements DeflaterConstants int match; int best_end = this.strstart + matchLen; int best_len = Math.max(matchLen, MIN_MATCH - 1); - + int limit = Math.max(strstart - MAX_DIST, 0); int strend = scan + MAX_MATCH - 1; @@ -350,51 +350,51 @@ class DeflaterEngine implements DeflaterConstants if (niceLength > lookahead) niceLength = lookahead; - if (DeflaterConstants.DEBUGGING - && strstart > 2*WSIZE - MIN_LOOKAHEAD) + if (DeflaterConstants.DEBUGGING + && strstart > 2*WSIZE - MIN_LOOKAHEAD) throw new InternalError("need lookahead"); - + do { if (DeflaterConstants.DEBUGGING && curMatch >= strstart) - throw new InternalError("future match"); + throw new InternalError("future match"); if (window[curMatch + best_len] != scan_end - || window[curMatch + best_len - 1] != scan_end1 - || window[curMatch] != window[scan] - || window[curMatch+1] != window[scan + 1]) - continue; + || window[curMatch + best_len - 1] != scan_end1 + || window[curMatch] != window[scan] + || window[curMatch+1] != window[scan + 1]) + continue; - match = curMatch + 2; + match = curMatch + 2; scan += 2; /* We check for insufficient lookahead only every 8th comparison; * the 256th check will be made at strstart+258. */ while (window[++scan] == window[++match] - && window[++scan] == window[++match] - && window[++scan] == window[++match] - && window[++scan] == window[++match] - && window[++scan] == window[++match] - && window[++scan] == window[++match] - && window[++scan] == window[++match] - && window[++scan] == window[++match] - && scan < strend) + && window[++scan] == window[++match] + && window[++scan] == window[++match] + && window[++scan] == window[++match] + && window[++scan] == window[++match] + && window[++scan] == window[++match] + && window[++scan] == window[++match] + && window[++scan] == window[++match] + && scan < strend) ; if (scan > best_end) { -// if (DeflaterConstants.DEBUGGING && ins_h == 0) -// System.err.println("Found match: "+curMatch+"-"+(scan-strstart)); - matchStart = curMatch; - best_end = scan; - best_len = scan - strstart; - if (best_len >= niceLength) - break; - - scan_end1 = window[best_end-1]; - scan_end = window[best_end]; +// if (DeflaterConstants.DEBUGGING && ins_h == 0) +// System.err.println("Found match: "+curMatch+"-"+(scan-strstart)); + matchStart = curMatch; + best_end = scan; + best_len = scan - strstart; + if (best_len >= niceLength) + break; + + scan_end1 = window[best_end-1]; + scan_end = window[best_end]; } scan = strstart; } while ((curMatch = (prev[curMatch & WMASK] & 0xffff)) > limit - && --chainLength != 0); + && --chainLength != 0); matchLen = Math.min(best_len, lookahead); return matchLen >= MIN_MATCH; @@ -417,13 +417,13 @@ class DeflaterEngine implements DeflaterConstants length--; while (--length > 0) { - insertString(); - strstart++; + insertString(); + strstart++; } strstart += 2; blockStart = strstart; - } - + } + private boolean deflateStored(boolean flush, boolean finish) { if (!flush && lookahead == 0) @@ -434,25 +434,25 @@ class DeflaterEngine implements DeflaterConstants int storedLen = strstart - blockStart; - if ((storedLen >= DeflaterConstants.MAX_BLOCK_SIZE) - /* Block is full */ - || (blockStart < WSIZE && storedLen >= MAX_DIST) - /* Block may move out of window */ - || flush) + if ((storedLen >= DeflaterConstants.MAX_BLOCK_SIZE) + /* Block is full */ + || (blockStart < WSIZE && storedLen >= MAX_DIST) + /* Block may move out of window */ + || flush) { - boolean lastBlock = finish; - if (storedLen > DeflaterConstants.MAX_BLOCK_SIZE) - { - storedLen = DeflaterConstants.MAX_BLOCK_SIZE; - lastBlock = false; - } - - if (DeflaterConstants.DEBUGGING) - System.err.println("storedBlock["+storedLen+","+lastBlock+"]"); - - huffman.flushStoredBlock(window, blockStart, storedLen, lastBlock); - blockStart += storedLen; - return !lastBlock; + boolean lastBlock = finish; + if (storedLen > DeflaterConstants.MAX_BLOCK_SIZE) + { + storedLen = DeflaterConstants.MAX_BLOCK_SIZE; + lastBlock = false; + } + + if (DeflaterConstants.DEBUGGING) + System.err.println("storedBlock["+storedLen+","+lastBlock+"]"); + + huffman.flushStoredBlock(window, blockStart, storedLen, lastBlock); + blockStart += storedLen; + return !lastBlock; } return true; } @@ -464,78 +464,78 @@ class DeflaterEngine implements DeflaterConstants while (lookahead >= MIN_LOOKAHEAD || flush) { - if (lookahead == 0) - { - /* We are flushing everything */ - huffman.flushBlock(window, blockStart, strstart - blockStart, - finish); - blockStart = strstart; - return false; - } - - if (strstart > 2 * WSIZE - MIN_LOOKAHEAD) - { - /* slide window, as findLongestMatch need this. - * This should only happen when flushing and the window - * is almost full. - */ - slideWindow(); - } - - int hashHead; - if (lookahead >= MIN_MATCH - && (hashHead = insertString()) != 0 - && strategy != Deflater.HUFFMAN_ONLY - && strstart - hashHead <= MAX_DIST - && findLongestMatch(hashHead)) - { - /* longestMatch sets matchStart and matchLen */ - if (DeflaterConstants.DEBUGGING) - { - for (int i = 0 ; i < matchLen; i++) - { - if (window[strstart+i] != window[matchStart + i]) - throw new InternalError(); - } - } - boolean full = huffman.tallyDist(strstart - matchStart, matchLen); - - lookahead -= matchLen; - if (matchLen <= max_lazy && lookahead >= MIN_MATCH) - { - while (--matchLen > 0) - { - strstart++; - insertString(); - } - strstart++; - } - else - { - strstart += matchLen; - if (lookahead >= MIN_MATCH - 1) - updateHash(); - } - matchLen = MIN_MATCH - 1; - if (!full) - continue; - } - else - { - /* No match found */ - huffman.tallyLit(window[strstart] & 0xff); - strstart++; - lookahead--; - } - - if (huffman.isFull()) - { - boolean lastBlock = finish && lookahead == 0; - huffman.flushBlock(window, blockStart, strstart - blockStart, - lastBlock); - blockStart = strstart; - return !lastBlock; - } + if (lookahead == 0) + { + /* We are flushing everything */ + huffman.flushBlock(window, blockStart, strstart - blockStart, + finish); + blockStart = strstart; + return false; + } + + if (strstart > 2 * WSIZE - MIN_LOOKAHEAD) + { + /* slide window, as findLongestMatch need this. + * This should only happen when flushing and the window + * is almost full. + */ + slideWindow(); + } + + int hashHead; + if (lookahead >= MIN_MATCH + && (hashHead = insertString()) != 0 + && strategy != Deflater.HUFFMAN_ONLY + && strstart - hashHead <= MAX_DIST + && findLongestMatch(hashHead)) + { + /* longestMatch sets matchStart and matchLen */ + if (DeflaterConstants.DEBUGGING) + { + for (int i = 0 ; i < matchLen; i++) + { + if (window[strstart+i] != window[matchStart + i]) + throw new InternalError(); + } + } + boolean full = huffman.tallyDist(strstart - matchStart, matchLen); + + lookahead -= matchLen; + if (matchLen <= max_lazy && lookahead >= MIN_MATCH) + { + while (--matchLen > 0) + { + strstart++; + insertString(); + } + strstart++; + } + else + { + strstart += matchLen; + if (lookahead >= MIN_MATCH - 1) + updateHash(); + } + matchLen = MIN_MATCH - 1; + if (!full) + continue; + } + else + { + /* No match found */ + huffman.tallyLit(window[strstart] & 0xff); + strstart++; + lookahead--; + } + + if (huffman.isFull()) + { + boolean lastBlock = finish && lookahead == 0; + huffman.flushBlock(window, blockStart, strstart - blockStart, + lastBlock); + blockStart = strstart; + return !lastBlock; + } } return true; } @@ -547,127 +547,127 @@ class DeflaterEngine implements DeflaterConstants while (lookahead >= MIN_LOOKAHEAD || flush) { - if (lookahead == 0) - { - if (prevAvailable) - huffman.tallyLit(window[strstart-1] & 0xff); - prevAvailable = false; - - /* We are flushing everything */ - if (DeflaterConstants.DEBUGGING && !flush) - throw new InternalError("Not flushing, but no lookahead"); - huffman.flushBlock(window, blockStart, strstart - blockStart, - finish); - blockStart = strstart; - return false; - } - - if (strstart >= 2 * WSIZE - MIN_LOOKAHEAD) - { - /* slide window, as findLongestMatch need this. - * This should only happen when flushing and the window - * is almost full. - */ - slideWindow(); - } - - int prevMatch = matchStart; - int prevLen = matchLen; - if (lookahead >= MIN_MATCH) - { - int hashHead = insertString(); - if (strategy != Deflater.HUFFMAN_ONLY - && hashHead != 0 && strstart - hashHead <= MAX_DIST - && findLongestMatch(hashHead)) - { - /* longestMatch sets matchStart and matchLen */ - - /* Discard match if too small and too far away */ - if (matchLen <= 5 - && (strategy == Deflater.FILTERED - || (matchLen == MIN_MATCH - && strstart - matchStart > TOO_FAR))) { - matchLen = MIN_MATCH - 1; - } - } - } - - /* previous match was better */ - if (prevLen >= MIN_MATCH && matchLen <= prevLen) - { - if (DeflaterConstants.DEBUGGING) - { - for (int i = 0 ; i < matchLen; i++) - { - if (window[strstart-1+i] != window[prevMatch + i]) - throw new InternalError(); - } - } - huffman.tallyDist(strstart - 1 - prevMatch, prevLen); - prevLen -= 2; - do - { - strstart++; - lookahead--; - if (lookahead >= MIN_MATCH) - insertString(); - } - while (--prevLen > 0); - strstart ++; - lookahead--; - prevAvailable = false; - matchLen = MIN_MATCH - 1; - } - else - { - if (prevAvailable) - huffman.tallyLit(window[strstart-1] & 0xff); - prevAvailable = true; - strstart++; - lookahead--; - } - - if (huffman.isFull()) - { - int len = strstart - blockStart; - if (prevAvailable) - len--; - boolean lastBlock = (finish && lookahead == 0 && !prevAvailable); - huffman.flushBlock(window, blockStart, len, lastBlock); - blockStart += len; - return !lastBlock; - } + if (lookahead == 0) + { + if (prevAvailable) + huffman.tallyLit(window[strstart-1] & 0xff); + prevAvailable = false; + + /* We are flushing everything */ + if (DeflaterConstants.DEBUGGING && !flush) + throw new InternalError("Not flushing, but no lookahead"); + huffman.flushBlock(window, blockStart, strstart - blockStart, + finish); + blockStart = strstart; + return false; + } + + if (strstart >= 2 * WSIZE - MIN_LOOKAHEAD) + { + /* slide window, as findLongestMatch need this. + * This should only happen when flushing and the window + * is almost full. + */ + slideWindow(); + } + + int prevMatch = matchStart; + int prevLen = matchLen; + if (lookahead >= MIN_MATCH) + { + int hashHead = insertString(); + if (strategy != Deflater.HUFFMAN_ONLY + && hashHead != 0 && strstart - hashHead <= MAX_DIST + && findLongestMatch(hashHead)) + { + /* longestMatch sets matchStart and matchLen */ + + /* Discard match if too small and too far away */ + if (matchLen <= 5 + && (strategy == Deflater.FILTERED + || (matchLen == MIN_MATCH + && strstart - matchStart > TOO_FAR))) { + matchLen = MIN_MATCH - 1; + } + } + } + + /* previous match was better */ + if (prevLen >= MIN_MATCH && matchLen <= prevLen) + { + if (DeflaterConstants.DEBUGGING) + { + for (int i = 0 ; i < matchLen; i++) + { + if (window[strstart-1+i] != window[prevMatch + i]) + throw new InternalError(); + } + } + huffman.tallyDist(strstart - 1 - prevMatch, prevLen); + prevLen -= 2; + do + { + strstart++; + lookahead--; + if (lookahead >= MIN_MATCH) + insertString(); + } + while (--prevLen > 0); + strstart ++; + lookahead--; + prevAvailable = false; + matchLen = MIN_MATCH - 1; + } + else + { + if (prevAvailable) + huffman.tallyLit(window[strstart-1] & 0xff); + prevAvailable = true; + strstart++; + lookahead--; + } + + if (huffman.isFull()) + { + int len = strstart - blockStart; + if (prevAvailable) + len--; + boolean lastBlock = (finish && lookahead == 0 && !prevAvailable); + huffman.flushBlock(window, blockStart, len, lastBlock); + blockStart += len; + return !lastBlock; + } } return true; - } + } - public boolean deflate(boolean flush, boolean finish) + public boolean deflate(boolean flush, boolean finish) { boolean progress; do { - fillWindow(); - boolean canFlush = flush && inputOff == inputEnd; - if (DeflaterConstants.DEBUGGING) - System.err.println("window: ["+blockStart+","+strstart+"," - +lookahead+"], "+comprFunc+","+canFlush); - switch (comprFunc) - { - case DEFLATE_STORED: - progress = deflateStored(canFlush, finish); - break; - case DEFLATE_FAST: - progress = deflateFast(canFlush, finish); - break; - case DEFLATE_SLOW: - progress = deflateSlow(canFlush, finish); - break; - default: - throw new InternalError(); - } + fillWindow(); + boolean canFlush = flush && inputOff == inputEnd; + if (DeflaterConstants.DEBUGGING) + System.err.println("window: ["+blockStart+","+strstart+"," + +lookahead+"], "+comprFunc+","+canFlush); + switch (comprFunc) + { + case DEFLATE_STORED: + progress = deflateStored(canFlush, finish); + break; + case DEFLATE_FAST: + progress = deflateFast(canFlush, finish); + break; + case DEFLATE_SLOW: + progress = deflateSlow(canFlush, finish); + break; + default: + throw new InternalError(); + } } while (pending.isFlushed() /* repeat while we have no pending output */ - && progress); /* and progress was made */ + && progress); /* and progress was made */ return progress; } @@ -676,12 +676,12 @@ class DeflaterEngine implements DeflaterConstants { if (inputOff < inputEnd) throw new IllegalStateException - ("Old input was not completely processed"); + ("Old input was not completely processed"); int end = off + len; /* We want to throw an ArrayIndexOutOfBoundsException early. The - * check is very tricky: it also handles integer wrap around. + * check is very tricky: it also handles integer wrap around. */ if (0 > off || off > end || end > buf.length) throw new ArrayIndexOutOfBoundsException(); diff --git a/libjava/classpath/java/util/zip/DeflaterHuffman.java b/libjava/classpath/java/util/zip/DeflaterHuffman.java index 32c10b6..8da987e0 100644 --- a/libjava/classpath/java/util/zip/DeflaterHuffman.java +++ b/libjava/classpath/java/util/zip/DeflaterHuffman.java @@ -44,7 +44,7 @@ package java.util.zip; * to the split of deflate and setInput. * * @author Jochen Hoenicke - * @date Jan 6, 2000 + * @date Jan 6, 2000 */ class DeflaterHuffman { @@ -79,7 +79,7 @@ class DeflaterHuffman void reset() { for (int i = 0; i < freqs.length; i++) - freqs[i] = 0; + freqs[i] = 0; codes = null; length = null; } @@ -87,10 +87,10 @@ class DeflaterHuffman final void writeSymbol(int code) { if (DeflaterConstants.DEBUGGING) - { - freqs[code]--; -// System.err.print("writeSymbol("+freqs.length+","+code+"): "); - } + { + freqs[code]--; +// System.err.print("writeSymbol("+freqs.length+","+code+"): "); + } pending.writeBits(codes[code] & 0xffff, length[code]); } @@ -98,13 +98,13 @@ class DeflaterHuffman { boolean empty = true; for (int i = 0; i < freqs.length; i++) - if (freqs[i] != 0) - { - System.err.println("freqs["+i+"] == "+freqs[i]); - empty = false; - } + if (freqs[i] != 0) + { + System.err.println("freqs["+i+"] == "+freqs[i]); + empty = false; + } if (!empty) - throw new InternalError(); + throw new InternalError(); System.err.println("checkEmpty suceeded!"); } @@ -120,31 +120,31 @@ class DeflaterHuffman codes = new short[freqs.length]; if (DeflaterConstants.DEBUGGING) - System.err.println("buildCodes: "+freqs.length); - for (int bits = 0; bits < maxLength; bits++) - { - nextCode[bits] = code; - code += bl_counts[bits] << (15 - bits); - if (DeflaterConstants.DEBUGGING) - System.err.println("bits: "+(bits+1)+" count: "+bl_counts[bits] - +" nextCode: "+Integer.toHexString(code)); - } + System.err.println("buildCodes: "+freqs.length); + for (int bits = 0; bits < maxLength; bits++) + { + nextCode[bits] = code; + code += bl_counts[bits] << (15 - bits); + if (DeflaterConstants.DEBUGGING) + System.err.println("bits: "+(bits+1)+" count: "+bl_counts[bits] + +" nextCode: "+Integer.toHexString(code)); + } if (DeflaterConstants.DEBUGGING && code != 65536) - throw new RuntimeException("Inconsistent bl_counts!"); - + throw new RuntimeException("Inconsistent bl_counts!"); + for (int i=0; i < numCodes; i++) - { - int bits = length[i]; - if (bits > 0) - { - if (DeflaterConstants.DEBUGGING) - System.err.println("codes["+i+"] = rev(" - +Integer.toHexString(nextCode[bits-1])+")," - +bits); - codes[i] = bitReverse(nextCode[bits-1]); - nextCode[bits-1] += 1 << (16 - bits); - } - } + { + int bits = length[i]; + if (bits > 0) + { + if (DeflaterConstants.DEBUGGING) + System.err.println("codes["+i+"] = rev(" + +Integer.toHexString(nextCode[bits-1])+")," + +bits); + codes[i] = bitReverse(nextCode[bits-1]); + nextCode[bits-1] += 1 << (16 - bits); + } + } } private void buildLength(int childs[]) @@ -153,63 +153,63 @@ class DeflaterHuffman int numNodes = childs.length / 2; int numLeafs = (numNodes + 1) / 2; int overflow = 0; - + for (int i = 0; i < maxLength; i++) - bl_counts[i] = 0; + bl_counts[i] = 0; /* First calculate optimal bit lengths */ int lengths[] = new int[numNodes]; lengths[numNodes-1] = 0; for (int i = numNodes - 1; i >= 0; i--) - { - if (childs[2*i+1] != -1) - { - int bitLength = lengths[i] + 1; - if (bitLength > maxLength) - { - bitLength = maxLength; - overflow++; - } - lengths[childs[2*i]] = lengths[childs[2*i+1]] = bitLength; - } - else - { - /* A leaf node */ - int bitLength = lengths[i]; - bl_counts[bitLength - 1]++; - this.length[childs[2*i]] = (byte) lengths[i]; - } - } - + { + if (childs[2*i+1] != -1) + { + int bitLength = lengths[i] + 1; + if (bitLength > maxLength) + { + bitLength = maxLength; + overflow++; + } + lengths[childs[2*i]] = lengths[childs[2*i+1]] = bitLength; + } + else + { + /* A leaf node */ + int bitLength = lengths[i]; + bl_counts[bitLength - 1]++; + this.length[childs[2*i]] = (byte) lengths[i]; + } + } + if (DeflaterConstants.DEBUGGING) - { - System.err.println("Tree "+freqs.length+" lengths:"); - for (int i=0; i < numLeafs; i++) - System.err.println("Node "+childs[2*i]+" freq: "+freqs[childs[2*i]] - + " len: "+length[childs[2*i]]); - } - + { + System.err.println("Tree "+freqs.length+" lengths:"); + for (int i=0; i < numLeafs; i++) + System.err.println("Node "+childs[2*i]+" freq: "+freqs[childs[2*i]] + + " len: "+length[childs[2*i]]); + } + if (overflow == 0) - return; - + return; + int incrBitLen = maxLength - 1; do - { - /* Find the first bit length which could increase: */ - while (bl_counts[--incrBitLen] == 0) - ; - - /* Move this node one down and remove a corresponding - * amount of overflow nodes. - */ - do - { - bl_counts[incrBitLen]--; - bl_counts[++incrBitLen]++; - overflow -= 1 << (maxLength - 1 - incrBitLen); - } - while (overflow > 0 && incrBitLen < maxLength - 1); - } + { + /* Find the first bit length which could increase: */ + while (bl_counts[--incrBitLen] == 0) + ; + + /* Move this node one down and remove a corresponding + * amount of overflow nodes. + */ + do + { + bl_counts[incrBitLen]--; + bl_counts[++incrBitLen]++; + overflow -= 1 << (maxLength - 1 - incrBitLen); + } + while (overflow > 0 && incrBitLen < maxLength - 1); + } while (overflow > 0); /* We may have overshot above. Move some nodes from maxLength to @@ -217,7 +217,7 @@ class DeflaterHuffman */ bl_counts[maxLength-1] += overflow; bl_counts[maxLength-2] -= overflow; - + /* Now recompute all bit lengths, scanning in increasing * frequency. It is simpler to reconstruct all lengths instead of * fixing only the wrong ones. This idea is taken from 'ar' @@ -227,30 +227,30 @@ class DeflaterHuffman * array. */ int nodePtr = 2 * numLeafs; - for (int bits = maxLength; bits != 0; bits--) - { - int n = bl_counts[bits-1]; - while (n > 0) - { - int childPtr = 2*childs[nodePtr++]; - if (childs[childPtr + 1] == -1) - { - /* We found another leaf */ - length[childs[childPtr]] = (byte) bits; - n--; - } - } - } + for (int bits = maxLength; bits != 0; bits--) + { + int n = bl_counts[bits-1]; + while (n > 0) + { + int childPtr = 2*childs[nodePtr++]; + if (childs[childPtr + 1] == -1) + { + /* We found another leaf */ + length[childs[childPtr]] = (byte) bits; + n--; + } + } + } if (DeflaterConstants.DEBUGGING) - { - System.err.println("*** After overflow elimination. ***"); - for (int i=0; i < numLeafs; i++) - System.err.println("Node "+childs[2*i]+" freq: "+freqs[childs[2*i]] - + " len: "+length[childs[2*i]]); - } + { + System.err.println("*** After overflow elimination. ***"); + for (int i=0; i < numLeafs; i++) + System.err.println("Node "+childs[2*i]+" freq: "+freqs[childs[2*i]] + + " len: "+length[childs[2*i]]); + } } - - void buildTree() + + void buildTree() { int numSymbols = freqs.length; @@ -266,123 +266,123 @@ class DeflaterHuffman int heapLen = 0; int maxCode = 0; for (int n = 0; n < numSymbols; n++) - { - int freq = freqs[n]; - if (freq != 0) - { - /* Insert n into heap */ - int pos = heapLen++; - int ppos; - while (pos > 0 && - freqs[heap[ppos = (pos - 1) / 2]] > freq) { - heap[pos] = heap[ppos]; - pos = ppos; - } - heap[pos] = n; - maxCode = n; - } - } - + { + int freq = freqs[n]; + if (freq != 0) + { + /* Insert n into heap */ + int pos = heapLen++; + int ppos; + while (pos > 0 && + freqs[heap[ppos = (pos - 1) / 2]] > freq) { + heap[pos] = heap[ppos]; + pos = ppos; + } + heap[pos] = n; + maxCode = n; + } + } + /* We could encode a single literal with 0 bits but then we * don't see the literals. Therefore we force at least two * literals to avoid this case. We don't care about order in - * this case, both literals get a 1 bit code. + * this case, both literals get a 1 bit code. */ while (heapLen < 2) - { - int node = maxCode < 2 ? ++maxCode : 0; - heap[heapLen++] = node; - } + { + int node = maxCode < 2 ? ++maxCode : 0; + heap[heapLen++] = node; + } numCodes = Math.max(maxCode + 1, minNumCodes); - + int numLeafs = heapLen; int[] childs = new int[4*heapLen - 2]; int[] values = new int[2*heapLen - 1]; int numNodes = numLeafs; for (int i = 0; i < heapLen; i++) - { - int node = heap[i]; - childs[2*i] = node; - childs[2*i+1] = -1; - values[i] = freqs[node] << 8; - heap[i] = i; - } - + { + int node = heap[i]; + childs[2*i] = node; + childs[2*i+1] = -1; + values[i] = freqs[node] << 8; + heap[i] = i; + } + /* Construct the Huffman tree by repeatedly combining the least two * frequent nodes. */ do - { - int first = heap[0]; - int last = heap[--heapLen]; - - /* Propagate the hole to the leafs of the heap */ - int ppos = 0; - int path = 1; - while (path < heapLen) - { - if (path + 1 < heapLen - && values[heap[path]] > values[heap[path+1]]) - path++; - - heap[ppos] = heap[path]; - ppos = path; - path = path * 2 + 1; - } - - /* Now propagate the last element down along path. Normally - * it shouldn't go too deep. - */ - int lastVal = values[last]; - while ((path = ppos) > 0 - && values[heap[ppos = (path - 1)/2]] > lastVal) - heap[path] = heap[ppos]; - heap[path] = last; - - - int second = heap[0]; - - /* Create a new node father of first and second */ - last = numNodes++; - childs[2*last] = first; - childs[2*last+1] = second; - int mindepth = Math.min(values[first] & 0xff, values[second] & 0xff); - values[last] = lastVal = values[first] + values[second] - mindepth + 1; - - /* Again, propagate the hole to the leafs */ - ppos = 0; - path = 1; - while (path < heapLen) - { - if (path + 1 < heapLen - && values[heap[path]] > values[heap[path+1]]) - path++; - - heap[ppos] = heap[path]; - ppos = path; - path = ppos * 2 + 1; - } - - /* Now propagate the new element down along path */ - while ((path = ppos) > 0 - && values[heap[ppos = (path - 1)/2]] > lastVal) - heap[path] = heap[ppos]; - heap[path] = last; - } + { + int first = heap[0]; + int last = heap[--heapLen]; + + /* Propagate the hole to the leafs of the heap */ + int ppos = 0; + int path = 1; + while (path < heapLen) + { + if (path + 1 < heapLen + && values[heap[path]] > values[heap[path+1]]) + path++; + + heap[ppos] = heap[path]; + ppos = path; + path = path * 2 + 1; + } + + /* Now propagate the last element down along path. Normally + * it shouldn't go too deep. + */ + int lastVal = values[last]; + while ((path = ppos) > 0 + && values[heap[ppos = (path - 1)/2]] > lastVal) + heap[path] = heap[ppos]; + heap[path] = last; + + + int second = heap[0]; + + /* Create a new node father of first and second */ + last = numNodes++; + childs[2*last] = first; + childs[2*last+1] = second; + int mindepth = Math.min(values[first] & 0xff, values[second] & 0xff); + values[last] = lastVal = values[first] + values[second] - mindepth + 1; + + /* Again, propagate the hole to the leafs */ + ppos = 0; + path = 1; + while (path < heapLen) + { + if (path + 1 < heapLen + && values[heap[path]] > values[heap[path+1]]) + path++; + + heap[ppos] = heap[path]; + ppos = path; + path = ppos * 2 + 1; + } + + /* Now propagate the new element down along path */ + while ((path = ppos) > 0 + && values[heap[ppos = (path - 1)/2]] > lastVal) + heap[path] = heap[ppos]; + heap[path] = last; + } while (heapLen > 1); - + if (heap[0] != childs.length / 2 - 1) - throw new RuntimeException("Weird!"); - + throw new RuntimeException("Weird!"); + buildLength(childs); } - int getEncodedLength() + int getEncodedLength() { int len = 0; for (int i = 0; i < freqs.length; i++) - len += freqs[i] * length[i]; + len += freqs[i] * length[i]; return len; } @@ -391,46 +391,46 @@ class DeflaterHuffman int min_count; /* min repeat count */ int count; /* repeat count of the current code */ int curlen = -1; /* length of current code */ - + int i = 0; while (i < numCodes) - { - count = 1; - int nextlen = length[i]; - if (nextlen == 0) - { - max_count = 138; - min_count = 3; - } - else - { - max_count = 6; - min_count = 3; - if (curlen != nextlen) - { - blTree.freqs[nextlen]++; - count = 0; - } - } - curlen = nextlen; - i++; - - while (i < numCodes && curlen == length[i]) - { - i++; - if (++count >= max_count) - break; - } - - if (count < min_count) - blTree.freqs[curlen] += count; - else if (curlen != 0) - blTree.freqs[REP_3_6]++; - else if (count <= 10) - blTree.freqs[REP_3_10]++; - else - blTree.freqs[REP_11_138]++; - } + { + count = 1; + int nextlen = length[i]; + if (nextlen == 0) + { + max_count = 138; + min_count = 3; + } + else + { + max_count = 6; + min_count = 3; + if (curlen != nextlen) + { + blTree.freqs[nextlen]++; + count = 0; + } + } + curlen = nextlen; + i++; + + while (i < numCodes && curlen == length[i]) + { + i++; + if (++count >= max_count) + break; + } + + if (count < min_count) + blTree.freqs[curlen] += count; + else if (curlen != 0) + blTree.freqs[REP_3_6]++; + else if (count <= 10) + blTree.freqs[REP_3_10]++; + else + blTree.freqs[REP_11_138]++; + } } void writeTree(Tree blTree) @@ -439,58 +439,58 @@ class DeflaterHuffman int min_count; /* min repeat count */ int count; /* repeat count of the current code */ int curlen = -1; /* length of current code */ - + int i = 0; while (i < numCodes) - { - count = 1; - int nextlen = length[i]; - if (nextlen == 0) - { - max_count = 138; - min_count = 3; - } - else - { - max_count = 6; - min_count = 3; - if (curlen != nextlen) - { - blTree.writeSymbol(nextlen); - count = 0; - } - } - curlen = nextlen; - i++; - - while (i < numCodes && curlen == length[i]) - { - i++; - if (++count >= max_count) - break; - } - - if (count < min_count) - { - while (count-- > 0) - blTree.writeSymbol(curlen); - } - else if (curlen != 0) - { - blTree.writeSymbol(REP_3_6); - pending.writeBits(count - 3, 2); - } - else if (count <= 10) - { - blTree.writeSymbol(REP_3_10); - pending.writeBits(count - 3, 3); - } - else - { - blTree.writeSymbol(REP_11_138); - pending.writeBits(count - 11, 7); - } - } + { + count = 1; + int nextlen = length[i]; + if (nextlen == 0) + { + max_count = 138; + min_count = 3; + } + else + { + max_count = 6; + min_count = 3; + if (curlen != nextlen) + { + blTree.writeSymbol(nextlen); + count = 0; + } + } + curlen = nextlen; + i++; + + while (i < numCodes && curlen == length[i]) + { + i++; + if (++count >= max_count) + break; + } + + if (count < min_count) + { + while (count-- > 0) + blTree.writeSymbol(curlen); + } + else if (curlen != 0) + { + blTree.writeSymbol(REP_3_6); + pending.writeBits(count - 3, 2); + } + else if (count <= 10) + { + blTree.writeSymbol(REP_3_10); + pending.writeBits(count - 3, 3); + } + else + { + blTree.writeSymbol(REP_11_138); + pending.writeBits(count - 11, 7); + } + } } } @@ -514,9 +514,9 @@ class DeflaterHuffman */ static short bitReverse(int value) { return (short) (bit4Reverse.charAt(value & 0xf) << 12 - | bit4Reverse.charAt((value >> 4) & 0xf) << 8 - | bit4Reverse.charAt((value >> 8) & 0xf) << 4 - | bit4Reverse.charAt(value >> 12)); + | bit4Reverse.charAt((value >> 4) & 0xf) << 8 + | bit4Reverse.charAt((value >> 8) & 0xf) << 4 + | bit4Reverse.charAt(value >> 12)); } static { @@ -550,8 +550,8 @@ class DeflaterHuffman staticDLength[i] = 5; } } - - public DeflaterHuffman(DeflaterPending pending) + + public DeflaterHuffman(DeflaterPending pending) { this.pending = pending; @@ -578,8 +578,8 @@ class DeflaterHuffman int code = 257; while (len >= 8) { - code += 4; - len >>= 1; + code += 4; + len >>= 1; } return code + len; } @@ -588,8 +588,8 @@ class DeflaterHuffman int code = 0; while (distance >= 4) { - code += 2; - distance >>= 1; + code += 2; + distance >>= 1; } return code + distance; } @@ -610,58 +610,58 @@ class DeflaterHuffman } public void compressBlock() { - for (int i = 0; i < last_lit; i++) + for (int i = 0; i < last_lit; i++) { - int litlen = l_buf[i] & 0xff; - int dist = d_buf[i]; - if (dist-- != 0) - { - if (DeflaterConstants.DEBUGGING) - System.err.print("["+(dist+1)+","+(litlen+3)+"]: "); - - int lc = l_code(litlen); - literalTree.writeSymbol(lc); - - int bits = (lc - 261) / 4; - if (bits > 0 && bits <= 5) - pending.writeBits(litlen & ((1 << bits) - 1), bits); - - int dc = d_code(dist); - distTree.writeSymbol(dc); - - bits = dc / 2 - 1; - if (bits > 0) - pending.writeBits(dist & ((1 << bits) - 1), bits); - } - else - { - if (DeflaterConstants.DEBUGGING) - { - if (litlen > 32 && litlen < 127) - System.err.print("("+(char)litlen+"): "); - else - System.err.print("{"+litlen+"}: "); - } - literalTree.writeSymbol(litlen); - } + int litlen = l_buf[i] & 0xff; + int dist = d_buf[i]; + if (dist-- != 0) + { + if (DeflaterConstants.DEBUGGING) + System.err.print("["+(dist+1)+","+(litlen+3)+"]: "); + + int lc = l_code(litlen); + literalTree.writeSymbol(lc); + + int bits = (lc - 261) / 4; + if (bits > 0 && bits <= 5) + pending.writeBits(litlen & ((1 << bits) - 1), bits); + + int dc = d_code(dist); + distTree.writeSymbol(dc); + + bits = dc / 2 - 1; + if (bits > 0) + pending.writeBits(dist & ((1 << bits) - 1), bits); + } + else + { + if (DeflaterConstants.DEBUGGING) + { + if (litlen > 32 && litlen < 127) + System.err.print("("+(char)litlen+"): "); + else + System.err.print("{"+litlen+"}: "); + } + literalTree.writeSymbol(litlen); + } } if (DeflaterConstants.DEBUGGING) System.err.print("EOF: "); literalTree.writeSymbol(EOF_SYMBOL); if (DeflaterConstants.DEBUGGING) { - literalTree.checkEmpty(); - distTree.checkEmpty(); + literalTree.checkEmpty(); + distTree.checkEmpty(); } } - public void flushStoredBlock(byte[] stored, - int stored_offset, int stored_len, - boolean lastBlock) { + public void flushStoredBlock(byte[] stored, + int stored_offset, int stored_len, + boolean lastBlock) { if (DeflaterConstants.DEBUGGING) System.err.println("Flushing stored block "+ stored_len); pending.writeBits((DeflaterConstants.STORED_BLOCK << 1) - + (lastBlock ? 1 : 0), 3); + + (lastBlock ? 1 : 0), 3); pending.alignToByte(); pending.writeShort(stored_len); pending.writeShort(~stored_len); @@ -670,7 +670,7 @@ class DeflaterHuffman } public void flushBlock(byte[] stored, int stored_offset, int stored_len, - boolean lastBlock) { + boolean lastBlock) { literalTree.freqs[EOF_SYMBOL]++; /* Build trees */ @@ -687,8 +687,8 @@ class DeflaterHuffman int blTreeCodes = 4; for (int i = 18; i > blTreeCodes; i--) { - if (blTree.length[BL_ORDER[i]] > 0) - blTreeCodes = i+1; + if (blTree.length[BL_ORDER[i]] > 0) + blTreeCodes = i+1; } int opt_len = 14 + blTreeCodes * 3 + blTree.getEncodedLength() + literalTree.getEncodedLength() + distTree.getEncodedLength() @@ -701,36 +701,36 @@ class DeflaterHuffman static_len += distTree.freqs[i] * staticDLength[i]; if (opt_len >= static_len) { - /* Force static trees */ - opt_len = static_len; + /* Force static trees */ + opt_len = static_len; } if (stored_offset >= 0 && stored_len+4 < opt_len >> 3) { - /* Store Block */ - if (DeflaterConstants.DEBUGGING) - System.err.println("Storing, since " + stored_len + " < " + opt_len - + " <= " + static_len); - flushStoredBlock(stored, stored_offset, stored_len, lastBlock); + /* Store Block */ + if (DeflaterConstants.DEBUGGING) + System.err.println("Storing, since " + stored_len + " < " + opt_len + + " <= " + static_len); + flushStoredBlock(stored, stored_offset, stored_len, lastBlock); } else if (opt_len == static_len) { - /* Encode with static tree */ - pending.writeBits((DeflaterConstants.STATIC_TREES << 1) - + (lastBlock ? 1 : 0), 3); - literalTree.setStaticCodes(staticLCodes, staticLLength); - distTree.setStaticCodes(staticDCodes, staticDLength); - compressBlock(); - reset(); + /* Encode with static tree */ + pending.writeBits((DeflaterConstants.STATIC_TREES << 1) + + (lastBlock ? 1 : 0), 3); + literalTree.setStaticCodes(staticLCodes, staticLLength); + distTree.setStaticCodes(staticDCodes, staticDLength); + compressBlock(); + reset(); } else { - /* Encode with dynamic tree */ - pending.writeBits((DeflaterConstants.DYN_TREES << 1) - + (lastBlock ? 1 : 0), 3); - sendAllTrees(blTreeCodes); - compressBlock(); - reset(); + /* Encode with dynamic tree */ + pending.writeBits((DeflaterConstants.DYN_TREES << 1) + + (lastBlock ? 1 : 0), 3); + sendAllTrees(blTreeCodes); + compressBlock(); + reset(); } } @@ -739,14 +739,14 @@ class DeflaterHuffman return last_lit == BUFSIZE; } - public final boolean tallyLit(int lit) + public final boolean tallyLit(int lit) { if (DeflaterConstants.DEBUGGING) { - if (lit > 32 && lit < 127) - System.err.println("("+(char)lit+")"); - else - System.err.println("{"+lit+"}"); + if (lit > 32 && lit < 127) + System.err.println("("+(char)lit+")"); + else + System.err.println("{"+lit+"}"); } d_buf[last_lit] = 0; l_buf[last_lit++] = (byte) lit; @@ -754,7 +754,7 @@ class DeflaterHuffman return last_lit == BUFSIZE; } - public final boolean tallyDist(int dist, int len) + public final boolean tallyDist(int dist, int len) { if (DeflaterConstants.DEBUGGING) System.err.println("["+dist+","+len+"]"); diff --git a/libjava/classpath/java/util/zip/DeflaterOutputStream.java b/libjava/classpath/java/util/zip/DeflaterOutputStream.java index 4321c0f..6fd1c5c 100644 --- a/libjava/classpath/java/util/zip/DeflaterOutputStream.java +++ b/libjava/classpath/java/util/zip/DeflaterOutputStream.java @@ -57,21 +57,21 @@ import java.io.OutputStream; * finishing the stream. * * @author Tom Tromey, Jochen Hoenicke - * @date Jan 11, 2001 + * @date Jan 11, 2001 */ public class DeflaterOutputStream extends FilterOutputStream { - /** + /** * This buffer is used temporarily to retrieve the bytes from the - * deflater and write them to the underlying output stream. + * deflater and write them to the underlying output stream. */ protected byte[] buf; - /** + /** * The deflater which is used to deflate the stream. */ protected Deflater def; - + /** * Deflates everything in the def's input buffers. This will call * <code>def.deflate()</code> until all bytes from the input buffers @@ -81,19 +81,19 @@ public class DeflaterOutputStream extends FilterOutputStream { while (! def.needsInput()) { - int len = def.deflate(buf, 0, buf.length); + int len = def.deflate(buf, 0, buf.length); - // System.err.println("DOS deflated " + len + " out of " + buf.length); - if (len <= 0) - break; - out.write(buf, 0, len); + // System.err.println("DOS deflated " + len + " out of " + buf.length); + if (len <= 0) + break; + out.write(buf, 0, len); } if (! def.needsInput()) throw new InternalError("Can't deflate all input?"); } - /** + /** * Creates a new DeflaterOutputStream with a default Deflater and * default buffer size. * @param out the output stream where deflated output should be written. @@ -103,7 +103,7 @@ public class DeflaterOutputStream extends FilterOutputStream this(out, new Deflater(), 4096); } - /** + /** * Creates a new DeflaterOutputStream with the given Deflater and * default buffer size. * @param out the output stream where deflated output should be written. @@ -114,7 +114,7 @@ public class DeflaterOutputStream extends FilterOutputStream this(out, defl, 4096); } - /** + /** * Creates a new DeflaterOutputStream with the given Deflater and * buffer size. * @param out the output stream where deflated output should be written. @@ -131,7 +131,7 @@ public class DeflaterOutputStream extends FilterOutputStream def = defl; } - /** + /** * Flushes the stream by calling flush() on the deflater and then * on the underlying stream. This ensures that all bytes are * flushed. This function doesn't work in Sun's JDK, but only in @@ -147,17 +147,17 @@ public class DeflaterOutputStream extends FilterOutputStream /** * Finishes the stream by calling finish() on the deflater. This * was the only way to ensure that all bytes are flushed in Sun's - * JDK. + * JDK. */ public void finish() throws IOException { def.finish(); while (! def.finished()) { - int len = def.deflate(buf, 0, buf.length); - if (len <= 0) - break; - out.write(buf, 0, len); + int len = def.deflate(buf, 0, buf.length); + if (len <= 0) + break; + out.write(buf, 0, len); } if (! def.finished()) throw new InternalError("Can't deflate all input?"); @@ -165,7 +165,7 @@ public class DeflaterOutputStream extends FilterOutputStream } /** - * Calls finish() and closes the stream. + * Calls finish() and closes the stream. */ public void close() throws IOException { diff --git a/libjava/classpath/java/util/zip/DeflaterPending.java b/libjava/classpath/java/util/zip/DeflaterPending.java index f38212c..fabc226 100644 --- a/libjava/classpath/java/util/zip/DeflaterPending.java +++ b/libjava/classpath/java/util/zip/DeflaterPending.java @@ -41,7 +41,7 @@ package java.util.zip; * This class stores the pending output of the Deflater. * * @author Jochen Hoenicke - * @date Jan 5, 2000 + * @date Jan 5, 2000 */ class DeflaterPending extends PendingBuffer @@ -51,4 +51,3 @@ class DeflaterPending extends PendingBuffer super(DeflaterConstants.PENDING_BUF_SIZE); } } - diff --git a/libjava/classpath/java/util/zip/GZIPInputStream.java b/libjava/classpath/java/util/zip/GZIPInputStream.java index f244810..ed99ee9 100644 --- a/libjava/classpath/java/util/zip/GZIPInputStream.java +++ b/libjava/classpath/java/util/zip/GZIPInputStream.java @@ -7,7 +7,7 @@ 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 @@ -43,7 +43,7 @@ import java.io.IOException; import java.io.InputStream; /** - * This filter stream is used to decompress a "GZIP" format stream. + * This filter stream is used to decompress a "GZIP" format stream. * The "GZIP" format is described in RFC 1952. * * @author John Leuner @@ -86,11 +86,11 @@ public class GZIPInputStream /** * The CRC-32 checksum value for uncompressed data. */ - protected CRC32 crc; + protected CRC32 crc; /** * Indicates whether or not the end of the stream has been reached. - */ + */ protected boolean eos; /** @@ -101,7 +101,7 @@ public class GZIPInputStream /** * Creates a GZIPInputStream with the default buffer size. * - * @param in The stream to read compressed data from + * @param in The stream to read compressed data from * (in GZIP format). * * @throws IOException if an error occurs during an I/O operation. @@ -115,7 +115,7 @@ public class GZIPInputStream /** * Creates a GZIPInputStream with the specified buffer size. * - * @param in The stream to read compressed data from + * @param in The stream to read compressed data from * (in GZIP format). * @param size The size of the buffer to use. * @@ -204,7 +204,7 @@ public class GZIPInputStream throw new IOException("Error in GZIP header, bad magic code"); headCRC.update(magic); headCRC.update(magic2); - + /* 2. Check the compression type (must be 8) */ int CM = in.read(); if (CM != Deflater.DEFLATED) @@ -216,32 +216,32 @@ public class GZIPInputStream if (flags < 0) throw new EOFException("Early EOF in GZIP header"); headCRC.update(flags); - + /* This flag byte is divided into individual bits as follows: - - bit 0 FTEXT - bit 1 FHCRC - bit 2 FEXTRA - bit 3 FNAME - bit 4 FCOMMENT - bit 5 reserved - bit 6 reserved - bit 7 reserved + + bit 0 FTEXT + bit 1 FHCRC + bit 2 FEXTRA + bit 3 FNAME + bit 4 FCOMMENT + bit 5 reserved + bit 6 reserved + bit 7 reserved */ - - /* 3.1 Check the reserved bits are zero */ + + /* 3.1 Check the reserved bits are zero */ if ((flags & 0xd0) != 0) throw new IOException("Reserved flag bits in GZIP header != 0"); - + /* 4.-6. Skip the modification time, extra flags, and OS type */ for (int i=0; i< 6; i++) { int readByte = in.read(); if (readByte < 0) - throw new EOFException("Early EOF in GZIP header"); + throw new EOFException("Early EOF in GZIP header"); headCRC.update(readByte); } - + /* 7. Read extra field */ if ((flags & FEXTRA) != 0) { @@ -249,39 +249,39 @@ public class GZIPInputStream for (int i=0; i< 2; i++) { int readByte = in.read(); - if (readByte < 0) - throw new EOFException("Early EOF in GZIP header"); - headCRC.update(readByte); + if (readByte < 0) + throw new EOFException("Early EOF in GZIP header"); + headCRC.update(readByte); } if (in.read() < 0 || in.read() < 0) - throw new EOFException("Early EOF in GZIP header"); - + throw new EOFException("Early EOF in GZIP header"); + int len1, len2, extraLen; len1 = in.read(); len2 = in.read(); if ((len1 < 0) || (len2 < 0)) - throw new EOFException("Early EOF in GZIP header"); + throw new EOFException("Early EOF in GZIP header"); headCRC.update(len1); headCRC.update(len2); extraLen = (len1 << 8) | len2; for (int i = 0; i < extraLen;i++) { - int readByte = in.read(); - if (readByte < 0) - throw new EOFException("Early EOF in GZIP header"); - headCRC.update(readByte); + int readByte = in.read(); + if (readByte < 0) + throw new EOFException("Early EOF in GZIP header"); + headCRC.update(readByte); } } - + /* 8. Read file name */ if ((flags & FNAME) != 0) { int readByte; while ( (readByte = in.read()) > 0) - headCRC.update(readByte); + headCRC.update(readByte); if (readByte < 0) - throw new EOFException("Early EOF in GZIP file name"); + throw new EOFException("Early EOF in GZIP file name"); headCRC.update(readByte); } @@ -296,7 +296,7 @@ public class GZIPInputStream throw new EOFException("Early EOF in GZIP comment"); headCRC.update(readByte); } - + /* 10. Read header CRC */ if ((flags & FHCRC) != 0) { @@ -304,16 +304,16 @@ public class GZIPInputStream int crcval = in.read(); if (crcval < 0) throw new EOFException("Early EOF in GZIP header"); - + tempByte = in.read(); if (tempByte < 0) throw new EOFException("Early EOF in GZIP header"); - + crcval = (crcval << 8) | tempByte; if (crcval != ((int) headCRC.getValue() & 0xffff)) throw new IOException("Header CRC value mismatch"); } - + readGZIPHeader = true; //System.err.println("Read GZIP header"); } @@ -330,7 +330,7 @@ public class GZIPInputStream { int count = in.read(footer, 8-needed, needed); if (count <= 0) - throw new EOFException("Early EOF in GZIP footer"); + throw new EOFException("Early EOF in GZIP footer"); needed -= count; //Jewel Jan 16 } @@ -338,9 +338,9 @@ public class GZIPInputStream | ((footer[2] & 0xff) << 16) | (footer[3] << 24); if (crcval != (int) crc.getValue()) throw new IOException("GZIP crc sum mismatch, theirs \"" - + Integer.toHexString(crcval) - + "\" and ours \"" - + Integer.toHexString( (int) crc.getValue())); + + Integer.toHexString(crcval) + + "\" and ours \"" + + Integer.toHexString( (int) crc.getValue())); int total = (footer[4] & 0xff) | ((footer[5] & 0xff) << 8) | ((footer[6] & 0xff) << 16) | (footer[7] << 24); diff --git a/libjava/classpath/java/util/zip/GZIPOutputStream.java b/libjava/classpath/java/util/zip/GZIPOutputStream.java index 5b7b827..0080ab6 100644 --- a/libjava/classpath/java/util/zip/GZIPOutputStream.java +++ b/libjava/classpath/java/util/zip/GZIPOutputStream.java @@ -7,7 +7,7 @@ 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 @@ -41,7 +41,7 @@ import java.io.IOException; import java.io.OutputStream; /** - * This filter stream is used to compress a stream into a "GZIP" stream. + * This filter stream is used to compress a stream into a "GZIP" stream. * The "GZIP" format is described in RFC 1952. * * @author John Leuner @@ -64,8 +64,8 @@ public class GZIPOutputStream extends DeflaterOutputStream /** * Creates a GZIPOutputStream with the default buffer size * - * @param out The stream to read data (to be compressed) from - * + * @param out The stream to read data (to be compressed) from + * */ public GZIPOutputStream(OutputStream out) throws IOException { @@ -75,8 +75,8 @@ public class GZIPOutputStream extends DeflaterOutputStream /** * Creates a GZIPOutputStream with the specified buffer size * - * @param out The stream to read compressed data from - * @param size Size of the buffer to use + * @param out The stream to read compressed data from + * @param size Size of the buffer to use */ public GZIPOutputStream(OutputStream out, int size) throws IOException { @@ -85,25 +85,25 @@ public class GZIPOutputStream extends DeflaterOutputStream int mod_time = (int) (System.currentTimeMillis() / 1000L); byte[] gzipHeader = { - /* The two magic bytes */ - (byte) GZIPInputStream.GZIP_MAGIC, - (byte) (GZIPInputStream.GZIP_MAGIC >> 8), - - /* The compression type */ - (byte) Deflater.DEFLATED, - + /* The two magic bytes */ + (byte) GZIPInputStream.GZIP_MAGIC, + (byte) (GZIPInputStream.GZIP_MAGIC >> 8), + + /* The compression type */ + (byte) Deflater.DEFLATED, + /* The flags (not set) */ - 0, - - /* The modification time */ - (byte) mod_time, (byte) (mod_time >> 8), - (byte) (mod_time >> 16), (byte) (mod_time >> 24), - - /* The extra flags */ - 0, - - /* The OS type (unknown) */ - (byte) 255 + 0, + + /* The modification time */ + (byte) mod_time, (byte) (mod_time >> 8), + (byte) (mod_time >> 16), (byte) (mod_time >> 24), + + /* The extra flags */ + 0, + + /* The OS type (unknown) */ + (byte) 255 }; out.write(gzipHeader); @@ -134,18 +134,18 @@ public class GZIPOutputStream extends DeflaterOutputStream int totalin = def.getTotalIn(); int crcval = (int) (crc.getValue() & 0xffffffff); - // System.err.println("CRC val is " + Integer.toHexString( crcval ) + " and length " + Integer.toHexString(totalin)); - - byte[] gzipFooter = + // System.err.println("CRC val is " + Integer.toHexString( crcval ) + " and length " + Integer.toHexString(totalin)); + + byte[] gzipFooter = { - (byte) crcval, (byte) (crcval >> 8), - (byte) (crcval >> 16), (byte) (crcval >> 24), + (byte) crcval, (byte) (crcval >> 8), + (byte) (crcval >> 16), (byte) (crcval >> 24), - (byte) totalin, (byte) (totalin >> 8), - (byte) (totalin >> 16), (byte) (totalin >> 24) + (byte) totalin, (byte) (totalin >> 8), + (byte) (totalin >> 16), (byte) (totalin >> 24) }; out.write(gzipFooter); - // System.err.println("wrote GZIP trailer (" + gzipFooter.length + " bytes )"); + // System.err.println("wrote GZIP trailer (" + gzipFooter.length + " bytes )"); } } diff --git a/libjava/classpath/java/util/zip/Inflater.java b/libjava/classpath/java/util/zip/Inflater.java index f529dc6..0f094d6 100644 --- a/libjava/classpath/java/util/zip/Inflater.java +++ b/libjava/classpath/java/util/zip/Inflater.java @@ -7,7 +7,7 @@ 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 @@ -43,7 +43,7 @@ package java.util.zip; */ /** - * Inflater is used to decompress data that has been compressed according + * Inflater is used to decompress data that has been compressed according * to the "deflate" standard described in rfc1950. * * The usage is as following. First you have to set some input with @@ -51,10 +51,10 @@ package java.util.zip; * inflate any bytes there may be three reasons: * <ul> * <li>needsInput() returns true because the input buffer is empty. - * You have to provide more input with <code>setInput()</code>. + * You have to provide more input with <code>setInput()</code>. * NOTE: needsInput() also returns true when, the stream is finished. * </li> - * <li>needsDictionary() returns true, you have to provide a preset + * <li>needsDictionary() returns true, you have to provide a preset * dictionary with <code>setDictionary()</code>.</li> * <li>finished() returns true, the inflater has finished.</li> * </ul> @@ -69,15 +69,15 @@ package java.util.zip; public class Inflater { /* Copy lengths for literal codes 257..285 */ - private static final int CPLENS[] = - { + private static final int CPLENS[] = + { 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258 }; - - /* Extra bits for literal codes 257..285 */ - private static final int CPLEXT[] = - { + + /* Extra bits for literal codes 257..285 */ + private static final int CPLEXT[] = + { 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0 }; @@ -88,11 +88,11 @@ public class Inflater 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577 }; - + /* Extra bits for distance codes */ private static final int CPDEXT[] = { 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, - 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, + 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13 }; @@ -122,10 +122,10 @@ public class Inflater * Only valid if mode is DECODE_DICT or DECODE_CHKSUM. */ private int readAdler; - /** + /** * The number of bits needed to complete the current state. This * is valid, if mode is DECODE_DICT, DECODE_CHKSUM, - * DECODE_HUFFMAN_LENBITS or DECODE_HUFFMAN_DISTBITS. + * DECODE_HUFFMAN_LENBITS or DECODE_HUFFMAN_DISTBITS. */ private int neededBits; private int repLength, repDist; @@ -133,7 +133,7 @@ public class Inflater /** * True, if the last block flag was set in the last block of the * inflated stream. This means that the stream ends after the - * current block. + * current block. */ private boolean isLastBlock; @@ -143,7 +143,7 @@ public class Inflater private long totalOut; /** * The total number of bytes set with setInput(). This is not the - * value returned by getTotalIn(), since this also includes the + * value returned by getTotalIn(), since this also includes the * unprocessed input. */ private long totalIn; @@ -198,7 +198,7 @@ public class Inflater * for the Sun implementation). Exists only for compatibility * with Sun's JDK, where the compressor allocates native memory. * If you call any method (even reset) afterwards the behaviour is - * <i>undefined</i>. + * <i>undefined</i>. */ public void end () { @@ -214,7 +214,7 @@ public class Inflater * Returns true, if the inflater has finished. This means, that no * input is needed and no output can be produced. */ - public boolean finished() + public boolean finished() { return mode == FINISHED && outputWindow.getAvailable() == 0; } @@ -230,18 +230,18 @@ public class Inflater { return needsDictionary() ? readAdler : (int) adler.getValue(); } - + /** * Gets the number of unprocessed input. Useful, if the end of the * stream is reached and you want to further process the bytes after - * the deflate stream. + * the deflate stream. * @return the number of bytes of the input which were not processed. */ public int getRemaining() { return input.getAvailableBytes(); } - + /** * Gets the total number of processed compressed input bytes. * @return the total number of bytes of processed input bytes. @@ -283,11 +283,11 @@ public class Inflater /** * Inflates the compressed stream to the output buffer. If this * returns 0, you should check, whether needsDictionary(), - * needsInput() or finished() returns true, to determine why no + * needsInput() or finished() returns true, to determine why no * further output is produced. * @param buf the output buffer. * @return the number of bytes written to the buffer, 0 if no further - * output can be produced. + * output can be produced. * @exception DataFormatException if deflated stream is invalid. * @exception IllegalArgumentException if buf has length 0. */ @@ -299,13 +299,13 @@ public class Inflater /** * Inflates the compressed stream to the output buffer. If this * returns 0, you should check, whether needsDictionary(), - * needsInput() or finished() returns true, to determine why no + * needsInput() or finished() returns true, to determine why no * further output is produced. * @param buf the output buffer. * @param off the offset into buffer where the output should start. * @param len the maximum length of the output. * @return the number of bytes written to the buffer, 0 if no further - * output can be produced. + * output can be produced. * @exception DataFormatException if deflated stream is invalid. * @exception IndexOutOfBoundsException if the off and/or len are wrong. */ @@ -351,7 +351,7 @@ public class Inflater * * <em>NOTE</em>: This method also returns true when the stream is finished. */ - public boolean needsInput () + public boolean needsInput () { return input.needsInput (); } @@ -381,7 +381,7 @@ public class Inflater * @param buffer the dictionary. * @exception IllegalStateException if no dictionary is needed. * @exception IllegalArgumentException if the dictionary checksum is - * wrong. + * wrong. */ public void setDictionary (byte[] buffer) { @@ -398,7 +398,7 @@ public class Inflater * @param len the length of the dictionary. * @exception IllegalStateException if no dictionary is needed. * @exception IllegalArgumentException if the dictionary checksum is - * wrong. + * wrong. * @exception IndexOutOfBoundsException if the off and/or len are wrong. */ public void setDictionary (byte[] buffer, int off, int len) @@ -420,7 +420,7 @@ public class Inflater * @param buf the input. * @exception IllegalStateException if no input is needed. */ - public void setInput (byte[] buf) + public void setInput (byte[] buf) { setInput (buf, 0, buf.length); } @@ -430,11 +430,11 @@ public class Inflater * returns true. * @param buf the input. * @param off the offset into buffer where the input starts. - * @param len the length of the input. + * @param len the length of the input. * @exception IllegalStateException if no input is needed. * @exception IndexOutOfBoundsException if the off and/or len are wrong. */ - public void setInput (byte[] buf, int off, int len) + public void setInput (byte[] buf, int off, int len) { input.setInput (buf, off, len); totalIn += len; @@ -442,7 +442,7 @@ public class Inflater /** * Decodes the deflate header. - * @return false if more input is needed. + * @return false if more input is needed. * @exception DataFormatException if header is invalid. */ private boolean decodeHeader () throws DataFormatException @@ -451,48 +451,48 @@ public class Inflater if (header < 0) return false; input.dropBits(16); - + /* The header is written in "wrong" byte order */ header = ((header << 8) | (header >> 8)) & 0xffff; if (header % 31 != 0) throw new DataFormatException("Header checksum illegal"); - + if ((header & 0x0f00) != (Deflater.DEFLATED << 8)) throw new DataFormatException("Compression Method unknown"); - /* Maximum size of the backwards window in bits. + /* Maximum size of the backwards window in bits. * We currently ignore this, but we could use it to make the * inflater window more space efficient. On the other hand the * full window (15 bits) is needed most times, anyway. int max_wbits = ((header & 0x7000) >> 12) + 8; */ - + if ((header & 0x0020) == 0) // Dictionary flag? { - mode = DECODE_BLOCKS; + mode = DECODE_BLOCKS; } else { - mode = DECODE_DICT; - neededBits = 32; + mode = DECODE_DICT; + neededBits = 32; } return true; } - + /** * Decodes the dictionary checksum after the deflate header. - * @return false if more input is needed. + * @return false if more input is needed. */ private boolean decodeDict () { while (neededBits > 0) { - int dictByte = input.peekBits(8); - if (dictByte < 0) - return false; - input.dropBits(8); - readAdler = (readAdler << 8) | dictByte; - neededBits -= 8; + int dictByte = input.peekBits(8); + if (dictByte < 0) + return false; + input.dropBits(8); + readAdler = (readAdler << 8) | dictByte; + neededBits -= 8; } return false; } @@ -501,226 +501,226 @@ public class Inflater * Decodes the huffman encoded symbols in the input stream. * @return false if more input is needed, true if output window is * full or the current block ends. - * @exception DataFormatException if deflated stream is invalid. + * @exception DataFormatException if deflated stream is invalid. */ private boolean decodeHuffman () throws DataFormatException { int free = outputWindow.getFreeSpace(); while (free >= 258) { - int symbol; - switch (mode) - { - case DECODE_HUFFMAN: - /* This is the inner loop so it is optimized a bit */ - while (((symbol = litlenTree.getSymbol(input)) & ~0xff) == 0) - { - outputWindow.write(symbol); - if (--free < 258) - return true; - } - if (symbol < 257) - { - if (symbol < 0) - return false; - else - { - /* symbol == 256: end of block */ - distTree = null; - litlenTree = null; - mode = DECODE_BLOCKS; - return true; - } - } - - try - { - repLength = CPLENS[symbol - 257]; - neededBits = CPLEXT[symbol - 257]; - } - catch (ArrayIndexOutOfBoundsException ex) - { - throw new DataFormatException("Illegal rep length code"); - } - /* fall through */ - case DECODE_HUFFMAN_LENBITS: - if (neededBits > 0) - { - mode = DECODE_HUFFMAN_LENBITS; - int i = input.peekBits(neededBits); - if (i < 0) - return false; - input.dropBits(neededBits); - repLength += i; - } - mode = DECODE_HUFFMAN_DIST; - /* fall through */ - case DECODE_HUFFMAN_DIST: - symbol = distTree.getSymbol(input); - if (symbol < 0) - return false; - try - { - repDist = CPDIST[symbol]; - neededBits = CPDEXT[symbol]; - } - catch (ArrayIndexOutOfBoundsException ex) - { - throw new DataFormatException("Illegal rep dist code"); - } - /* fall through */ - case DECODE_HUFFMAN_DISTBITS: - if (neededBits > 0) - { - mode = DECODE_HUFFMAN_DISTBITS; - int i = input.peekBits(neededBits); - if (i < 0) - return false; - input.dropBits(neededBits); - repDist += i; - } - outputWindow.repeat(repLength, repDist); - free -= repLength; - mode = DECODE_HUFFMAN; - break; - default: - throw new IllegalStateException(); - } + int symbol; + switch (mode) + { + case DECODE_HUFFMAN: + /* This is the inner loop so it is optimized a bit */ + while (((symbol = litlenTree.getSymbol(input)) & ~0xff) == 0) + { + outputWindow.write(symbol); + if (--free < 258) + return true; + } + if (symbol < 257) + { + if (symbol < 0) + return false; + else + { + /* symbol == 256: end of block */ + distTree = null; + litlenTree = null; + mode = DECODE_BLOCKS; + return true; + } + } + + try + { + repLength = CPLENS[symbol - 257]; + neededBits = CPLEXT[symbol - 257]; + } + catch (ArrayIndexOutOfBoundsException ex) + { + throw new DataFormatException("Illegal rep length code"); + } + /* fall through */ + case DECODE_HUFFMAN_LENBITS: + if (neededBits > 0) + { + mode = DECODE_HUFFMAN_LENBITS; + int i = input.peekBits(neededBits); + if (i < 0) + return false; + input.dropBits(neededBits); + repLength += i; + } + mode = DECODE_HUFFMAN_DIST; + /* fall through */ + case DECODE_HUFFMAN_DIST: + symbol = distTree.getSymbol(input); + if (symbol < 0) + return false; + try + { + repDist = CPDIST[symbol]; + neededBits = CPDEXT[symbol]; + } + catch (ArrayIndexOutOfBoundsException ex) + { + throw new DataFormatException("Illegal rep dist code"); + } + /* fall through */ + case DECODE_HUFFMAN_DISTBITS: + if (neededBits > 0) + { + mode = DECODE_HUFFMAN_DISTBITS; + int i = input.peekBits(neededBits); + if (i < 0) + return false; + input.dropBits(neededBits); + repDist += i; + } + outputWindow.repeat(repLength, repDist); + free -= repLength; + mode = DECODE_HUFFMAN; + break; + default: + throw new IllegalStateException(); + } } return true; } /** * Decodes the adler checksum after the deflate stream. - * @return false if more input is needed. + * @return false if more input is needed. * @exception DataFormatException if checksum doesn't match. */ private boolean decodeChksum () throws DataFormatException { while (neededBits > 0) { - int chkByte = input.peekBits(8); - if (chkByte < 0) - return false; - input.dropBits(8); - readAdler = (readAdler << 8) | chkByte; - neededBits -= 8; + int chkByte = input.peekBits(8); + if (chkByte < 0) + return false; + input.dropBits(8); + readAdler = (readAdler << 8) | chkByte; + neededBits -= 8; } if ((int) adler.getValue() != readAdler) throw new DataFormatException("Adler chksum doesn't match: " - +Integer.toHexString((int)adler.getValue()) - +" vs. "+Integer.toHexString(readAdler)); + +Integer.toHexString((int)adler.getValue()) + +" vs. "+Integer.toHexString(readAdler)); mode = FINISHED; return false; } /** * Decodes the deflated stream. - * @return false if more input is needed, or if finished. + * @return false if more input is needed, or if finished. * @exception DataFormatException if deflated stream is invalid. */ private boolean decode () throws DataFormatException { - switch (mode) + switch (mode) { case DECODE_HEADER: - return decodeHeader(); + return decodeHeader(); case DECODE_DICT: - return decodeDict(); + return decodeDict(); case DECODE_CHKSUM: - return decodeChksum(); + return decodeChksum(); case DECODE_BLOCKS: - if (isLastBlock) - { - if (nowrap) - { - mode = FINISHED; - return false; - } - else - { - input.skipToByteBoundary(); - neededBits = 32; - mode = DECODE_CHKSUM; - return true; - } - } - - int type = input.peekBits(3); - if (type < 0) - return false; - input.dropBits(3); - - if ((type & 1) != 0) - isLastBlock = true; - switch (type >> 1) - { - case DeflaterConstants.STORED_BLOCK: - input.skipToByteBoundary(); - mode = DECODE_STORED_LEN1; - break; - case DeflaterConstants.STATIC_TREES: - litlenTree = InflaterHuffmanTree.defLitLenTree; - distTree = InflaterHuffmanTree.defDistTree; - mode = DECODE_HUFFMAN; - break; - case DeflaterConstants.DYN_TREES: - dynHeader = new InflaterDynHeader(); - mode = DECODE_DYN_HEADER; - break; - default: - throw new DataFormatException("Unknown block type "+type); - } - return true; + if (isLastBlock) + { + if (nowrap) + { + mode = FINISHED; + return false; + } + else + { + input.skipToByteBoundary(); + neededBits = 32; + mode = DECODE_CHKSUM; + return true; + } + } + + int type = input.peekBits(3); + if (type < 0) + return false; + input.dropBits(3); + + if ((type & 1) != 0) + isLastBlock = true; + switch (type >> 1) + { + case DeflaterConstants.STORED_BLOCK: + input.skipToByteBoundary(); + mode = DECODE_STORED_LEN1; + break; + case DeflaterConstants.STATIC_TREES: + litlenTree = InflaterHuffmanTree.defLitLenTree; + distTree = InflaterHuffmanTree.defDistTree; + mode = DECODE_HUFFMAN; + break; + case DeflaterConstants.DYN_TREES: + dynHeader = new InflaterDynHeader(); + mode = DECODE_DYN_HEADER; + break; + default: + throw new DataFormatException("Unknown block type "+type); + } + return true; case DECODE_STORED_LEN1: - { - if ((uncomprLen = input.peekBits(16)) < 0) - return false; - input.dropBits(16); - mode = DECODE_STORED_LEN2; - } - /* fall through */ + { + if ((uncomprLen = input.peekBits(16)) < 0) + return false; + input.dropBits(16); + mode = DECODE_STORED_LEN2; + } + /* fall through */ case DECODE_STORED_LEN2: - { - int nlen = input.peekBits(16); - if (nlen < 0) - return false; - input.dropBits(16); - if (nlen != (uncomprLen ^ 0xffff)) - throw new DataFormatException("broken uncompressed block"); - mode = DECODE_STORED; - } - /* fall through */ + { + int nlen = input.peekBits(16); + if (nlen < 0) + return false; + input.dropBits(16); + if (nlen != (uncomprLen ^ 0xffff)) + throw new DataFormatException("broken uncompressed block"); + mode = DECODE_STORED; + } + /* fall through */ case DECODE_STORED: - { - int more = outputWindow.copyStored(input, uncomprLen); - uncomprLen -= more; - if (uncomprLen == 0) - { - mode = DECODE_BLOCKS; - return true; - } - return !input.needsInput(); - } + { + int more = outputWindow.copyStored(input, uncomprLen); + uncomprLen -= more; + if (uncomprLen == 0) + { + mode = DECODE_BLOCKS; + return true; + } + return !input.needsInput(); + } case DECODE_DYN_HEADER: - if (!dynHeader.decode(input)) - return false; - litlenTree = dynHeader.buildLitLenTree(); - distTree = dynHeader.buildDistTree(); - mode = DECODE_HUFFMAN; - /* fall through */ + if (!dynHeader.decode(input)) + return false; + litlenTree = dynHeader.buildLitLenTree(); + distTree = dynHeader.buildDistTree(); + mode = DECODE_HUFFMAN; + /* fall through */ case DECODE_HUFFMAN: case DECODE_HUFFMAN_LENBITS: case DECODE_HUFFMAN_DIST: case DECODE_HUFFMAN_DISTBITS: - return decodeHuffman(); + return decodeHuffman(); case FINISHED: - return false; + return false; default: - throw new IllegalStateException(); - } + throw new IllegalStateException(); + } } } diff --git a/libjava/classpath/java/util/zip/InflaterDynHeader.java b/libjava/classpath/java/util/zip/InflaterDynHeader.java index bff84a8..64e08d6 100644 --- a/libjava/classpath/java/util/zip/InflaterDynHeader.java +++ b/libjava/classpath/java/util/zip/InflaterDynHeader.java @@ -49,12 +49,12 @@ class InflaterDynHeader private static final int repMin[] = { 3, 3, 11 }; private static final int repBits[] = { 2, 3, 7 }; - + private byte[] blLens; private byte[] litdistLens; private InflaterHuffmanTree blTree; - + private int mode; private int lnum, dnum, blnum, num; private int repSymbol; @@ -63,127 +63,127 @@ class InflaterDynHeader private static final int[] BL_ORDER = { 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 }; - + public InflaterDynHeader() { } - + public boolean decode(StreamManipulator input) throws DataFormatException { decode_loop: for (;;) { - switch (mode) - { - case LNUM: - lnum = input.peekBits(5); - if (lnum < 0) - return false; - lnum += 257; - input.dropBits(5); -// System.err.println("LNUM: "+lnum); - mode = DNUM; - /* fall through */ - case DNUM: - dnum = input.peekBits(5); - if (dnum < 0) - return false; - dnum++; - input.dropBits(5); -// System.err.println("DNUM: "+dnum); - num = lnum+dnum; - litdistLens = new byte[num]; - mode = BLNUM; - /* fall through */ - case BLNUM: - blnum = input.peekBits(4); - if (blnum < 0) - return false; - blnum += 4; - input.dropBits(4); - blLens = new byte[19]; - ptr = 0; -// System.err.println("BLNUM: "+blnum); - mode = BLLENS; - /* fall through */ - case BLLENS: - while (ptr < blnum) - { - int len = input.peekBits(3); - if (len < 0) - return false; - input.dropBits(3); -// System.err.println("blLens["+BL_ORDER[ptr]+"]: "+len); - blLens[BL_ORDER[ptr]] = (byte) len; - ptr++; - } - blTree = new InflaterHuffmanTree(blLens); - blLens = null; - ptr = 0; - mode = LENS; - /* fall through */ - case LENS: - { - int symbol; - while (((symbol = blTree.getSymbol(input)) & ~15) == 0) - { - /* Normal case: symbol in [0..15] */ - -// System.err.println("litdistLens["+ptr+"]: "+symbol); - litdistLens[ptr++] = lastLen = (byte) symbol; - - if (ptr == num) - { - /* Finished */ - return true; - } - } - - /* need more input ? */ - if (symbol < 0) - return false; - - /* otherwise repeat code */ - if (symbol >= 17) - { - /* repeat zero */ -// System.err.println("repeating zero"); - lastLen = 0; - } - else - { - if (ptr == 0) - throw new DataFormatException(); - } - repSymbol = symbol-16; - mode = REPS; - } - /* fall through */ - - case REPS: - { - int bits = repBits[repSymbol]; - int count = input.peekBits(bits); - if (count < 0) - return false; - input.dropBits(bits); - count += repMin[repSymbol]; -// System.err.println("litdistLens repeated: "+count); - - if (ptr + count > num) - throw new DataFormatException(); - while (count-- > 0) - litdistLens[ptr++] = lastLen; - - if (ptr == num) - { - /* Finished */ - return true; - } - } - mode = LENS; - continue decode_loop; - } + switch (mode) + { + case LNUM: + lnum = input.peekBits(5); + if (lnum < 0) + return false; + lnum += 257; + input.dropBits(5); +// System.err.println("LNUM: "+lnum); + mode = DNUM; + /* fall through */ + case DNUM: + dnum = input.peekBits(5); + if (dnum < 0) + return false; + dnum++; + input.dropBits(5); +// System.err.println("DNUM: "+dnum); + num = lnum+dnum; + litdistLens = new byte[num]; + mode = BLNUM; + /* fall through */ + case BLNUM: + blnum = input.peekBits(4); + if (blnum < 0) + return false; + blnum += 4; + input.dropBits(4); + blLens = new byte[19]; + ptr = 0; +// System.err.println("BLNUM: "+blnum); + mode = BLLENS; + /* fall through */ + case BLLENS: + while (ptr < blnum) + { + int len = input.peekBits(3); + if (len < 0) + return false; + input.dropBits(3); +// System.err.println("blLens["+BL_ORDER[ptr]+"]: "+len); + blLens[BL_ORDER[ptr]] = (byte) len; + ptr++; + } + blTree = new InflaterHuffmanTree(blLens); + blLens = null; + ptr = 0; + mode = LENS; + /* fall through */ + case LENS: + { + int symbol; + while (((symbol = blTree.getSymbol(input)) & ~15) == 0) + { + /* Normal case: symbol in [0..15] */ + +// System.err.println("litdistLens["+ptr+"]: "+symbol); + litdistLens[ptr++] = lastLen = (byte) symbol; + + if (ptr == num) + { + /* Finished */ + return true; + } + } + + /* need more input ? */ + if (symbol < 0) + return false; + + /* otherwise repeat code */ + if (symbol >= 17) + { + /* repeat zero */ +// System.err.println("repeating zero"); + lastLen = 0; + } + else + { + if (ptr == 0) + throw new DataFormatException(); + } + repSymbol = symbol-16; + mode = REPS; + } + /* fall through */ + + case REPS: + { + int bits = repBits[repSymbol]; + int count = input.peekBits(bits); + if (count < 0) + return false; + input.dropBits(bits); + count += repMin[repSymbol]; +// System.err.println("litdistLens repeated: "+count); + + if (ptr + count > num) + throw new DataFormatException(); + while (count-- > 0) + litdistLens[ptr++] = lastLen; + + if (ptr == num) + { + /* Finished */ + return true; + } + } + mode = LENS; + continue decode_loop; + } } } diff --git a/libjava/classpath/java/util/zip/InflaterHuffmanTree.java b/libjava/classpath/java/util/zip/InflaterHuffmanTree.java index 6c9b217..c12c732 100644 --- a/libjava/classpath/java/util/zip/InflaterHuffmanTree.java +++ b/libjava/classpath/java/util/zip/InflaterHuffmanTree.java @@ -40,37 +40,37 @@ package java.util.zip; class InflaterHuffmanTree { private static final int MAX_BITLEN = 15; - + private short[] tree; static InflaterHuffmanTree defLitLenTree, defDistTree; static { - try + try { - byte[] codeLengths = new byte[288]; - int i = 0; - while (i < 144) - codeLengths[i++] = 8; - while (i < 256) - codeLengths[i++] = 9; - while (i < 280) - codeLengths[i++] = 7; - while (i < 288) - codeLengths[i++] = 8; - defLitLenTree = new InflaterHuffmanTree(codeLengths); - - codeLengths = new byte[32]; - i = 0; - while (i < 32) - codeLengths[i++] = 5; - defDistTree = new InflaterHuffmanTree(codeLengths); - } + byte[] codeLengths = new byte[288]; + int i = 0; + while (i < 144) + codeLengths[i++] = 8; + while (i < 256) + codeLengths[i++] = 9; + while (i < 280) + codeLengths[i++] = 7; + while (i < 288) + codeLengths[i++] = 8; + defLitLenTree = new InflaterHuffmanTree(codeLengths); + + codeLengths = new byte[32]; + i = 0; + while (i < 32) + codeLengths[i++] = 5; + defDistTree = new InflaterHuffmanTree(codeLengths); + } catch (DataFormatException ex) { - throw new InternalError - ("InflaterHuffmanTree: static tree length illegal"); + throw new InternalError + ("InflaterHuffmanTree: static tree length illegal"); } } @@ -83,31 +83,31 @@ class InflaterHuffmanTree { buildTree(codeLengths); } - + private void buildTree(byte[] codeLengths) throws DataFormatException { int[] blCount = new int[MAX_BITLEN+1]; int[] nextCode = new int[MAX_BITLEN+1]; for (int i = 0; i < codeLengths.length; i++) { - int bits = codeLengths[i]; - if (bits > 0) - blCount[bits]++; + int bits = codeLengths[i]; + if (bits > 0) + blCount[bits]++; } int code = 0; int treeSize = 512; for (int bits = 1; bits <= MAX_BITLEN; bits++) { - nextCode[bits] = code; - code += blCount[bits] << (16 - bits); - if (bits >= 10) - { - /* We need an extra table for bit lengths >= 10. */ - int start = nextCode[bits] & 0x1ff80; - int end = code & 0x1ff80; - treeSize += (end - start) >> (16 - bits); - } + nextCode[bits] = code; + code += blCount[bits] << (16 - bits); + if (bits >= 10) + { + /* We need an extra table for bit lengths >= 10. */ + int start = nextCode[bits] & 0x1ff80; + int end = code & 0x1ff80; + treeSize += (end - start) >> (16 - bits); + } } if (code != 65536) throw new DataFormatException("Code lengths don't add up properly."); @@ -119,46 +119,46 @@ class InflaterHuffmanTree int treePtr = 512; for (int bits = MAX_BITLEN; bits >= 10; bits--) { - int end = code & 0x1ff80; - code -= blCount[bits] << (16 - bits); - int start = code & 0x1ff80; - for (int i = start; i < end; i += 1 << 7) - { - tree[DeflaterHuffman.bitReverse(i)] - = (short) ((-treePtr << 4) | bits); - treePtr += 1 << (bits-9); - } + int end = code & 0x1ff80; + code -= blCount[bits] << (16 - bits); + int start = code & 0x1ff80; + for (int i = start; i < end; i += 1 << 7) + { + tree[DeflaterHuffman.bitReverse(i)] + = (short) ((-treePtr << 4) | bits); + treePtr += 1 << (bits-9); + } } - + for (int i = 0; i < codeLengths.length; i++) { - int bits = codeLengths[i]; - if (bits == 0) - continue; - code = nextCode[bits]; - int revcode = DeflaterHuffman.bitReverse(code); - if (bits <= 9) - { - do - { - tree[revcode] = (short) ((i << 4) | bits); - revcode += 1 << bits; - } - while (revcode < 512); - } - else - { - int subTree = tree[revcode & 511]; - int treeLen = 1 << (subTree & 15); - subTree = -(subTree >> 4); - do - { - tree[subTree | (revcode >> 9)] = (short) ((i << 4) | bits); - revcode += 1 << bits; - } - while (revcode < treeLen); - } - nextCode[bits] = code + (1 << (16 - bits)); + int bits = codeLengths[i]; + if (bits == 0) + continue; + code = nextCode[bits]; + int revcode = DeflaterHuffman.bitReverse(code); + if (bits <= 9) + { + do + { + tree[revcode] = (short) ((i << 4) | bits); + revcode += 1 << bits; + } + while (revcode < 512); + } + else + { + int subTree = tree[revcode & 511]; + int treeLen = 1 << (subTree & 15); + subTree = -(subTree >> 4); + do + { + tree[subTree | (revcode >> 9)] = (short) ((i << 4) | bits); + revcode += 1 << bits; + } + while (revcode < treeLen); + } + nextCode[bits] = code + (1 << (16 - bits)); } } @@ -173,45 +173,45 @@ class InflaterHuffmanTree int lookahead, symbol; if ((lookahead = input.peekBits(9)) >= 0) { - if ((symbol = tree[lookahead]) >= 0) - { - input.dropBits(symbol & 15); - return symbol >> 4; - } - int subtree = -(symbol >> 4); - int bitlen = symbol & 15; - if ((lookahead = input.peekBits(bitlen)) >= 0) - { - symbol = tree[subtree | (lookahead >> 9)]; - input.dropBits(symbol & 15); - return symbol >> 4; - } - else - { - int bits = input.getAvailableBits(); - lookahead = input.peekBits(bits); - symbol = tree[subtree | (lookahead >> 9)]; - if ((symbol & 15) <= bits) - { - input.dropBits(symbol & 15); - return symbol >> 4; - } - else - return -1; - } + if ((symbol = tree[lookahead]) >= 0) + { + input.dropBits(symbol & 15); + return symbol >> 4; + } + int subtree = -(symbol >> 4); + int bitlen = symbol & 15; + if ((lookahead = input.peekBits(bitlen)) >= 0) + { + symbol = tree[subtree | (lookahead >> 9)]; + input.dropBits(symbol & 15); + return symbol >> 4; + } + else + { + int bits = input.getAvailableBits(); + lookahead = input.peekBits(bits); + symbol = tree[subtree | (lookahead >> 9)]; + if ((symbol & 15) <= bits) + { + input.dropBits(symbol & 15); + return symbol >> 4; + } + else + return -1; + } } else { - int bits = input.getAvailableBits(); - lookahead = input.peekBits(bits); - symbol = tree[lookahead]; - if (symbol >= 0 && (symbol & 15) <= bits) - { - input.dropBits(symbol & 15); - return symbol >> 4; - } - else - return -1; + int bits = input.getAvailableBits(); + lookahead = input.peekBits(bits); + symbol = tree[lookahead]; + if (symbol >= 0 && (symbol & 15) <= bits) + { + input.dropBits(symbol & 15); + return symbol >> 4; + } + else + return -1; } } } diff --git a/libjava/classpath/java/util/zip/InflaterInputStream.java b/libjava/classpath/java/util/zip/InflaterInputStream.java index 08c1fd7..1c5e9f2 100644 --- a/libjava/classpath/java/util/zip/InflaterInputStream.java +++ b/libjava/classpath/java/util/zip/InflaterInputStream.java @@ -8,7 +8,7 @@ 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 @@ -57,17 +57,17 @@ import java.io.InputStream; public class InflaterInputStream extends FilterInputStream { /** - * Decompressor for this filter + * Decompressor for this filter */ protected Inflater inf; /** - * Byte array used as a buffer + * Byte array used as a buffer */ protected byte[] buf; /** - * Size of buffer + * Size of buffer */ protected int len; @@ -81,7 +81,7 @@ public class InflaterInputStream extends FilterInputStream * * @param in the InputStream to read bytes from */ - public InflaterInputStream(InputStream in) + public InflaterInputStream(InputStream in) { this(in, new Inflater(), 4096); } @@ -93,7 +93,7 @@ public class InflaterInputStream extends FilterInputStream * @param in the InputStream to read bytes from * @param inf the decompressor used to decompress data read from in */ - public InflaterInputStream(InputStream in, Inflater inf) + public InflaterInputStream(InputStream in, Inflater inf) { this(in, inf, 4096); } @@ -106,7 +106,7 @@ public class InflaterInputStream extends FilterInputStream * @param inf the decompressor used to decompress data read from in * @param size size of the buffer to use */ - public InflaterInputStream(InputStream in, Inflater inf, int size) + public InflaterInputStream(InputStream in, Inflater inf, int size) { super(in); @@ -116,7 +116,7 @@ public class InflaterInputStream extends FilterInputStream throw new NullPointerException("inf may not be null"); if (size < 0) throw new IllegalArgumentException("size may not be negative"); - + this.inf = inf; this.buf = new byte [size]; } @@ -151,12 +151,12 @@ public class InflaterInputStream extends FilterInputStream { if (in == null) throw new ZipException ("InflaterInputStream is closed"); - + len = in.read(buf, 0, buf.length); if (len < 0) throw new ZipException("Deflated stream ends early."); - + inf.setInput(buf, 0, len); } @@ -166,7 +166,7 @@ public class InflaterInputStream extends FilterInputStream * The byte is in the lower 8 bits of the int. */ public int read() throws IOException - { + { int nread = read(onebytebuffer, 0, 1); if (nread > 0) return onebytebuffer[0] & 0xff; @@ -192,27 +192,27 @@ public class InflaterInputStream extends FilterInputStream int count = 0; while (count == 0) { - if (inf.needsInput()) - fill(); - - try - { - count = inf.inflate(b, off, len); - if (count == 0) - { - if (this.len == -1) - { - // Couldn't get any more data to feed to the Inflater - return -1; - } - if (inf.needsDictionary()) - throw new ZipException("Inflater needs Dictionary"); - } - } - catch (DataFormatException dfe) - { - throw new ZipException(dfe.getMessage()); - } + if (inf.needsInput()) + fill(); + + try + { + count = inf.inflate(b, off, len); + if (count == 0) + { + if (this.len == -1) + { + // Couldn't get any more data to feed to the Inflater + return -1; + } + if (inf.needsDictionary()) + throw new ZipException("Inflater needs Dictionary"); + } + } + catch (DataFormatException dfe) + { + throw new ZipException(dfe.getMessage()); + } } return count; } @@ -238,12 +238,12 @@ public class InflaterInputStream extends FilterInputStream long skipped = 0L; while (n > 0L) { - int numread = read(tmpbuf, 0, buflen); - if (numread <= 0) - break; - n -= numread; - skipped += numread; - buflen = (int) Math.min(n, 2048); + int numread = read(tmpbuf, 0, buflen); + if (numread <= 0) + break; + n -= numread; + skipped += numread; + buflen = (int) Math.min(n, 2048); } return skipped; diff --git a/libjava/classpath/java/util/zip/OutputWindow.java b/libjava/classpath/java/util/zip/OutputWindow.java index 1f082a9..59dadb5 100644 --- a/libjava/classpath/java/util/zip/OutputWindow.java +++ b/libjava/classpath/java/util/zip/OutputWindow.java @@ -67,9 +67,9 @@ class OutputWindow { while (len-- > 0) { - window[window_end++] = window[rep_start++]; - window_end &= WINDOW_MASK; - rep_start &= WINDOW_MASK; + window[window_end++] = window[rep_start++]; + window_end &= WINDOW_MASK; + rep_start &= WINDOW_MASK; } } @@ -82,18 +82,18 @@ class OutputWindow int border = WINDOW_SIZE - len; if (rep_start <= border && window_end < border) { - if (len <= dist) - { - System.arraycopy(window, rep_start, window, window_end, len); - window_end += len; - } - else - { - /* We have to copy manually, since the repeat pattern overlaps. - */ - while (len-- > 0) - window[window_end++] = window[rep_start++]; - } + if (len <= dist) + { + System.arraycopy(window, rep_start, window, window_end, len); + window_end += len; + } + else + { + /* We have to copy manually, since the repeat pattern overlaps. + */ + while (len-- > 0) + window[window_end++] = window[rep_start++]; + } } else slowRepeat(rep_start, len, dist); @@ -101,16 +101,16 @@ class OutputWindow public int copyStored(StreamManipulator input, int len) { - len = Math.min(Math.min(len, WINDOW_SIZE - window_filled), - input.getAvailableBytes()); + len = Math.min(Math.min(len, WINDOW_SIZE - window_filled), + input.getAvailableBytes()); int copied; int tailLen = WINDOW_SIZE - window_end; if (len > tailLen) { - copied = input.copyBytes(window, window_end, tailLen); - if (copied == tailLen) - copied += input.copyBytes(window, 0, len - tailLen); + copied = input.copyBytes(window, window_end, tailLen); + if (copied == tailLen) + copied += input.copyBytes(window, 0, len - tailLen); } else copied = input.copyBytes(window, window_end, len); @@ -127,8 +127,8 @@ class OutputWindow if (len > WINDOW_SIZE) { - offset += len - WINDOW_SIZE; - len = WINDOW_SIZE; + offset += len - WINDOW_SIZE; + len = WINDOW_SIZE; } System.arraycopy(dict, offset, window, 0, len); window_end = len & WINDOW_MASK; @@ -157,10 +157,10 @@ class OutputWindow if (tailLen > 0) { - System.arraycopy(window, WINDOW_SIZE - tailLen, - output, offset, tailLen); - offset += tailLen; - len = copy_end; + System.arraycopy(window, WINDOW_SIZE - tailLen, + output, offset, tailLen); + offset += tailLen; + len = copy_end; } System.arraycopy(window, copy_end - len, output, offset, len); window_filled -= copied; @@ -173,6 +173,3 @@ class OutputWindow window_filled = window_end = 0; } } - - - diff --git a/libjava/classpath/java/util/zip/PendingBuffer.java b/libjava/classpath/java/util/zip/PendingBuffer.java index 9079b98..50f561f 100644 --- a/libjava/classpath/java/util/zip/PendingBuffer.java +++ b/libjava/classpath/java/util/zip/PendingBuffer.java @@ -40,12 +40,12 @@ package java.util.zip; /** * This class is general purpose class for writing data to a buffer. * - * It allows you to write bits as well as bytes + * It allows you to write bits as well as bytes * * Based on DeflaterPending.java * * @author Jochen Hoenicke - * @date Jan 5, 2000 + * @date Jan 5, 2000 */ class PendingBuffer @@ -71,14 +71,14 @@ class PendingBuffer start = end = bitCount = 0; } - public final void writeByte(int b) + public final void writeByte(int b) { if (DeflaterConstants.DEBUGGING && start != 0) throw new IllegalStateException(); buf[end++] = (byte) b; } - public final void writeShort(int s) + public final void writeShort(int s) { if (DeflaterConstants.DEBUGGING && start != 0) throw new IllegalStateException(); @@ -86,7 +86,7 @@ class PendingBuffer buf[end++] = (byte) (s >> 8); } - public final void writeInt(int s) + public final void writeInt(int s) { if (DeflaterConstants.DEBUGGING && start != 0) throw new IllegalStateException(); @@ -96,7 +96,7 @@ class PendingBuffer buf[end++] = (byte) (s >> 24); } - public final void writeBlock(byte[] block, int offset, int len) + public final void writeBlock(byte[] block, int offset, int len) { if (DeflaterConstants.DEBUGGING && start != 0) throw new IllegalStateException(); @@ -113,9 +113,9 @@ class PendingBuffer throw new IllegalStateException(); if (bitCount > 0) { - buf[end++] = (byte) bits; - if (bitCount > 8) - buf[end++] = (byte) (bits >>> 8); + buf[end++] = (byte) bits; + if (bitCount > 8) + buf[end++] = (byte) (bits >>> 8); } bits = 0; bitCount = 0; @@ -161,28 +161,28 @@ class PendingBuffer public final int flush(byte[] output, int offset, int length) { if (bitCount >= 8) { - buf[end++] = (byte) bits; - bits >>>= 8; - bitCount -= 8; + buf[end++] = (byte) bits; + bits >>>= 8; + bitCount -= 8; } if (length > end - start) { - length = end - start; - System.arraycopy(buf, start, output, offset, length); - start = 0; - end = 0; + length = end - start; + System.arraycopy(buf, start, output, offset, length); + start = 0; + end = 0; } else { - System.arraycopy(buf, start, output, offset, length); - start += length; + System.arraycopy(buf, start, output, offset, length); + start += length; } return length; } /** * Flushes the pending buffer and returns that data in a new array - * + * * @return the output stream */ @@ -197,4 +197,3 @@ class PendingBuffer } - diff --git a/libjava/classpath/java/util/zip/StreamManipulator.java b/libjava/classpath/java/util/zip/StreamManipulator.java index 57d15ae..105d807 100644 --- a/libjava/classpath/java/util/zip/StreamManipulator.java +++ b/libjava/classpath/java/util/zip/StreamManipulator.java @@ -46,7 +46,7 @@ package java.util.zip; * but we only need at most 15, so this is all safe. * * There are some optimizations in this class, for example, you must - * never peek more then 8 bits more than needed, and you must first + * never peek more then 8 bits more than needed, and you must first * peek bits before you may drop them. This is not a general purpose * class but optimized for the behaviour of the Inflater. * @@ -66,17 +66,17 @@ class StreamManipulator * Get the next n bits but don't increase input pointer. n must be * less or equal 16 and if you if this call succeeds, you must drop * at least n-8 bits in the next call. - * + * * @return the value of the bits, or -1 if not enough bits available. */ public final int peekBits(int n) { if (bits_in_buffer < n) { - if (window_start == window_end) - return -1; - buffer |= (window[window_start++] & 0xff - | (window[window_start++] & 0xff) << 8) << bits_in_buffer; - bits_in_buffer += 16; + if (window_start == window_end) + return -1; + buffer |= (window[window_start++] & 0xff + | (window[window_start++] & 0xff) << 8) << bits_in_buffer; + bits_in_buffer += 16; } return buffer & ((1 << n) - 1); } @@ -94,7 +94,7 @@ class StreamManipulator /** * Gets the next n bits and increases input pointer. This is equivalent * to peekBits followed by dropBits, except for correct error handling. - * @return the value of the bits, or -1 if not enough bits available. + * @return the value of the bits, or -1 if not enough bits available. */ public final int getBits(int n) { @@ -114,7 +114,7 @@ class StreamManipulator } /** - * Gets the number of bytes available. + * Gets the number of bytes available. * @return the number of bytes available. */ public final int getAvailableBytes() @@ -141,24 +141,24 @@ class StreamManipulator * byte aligned. If not enough bytes are available, copies fewer * bytes. * @param length the length to copy, 0 is allowed. - * @return the number of bytes copied, 0 if no byte is available. + * @return the number of bytes copied, 0 if no byte is available. */ public int copyBytes(byte[] output, int offset, int length) { if (length < 0) throw new IllegalArgumentException("length negative"); - if ((bits_in_buffer & 7) != 0) + if ((bits_in_buffer & 7) != 0) /* bits_in_buffer may only be 0 or 8 */ throw new IllegalStateException("Bit buffer is not aligned!"); int count = 0; while (bits_in_buffer > 0 && length > 0) { - output[offset++] = (byte) buffer; - buffer >>>= 8; - bits_in_buffer -= 8; - length--; - count++; + output[offset++] = (byte) buffer; + buffer >>>= 8; + bits_in_buffer -= 8; + length--; + count++; } if (length == 0) return count; @@ -171,9 +171,9 @@ class StreamManipulator if (((window_start - window_end) & 1) != 0) { - /* We always want an even number of bytes in input, see peekBits */ - buffer = (window[window_start++] & 0xff); - bits_in_buffer = 8; + /* We always want an even number of bytes in input, see peekBits */ + buffer = (window[window_start++] & 0xff); + bits_in_buffer = 8; } return count + length; } @@ -191,26 +191,25 @@ class StreamManipulator { if (window_start < window_end) throw new IllegalStateException - ("Old input was not completely processed"); + ("Old input was not completely processed"); int end = off + len; /* We want to throw an ArrayIndexOutOfBoundsException early. The - * check is very tricky: it also handles integer wrap around. + * check is very tricky: it also handles integer wrap around. */ if (0 > off || off > end || end > buf.length) throw new ArrayIndexOutOfBoundsException(); - + if ((len & 1) != 0) { - /* We always want an even number of bytes in input, see peekBits */ - buffer |= (buf[off++] & 0xff) << bits_in_buffer; - bits_in_buffer += 8; + /* We always want an even number of bytes in input, see peekBits */ + buffer |= (buf[off++] & 0xff) << bits_in_buffer; + bits_in_buffer += 8; } - + window = buf; window_start = off; window_end = end; } } - diff --git a/libjava/classpath/java/util/zip/ZipConstants.java b/libjava/classpath/java/util/zip/ZipConstants.java index bdf9450..69f589a 100644 --- a/libjava/classpath/java/util/zip/ZipConstants.java +++ b/libjava/classpath/java/util/zip/ZipConstants.java @@ -91,4 +91,3 @@ interface ZipConstants int ENDOFF = 16; int ENDCOM = 20; } - diff --git a/libjava/classpath/java/util/zip/ZipEntry.java b/libjava/classpath/java/util/zip/ZipEntry.java index a6d01af..73afc89 100644 --- a/libjava/classpath/java/util/zip/ZipEntry.java +++ b/libjava/classpath/java/util/zip/ZipEntry.java @@ -46,7 +46,7 @@ import java.util.Calendar; * about the members in an archive. On the other hand ZipOutputStream * needs an instance of this class to create a new member. * - * @author Jochen Hoenicke + * @author Jochen Hoenicke */ public class ZipEntry implements ZipConstants, Cloneable { @@ -196,7 +196,7 @@ public class ZipEntry implements ZipConstants, Cloneable /** * Returns the entry name. The path components in the entry are - * always separated by slashes ('/'). + * always separated by slashes ('/'). */ public String getName() { @@ -241,7 +241,7 @@ public class ZipEntry implements ZipConstants, Cloneable time = cal.getTimeInMillis(); known |= KNOWN_TIME; return time; - } + } catch (RuntimeException ex) { /* Ignore illegal time stamp */ @@ -260,7 +260,7 @@ public class ZipEntry implements ZipConstants, Cloneable public void setSize(long size) { if ((size & 0xffffffff00000000L) != 0) - throw new IllegalArgumentException(); + throw new IllegalArgumentException(); this.size = (int) size; this.known |= KNOWN_SIZE; } @@ -298,7 +298,7 @@ public class ZipEntry implements ZipConstants, Cloneable public void setCrc(long crc) { if ((crc & 0xffffffff00000000L) != 0) - throw new IllegalArgumentException(); + throw new IllegalArgumentException(); this.crc = (int) crc; this.known |= KNOWN_CRC; } @@ -317,18 +317,18 @@ public class ZipEntry implements ZipConstants, Cloneable * supported. * @exception IllegalArgumentException if method is not supported. * @see ZipOutputStream#DEFLATED - * @see ZipOutputStream#STORED + * @see ZipOutputStream#STORED */ public void setMethod(int method) { if (method != ZipOutputStream.STORED - && method != ZipOutputStream.DEFLATED) - throw new IllegalArgumentException(); + && method != ZipOutputStream.DEFLATED) + throw new IllegalArgumentException(); this.method = (byte) method; } /** - * Gets the compression method. + * Gets the compression method. * @return the compression method or -1 if unknown. */ public int getMethod() @@ -342,10 +342,10 @@ public class ZipEntry implements ZipConstants, Cloneable */ public void setExtra(byte[] extra) { - if (extra == null) + if (extra == null) { - this.extra = null; - return; + this.extra = null; + return; } if (extra.length > 0xffff) throw new IllegalArgumentException(); @@ -360,38 +360,38 @@ public class ZipEntry implements ZipConstants, Cloneable if (extra == null) { - known |= KNOWN_EXTRA; - return; + known |= KNOWN_EXTRA; + return; } try { - int pos = 0; - while (pos < extra.length) - { - int sig = (extra[pos++] & 0xff) - | (extra[pos++] & 0xff) << 8; - int len = (extra[pos++] & 0xff) - | (extra[pos++] & 0xff) << 8; - if (sig == 0x5455) - { - /* extended time stamp */ - int flags = extra[pos]; - if ((flags & 1) != 0) - { - long time = ((extra[pos+1] & 0xff) - | (extra[pos+2] & 0xff) << 8 - | (extra[pos+3] & 0xff) << 16 - | (extra[pos+4] & 0xff) << 24); - setTime(time*1000); - } - } - pos += len; - } + int pos = 0; + while (pos < extra.length) + { + int sig = (extra[pos++] & 0xff) + | (extra[pos++] & 0xff) << 8; + int len = (extra[pos++] & 0xff) + | (extra[pos++] & 0xff) << 8; + if (sig == 0x5455) + { + /* extended time stamp */ + int flags = extra[pos]; + if ((flags & 1) != 0) + { + long time = ((extra[pos+1] & 0xff) + | (extra[pos+2] & 0xff) << 8 + | (extra[pos+3] & 0xff) << 16 + | (extra[pos+4] & 0xff) << 24); + setTime(time*1000); + } + } + pos += len; + } } catch (ArrayIndexOutOfBoundsException ex) { - /* be lenient */ + /* be lenient */ } known |= KNOWN_EXTRA; @@ -429,7 +429,7 @@ public class ZipEntry implements ZipConstants, Cloneable /** * Gets true, if the entry is a directory. This is solely - * determined by the name, a trailing slash '/' marks a directory. + * determined by the name, a trailing slash '/' marks a directory. */ public boolean isDirectory() { diff --git a/libjava/classpath/java/util/zip/ZipFile.java b/libjava/classpath/java/util/zip/ZipFile.java index 7cf7007..3963bcb 100644 --- a/libjava/classpath/java/util/zip/ZipFile.java +++ b/libjava/classpath/java/util/zip/ZipFile.java @@ -106,19 +106,19 @@ public class ZipFile implements ZipConstants * * @return the newly open RandomAccessFile, never null */ - private RandomAccessFile openFile(String name, - File file) + private RandomAccessFile openFile(String name, + File file) throws ZipException, IOException - { - try + { + try { - return + return (name != null) ? new RandomAccessFile(name, "r") : new RandomAccessFile(file, "r"); } catch (FileNotFoundException f) - { + { ZipException ze = new ZipException(f.getMessage()); ze.initCause(f); throw ze; @@ -130,7 +130,7 @@ public class ZipFile implements ZipConstants * Opens a Zip file with the given name for reading. * @exception IOException if a i/o error occured. * @exception ZipException if the file doesn't contain a valid zip - * archive. + * archive. */ public ZipFile(String name) throws ZipException, IOException { @@ -143,7 +143,7 @@ public class ZipFile implements ZipConstants * Opens a Zip file reading the given File. * @exception IOException if a i/o error occured. * @exception ZipException if the file doesn't contain a valid zip - * archive. + * archive. */ public ZipFile(File file) throws ZipException, IOException { @@ -158,7 +158,7 @@ public class ZipFile implements ZipConstants * If the OPEN_DELETE mode is specified, the zip file will be deleted at * some time moment after it is opened. It will be deleted before the zip * file is closed or the Virtual Machine exits. - * + * * The contents of the zip file will be accessible until it is closed. * * @since JDK1.3 @@ -166,7 +166,7 @@ public class ZipFile implements ZipConstants * * @exception IOException if a i/o error occured. * @exception ZipException if the file doesn't contain a valid zip - * archive. + * archive. */ public ZipFile(File file, int mode) throws ZipException, IOException { @@ -183,7 +183,7 @@ public class ZipFile implements ZipConstants { boolean valid = false; - try + try { byte[] buf = new byte[4]; raf.readFully(buf); @@ -195,18 +195,18 @@ public class ZipFile implements ZipConstants } catch (IOException _) { - } + } if (!valid) { try { - raf.close(); + raf.close(); } catch (IOException _) { } - throw new ZipException("Not a valid zip file"); + throw new ZipException("Not a valid zip file"); } } @@ -225,11 +225,11 @@ public class ZipFile implements ZipConstants * while holding the lock on <code>raf</code>. * * @exception IOException if a i/o error occured. - * @exception ZipException if the central directory is malformed + * @exception ZipException if the central directory is malformed */ private void readEntries() throws ZipException, IOException { - /* Search for the End Of Central Directory. When a zip comment is + /* Search for the End Of Central Directory. When a zip comment is * present the directory may start earlier. * Note that a comment has a maximum length of 64K, so that is the * maximum we search backwards. @@ -239,13 +239,13 @@ public class ZipFile implements ZipConstants long top = Math.max(0, pos - 65536); do { - if (pos < top) - throw new ZipException - ("central directory not found, probably not a zip file: " + name); - inp.seek(pos--); + if (pos < top) + throw new ZipException + ("central directory not found, probably not a zip file: " + name); + inp.seek(pos--); } while (inp.readLeInt() != ENDSIG); - + if (inp.skip(ENDTOT - ENDNRD) != ENDTOT - ENDNRD) throw new EOFException(name); int count = inp.readLeShort(); @@ -255,43 +255,43 @@ public class ZipFile implements ZipConstants entries = new LinkedHashMap<String, ZipEntry> (count+count/2); inp.seek(centralOffset); - + for (int i = 0; i < count; i++) { - if (inp.readLeInt() != CENSIG) - throw new ZipException("Wrong Central Directory signature: " + name); + if (inp.readLeInt() != CENSIG) + throw new ZipException("Wrong Central Directory signature: " + name); inp.skip(6); - int method = inp.readLeShort(); - int dostime = inp.readLeInt(); - int crc = inp.readLeInt(); - int csize = inp.readLeInt(); - int size = inp.readLeInt(); - int nameLen = inp.readLeShort(); - int extraLen = inp.readLeShort(); - int commentLen = inp.readLeShort(); + int method = inp.readLeShort(); + int dostime = inp.readLeInt(); + int crc = inp.readLeInt(); + int csize = inp.readLeInt(); + int size = inp.readLeInt(); + int nameLen = inp.readLeShort(); + int extraLen = inp.readLeShort(); + int commentLen = inp.readLeShort(); inp.skip(8); - int offset = inp.readLeInt(); - String name = inp.readString(nameLen); - - ZipEntry entry = new ZipEntry(name); - entry.setMethod(method); - entry.setCrc(crc & 0xffffffffL); - entry.setSize(size & 0xffffffffL); - entry.setCompressedSize(csize & 0xffffffffL); - entry.setDOSTime(dostime); - if (extraLen > 0) - { - byte[] extra = new byte[extraLen]; - inp.readFully(extra); - entry.setExtra(extra); - } - if (commentLen > 0) - { + int offset = inp.readLeInt(); + String name = inp.readString(nameLen); + + ZipEntry entry = new ZipEntry(name); + entry.setMethod(method); + entry.setCrc(crc & 0xffffffffL); + entry.setSize(size & 0xffffffffL); + entry.setCompressedSize(csize & 0xffffffffL); + entry.setDOSTime(dostime); + if (extraLen > 0) + { + byte[] extra = new byte[extraLen]; + inp.readFully(extra); + entry.setExtra(extra); + } + if (commentLen > 0) + { entry.setComment(inp.readString(commentLen)); - } - entry.offset = offset; - entries.put(name, entry); + } + entry.offset = offset; + entries.put(name, entry); } } @@ -299,7 +299,7 @@ public class ZipFile implements ZipConstants * Closes the ZipFile. This also closes all input streams given by * this class. After this is called, no further method should be * called. - * + * * @exception IOException if a i/o error occured. */ public void close() throws IOException @@ -310,9 +310,9 @@ public class ZipFile implements ZipConstants synchronized (raf) { - closed = true; - entries = null; - raf.close(); + closed = true; + entries = null; + raf.close(); } } @@ -333,14 +333,14 @@ public class ZipFile implements ZipConstants public Enumeration<? extends ZipEntry> entries() { checkClosed(); - + try { - return new ZipEntryEnumeration(getEntries().values().iterator()); + return new ZipEntryEnumeration(getEntries().values().iterator()); } catch (IOException ioe) { - return new EmptyEnumeration<ZipEntry>(); + return new EmptyEnumeration<ZipEntry>(); } } @@ -354,12 +354,12 @@ public class ZipFile implements ZipConstants { synchronized(raf) { - checkClosed(); + checkClosed(); - if (entries == null) - readEntries(); + if (entries == null) + readEntries(); - return entries; + return entries; } } @@ -378,16 +378,16 @@ public class ZipFile implements ZipConstants try { - LinkedHashMap<String, ZipEntry> entries = getEntries(); - ZipEntry entry = entries.get(name); + LinkedHashMap<String, ZipEntry> entries = getEntries(); + ZipEntry entry = entries.get(name); // If we didn't find it, maybe it's a directory. if (entry == null && !name.endsWith("/")) - entry = entries.get(name + '/'); - return entry != null ? new ZipEntry(entry, name) : null; + entry = entries.get(name + '/'); + return entry != null ? new ZipEntry(entry, name) : null; } catch (IOException ioe) { - return null; + return null; } } @@ -411,7 +411,7 @@ public class ZipFile implements ZipConstants * * @exception IllegalStateException when the ZipFile has already been closed * @exception IOException if a i/o error occured. - * @exception ZipException if the Zip archive is malformed. + * @exception ZipException if the Zip archive is malformed. */ public InputStream getInputStream(ZipEntry entry) throws IOException { @@ -446,7 +446,7 @@ public class ZipFile implements ZipConstants switch (method) { case ZipOutputStream.STORED: - return inp; + return inp; case ZipOutputStream.DEFLATED: inp.addDummyByte(); final Inflater inf = new Inflater(true); @@ -463,10 +463,10 @@ public class ZipFile implements ZipConstants } }; default: - throw new ZipException("Unknown compression method " + method); + throw new ZipException("Unknown compression method " + method); } } - + /** * Returns the (path) name of this zip file. */ @@ -483,17 +483,17 @@ public class ZipFile implements ZipConstants public int size() { checkClosed(); - + try { - return getEntries().size(); + return getEntries().size(); } catch (IOException ioe) { - return 0; + return 0; } } - + private static class ZipEntryEnumeration implements Enumeration<ZipEntry> { private final Iterator<ZipEntry> elements; @@ -511,7 +511,7 @@ public class ZipFile implements ZipConstants public ZipEntry nextElement() { /* We return a clone, just to be safe that the user doesn't - * change the entry. + * change the entry. */ return (ZipEntry) (elements.next().clone()); } @@ -525,7 +525,7 @@ public class ZipFile implements ZipConstants private static final Charset UTF8CHARSET = Charset.forName("UTF-8"); /** - * The actual UTF-8 decoder. Created on demand. + * The actual UTF-8 decoder. Created on demand. */ private CharsetDecoder utf8Decoder; @@ -572,37 +572,37 @@ public class ZipFile implements ZipConstants } } } - + public int available() { long amount = end - (bufferOffset + pos); if (amount > Integer.MAX_VALUE) - return Integer.MAX_VALUE; + return Integer.MAX_VALUE; return (int) amount; } - + public int read() throws IOException { if (bufferOffset + pos >= end + dummyByteCount) - return -1; + return -1; if (pos == buffer.length) { bufferOffset += buffer.length; pos = 0; fillBuffer(); } - + return buffer[pos++] & 0xFF; } public int read(byte[] b, int off, int len) throws IOException { if (len > end + dummyByteCount - (bufferOffset + pos)) - { - len = (int) (end + dummyByteCount - (bufferOffset + pos)); - if (len == 0) - return -1; - } + { + len = (int) (end + dummyByteCount - (bufferOffset + pos)); + if (len == 0) + return -1; + } int totalBytesRead = Math.min(buffer.length - pos, len); System.arraycopy(buffer, pos, b, off, totalBytesRead); @@ -622,16 +622,16 @@ public class ZipFile implements ZipConstants len -= remain; totalBytesRead += remain; } - + return totalBytesRead; } public long skip(long amount) throws IOException { if (amount < 0) - return 0; + return 0; if (amount > end - (bufferOffset + pos)) - amount = end - (bufferOffset + pos); + amount = end - (bufferOffset + pos); seek(bufferOffset + pos + amount); return amount; } diff --git a/libjava/classpath/java/util/zip/ZipInputStream.java b/libjava/classpath/java/util/zip/ZipInputStream.java index df44bb3..3eae026 100644 --- a/libjava/classpath/java/util/zip/ZipInputStream.java +++ b/libjava/classpath/java/util/zip/ZipInputStream.java @@ -82,9 +82,9 @@ public class ZipInputStream extends InflaterInputStream implements ZipConstants { if (avail <= 0) { - fillBuf(); - if (avail <= 0) - return -1; + fillBuf(); + if (avail <= 0) + return -1; } if (length > avail) length = avail; @@ -92,28 +92,28 @@ public class ZipInputStream extends InflaterInputStream implements ZipConstants avail -= length; return length; } - + private void readFully(byte[] out) throws IOException { int off = 0; int len = out.length; while (len > 0) { - int count = readBuf(out, off, len); - if (count == -1) - throw new EOFException(); - off += count; - len -= count; + int count = readBuf(out, off, len); + if (count == -1) + throw new EOFException(); + off += count; + len -= count; } } - + private int readLeByte() throws IOException { if (avail <= 0) { - fillBuf(); - if (avail <= 0) - throw new ZipException("EOF in header"); + fillBuf(); + if (avail <= 0) + throw new ZipException("EOF in header"); } return buf[len - avail--] & 0xff; } @@ -121,7 +121,7 @@ public class ZipInputStream extends InflaterInputStream implements ZipConstants /** * Read an unsigned short in little endian byte order. */ - private int readLeShort() throws IOException + private int readLeShort() throws IOException { return readLeByte() | (readLeByte() << 8); } @@ -129,7 +129,7 @@ public class ZipInputStream extends InflaterInputStream implements ZipConstants /** * Read an int in little endian byte order. */ - private int readLeInt() throws IOException + private int readLeInt() throws IOException { return readLeShort() | (readLeShort() << 16); } @@ -148,13 +148,13 @@ public class ZipInputStream extends InflaterInputStream implements ZipConstants int header = readLeInt(); if (header == CENSIG) { - /* Central Header reached. */ - close(); - return null; + /* Central Header reached. */ + close(); + return null; } if (header != LOCSIG) throw new ZipException("Wrong Local header signature: " - + Integer.toHexString(header)); + + Integer.toHexString(header)); /* skip version */ readLeShort(); flags = readLeShort(); @@ -175,36 +175,36 @@ public class ZipInputStream extends InflaterInputStream implements ZipConstants String name; try { - name = new String(buffer, "UTF-8"); + name = new String(buffer, "UTF-8"); } catch (UnsupportedEncodingException uee) { - throw new AssertionError(uee); + throw new AssertionError(uee); } - + entry = createZipEntry(name); entryAtEOF = false; entry.setMethod(method); if ((flags & 8) == 0) { - entry.setCrc(crc & 0xffffffffL); - entry.setSize(size & 0xffffffffL); - entry.setCompressedSize(csize & 0xffffffffL); + entry.setCrc(crc & 0xffffffffL); + entry.setSize(size & 0xffffffffL); + entry.setCompressedSize(csize & 0xffffffffL); } entry.setDOSTime(dostime); if (extraLen > 0) { - byte[] extra = new byte[extraLen]; - readFully(extra); - entry.setExtra(extra); + byte[] extra = new byte[extraLen]; + readFully(extra); + entry.setExtra(extra); } if (method == ZipOutputStream.DEFLATED && avail > 0) { - System.arraycopy(buf, len - avail, buf, 0, avail); - len = avail; - avail = 0; - inf.setInput(buf, 0, len); + System.arraycopy(buf, len - avail, buf, 0, avail); + len = avail; + avail = 0; + inf.setInput(buf, 0, len); } return entry; } @@ -232,33 +232,33 @@ public class ZipInputStream extends InflaterInputStream implements ZipConstants if (method == ZipOutputStream.DEFLATED) { - if ((flags & 8) != 0) - { - /* We don't know how much we must skip, read until end. */ - byte[] tmp = new byte[2048]; - while (read(tmp) > 0) - ; - - /* read will close this entry */ - return; - } - csize -= inf.getTotalIn(); - avail = inf.getRemaining(); + if ((flags & 8) != 0) + { + /* We don't know how much we must skip, read until end. */ + byte[] tmp = new byte[2048]; + while (read(tmp) > 0) + ; + + /* read will close this entry */ + return; + } + csize -= inf.getTotalIn(); + avail = inf.getRemaining(); } if (avail > csize && csize >= 0) avail -= csize; else { - csize -= avail; - avail = 0; - while (csize != 0) - { - long skipped = in.skip(csize & 0xffffffffL); - if (skipped <= 0) - throw new ZipException("zip archive ends early."); - csize -= skipped; - } + csize -= avail; + avail = 0; + while (csize != 0) + { + long skipped = in.skip(csize & 0xffffffffL); + if (skipped <= 0) + throw new ZipException("zip archive ends early."); + csize -= skipped; + } } size = 0; @@ -307,40 +307,40 @@ public class ZipInputStream extends InflaterInputStream implements ZipConstants switch (method) { case ZipOutputStream.DEFLATED: - len = super.read(b, off, len); - if (len < 0) - { - if (!inf.finished()) - throw new ZipException("Inflater not finished!?"); - avail = inf.getRemaining(); - if ((flags & 8) != 0) - readDataDescr(); - - if (inf.getTotalIn() != csize - || inf.getTotalOut() != size) - throw new ZipException("size mismatch: "+csize+";"+size+" <-> "+inf.getTotalIn()+";"+inf.getTotalOut()); - inf.reset(); - finished = true; - } - break; - + len = super.read(b, off, len); + if (len < 0) + { + if (!inf.finished()) + throw new ZipException("Inflater not finished!?"); + avail = inf.getRemaining(); + if ((flags & 8) != 0) + readDataDescr(); + + if (inf.getTotalIn() != csize + || inf.getTotalOut() != size) + throw new ZipException("size mismatch: "+csize+";"+size+" <-> "+inf.getTotalIn()+";"+inf.getTotalOut()); + inf.reset(); + finished = true; + } + break; + case ZipOutputStream.STORED: - if (len > csize && csize >= 0) - len = csize; - - len = readBuf(b, off, len); - if (len > 0) - { - csize -= len; - size -= len; - } - - if (csize == 0) - finished = true; - else if (len < 0) - throw new ZipException("EOF in stored block"); - break; + if (len > csize && csize >= 0) + len = csize; + + len = readBuf(b, off, len); + if (len > 0) + { + csize -= len; + size -= len; + } + + if (csize == 0) + finished = true; + else if (len < 0) + throw new ZipException("EOF in stored block"); + break; } if (len > 0) @@ -348,11 +348,11 @@ public class ZipInputStream extends InflaterInputStream implements ZipConstants if (finished) { - if ((crc.getValue() & 0xffffffffL) != entry.getCrc()) - throw new ZipException("CRC mismatch"); - crc.reset(); - entry = null; - entryAtEOF = true; + if ((crc.getValue() & 0xffffffffL) != entry.getCrc()) + throw new ZipException("CRC mismatch"); + crc.reset(); + entry = null; + entryAtEOF = true; } return len; } @@ -374,7 +374,7 @@ public class ZipInputStream extends InflaterInputStream implements ZipConstants * to new ZipEntry(name). * @param name the name of the zip entry. */ - protected ZipEntry createZipEntry(String name) + protected ZipEntry createZipEntry(String name) { return new ZipEntry(name); } diff --git a/libjava/classpath/java/util/zip/ZipOutputStream.java b/libjava/classpath/java/util/zip/ZipOutputStream.java index d292f7d..bc1c3e9 100644 --- a/libjava/classpath/java/util/zip/ZipOutputStream.java +++ b/libjava/classpath/java/util/zip/ZipOutputStream.java @@ -54,7 +54,7 @@ import java.util.Vector; * * This class is not thread safe. * - * @author Jochen Hoenicke + * @author Jochen Hoenicke */ public class ZipOutputStream extends DeflaterOutputStream implements ZipConstants { @@ -79,7 +79,7 @@ public class ZipOutputStream extends DeflaterOutputStream implements ZipConstant * Compression method. This method doesn't compress at all. */ public static final int STORED = 0; - + /** * Compression method. This method uses the Deflater. */ @@ -105,17 +105,17 @@ public class ZipOutputStream extends DeflaterOutputStream implements ZipConstant byte[] commentBytes; try { - commentBytes = comment.getBytes("UTF-8"); + commentBytes = comment.getBytes("UTF-8"); } catch (UnsupportedEncodingException uee) { - throw new AssertionError(uee); + throw new AssertionError(uee); } if (commentBytes.length > 0xffff) throw new IllegalArgumentException("Comment too long."); zipComment = commentBytes; } - + /** * Sets default compression method. If the Zip entry specifies * another method its method takes precedence. @@ -133,7 +133,7 @@ public class ZipOutputStream extends DeflaterOutputStream implements ZipConstant /** * Sets default compression level. The new level will be activated - * immediately. + * immediately. * @exception IllegalArgumentException if level is not supported. * @see Deflater */ @@ -141,11 +141,11 @@ public class ZipOutputStream extends DeflaterOutputStream implements ZipConstant { def.setLevel(level); } - + /** * Write an unsigned short in little endian byte order. */ - private void writeLeShort(int value) throws IOException + private void writeLeShort(int value) throws IOException { out.write(value & 0xff); out.write((value >> 8) & 0xff); @@ -154,7 +154,7 @@ public class ZipOutputStream extends DeflaterOutputStream implements ZipConstant /** * Write an int in little endian byte order. */ - private void writeLeInt(int value) throws IOException + private void writeLeInt(int value) throws IOException { writeLeShort(value); writeLeShort(value >> 16); @@ -192,27 +192,27 @@ public class ZipOutputStream extends DeflaterOutputStream implements ZipConstant if (method == STORED) { - if (entry.getCompressedSize() >= 0) - { - if (entry.getSize() < 0) - entry.setSize(entry.getCompressedSize()); - else if (entry.getSize() != entry.getCompressedSize()) - throw new ZipException - ("Method STORED, but compressed size != size"); - } - else - entry.setCompressedSize(entry.getSize()); - - if (entry.getSize() < 0) - throw new ZipException("Method STORED, but size not set"); - if (entry.getCrc() < 0) - throw new ZipException("Method STORED, but crc not set"); + if (entry.getCompressedSize() >= 0) + { + if (entry.getSize() < 0) + entry.setSize(entry.getCompressedSize()); + else if (entry.getSize() != entry.getCompressedSize()) + throw new ZipException + ("Method STORED, but compressed size != size"); + } + else + entry.setCompressedSize(entry.getSize()); + + if (entry.getSize() < 0) + throw new ZipException("Method STORED, but size not set"); + if (entry.getCrc() < 0) + throw new ZipException("Method STORED, but crc not set"); } else if (method == DEFLATED) { - if (entry.getCompressedSize() < 0 - || entry.getSize() < 0 || entry.getCrc() < 0) - flags |= 8; + if (entry.getCompressedSize() < 0 + || entry.getSize() < 0 || entry.getCrc() < 0) + flags |= 8; } if (curEntry != null) @@ -228,30 +228,30 @@ public class ZipOutputStream extends DeflaterOutputStream implements ZipConstant /* Write the local file header */ writeLeInt(LOCSIG); writeLeShort(method == STORED - ? ZIP_STORED_VERSION : ZIP_DEFLATED_VERSION); + ? ZIP_STORED_VERSION : ZIP_DEFLATED_VERSION); writeLeShort(flags); writeLeShort(method); writeLeInt(entry.getDOSTime()); if ((flags & 8) == 0) { - writeLeInt((int)entry.getCrc()); - writeLeInt((int)entry.getCompressedSize()); - writeLeInt((int)entry.getSize()); + writeLeInt((int)entry.getCrc()); + writeLeInt((int)entry.getCompressedSize()); + writeLeInt((int)entry.getSize()); } else { - writeLeInt(0); - writeLeInt(0); - writeLeInt(0); + writeLeInt(0); + writeLeInt(0); + writeLeInt(0); } byte[] name; try { - name = entry.getName().getBytes("UTF-8"); + name = entry.getName().getBytes("UTF-8"); } catch (UnsupportedEncodingException uee) { - throw new AssertionError(uee); + throw new AssertionError(uee); } if (name.length > 0xffff) throw new ZipException("Name too long."); @@ -294,31 +294,31 @@ public class ZipOutputStream extends DeflaterOutputStream implements ZipConstant curEntry.setSize(size); else if (curEntry.getSize() != size) throw new ZipException("size was "+size - +", but I expected "+curEntry.getSize()); + +", but I expected "+curEntry.getSize()); if (curEntry.getCompressedSize() < 0) curEntry.setCompressedSize(csize); else if (curEntry.getCompressedSize() != csize) throw new ZipException("compressed size was "+csize - +", but I expected "+curEntry.getSize()); + +", but I expected "+curEntry.getSize()); if (curEntry.getCrc() < 0) curEntry.setCrc(crc.getValue()); else if (curEntry.getCrc() != crc.getValue()) throw new ZipException("crc was " + Long.toHexString(crc.getValue()) - + ", but I expected " - + Long.toHexString(curEntry.getCrc())); + + ", but I expected " + + Long.toHexString(curEntry.getCrc())); offset += csize; /* Now write the data descriptor entry if needed. */ if (curMethod == DEFLATED && (curEntry.flags & 8) != 0) { - writeLeInt(EXTSIG); - writeLeInt((int)curEntry.getCrc()); - writeLeInt((int)curEntry.getCompressedSize()); - writeLeInt((int)curEntry.getSize()); - offset += EXTHDR; + writeLeInt(EXTSIG); + writeLeInt((int)curEntry.getCrc()); + writeLeInt((int)curEntry.getCompressedSize()); + writeLeInt((int)curEntry.getSize()); + offset += EXTHDR; } entries.addElement(curEntry); @@ -338,12 +338,12 @@ public class ZipOutputStream extends DeflaterOutputStream implements ZipConstant switch (curMethod) { case DEFLATED: - super.write(b, off, len); - break; - + super.write(b, off, len); + break; + case STORED: - out.write(b, off, len); - break; + out.write(b, off, len); + break; } crc.update(b, off, len); @@ -364,65 +364,65 @@ public class ZipOutputStream extends DeflaterOutputStream implements ZipConstant int numEntries = 0; int sizeEntries = 0; - + Enumeration e = entries.elements(); while (e.hasMoreElements()) { - ZipEntry entry = (ZipEntry) e.nextElement(); - - int method = entry.getMethod(); - writeLeInt(CENSIG); - writeLeShort(method == STORED - ? ZIP_STORED_VERSION : ZIP_DEFLATED_VERSION); - writeLeShort(method == STORED - ? ZIP_STORED_VERSION : ZIP_DEFLATED_VERSION); - writeLeShort(entry.flags); - writeLeShort(method); - writeLeInt(entry.getDOSTime()); - writeLeInt((int)entry.getCrc()); - writeLeInt((int)entry.getCompressedSize()); - writeLeInt((int)entry.getSize()); - - byte[] name; - try - { - name = entry.getName().getBytes("UTF-8"); - } - catch (UnsupportedEncodingException uee) - { - throw new AssertionError(uee); - } - if (name.length > 0xffff) - throw new ZipException("Name too long."); - byte[] extra = entry.getExtra(); - if (extra == null) - extra = new byte[0]; - String str = entry.getComment(); - byte[] comment; - try - { - comment = str != null ? str.getBytes("UTF-8") : new byte[0]; - } - catch (UnsupportedEncodingException uee) - { - throw new AssertionError(uee); - } - if (comment.length > 0xffff) - throw new ZipException("Comment too long."); - - writeLeShort(name.length); - writeLeShort(extra.length); - writeLeShort(comment.length); - writeLeShort(0); /* disk number */ - writeLeShort(0); /* internal file attr */ - writeLeInt(0); /* external file attr */ - writeLeInt(entry.offset); - - out.write(name); - out.write(extra); - out.write(comment); - numEntries++; - sizeEntries += CENHDR + name.length + extra.length + comment.length; + ZipEntry entry = (ZipEntry) e.nextElement(); + + int method = entry.getMethod(); + writeLeInt(CENSIG); + writeLeShort(method == STORED + ? ZIP_STORED_VERSION : ZIP_DEFLATED_VERSION); + writeLeShort(method == STORED + ? ZIP_STORED_VERSION : ZIP_DEFLATED_VERSION); + writeLeShort(entry.flags); + writeLeShort(method); + writeLeInt(entry.getDOSTime()); + writeLeInt((int)entry.getCrc()); + writeLeInt((int)entry.getCompressedSize()); + writeLeInt((int)entry.getSize()); + + byte[] name; + try + { + name = entry.getName().getBytes("UTF-8"); + } + catch (UnsupportedEncodingException uee) + { + throw new AssertionError(uee); + } + if (name.length > 0xffff) + throw new ZipException("Name too long."); + byte[] extra = entry.getExtra(); + if (extra == null) + extra = new byte[0]; + String str = entry.getComment(); + byte[] comment; + try + { + comment = str != null ? str.getBytes("UTF-8") : new byte[0]; + } + catch (UnsupportedEncodingException uee) + { + throw new AssertionError(uee); + } + if (comment.length > 0xffff) + throw new ZipException("Comment too long."); + + writeLeShort(name.length); + writeLeShort(extra.length); + writeLeShort(comment.length); + writeLeShort(0); /* disk number */ + writeLeShort(0); /* internal file attr */ + writeLeInt(0); /* external file attr */ + writeLeInt(entry.offset); + + out.write(name); + out.write(extra); + out.write(comment); + numEntries++; + sizeEntries += CENHDR + name.length + extra.length + comment.length; } writeLeInt(ENDSIG); |