[SCM] Openide utilities library branch, upstream, updated. upstream/6.7.1

Giovanni Mascellani gmascellani-guest at alioth.debian.org
Sat Nov 14 19:05:20 UTC 2009


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Openide utilities library".

The branch, upstream has been updated
       via  1673bd17980bd558e85f5e1c707802e6ee5d76a6 (commit)
      from  b29c5c42627264099eddaa0bc8b87cac24f1e24b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 apichanges.xml                                     |  121 +---
 arch.xml                                           |   17 +-
 build.xml                                          |    2 +-
 nbproject/org-openide-util.sig                     |   29 +-
 nbproject/project.properties                       |    4 +-
 nbproject/project.xml                              |   16 +-
 .../services/java.net.URLStreamHandlerFactory      |    1 -
 .../services/javax.annotation.processing.Processor |    1 -
 .../netbeans/modules/openide/util/AWTBridge.java   |    2 +-
 .../util/AbstractServiceProviderProcessor.java     |  289 ------
 .../modules/openide/util/ActionsBridge.java        |   22 +-
 .../openide/util/NamedServicesProvider.java        |    2 +-
 .../modules/openide/util/PreferencesProvider.java  |    2 +-
 .../openide/util/ProxyURLStreamHandlerFactory.java |   83 --
 .../openide/util/ServiceProviderProcessor.java     |  266 ++++--
 .../URLStreamHandlerRegistrationProcessor.java     |   79 --
 src/org/openide/ErrorManager.java                  |    2 +-
 src/org/openide/LifecycleManager.java              |   12 +-
 src/org/openide/ServiceType.java                   |    2 +-
 src/org/openide/util/AsyncGUIJob.java              |    2 +-
 src/org/openide/util/AsyncInitSupport.java         |    2 +-
 src/org/openide/util/Bundle.properties             |    2 +-
 src/org/openide/util/Cancellable.java              |    2 +-
 src/org/openide/util/ChangeSupport.java            |    9 +-
 src/org/openide/util/ContextAwareAction.java       |    2 +-
 src/org/openide/util/ContextGlobalProvider.java    |    2 +-
 src/org/openide/util/EditableProperties.java       |  924 --------------------
 src/org/openide/util/Enumerations.java             |    2 +-
 src/org/openide/util/Exceptions.java               |    2 +-
 src/org/openide/util/HelpCtx.java                  |    2 +-
 src/org/openide/util/ImageUtilities.java           |   89 +--
 src/org/openide/util/Lookup.java                   |   31 +-
 src/org/openide/util/LookupEvent.java              |    2 +-
 src/org/openide/util/LookupListener.java           |    2 +-
 src/org/openide/util/MapFormat.java                |    2 +-
 src/org/openide/util/Mutex.java                    |    2 +-
 src/org/openide/util/MutexException.java           |    2 +-
 src/org/openide/util/NbBundle.java                 |   66 +-
 src/org/openide/util/NbCollections.java            |    2 +-
 src/org/openide/util/NbPreferences.java            |    2 +-
 src/org/openide/util/NotImplementedException.java  |    2 +-
 src/org/openide/util/Parameters.java               |    2 +-
 src/org/openide/util/Queue.java                    |    2 +-
 src/org/openide/util/RE13.java                     |    2 +-
 src/org/openide/util/RequestProcessor.java         |  110 +--
 src/org/openide/util/SharedClassObject.java        |    2 +-
 src/org/openide/util/Task.java                     |   10 +-
 src/org/openide/util/TaskListener.java             |    2 +-
 src/org/openide/util/TimedSoftReference.java       |    2 +-
 src/org/openide/util/TopologicalSortException.java |    2 +-
 .../openide/util/URLStreamHandlerRegistration.java |   78 --
 src/org/openide/util/Union2.java                   |    2 +-
 src/org/openide/util/UserCancelException.java      |    2 +-
 src/org/openide/util/UserQuestionException.java    |    2 +-
 src/org/openide/util/Utilities.java                |    4 +-
 .../openide/util/UtilitiesCompositeActionMap.java  |    2 +-
 src/org/openide/util/WeakListenerImpl.java         |    2 +-
 src/org/openide/util/WeakListeners.java            |    2 +-
 src/org/openide/util/WeakSet.java                  |    2 +-
 src/org/openide/util/actions/ActionPerformer.java  |    2 +-
 .../openide/util/actions/BooleanStateAction.java   |    2 +-
 .../openide/util/actions/CallableSystemAction.java |   19 +-
 .../openide/util/actions/CallbackSystemAction.java |   25 +-
 src/org/openide/util/actions/Presenter.java        |    2 +-
 src/org/openide/util/actions/SystemAction.java     |    2 +-
 .../openide/util/datatransfer/Bundle.properties    |    2 +-
 .../openide/util/datatransfer/ClipboardEvent.java  |    2 +-
 .../util/datatransfer/ClipboardListener.java       |    2 +-
 src/org/openide/util/datatransfer/ExClipboard.java |    2 +-
 .../openide/util/datatransfer/ExTransferable.java  |    2 +-
 .../util/datatransfer/MultiTransferObject.java     |    2 +-
 src/org/openide/util/datatransfer/NewType.java     |    2 +-
 src/org/openide/util/datatransfer/PasteType.java   |    2 +-
 .../util/datatransfer/TransferListener.java        |    2 +-
 src/org/openide/util/doc-files/api.html            |    2 +-
 src/org/openide/util/io/FoldingIOException.java    |    2 +-
 src/org/openide/util/io/NbMarshalledObject.java    |    2 +-
 src/org/openide/util/io/NbObjectInputStream.java   |    2 +-
 src/org/openide/util/io/NbObjectOutputStream.java  |    7 +-
 src/org/openide/util/io/NullInputStream.java       |    2 +-
 src/org/openide/util/io/NullOutputStream.java      |    2 +-
 src/org/openide/util/io/OperationException.java    |    2 +-
 src/org/openide/util/io/ReaderInputStream.java     |    2 +-
 src/org/openide/util/io/SafeException.java         |    2 +-
 src/org/openide/util/lookup/ALPairComparator.java  |    2 +-
 src/org/openide/util/lookup/AbstractLookup.java    |    2 +-
 src/org/openide/util/lookup/ArrayStorage.java      |   41 +-
 src/org/openide/util/lookup/DelegatingStorage.java |    2 +-
 src/org/openide/util/lookup/ExcludingLookup.java   |    2 +-
 src/org/openide/util/lookup/InheritanceTree.java   |    2 +-
 src/org/openide/util/lookup/InstanceContent.java   |    2 +-
 src/org/openide/util/lookup/Lookups.java           |   16 +-
 .../openide/util/lookup/MetaInfServicesLookup.java |   34 +-
 src/org/openide/util/lookup/ProxyLookup.java       |    2 +-
 src/org/openide/util/lookup/SimpleLookup.java      |    2 +-
 src/org/openide/util/lookup/SimpleProxyLookup.java |    2 +-
 src/org/openide/util/lookup/SingletonLookup.java   |    2 +-
 src/org/openide/util/lookup/WaitableResult.java    |    2 +-
 src/org/openide/util/lookup/package.html           |    2 +-
 src/org/openide/xml/EntityCatalog.java             |    2 +-
 src/org/openide/xml/XMLUtil.java                   |   16 +-
 src/org/openide/xml/package.html                   |    2 +-
 .../util/ProxyURLStreamHandlerFactoryTest.java     |   70 --
 .../src/org/openide/ErrorManagerCyclicDepTest.java |    2 +-
 .../ErrorManagerDelegatesToLoggingTest.java        |    2 +-
 test/unit/src/org/openide/ErrorManagerTest.java    |    2 +-
 .../src/org/openide/util/ChangeSupportTest.java    |    2 +-
 .../org/openide/util/EditablePropertiesTest.java   |  417 ---------
 .../src/org/openide/util/EnumerationsTest.java     |  133 ++--
 test/unit/src/org/openide/util/ExceptionsTest.java |    2 +-
 .../openide/util/ImageUtilitiesGetLoaderTest.java  |    2 +-
 .../src/org/openide/util/ImageUtilitiesTest.java   |    2 +-
 test/unit/src/org/openide/util/InitJobTest.java    |    2 +-
 test/unit/src/org/openide/util/MapFormatTest.java  |    2 +-
 test/unit/src/org/openide/util/MutexTest.java      |    2 +-
 test/unit/src/org/openide/util/MutexWrapTest.java  |    2 +-
 test/unit/src/org/openide/util/NbBundleTest.java   |   11 +-
 .../src/org/openide/util/NbCollectionsTest.java    |    2 +-
 test/unit/src/org/openide/util/ParametersTest.java |    2 +-
 .../src/org/openide/util/RequestProcessorTest.java |   78 +--
 .../org/openide/util/SharedClassObjectTest.java    |    2 +-
 test/unit/src/org/openide/util/TaskTest.java       |    2 +-
 test/unit/src/org/openide/util/Union2Test.java     |    2 +-
 .../src/org/openide/util/UtilitiesActionsTest.java |    2 +-
 .../org/openide/util/UtilitiesActiveQueueTest.java |    2 +-
 .../util/UtilitiesFileURLConvertorTest.java        |    2 +-
 .../openide/util/UtilitiesProgressCursorTest.java  |    2 +-
 test/unit/src/org/openide/util/UtilitiesTest.java  |    2 +-
 .../openide/util/UtilitiesTopologicalSortTest.java |    2 +-
 .../org/openide/util/UtilitiesTranslateTest.java   |    2 +-
 .../org/openide/util/WeakListenersSpeedTest.java   |    2 +-
 .../src/org/openide/util/WeakListenersTest.java    |    2 +-
 test/unit/src/org/openide/util/WeakSetTest.java    |    2 +-
 .../org/openide/util/actions/ActionsInfraHid.java  |    2 +-
 .../org/openide/util/actions/AsynchronousTest.java |    2 +-
 .../util/actions/BooleanStateActionTest.java       |    2 +-
 .../util/actions/CallbackSystemActionTest.java     |    2 +-
 .../org/openide/util/actions/SystemActionTest.java |    2 +-
 .../unit/src/org/openide/util/data/test.properties |  134 ---
 .../openide/util/datatransfer/ExClipboardTest.java |    2 +-
 .../util/datatransfer/ExTransferableTest.java      |    2 +-
 .../src/org/openide/util/io/SafeExceptionTest.java |    2 +-
 .../org/openide/util/io/SerializationEnumTest.java |    5 +-
 .../lookup/AbstractLookupArrayStorageTest.java     |    2 +-
 .../lookup/AbstractLookupAsynchExecutorTest.java   |    2 +-
 .../openide/util/lookup/AbstractLookupBaseHid.java |  276 +++---
 .../util/lookup/AbstractLookupExecutorTest.java    |    2 +-
 .../util/lookup/AbstractLookupMemoryTest.java      |   24 +-
 .../openide/util/lookup/AbstractLookupTest.java    |    9 +-
 .../openide/util/lookup/ExcludingLookupTest.java   |    3 +-
 .../openide/util/lookup/InheritanceTreeTest.java   |    2 +-
 .../util/lookup/InitializationBug44134Test.java    |    2 +-
 .../src/org/openide/util/lookup/LookupBugTest.java |    2 +-
 .../org/openide/util/lookup/LookupsProxyTest.java  |    3 +-
 .../util/lookup/MetaInfServicesLookupTest.java     |  191 ++---
 .../lookup/MetaInfServicesLookupTestRunnable.java  |    2 +-
 .../util/lookup/NamedServicesLookupTest.java       |   29 +-
 .../org/openide/util/lookup/PathInLookupTest.java  |  112 ---
 .../util/lookup/PrefixServicesLookupTest.java      |    2 +-
 .../org/openide/util/lookup/ProxyLookupTest.java   |    4 +-
 .../org/openide/util/lookup/SimpleLookupTest.java  |   20 +-
 .../lookup/SimpleProxyLookupIssue42244Test.java    |    3 +-
 .../SimpleProxyLookupSpeedIssue42244Test.java      |    2 +-
 .../openide/util/lookup/SimpleProxyLookupTest.java |    8 +-
 .../org/openide/util/test/MockChangeListener.java  |    2 +-
 .../openide/util/test/MockChangeListenerTest.java  |    2 +-
 .../unit/src/org/openide/util/test/MockLookup.java |    2 +-
 .../src/org/openide/util/test/MockLookupTest.java  |    2 +-
 .../util/test/MockPropertyChangeListener.java      |    2 +-
 .../util/test/MockPropertyChangeListenerTest.java  |    2 +-
 .../openide/util/test/RestrictThreadCreation.java  |    2 +-
 .../src/org/openide/util/test/TestFileUtils.java   |   21 -
 .../src/org/openide/util/test/package-info.java    |    2 +-
 .../src/org/openide/xml/XMLUtilReflectionTest.java |    2 +-
 test/unit/src/org/openide/xml/XMLUtilTest.java     |    2 +-
 175 files changed, 757 insertions(+), 3465 deletions(-)

diff --git a/apichanges.xml b/apichanges.xml
index d91cbde..9ff91da 100644
--- a/apichanges.xml
+++ b/apichanges.xml
@@ -2,7 +2,7 @@
 <!--
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
 
 
 The contents of this file are subject to the terms of either the GNU
@@ -49,125 +49,6 @@ made subject to such option by the copyright holder.
     <apidef name="actions">Actions API</apidef>
 </apidefs>
 <changes>
-    <change id="URLStreamHandlerRegistration">
-        <api name="util"/>
-        <summary>Added <code>@URLStreamHandlerRegistration</code></summary>
-        <version major="7" minor="31"/>
-        <date day="30" month="10" year="2009"/>
-        <author login="jglick"/>
-        <compatibility addition="yes">
-            <p>
-                Modules registering <code>URLStreamHandlerFactory</code>s into
-                global lookup will still work but are advised to switch to this
-                annotation, which is both easier to use and more efficient.
-            </p>
-        </compatibility>
-        <description>
-            <p>
-                Introduced an annotation to register URL protocols.
-            </p>
-        </description>
-        <class package="org.openide.util" name="URLStreamHandlerRegistration"/>
-        <issue number="20838"/>
-    </change>
-    <change id="ImageUtilities.createDisabled">
-        <api name="util"/>
-        <summary><code>ImageUtilities.createDisabledIcon</code> and <code>ImageUtilities.createDisabledImage</code> added.</summary>
-        <version major="7" minor="28"/>
-        <date day="10" month="9" year="2009"/>
-        <author login="t_h"/>
-        <compatibility addition="yes"/>
-        <description>
-            <p>
-                <code>ImageUtilities.createDisabledIcon</code> now can be used
-                to create low color saturation icon for disabled buttons. Also
-                <code>ImageUtilities.createDisabledImage</code> was added.
-            </p>
-        </description>
-        <class package="org.openide.util" name="ImageUtilities"/>
-        <issue number="171400"/>
-    </change>
-    <change id="NbBundle.varargs">
-        <api name="util"/>
-        <summary><code>NbBundle.getMessage</code> can take arbitrarily many format arguments</summary>
-        <version major="7" minor="27"/>
-        <date day="5" month="8" year="2009"/>
-        <author login="jglick"/>
-        <compatibility addition="yes"/>
-        <description>
-            <p>
-                <code>NbBundle.getMessage</code> now has a varargs overload that
-                permits you to specify four or more format arguments without
-                explicitly constructing an array.
-            </p>
-        </description>
-        <class package="org.openide.util" name="NbBundle"/>
-    </change>
-    <change id="EditableProperties">
-        <api name="util"/>
-        <summary>Copied API from <code>project.ant</code> for <code>EditableProperties</code>.</summary>
-        <version major="7" minor="26"/>
-        <date day="29" month="7" year="2009"/>
-        <author login="jglick"/>
-        <compatibility addition="yes"/>
-        <description>
-            <p>
-                 <code>EditableProperties</code> now available in Utilities API
-                 so it can be used more broadly.
-            </p>
-        </description>
-        <class package="org.openide.util" name="EditableProperties"/>
-        <issue number="66577"/>
-    </change>
-    <change id="LifecycleManager.markForRestart">
-        <api name="util"/>
-        <summary>Added way to request that the platform restart.</summary>
-        <version major="7" minor="25"/>
-        <date day="14" month="7" year="2009"/>
-        <author login="jglick"/>
-        <compatibility addition="yes"/>
-        <description>
-            <p>
-                 Can now use <code>LifecycleManager.markForRestart</code> to cause
-                 the application to restart after exiting. Formerly needed to
-                 create special files in the userdir or use similar tricks.
-            </p>
-        </description>
-        <class package="org.openide" name="LifecycleManager"/>
-        <issue number="168257"/>
-    </change>
-    <change id="org.openide.util.Lookup.paths">
-        <api name="lookup"/>
-        <summary>Added
-            <code>org.openide.util.Lookup.paths</code> property
-        </summary>
-        <version major="7" minor="24"/>
-        <date day="19" month="6" year="2009"/>
-        <author login="jtulach"/>
-        <compatibility addition="yes"/>
-        <description>
-            <p>
-                 Better way to integrate Lookup.getDefault() and system filesystem.
-            </p>
-        </description>
-        <class package="org.openide.util" name="Lookup"/>
-        <issue number="166782"/>
-    </change>
-    <change id="enableStackTraces">
-        <api name="util"/>
-        <summary>Added constructor <code>RequestProcessor(String name, int throughput, boolean interruptThread, boolean enableStackTraces)</code></summary>
-        <version major="7" minor="24"/>
-        <date day="8" month="6" year="2009"/>
-        <author login="rmichalsky"/>
-        <compatibility addition="yes"/>
-        <description>
-            <p>
-                Newly added constructor allows to disable (slow) filling stack traces before posting each task. 
-            </p>
-        </description>
-        <class package="org.openide.util" name="RequestProcessor"/>
-        <issue number="165862"/>
-    </change>
     <change id="ImageUtilities.loadImageIcon">
         <api name="util"/>
         <summary>Added <code>loadImageIcon(String resource, boolean localized)</code></summary>
diff --git a/arch.xml b/arch.xml
index 5b5999c..2864ffa 100644
--- a/arch.xml
+++ b/arch.xml
@@ -2,7 +2,7 @@
 <!--
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
 
 
 The contents of this file are subject to the terms of either the GNU
@@ -514,21 +514,6 @@ org.my.netbeans.extramodule.ExtraTip
         is the result of <a href="@TOP@/org/openide/util/Lookup.html#getDefault()">Lookup.getDefault()</a>.
     </api>
     </li>
-
-    <li>
-    <api type="export" group="property" name="org.openide.util.Lookup.paths" category="devel">
-        Sometimes it may be useful for the Lookup to contains objects from
-        some system file system folder. This can be done with
-        <code>org.openide.util.Lookup.paths=Folder1:Folder2:Folder3</code>.
-        If this property is set prior to first call to
-        <a href="@TOP@/org/openide/util/Lookup.html#getDefault()">Lookup.getDefault()</a>,
-        it is split into pieces (separator is <code>':'</code>) and individual
-        parts are then used to construct <code>Lookups.forPath("Folder1")</code>,
-        etc. All these lookups then become part of the
-        <a href="@TOP@/org/openide/util/Lookup.html#getDefault()">Lookup.getDefault()</a>
-        one. This property works since version 7.24
-    </api>
-    </li>
     
   </ul>
  </answer>
diff --git a/build.xml b/build.xml
index 7b0f339..aaa1376 100644
--- a/build.xml
+++ b/build.xml
@@ -2,7 +2,7 @@
 <!--
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
 
 
 The contents of this file are subject to the terms of either the GNU
diff --git a/nbproject/org-openide-util.sig b/nbproject/org-openide-util.sig
index 7563ddf..2c6948c 100644
--- a/nbproject/org-openide-util.sig
+++ b/nbproject/org-openide-util.sig
@@ -1,5 +1,5 @@
 #Signature file v4.0
-#Version 7.22.1
+#Version 7.18.1
 
 CLSS public java.awt.datatransfer.Clipboard
 cons public Clipboard(java.lang.String)
@@ -576,7 +576,7 @@ meth public static <%0 extends java.lang.Throwable> {%%0} attachMessage({%%0},ja
 meth public static java.lang.String findLocalizedMessage(java.lang.Throwable)
 meth public static void printStackTrace(java.lang.Throwable)
 supr java.lang.Object
-hfds LOC_MSG_PLACEHOLDER,LOG
+hfds LOC_MSG_PLACEHOLDER
 hcls AnnException,OwnLevel
 
 CLSS public final org.openide.util.HelpCtx
@@ -609,7 +609,6 @@ meth public final static java.awt.Image loadImage(java.lang.String,boolean)
 meth public final static java.awt.Image mergeImages(java.awt.Image,java.awt.Image,int,int)
 meth public final static java.lang.String getImageToolTip(java.awt.Image)
 meth public final static javax.swing.Icon image2Icon(java.awt.Image)
-meth public final static javax.swing.ImageIcon loadImageIcon(java.lang.String,boolean)
 supr java.lang.Object
 hfds ERR,NO_ICON,PNG_READER,TOOLTIP_SEPAR,cache,component,compositeCache,currentLoader,extraInitialSlashes,imageToolTipCache,loaderQuery,localizedCache,mediaTrackerID,noLoaderWarned,tracker
 hcls ActiveRef,CompositeImageKey,ToolTipImage,ToolTipImageKey
@@ -771,7 +770,7 @@ meth public static void setBranding(java.lang.String)
 meth public static void setClassLoaderFinder(org.openide.util.NbBundle$ClassLoaderFinder)
  anno 0 java.lang.Deprecated()
 supr java.lang.Object
-hfds LOG,USE_DEBUG_LOADER,brandingToken,bundleCache,localizedFileCache
+hfds USE_DEBUG_LOADER,brandingToken,bundleCache,localizedFileCache
 hcls AttributesMap,DebugLoader,LocaleIterator,MergedBundle,PBundle
 
 CLSS public abstract interface static org.openide.util.NbBundle$ClassLoaderFinder
@@ -1022,7 +1021,6 @@ meth public static java.lang.String escapeParameters(java.lang.String[])
 meth public static java.lang.String getClassName(java.lang.Class)
 meth public static java.lang.String getShortClassName(java.lang.Class)
 meth public static java.lang.String keyToString(javax.swing.KeyStroke)
-meth public static java.lang.String keyToString(javax.swing.KeyStroke,boolean)
 meth public static java.lang.String replaceString(java.lang.String,java.lang.String,java.lang.String)
 meth public static java.lang.String translate(java.lang.String)
 meth public static java.lang.String wrapString(java.lang.String,int,boolean,boolean)
@@ -1044,8 +1042,8 @@ meth public static javax.swing.KeyStroke stringToKey(java.lang.String)
 meth public static javax.swing.KeyStroke[] stringToKeys(java.lang.String)
 meth public static org.openide.util.Lookup actionsGlobalContext()
 supr java.lang.Object
-hfds ALT_WILDCARD_MASK,CTRL_WILDCARD_MASK,LOG,TRANS_LOCK,TYPICAL_MACOSX_MENU_HEIGHT,clearIntrospector,doClear,global,keywords,namesAndValues,operatingSystem,transExp,transLoader
-hcls NamesAndValues,RE
+hfds ALT_WILDCARD_MASK,CTRL_WILDCARD_MASK,LOG,TRANS_LOCK,TYPICAL_MACOSX_MENU_HEIGHT,activeReferenceQueue,clearIntrospector,doClear,global,keywords,namesAndValues,operatingSystem,transExp,transLoader
+hcls ActiveQueue,NamesAndValues,RE
 
 CLSS public static org.openide.util.Utilities$UnorderableException
  anno 0 java.lang.Deprecated()
@@ -1375,7 +1373,7 @@ meth public final <%0 extends java.lang.Object> {%%0} lookup(java.lang.Class<{%%
 meth public java.lang.String toString()
 supr org.openide.util.Lookup
 hfds count,serialVersionUID,tree,treeLock
-hcls CycleError,ISE,Info,NotifyListeners,R,ReferenceIterator,ReferenceToResult,Storage
+hcls ISE,Info,R,ReferenceIterator,ReferenceToResult,Storage
 
 CLSS public static org.openide.util.lookup.AbstractLookup$Content
 cons public Content()
@@ -1441,21 +1439,6 @@ supr org.openide.util.Lookup
 hfds data
 hcls EmptyInternalData,ImmutableInternalData,R,RealInternalData,SingleInternalData,WeakRef,WeakResult
 
-CLSS public abstract interface !annotation org.openide.util.lookup.ServiceProvider
- anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=SOURCE)
- anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE])
-intf java.lang.annotation.Annotation
-meth public abstract !hasdefault int position()
-meth public abstract !hasdefault java.lang.String path()
-meth public abstract !hasdefault java.lang.String[] supersedes()
-meth public abstract java.lang.Class<?> service()
-
-CLSS public abstract interface !annotation org.openide.util.lookup.ServiceProviders
- anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=SOURCE)
- anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE])
-intf java.lang.annotation.Annotation
-meth public abstract org.openide.util.lookup.ServiceProvider[] value()
-
 CLSS public abstract org.openide.xml.EntityCatalog
 cons public EntityCatalog()
 fld public final static java.lang.String PUBLIC_ID = "-//NetBeans//Entity Mapping Registration 1.0//EN"
diff --git a/nbproject/project.properties b/nbproject/project.properties
index bd7a252..757c676 100644
--- a/nbproject/project.properties
+++ b/nbproject/project.properties
@@ -1,6 +1,6 @@
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 #
-# Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+# Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
 #
 # The contents of this file are subject to the terms of either the GNU
 # General Public License Version 2 only ("GPL") or the Common
@@ -42,7 +42,7 @@ javac.source=1.5
 module.jar.dir=lib
 cp.extra=${nb_all}/apisupport.harness/external/openjdk-javac-6-b12.jar
 
-spec.version.base=7.31.0
+spec.version.base=7.22.1
 
 # For XMLSerializer, needed for XMLUtil.write to work w/ namespaces under JDK 1.4:
 
diff --git a/nbproject/project.xml b/nbproject/project.xml
index 8eeb655..be24604 100644
--- a/nbproject/project.xml
+++ b/nbproject/project.xml
@@ -2,7 +2,7 @@
 <!--
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
 
 
 The contents of this file are subject to the terms of either the GNU
@@ -46,20 +46,6 @@ made subject to such option by the copyright holder.
         <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
             <code-name-base>org.openide.util</code-name-base>
             <module-dependencies/>
-            <test-dependencies>
-                <test-type>
-                    <name>unit</name>
-                    <test-dependency>
-                        <code-name-base>org.netbeans.libs.junit4</code-name-base>
-                        <compile-dependency/>
-                    </test-dependency>
-                    <test-dependency>
-                        <code-name-base>org.netbeans.modules.nbjunit</code-name-base>
-                        <recursive/>
-                        <compile-dependency/>
-                    </test-dependency>
-                </test-type>
-            </test-dependencies>
             <public-packages>
                 <package>org.openide</package>
                 <package>org.openide.util</package>
diff --git a/src/META-INF/services/java.net.URLStreamHandlerFactory b/src/META-INF/services/java.net.URLStreamHandlerFactory
deleted file mode 100644
index 71d8b49..0000000
--- a/src/META-INF/services/java.net.URLStreamHandlerFactory
+++ /dev/null
@@ -1 +0,0 @@
-org.netbeans.modules.openide.util.ProxyURLStreamHandlerFactory
diff --git a/src/META-INF/services/javax.annotation.processing.Processor b/src/META-INF/services/javax.annotation.processing.Processor
index 8f5ba84..33ca6e9 100644
--- a/src/META-INF/services/javax.annotation.processing.Processor
+++ b/src/META-INF/services/javax.annotation.processing.Processor
@@ -1,2 +1 @@
 org.netbeans.modules.openide.util.ServiceProviderProcessor
-org.netbeans.modules.openide.util.URLStreamHandlerRegistrationProcessor
diff --git a/src/org/netbeans/modules/openide/util/AWTBridge.java b/src/org/netbeans/modules/openide/util/AWTBridge.java
index a3dffaf..9ace7a1 100644
--- a/src/org/netbeans/modules/openide/util/AWTBridge.java
+++ b/src/org/netbeans/modules/openide/util/AWTBridge.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/netbeans/modules/openide/util/AbstractServiceProviderProcessor.java b/src/org/netbeans/modules/openide/util/AbstractServiceProviderProcessor.java
deleted file mode 100644
index eec76f2..0000000
--- a/src/org/netbeans/modules/openide/util/AbstractServiceProviderProcessor.java
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- *
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common
- * Development and Distribution License("CDDL") (collectively, the
- * "License"). You may not use this file except in compliance with the
- * License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html
- * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
- * specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header
- * Notice in each file and include the License file at
- * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the
- * License Header, with the fields enclosed by brackets [] replaced by
- * your own identifying information:
- * "Portions Copyrighted [year] [name of copyright owner]"
- *
- * If you wish your version of this file to be governed by only the CDDL
- * or only the GPL Version 2, indicate your decision by adding
- * "[Contributor] elects to include this software in this distribution
- * under the [CDDL or GPL Version 2] license." If you do not indicate a
- * single choice of license, a recipient has the option to distribute
- * your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above.
- * However, if you add GPL Version 2 code and therefore, elected the GPL
- * Version 2 license, then the option applies only if the new code is
- * made subject to such option by the copyright holder.
- *
- * Contributor(s):
- *
- * Portions Copyrighted 2009 Sun Microsystems, Inc.
- */
-
-package org.netbeans.modules.openide.util;
-
-import java.io.BufferedReader;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.lang.annotation.Annotation;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.WeakHashMap;
-import javax.annotation.processing.AbstractProcessor;
-import javax.annotation.processing.ProcessingEnvironment;
-import javax.annotation.processing.RoundEnvironment;
-import javax.lang.model.element.AnnotationMirror;
-import javax.lang.model.element.AnnotationValue;
-import javax.lang.model.element.Element;
-import javax.lang.model.element.ExecutableElement;
-import javax.lang.model.element.Modifier;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.type.TypeMirror;
-import javax.lang.model.util.ElementFilter;
-import javax.tools.Diagnostic.Kind;
-import javax.tools.FileObject;
-import javax.tools.StandardLocation;
-
-/**
- * Infrastructure for generating {@code META-INF/services/*} and
- * {@code META-INF/namedservices/*} registrations from annotations.
- */
-public abstract class AbstractServiceProviderProcessor extends AbstractProcessor {
-
-    private final Map<ProcessingEnvironment,Map<String,List<String>>> outputFilesByProcessor = new WeakHashMap<ProcessingEnvironment,Map<String,List<String>>>();
-    private final Map<ProcessingEnvironment,Map<String,List<Element>>> originatingElementsByProcessor = new WeakHashMap<ProcessingEnvironment,Map<String,List<Element>>>();
-    private final Map<TypeElement,Boolean> verifiedClasses = new WeakHashMap<TypeElement,Boolean>();
-
-    /** For access by subclasses. */
-    protected AbstractServiceProviderProcessor() {}
-
-    public @Override final boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
-        if (roundEnv.errorRaised()) {
-            return false;
-        }
-        if (roundEnv.processingOver()) {
-            writeServices();
-            outputFilesByProcessor.clear();
-            originatingElementsByProcessor.clear();
-            return true;
-        } else {
-            return handleProcess(annotations, roundEnv);
-        }
-    }
-
-    /**
-     * The regular body of {@link #process}.
-     * Called during regular rounds if there are no outstanding errors.
-     * In the last round, one of the processors will write out generated registrations.
-     * @param annotations as in {@link #process}
-     * @param roundEnv as in {@link #process}
-     * @return as in {@link #process}
-     */
-    protected abstract boolean handleProcess(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv);
-
-    /**
-     * Register a service.
-     * If the class does not have an appropriate signature, an error will be printed and the registration skipped.
-     * @param clazz the service implementation type
-     * @param annotation the (top-level) annotation registering the service, for diagnostic purposes
-     * @param type the type to which the implementation must be assignable
-     * @param path a path under which to register, or "" if inapplicable
-     * @param position a position at which to register, or {@link Integer#MAX_VALUE} to skip
-     * @param supersedes possibly empty list of implementation to supersede
-     */
-    protected final void register(TypeElement clazz, Class<? extends Annotation> annotation,
-            TypeMirror type, String path, int position, String[] supersedes) {
-        Boolean verify = verifiedClasses.get(clazz);
-        if (verify == null) {
-            verify = verifyServiceProviderSignature(clazz, annotation);
-            verifiedClasses.put(clazz, verify);
-        }
-        if (!verify) {
-            return;
-        }
-        String impl = processingEnv.getElementUtils().getBinaryName(clazz).toString();
-        String xface = processingEnv.getElementUtils().getBinaryName((TypeElement) processingEnv.getTypeUtils().asElement(type)).toString();
-        if (!processingEnv.getTypeUtils().isAssignable(clazz.asType(), type)) {
-            AnnotationMirror ann = findAnnotationMirror(clazz, annotation);
-            processingEnv.getMessager().printMessage(Kind.ERROR, impl + " is not assignable to " + xface,
-                    clazz, ann, findAnnotationValue(ann, "service"));
-            return;
-        }
-        processingEnv.getMessager().printMessage(Kind.NOTE,
-                impl + " to be registered as a " + xface + (path.length() > 0 ? " under " + path : ""));
-        String rsrc = (path.length() > 0 ? "META-INF/namedservices/" + path + "/" : "META-INF/services/") + xface;
-        {
-            Map<String,List<Element>> originatingElements = originatingElementsByProcessor.get(processingEnv);
-            if (originatingElements == null) {
-                originatingElements = new HashMap<String,List<Element>>();
-                originatingElementsByProcessor.put(processingEnv, originatingElements);
-            }
-            List<Element> origEls = originatingElements.get(rsrc);
-            if (origEls == null) {
-                origEls = new ArrayList<Element>();
-                originatingElements.put(rsrc, origEls);
-            }
-            origEls.add(clazz);
-        }
-        Map<String,List<String>> outputFiles = outputFilesByProcessor.get(processingEnv);
-        if (outputFiles == null) {
-            outputFiles = new HashMap<String,List<String>>();
-            outputFilesByProcessor.put(processingEnv, outputFiles);
-        }
-        List<String> lines = outputFiles.get(rsrc);
-        if (lines == null) {
-            lines = new ArrayList<String>();
-            try {
-                try {
-                    FileObject in = processingEnv.getFiler().getResource(StandardLocation.SOURCE_PATH, "", rsrc);
-                    in.openInputStream().close();
-                    processingEnv.getMessager().printMessage(Kind.ERROR,
-                            "Cannot generate " + rsrc + " because it already exists in sources: " + in.toUri());
-                    return;
-                } catch (FileNotFoundException x) {
-                    // Good.
-                }
-                try {
-                    FileObject in = processingEnv.getFiler().getResource(StandardLocation.CLASS_OUTPUT, "", rsrc);
-                    InputStream is = in.openInputStream();
-                    try {
-                        BufferedReader r = new BufferedReader(new InputStreamReader(is, "UTF-8"));
-                        String line;
-                        while ((line = r.readLine()) != null) {
-                            lines.add(line);
-                        }
-                    } finally {
-                        is.close();
-                    }
-                } catch (FileNotFoundException x) {
-                    // OK, created for the first time
-                }
-            } catch (IOException x) {
-                processingEnv.getMessager().printMessage(Kind.ERROR, x.toString());
-                return;
-            }
-            outputFiles.put(rsrc, lines);
-        }
-        int idx = lines.indexOf(impl);
-        if (idx != -1) {
-            lines.remove(idx);
-            while (lines.size() > idx && lines.get(idx).matches("#position=.+|#-.+")) {
-                lines.remove(idx);
-            }
-        }
-        lines.add(impl);
-        if (position != Integer.MAX_VALUE) {
-            lines.add("#position=" + position);
-        }
-        for (String exclude : supersedes) {
-            lines.add("#-" + exclude);
-        }
-    }
-
-    /**
-     * @param element a source element
-     * @param annotation a type of annotation
-     * @return the instance of that annotation on the element, or null if not found
-     */
-    private AnnotationMirror findAnnotationMirror(Element element, Class<? extends Annotation> annotation) {
-        for (AnnotationMirror ann : element.getAnnotationMirrors()) {
-            if (processingEnv.getElementUtils().getBinaryName((TypeElement) ann.getAnnotationType().asElement()).
-                    contentEquals(annotation.getName())) {
-                return ann;
-            }
-        }
-        return null;
-    }
-
-    /**
-     * @param annotation an annotation instance (null permitted)
-     * @param name the name of an attribute of that annotation
-     * @return the corresponding value if found
-     */
-    private AnnotationValue findAnnotationValue(AnnotationMirror annotation, String name) {
-        if (annotation != null) {
-            for (Map.Entry<? extends ExecutableElement,? extends AnnotationValue> entry : annotation.getElementValues().entrySet()) {
-                if (entry.getKey().getSimpleName().contentEquals(name)) {
-                    return entry.getValue();
-                }
-            }
-        }
-        return null;
-    }
-
-    private final boolean verifyServiceProviderSignature(TypeElement clazz, Class<? extends Annotation> annotation) {
-        AnnotationMirror ann = findAnnotationMirror(clazz, annotation);
-        if (!clazz.getModifiers().contains(Modifier.PUBLIC)) {
-            processingEnv.getMessager().printMessage(Kind.ERROR, clazz + " must be public", clazz, ann);
-            return false;
-        }
-        if (clazz.getModifiers().contains(Modifier.ABSTRACT)) {
-            processingEnv.getMessager().printMessage(Kind.ERROR, clazz + " must not be abstract", clazz, ann);
-            return false;
-        }
-        {
-            boolean hasDefaultCtor = false;
-            for (ExecutableElement constructor : ElementFilter.constructorsIn(clazz.getEnclosedElements())) {
-                if (constructor.getModifiers().contains(Modifier.PUBLIC) && constructor.getParameters().isEmpty()) {
-                    hasDefaultCtor = true;
-                    break;
-                }
-            }
-            if (!hasDefaultCtor) {
-                processingEnv.getMessager().printMessage(Kind.ERROR, clazz + " must have a public no-argument constructor", clazz, ann);
-                return false;
-            }
-        }
-        return true;
-    }
-
-    private void writeServices() {
-        for (Map.Entry<ProcessingEnvironment,Map<String,List<String>>> outputFiles : outputFilesByProcessor.entrySet()) {
-            for (Map.Entry<String, List<String>> entry : outputFiles.getValue().entrySet()) {
-                try {
-                    FileObject out = processingEnv.getFiler().createResource(StandardLocation.CLASS_OUTPUT, "", entry.getKey(),
-                            originatingElementsByProcessor.get(outputFiles.getKey()).get(entry.getKey()).toArray(new Element[0]));
-                    OutputStream os = out.openOutputStream();
-                    try {
-                        PrintWriter w = new PrintWriter(new OutputStreamWriter(os, "UTF-8"));
-                        for (String line : entry.getValue()) {
-                            w.println(line);
-                        }
-                        w.flush();
-                        w.close();
-                    } finally {
-                        os.close();
-                    }
-                } catch (IOException x) {
-                    processingEnv.getMessager().printMessage(Kind.ERROR, "Failed to write to " + entry.getKey() + ": " + x.toString());
-                }
-            }
-        }
-    }
-
-}
diff --git a/src/org/netbeans/modules/openide/util/ActionsBridge.java b/src/org/netbeans/modules/openide/util/ActionsBridge.java
index 6a68712..f475c72 100644
--- a/src/org/netbeans/modules/openide/util/ActionsBridge.java
+++ b/src/org/netbeans/modules/openide/util/ActionsBridge.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -61,12 +61,6 @@ public abstract class ActionsBridge extends Object {
     protected abstract void invokeAction(Action action, ActionEvent ev);
 
     public static void doPerformAction(CallableSystemAction action, final ActionsBridge.ActionRunnable r) {
-        implPerformAction(action, r);
-    }
-    public static void doPerformAction(Action action, final ActionsBridge.ActionRunnable r) {
-        implPerformAction(action, r);
-    }
-    private static void implPerformAction(Action action, final ActionsBridge.ActionRunnable r) {
         assert java.awt.EventQueue.isDispatchThread() : "Action " + action.getClass().getName() +
         " may not be invoked from the thread " + Thread.currentThread().getName() +
         ", only the event queue: http://www.netbeans.org/download/4_1/javadoc/OpenAPIs/apichanges.html#actions-event-thread";
@@ -89,27 +83,15 @@ public abstract class ActionsBridge extends Object {
      */
     public static abstract class ActionRunnable implements Action {
         final ActionEvent ev;
-        final Action action;
+        final SystemAction action;
         final boolean async;
 
         public ActionRunnable(ActionEvent ev, SystemAction action, boolean async) {
-            this(ev, (Action)action, async);
-        }
-        public ActionRunnable(ActionEvent ev, Action action, boolean async) {
             this.ev = ev;
             this.action = action;
             this.async = async;
         }
 
-        public static ActionRunnable create(ActionEvent ev, Action a, boolean async) {
-            return new ActionRunnable(ev, a, async) {
-                @Override
-                protected void run() {
-                    action.actionPerformed(ev);
-                }
-            };
-        }
-
         public final boolean needsToBeSynchronous() {
             return "waitFinished".equals(ev.getActionCommand()); // NOI18N
         }
diff --git a/src/org/netbeans/modules/openide/util/NamedServicesProvider.java b/src/org/netbeans/modules/openide/util/NamedServicesProvider.java
index 8203e94..498e1ed 100644
--- a/src/org/netbeans/modules/openide/util/NamedServicesProvider.java
+++ b/src/org/netbeans/modules/openide/util/NamedServicesProvider.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/netbeans/modules/openide/util/PreferencesProvider.java b/src/org/netbeans/modules/openide/util/PreferencesProvider.java
index 7955174..cdab6fa 100644
--- a/src/org/netbeans/modules/openide/util/PreferencesProvider.java
+++ b/src/org/netbeans/modules/openide/util/PreferencesProvider.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/netbeans/modules/openide/util/ProxyURLStreamHandlerFactory.java b/src/org/netbeans/modules/openide/util/ProxyURLStreamHandlerFactory.java
deleted file mode 100644
index 9e23901..0000000
--- a/src/org/netbeans/modules/openide/util/ProxyURLStreamHandlerFactory.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- *
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common
- * Development and Distribution License("CDDL") (collectively, the
- * "License"). You may not use this file except in compliance with the
- * License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html
- * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
- * specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header
- * Notice in each file and include the License file at
- * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the
- * License Header, with the fields enclosed by brackets [] replaced by
- * your own identifying information:
- * "Portions Copyrighted [year] [name of copyright owner]"
- *
- * If you wish your version of this file to be governed by only the CDDL
- * or only the GPL Version 2, indicate your decision by adding
- * "[Contributor] elects to include this software in this distribution
- * under the [CDDL or GPL Version 2] license." If you do not indicate a
- * single choice of license, a recipient has the option to distribute
- * your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above.
- * However, if you add GPL Version 2 code and therefore, elected the GPL
- * Version 2 license, then the option applies only if the new code is
- * made subject to such option by the copyright holder.
- *
- * Contributor(s):
- *
- * Portions Copyrighted 2009 Sun Microsystems, Inc.
- */
-
-package org.netbeans.modules.openide.util;
-
-import java.net.URLStreamHandler;
-import java.net.URLStreamHandlerFactory;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import org.openide.util.Lookup;
-import org.openide.util.LookupEvent;
-import org.openide.util.LookupListener;
-import org.openide.util.URLStreamHandlerRegistration;
-import org.openide.util.lookup.Lookups;
-
-/**
- * @see URLStreamHandlerRegistration
- */
-public final class ProxyURLStreamHandlerFactory implements URLStreamHandlerFactory {
-
-    /** prevents GC only */
-    private final Map<String, Lookup.Result<URLStreamHandler>> results = new HashMap<String, Lookup.Result<URLStreamHandler>>();
-    private final Map<String, URLStreamHandler> handlers = new HashMap<String, URLStreamHandler>();
-
-    /** for lookup */
-    public ProxyURLStreamHandlerFactory() {}
-
-    public synchronized URLStreamHandler createURLStreamHandler(final String protocol) {
-        if (!results.containsKey(protocol)) {
-            final Lookup.Result<URLStreamHandler> result = Lookups.forPath(URLStreamHandlerRegistrationProcessor.REGISTRATION_PREFIX + protocol).lookupResult(URLStreamHandler.class);
-            LookupListener listener = new LookupListener() {
-
-                public void resultChanged(LookupEvent ev) {
-                    synchronized (ProxyURLStreamHandlerFactory.this) {
-                        Collection<? extends URLStreamHandler> instances = result.allInstances();
-                        handlers.put(protocol, instances.isEmpty() ? null : instances.iterator().next());
-                    }
-                }
-            };
-            result.addLookupListener(listener);
-            listener.resultChanged(null);
-            results.put(protocol, result);
-        }
-        return handlers.get(protocol);
-    }
-}
diff --git a/src/org/netbeans/modules/openide/util/ServiceProviderProcessor.java b/src/org/netbeans/modules/openide/util/ServiceProviderProcessor.java
index d76b051..66263e9 100644
--- a/src/org/netbeans/modules/openide/util/ServiceProviderProcessor.java
+++ b/src/org/netbeans/modules/openide/util/ServiceProviderProcessor.java
@@ -39,135 +39,235 @@
 
 package org.netbeans.modules.openide.util;
 
+import java.io.BufferedReader;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
 import java.lang.annotation.Annotation;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.LinkedList;
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
-import javax.annotation.processing.Completion;
+import javax.annotation.processing.AbstractProcessor;
 import javax.annotation.processing.RoundEnvironment;
+import javax.annotation.processing.SupportedAnnotationTypes;
 import javax.annotation.processing.SupportedSourceVersion;
 import javax.lang.model.SourceVersion;
 import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.AnnotationValue;
 import javax.lang.model.element.Element;
 import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.Modifier;
 import javax.lang.model.element.TypeElement;
 import javax.lang.model.type.MirroredTypeException;
-import javax.lang.model.type.TypeKind;
 import javax.lang.model.type.TypeMirror;
+import javax.lang.model.util.ElementFilter;
+import javax.tools.Diagnostic.Kind;
+import javax.tools.FileObject;
+import javax.tools.StandardLocation;
 import org.openide.util.lookup.ServiceProvider;
 import org.openide.util.lookup.ServiceProviders;
 
 @SupportedSourceVersion(SourceVersion.RELEASE_6)
-public class ServiceProviderProcessor extends AbstractServiceProviderProcessor {
-
-    public @Override Set<String> getSupportedAnnotationTypes() {
-        return new HashSet<String>(Arrays.asList(
-            ServiceProvider.class.getCanonicalName(),
-            ServiceProviders.class.getCanonicalName()
-        ));
-    }
+ at SupportedAnnotationTypes({"org.openide.util.lookup.ServiceProvider", "org.openide.util.lookup.ServiceProviders"})
+public class ServiceProviderProcessor extends AbstractProcessor {
 
     /** public for ServiceLoader */
     public ServiceProviderProcessor() {}
 
-    protected boolean handleProcess(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
-        for (Element el : roundEnv.getElementsAnnotatedWith(ServiceProvider.class)) {
-            TypeElement clazz = (TypeElement) el;
-            ServiceProvider sp = clazz.getAnnotation(ServiceProvider.class);
-            register(clazz, ServiceProvider.class, sp);
+    private final Map<String, List<String>> outputFiles = new HashMap<String,List<String>>();
+    private final Map<String, List<Element>> originatingElements = new HashMap<String,List<Element>>();
+
+    @Override
+    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
+        if (roundEnv.errorRaised()) {
+            return false;
         }
-        for (Element el : roundEnv.getElementsAnnotatedWith(ServiceProviders.class)) {
-            TypeElement clazz = (TypeElement) el;
-            ServiceProviders spp = clazz.getAnnotation(ServiceProviders.class);
-            for (ServiceProvider sp : spp.value()) {
-                register(clazz, ServiceProviders.class, sp);
+        if (roundEnv.processingOver()) {
+            writeServices();
+            return false;
+        } else {
+            for (Element el : roundEnv.getElementsAnnotatedWith(ServiceProvider.class)) {
+                TypeElement clazz = (TypeElement) el;
+                if (!verifyServiceProviderSignature(clazz)) {
+                    continue;
+                }
+                ServiceProvider sp = clazz.getAnnotation(ServiceProvider.class);
+                register(clazz, sp);
             }
+            for (Element el : roundEnv.getElementsAnnotatedWith(ServiceProviders.class)) {
+                TypeElement clazz = (TypeElement) el;
+                if (!verifyServiceProviderSignature(clazz)) {
+                    continue;
+                }
+                ServiceProviders spp = clazz.getAnnotation(ServiceProviders.class);
+                for (ServiceProvider sp : spp.value()) {
+                    register(clazz, sp);
+                }
+            }
+            return true;
         }
-        return true;
     }
 
-    private void register(TypeElement clazz, Class<? extends Annotation> annotation, ServiceProvider svc) {
+    private void register(TypeElement clazz, ServiceProvider svc) {
+        TypeMirror type;
         try {
             svc.service();
             assert false;
             return;
         } catch (MirroredTypeException e) {
-            register(clazz, annotation, e.getTypeMirror(), svc.path(), svc.position(), svc.supersedes());
+            type = e.getTypeMirror();
         }
-    }
-
-    @Override
-    public Iterable<? extends Completion> getCompletions(Element annotated, AnnotationMirror annotation, ExecutableElement attr, String userText) {
-        if (processingEnv == null || annotated == null || !annotated.getKind().isClass()) {
-            return Collections.emptyList();
+        String impl = processingEnv.getElementUtils().getBinaryName(clazz).toString();
+        String xface = processingEnv.getElementUtils().getBinaryName((TypeElement) processingEnv.getTypeUtils().asElement(type)).toString();
+        if (!processingEnv.getTypeUtils().isAssignable(clazz.asType(), type)) {
+            AnnotationMirror ann = findAnnotationMirror(clazz, ServiceProvider.class);
+            processingEnv.getMessager().printMessage(Kind.ERROR, impl + " is not assignable to " + xface,
+                    clazz, ann, findAnnotationValue(ann, "service"));
+            return;
         }
-
-        if (   annotation == null
-            || !"org.openide.util.lookup.ServiceProvider".contentEquals(((TypeElement) annotation.getAnnotationType().asElement()).getQualifiedName())) {
-            return Collections.emptyList();
+        processingEnv.getMessager().printMessage(Kind.NOTE, impl + " to be registered as a " + xface);
+        String rsrc = (svc.path().length() > 0 ? "META-INF/namedservices/" + svc.path() + "/" : "META-INF/services/") + xface;
+        {
+            List<Element> origEls = originatingElements.get(rsrc);
+            if (origEls == null) {
+                origEls = new ArrayList<Element>();
+                originatingElements.put(rsrc, origEls);
+            }
+            origEls.add(clazz);
         }
-
-        if (!"service".contentEquals(attr.getSimpleName())) {
-            return Collections.emptyList();
+        List<String> lines = outputFiles.get(rsrc);
+        if (lines == null) {
+            lines = new ArrayList<String>();
+            try {
+                try {
+                    FileObject in = processingEnv.getFiler().getResource(StandardLocation.SOURCE_PATH, "", rsrc);
+                    in.openInputStream().close();
+                    processingEnv.getMessager().printMessage(Kind.ERROR,
+                            "Cannot generate " + rsrc + " because it already exists in sources: " + in.toUri());
+                    return;
+                } catch (FileNotFoundException x) {
+                    // Good.
+                }
+                try {
+                    FileObject in = processingEnv.getFiler().getResource(StandardLocation.CLASS_OUTPUT, "", rsrc);
+                    InputStream is = in.openInputStream();
+                    try {
+                        BufferedReader r = new BufferedReader(new InputStreamReader(is, "UTF-8"));
+                        String line;
+                        while ((line = r.readLine()) != null) {
+                            lines.add(line);
+                        }
+                    } finally {
+                        is.close();
+                    }
+                } catch (FileNotFoundException x) {
+                    // OK, created for the first time
+                }
+            } catch (IOException x) {
+                processingEnv.getMessager().printMessage(Kind.ERROR, x.toString());
+                return;
+            }
+            outputFiles.put(rsrc, lines);
         }
-
-        TypeElement jlObject = processingEnv.getElementUtils().getTypeElement("java.lang.Object");
-
-        if (jlObject == null) {
-            return Collections.emptyList();
+        int idx = lines.indexOf(impl);
+        if (idx != -1) {
+            lines.remove(idx);
+            while (lines.size() > idx && lines.get(idx).matches("#position=.+|#-.+")) {
+                lines.remove(idx);
+            }
         }
-        
-        Collection<Completion> result = new LinkedList<Completion>();
-        List<TypeElement> toProcess = new LinkedList<TypeElement>();
-
-        toProcess.add((TypeElement) annotated);
-
-        while (!toProcess.isEmpty()) {
-            TypeElement c = toProcess.remove(0);
-
-            result.add(new TypeCompletion(c.getQualifiedName().toString() + ".class"));
-
-            List<TypeMirror> parents = new LinkedList<TypeMirror>();
-
-            parents.add(c.getSuperclass());
-            parents.addAll(c.getInterfaces());
-
-            for (TypeMirror tm : parents) {
-                if (tm == null || tm.getKind() != TypeKind.DECLARED) {
-                    continue;
-                }
-
-                TypeElement type = (TypeElement) processingEnv.getTypeUtils().asElement(tm);
+        lines.add(impl);
+        if (svc.position() != Integer.MAX_VALUE) {
+            lines.add("#position=" + svc.position());
+        }
+        for (String exclude : svc.supersedes()) {
+            lines.add("#-" + exclude);
+        }
+    }
 
-                if (!jlObject.equals(type)) {
-                    toProcess.add(type);
+    private boolean verifyServiceProviderSignature(TypeElement clazz) {
+        AnnotationMirror ann = findAnnotationMirror(clazz, ServiceProvider.class);
+        if (!clazz.getModifiers().contains(Modifier.PUBLIC)) {
+            processingEnv.getMessager().printMessage(Kind.ERROR, clazz + " must be public", clazz, ann);
+            return false;
+        }
+        if (clazz.getModifiers().contains(Modifier.ABSTRACT)) {
+            processingEnv.getMessager().printMessage(Kind.ERROR, clazz + " must not be abstract", clazz, ann);
+            return false;
+        }
+        {
+            boolean hasDefaultCtor = false;
+            for (ExecutableElement constructor : ElementFilter.constructorsIn(clazz.getEnclosedElements())) {
+                if (constructor.getModifiers().contains(Modifier.PUBLIC) && constructor.getParameters().isEmpty()) {
+                    hasDefaultCtor = true;
+                    break;
                 }
             }
+            if (!hasDefaultCtor) {
+                processingEnv.getMessager().printMessage(Kind.ERROR, clazz + " must have a public no-argument constructor", clazz, ann);
+                return false;
+            }
         }
-
-        return result;
+        return true;
     }
 
-    private static final class TypeCompletion implements Completion {
-
-        private final String type;
-
-        public TypeCompletion(String type) {
-            this.type = type;
+    private void writeServices() {
+        for (Map.Entry<String, List<String>> entry : outputFiles.entrySet()) {
+            try {
+                FileObject out = processingEnv.getFiler().createResource(StandardLocation.CLASS_OUTPUT, "", entry.getKey(),
+                        originatingElements.get(entry.getKey()).toArray(new Element[0]));
+                OutputStream os = out.openOutputStream();
+                try {
+                    PrintWriter w = new PrintWriter(new OutputStreamWriter(os, "UTF-8"));
+                    for (String line : entry.getValue()) {
+                        w.println(line);
+                    }
+                    w.flush();
+                    w.close();
+                } finally {
+                    os.close();
+                }
+            } catch (IOException x) {
+                processingEnv.getMessager().printMessage(Kind.ERROR, "Failed to write to " + entry.getKey() + ": " + x.toString());
+            }
         }
+    }
 
-        public String getValue() {
-            return type;
+    /**
+     * @param element a source element
+     * @param annotation a type of annotation
+     * @return the instance of that annotation on the element, or null if not found
+     */
+    private AnnotationMirror findAnnotationMirror(Element element, Class<? extends Annotation> annotation) {
+        for (AnnotationMirror ann : element.getAnnotationMirrors()) {
+            if (processingEnv.getElementUtils().getBinaryName((TypeElement) ann.getAnnotationType().asElement()).
+                    contentEquals(annotation.getName())) {
+                return ann;
+            }
         }
+        return null;
+    }
 
-        public String getMessage() {
-            return null;
+    /**
+     * @param annotation an annotation instance (null permitted)
+     * @param name the name of an attribute of that annotation
+     * @return the corresponding value if found
+     */
+    private AnnotationValue findAnnotationValue(AnnotationMirror annotation, String name) {
+        if (annotation != null) {
+            for (Map.Entry<? extends ExecutableElement,? extends AnnotationValue> entry : annotation.getElementValues().entrySet()) {
+                if (entry.getKey().getSimpleName().contentEquals(name)) {
+                    return entry.getValue();
+                }
+            }
         }
-        
+        return null;
     }
 
 }
diff --git a/src/org/netbeans/modules/openide/util/URLStreamHandlerRegistrationProcessor.java b/src/org/netbeans/modules/openide/util/URLStreamHandlerRegistrationProcessor.java
deleted file mode 100644
index fbe3c59..0000000
--- a/src/org/netbeans/modules/openide/util/URLStreamHandlerRegistrationProcessor.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- *
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common
- * Development and Distribution License("CDDL") (collectively, the
- * "License"). You may not use this file except in compliance with the
- * License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html
- * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
- * specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header
- * Notice in each file and include the License file at
- * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the
- * License Header, with the fields enclosed by brackets [] replaced by
- * your own identifying information:
- * "Portions Copyrighted [year] [name of copyright owner]"
- *
- * If you wish your version of this file to be governed by only the CDDL
- * or only the GPL Version 2, indicate your decision by adding
- * "[Contributor] elects to include this software in this distribution
- * under the [CDDL or GPL Version 2] license." If you do not indicate a
- * single choice of license, a recipient has the option to distribute
- * your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above.
- * However, if you add GPL Version 2 code and therefore, elected the GPL
- * Version 2 license, then the option applies only if the new code is
- * made subject to such option by the copyright holder.
- *
- * Contributor(s):
- *
- * Portions Copyrighted 2009 Sun Microsystems, Inc.
- */
-
-package org.netbeans.modules.openide.util;
-
-import java.net.URLStreamHandler;
-import java.util.Collections;
-import java.util.Set;
-import javax.annotation.processing.RoundEnvironment;
-import javax.annotation.processing.SupportedSourceVersion;
-import javax.lang.model.SourceVersion;
-import javax.lang.model.element.Element;
-import javax.lang.model.element.TypeElement;
-import javax.lang.model.type.TypeMirror;
-import org.openide.util.URLStreamHandlerRegistration;
-
- at SupportedSourceVersion(SourceVersion.RELEASE_6)
-public class URLStreamHandlerRegistrationProcessor extends AbstractServiceProviderProcessor {
-
-    public @Override Set<String> getSupportedAnnotationTypes() {
-        return Collections.singleton(URLStreamHandlerRegistration.class.getCanonicalName());
-    }
-
-    public static final String REGISTRATION_PREFIX = "URLStreamHandler/"; // NOI18N
-
-    /** public for ServiceLoader */
-    public URLStreamHandlerRegistrationProcessor() {}
-
-    protected boolean handleProcess(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
-        for (Element el : roundEnv.getElementsAnnotatedWith(URLStreamHandlerRegistration.class)) {
-            TypeElement clazz = (TypeElement) el;
-            URLStreamHandlerRegistration r = clazz.getAnnotation(URLStreamHandlerRegistration.class);
-            TypeMirror type = processingEnv.getTypeUtils().getDeclaredType(
-                    processingEnv.getElementUtils().getTypeElement(URLStreamHandler.class.getName()));
-            for (String protocol : r.protocol()) {
-                register(clazz, URLStreamHandlerRegistration.class, type,
-                        REGISTRATION_PREFIX + protocol, r.position(), new String[0]);
-            }
-        }
-        return true;
-    }
-
-}
diff --git a/src/org/openide/ErrorManager.java b/src/org/openide/ErrorManager.java
index 5eaf52a..60dd8f4 100644
--- a/src/org/openide/ErrorManager.java
+++ b/src/org/openide/ErrorManager.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/LifecycleManager.java b/src/org/openide/LifecycleManager.java
index ae0ed0a..d9b8714 100644
--- a/src/org/openide/LifecycleManager.java
+++ b/src/org/openide/LifecycleManager.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -83,16 +83,6 @@ public abstract class LifecycleManager {
      */
     public abstract void exit();
 
-    /**
-     * Request that the application restart immediately after next being shut down.
-     * You may want to then call {@link #exit} to go ahead and restart now.
-     * @throws UnsupportedOperationException if this request cannot be honored
-     * @since org.openide.util 7.25
-     */
-    public void markForRestart() throws UnsupportedOperationException {
-        throw new UnsupportedOperationException();
-    }
-
     /** Fallback instance. */
     private static final class Trivial extends LifecycleManager {
         public Trivial() {
diff --git a/src/org/openide/ServiceType.java b/src/org/openide/ServiceType.java
index 191c23d..05dc2e6 100644
--- a/src/org/openide/ServiceType.java
+++ b/src/org/openide/ServiceType.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/AsyncGUIJob.java b/src/org/openide/util/AsyncGUIJob.java
index 9f34adc..35d7b09 100644
--- a/src/org/openide/util/AsyncGUIJob.java
+++ b/src/org/openide/util/AsyncGUIJob.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/AsyncInitSupport.java b/src/org/openide/util/AsyncInitSupport.java
index e18f07c..e548d92 100644
--- a/src/org/openide/util/AsyncInitSupport.java
+++ b/src/org/openide/util/AsyncInitSupport.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/Bundle.properties b/src/org/openide/util/Bundle.properties
index 9a6dbe5..7a47ff2 100644
--- a/src/org/openide/util/Bundle.properties
+++ b/src/org/openide/util/Bundle.properties
@@ -1,6 +1,6 @@
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 #
-# Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+# Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
 #
 # The contents of this file are subject to the terms of either the GNU
 # General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/Cancellable.java b/src/org/openide/util/Cancellable.java
index 75beafa..0afadcb 100644
--- a/src/org/openide/util/Cancellable.java
+++ b/src/org/openide/util/Cancellable.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/ChangeSupport.java b/src/org/openide/util/ChangeSupport.java
index d8a1417..f845907 100644
--- a/src/org/openide/util/ChangeSupport.java
+++ b/src/org/openide/util/ChangeSupport.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -43,8 +43,6 @@ package org.openide.util;
 
 import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 import javax.swing.event.ChangeEvent;
 import javax.swing.event.ChangeListener;
 
@@ -57,8 +55,6 @@ import javax.swing.event.ChangeListener;
  */
 public final class ChangeSupport {
 
-    private static final Logger LOG = Logger.getLogger(ChangeSupport.class.getName());
-
     // not private because used in unit tests
     final List<ChangeListener> listeners = new CopyOnWriteArrayList<ChangeListener>();
     private final Object source;
@@ -84,9 +80,6 @@ public final class ChangeSupport {
         if (listener == null) {
             return;
         }
-        if (LOG.isLoggable(Level.FINE) && listeners.contains(listener)) {
-            LOG.log(Level.FINE, "diagnostics for #167491", new IllegalStateException("Added " + listener + " multiply"));
-        }
         listeners.add(listener);
     }
 
diff --git a/src/org/openide/util/ContextAwareAction.java b/src/org/openide/util/ContextAwareAction.java
index 372093d..542dbd9 100644
--- a/src/org/openide/util/ContextAwareAction.java
+++ b/src/org/openide/util/ContextAwareAction.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/ContextGlobalProvider.java b/src/org/openide/util/ContextGlobalProvider.java
index 785eb08..0469427 100644
--- a/src/org/openide/util/ContextGlobalProvider.java
+++ b/src/org/openide/util/ContextGlobalProvider.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/EditableProperties.java b/src/org/openide/util/EditableProperties.java
deleted file mode 100644
index 0b44364..0000000
--- a/src/org/openide/util/EditableProperties.java
+++ /dev/null
@@ -1,924 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
- *
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common
- * Development and Distribution License("CDDL") (collectively, the
- * "License"). You may not use this file except in compliance with the
- * License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html
- * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
- * specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header
- * Notice in each file and include the License file at
- * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the
- * License Header, with the fields enclosed by brackets [] replaced by
- * your own identifying information:
- * "Portions Copyrighted [year] [name of copyright owner]"
- *
- * Contributor(s):
- *
- * The Original Software is NetBeans. The Initial Developer of the Original
- * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
- * Microsystems, Inc. All Rights Reserved.
- *
- * If you wish your version of this file to be governed by only the CDDL
- * or only the GPL Version 2, indicate your decision by adding
- * "[Contributor] elects to include this software in this distribution
- * under the [CDDL or GPL Version 2] license." If you do not indicate a
- * single choice of license, a recipient has the option to distribute
- * your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above.
- * However, if you add GPL Version 2 code and therefore, elected the GPL
- * Version 2 license, then the option applies only if the new code is
- * made subject to such option by the copyright holder.
- */
-
-package org.openide.util;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.util.AbstractMap;
-import java.util.AbstractSet;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.Set;
-
-// XXX: consider adding getInitialComment() and setInitialComment() methods
-// (useful e.g. for GeneratedFilesHelper)
-
-/**
- * Similar to {@link java.util.Properties} but designed to retain additional
- * information needed for safe hand-editing.
- * Useful for various <samp>*.properties</samp> in a project:
- * <ol>
- * <li>Can associate comments with particular entries.
- * <li>Order of entries preserved during modifications whenever possible.
- * <li>VCS-friendly: lines which are not semantically modified are not textually modified.
- * <li>Can automatically insert line breaks in new or modified values at positions
- *     that are likely to be semantically meaningful, e.g. between path components
- * </ol>
- * The file format (including encoding etc.) is compatible with the regular JRE implementation.
- * Only (non-null) String is supported for keys and values.
- * This class is not thread-safe; use only from a single thread, or use {@link java.util.Collections#synchronizedMap}.
- * @author Jesse Glick, David Konecny
- * @since org.openide.util 7.26
- */
-public final class EditableProperties extends AbstractMap<String,String> implements Cloneable {
-
-    private static class State {
-        /** whether multiple EP instances are currently linking to this */
-        boolean shared;
-        /** List of Item instances as read from the properties file. Order is important.
-         * Saving properties will save then in this order. */
-        final LinkedList<Item> items;
-        /** Map of [property key, Item instance] for faster access. */
-        final Map<String, Item> itemIndex;
-        /** create fresh state */
-        State() {
-            items = new LinkedList<Item>();
-            itemIndex = new HashMap<String,Item>();
-        }
-        /** duplicate state */
-        State(State original) {
-            items = new LinkedList<Item>();
-            itemIndex = new HashMap<String,Item>(original.items.size() * 4 / 3 + 1);
-            for (Item _i : original.items) {
-                Item i = (Item) _i.clone();
-                items.add(i);
-                itemIndex.put(i.getKey(), i);
-            }
-        }
-    }
-    
-    private State state;
-    private final boolean alphabetize;
-    
-    private static final String INDENT = "    ";
-
-    // parse states:
-    private static final int WAITING_FOR_KEY_VALUE = 1;
-    private static final int READING_KEY_VALUE = 2;
-    
-    /**
-     * Creates empty instance.
-     * @param alphabetize alphabetize new items according to key or not
-     */
-    public EditableProperties(boolean alphabetize) {
-        this.alphabetize = alphabetize;
-        state = new State();
-    }
-    
-    /**
-     * Creates new instance from an existing one.
-     * @param ep an instance of EditableProperties
-     */
-    private EditableProperties(EditableProperties ep) {
-        // #64174: use a simple deep copy for speed
-        alphabetize = ep.alphabetize;
-        state = ep.state;
-        state.shared = true;
-    }
-
-    private void writeOperation() {
-        if (state.shared) {
-            state = new State(state);
-        }
-    }
-    
-    /**
-     * Returns a set view of the mappings ordered according to their file 
-     * position.  Each element in this set is a Map.Entry. See
-     * {@link AbstractMap#entrySet} for more details.
-     * @return set with Map.Entry instances.
-     */
-    public Set<Map.Entry<String,String>> entrySet() {
-        return new SetImpl();
-    }
-    
-    /**
-     * Load properties from a stream.
-     * @param stream an input stream
-     * @throws IOException if the contents are malformed or the stream could not be read
-     */
-    public void load(InputStream stream) throws IOException {
-        int parseState = WAITING_FOR_KEY_VALUE;
-        BufferedReader input = new BufferedReader(new InputStreamReader(stream, "ISO-8859-1"));
-        List<String> tempList = new LinkedList<String>();
-        String line;
-        int commentLinesCount = 0;
-        // Read block of lines and create instance of Item for each.
-        // Separator is: either empty line or valid end of proeprty declaration
-        while (null != (line = input.readLine())) {
-            tempList.add(line);
-            boolean empty = isEmpty(line);
-            boolean comment = isComment(line);
-            if (parseState == WAITING_FOR_KEY_VALUE) {
-                if (empty) {
-                    // empty line: create Item without any key
-                    createNonKeyItem(tempList);
-                    commentLinesCount = 0;
-                } else {
-                    if (comment) {
-                        commentLinesCount++;
-                    } else {
-                        parseState = READING_KEY_VALUE;
-                    }
-                }
-            }
-            if (parseState == READING_KEY_VALUE && !isContinue(line)) {
-                // valid end of property declaration: create Item for it
-                createKeyItem(tempList, commentLinesCount);
-                parseState = WAITING_FOR_KEY_VALUE;
-                commentLinesCount = 0;
-            }
-        }
-        if (tempList.size() > 0) {
-            if (parseState == READING_KEY_VALUE) {
-                // value was not ended correctly? ignore.
-                createKeyItem(tempList, commentLinesCount);
-            } else {
-                createNonKeyItem(tempList);
-            }
-        }
-    }
-
-    /**
-     * Store properties to a stream.
-     * @param stream an output stream
-     * @throws IOException if the stream could not be written to
-     */
-    public void store(OutputStream stream) throws IOException {
-        boolean previousLineWasEmpty = true;
-        BufferedWriter output = new BufferedWriter(new OutputStreamWriter(stream, "ISO-8859-1"));
-        for (Item item : state.items) {
-            if (item.isSeparate() && !previousLineWasEmpty) {
-                output.newLine();
-            }
-            String line = null;
-            Iterator<String> it = item.getRawData().iterator();
-            while (it.hasNext()) {
-                line = it.next();
-                output.write(line);
-                output.newLine();
-            }
-            if (line != null) {
-                previousLineWasEmpty = isEmpty(line);
-            }
-        }
-        output.flush();
-    }
-
-    @Override
-    public String get(Object key) {
-        if (!(key instanceof String)) {
-            return null;
-        }
-        Item item = state.itemIndex.get((String) key);
-        return item != null ? item.getValue() : null;
-    }
-
-    @Override
-    public String put(String key, String value) {
-        Parameters.notNull("key", key);
-        Parameters.notNull(key, value);
-        writeOperation();
-        Item item = state.itemIndex.get(key);
-        String result = null;
-        if (item != null) {
-            result = item.getValue();
-            item.setValue(value);
-        } else {
-            item = new Item(key, value);
-            addItem(item, alphabetize);
-        }
-        return result;
-    }
-
-    /**
-     * Convenience method to get a property as a string.
-     * Same as {@link #get}; only here because of pre-generic code.
-     * @param key a property name; cannot be null nor empty
-     * @return the property value, or null if it was not defined
-     */
-    public String getProperty(String key) {
-        return get(key);
-    }
-    
-    /**
-     * Convenience method to set a property.
-     * Same as {@link #put}; only here because of pre-generic code.
-     * @param key a property name; cannot be null nor empty
-     * @param value the desired value; cannot be null
-     * @return previous value of the property or null if there was not any
-     */
-    public String setProperty(String key, String value) {
-        return put(key, value);
-    }
-
-    /**
-     * Sets a property to a value broken into segments for readability.
-     * Same behavior as {@link #setProperty(String,String)} with the difference that each item
-     * will be stored on its own line of text. {@link #getProperty} will simply concatenate
-     * all the items into one string, so generally separators
-     * (such as <samp>:</samp> for path-like properties) must be included in
-     * the items (for example, at the end of all but the last item).
-     * @param key a property name; cannot be null nor empty
-     * @param value the desired value; cannot be null; can be empty array
-     * @return previous value of the property or null if there was not any
-     */
-    public String setProperty(String key, String[] value) {
-        String result = get(key);
-        if (key == null || value == null) {
-            throw new NullPointerException();
-        }
-        List<String> valueList = Arrays.asList(value);
-        writeOperation();
-        Item item = state.itemIndex.get(key);
-        if (item != null) {
-            item.setValue(valueList);
-        } else {
-            addItem(new Item(key, valueList), alphabetize);
-        }
-        return result;
-    }
-
-    /**
-     * Returns comment associated with the property. The comment lines are
-     * returned as defined in properties file, that is comment delimiter is
-     * included. Comment for property is defined as: continuous block of lines
-     * starting with comment delimiter which are followed by property
-     * declaration (no empty line separator allowed).
-     * @param key a property name; cannot be null nor empty
-     * @return array of String lines as specified in properties file; comment
-     *    delimiter character is included
-     */
-    public String[] getComment(String key) {
-        Item item = state.itemIndex.get(key);
-        if (item == null) {
-            return new String[0];
-        }
-        return item.getComment();
-    }
-
-    /**
-     * Create comment for the property.
-     * <p>Note: if a comment includes non-ISO-8859-1 characters, they will be written
-     * to disk using Unicode escapes (and {@link #getComment} will interpret
-     * such escapes), but of course they will be unreadable for humans.
-     * @param key a property name; cannot be null nor empty
-     * @param comment lines of comment which will be written just above
-     *    the property; no reformatting; comment lines must start with 
-     *    comment delimiter; cannot be null; cannot be emty array
-     * @param separate whether the comment should be separated from previous
-     *    item by empty line
-     */
-    public void setComment(String key, String[] comment, boolean separate) {
-        // XXX: check validity of comment parameter
-        writeOperation();
-        Item item = state.itemIndex.get(key);
-        if (item == null) {
-            throw new IllegalArgumentException("Cannot set comment for non-existing property "+key);
-        }
-        item.setComment(comment, separate);
-    }
-
-    @Override
-    public Object clone() {
-        return cloneProperties();
-    }
-    
-    /**
-     * Create an exact copy of this properties object.
-     * @return a clone of this object
-     */
-    public EditableProperties cloneProperties() {
-        return new EditableProperties(this);
-    }
-
-    // non-key item is block of empty lines/comment not associated with any property
-    private void createNonKeyItem(List<String> lines) {
-        writeOperation();
-        // First check that previous item is not non-key item.
-        if (!state.items.isEmpty()) {
-            Item item = state.items.getLast();
-            if (item.getKey() == null) {
-                // it is non-key item:  merge them
-                item.addCommentLines(lines);
-                lines.clear();
-                return;
-            }
-        }
-        // create new non-key item
-        Item item = new Item(lines);
-        addItem(item, false);
-        lines.clear();
-    }
-
-    // opposite to non-key item: item with valid property declaration and 
-    // perhaps some comment lines
-    private void createKeyItem(List<String> lines, int commentLinesCount) {
-        Item item = new Item(lines.subList(0, commentLinesCount), lines.subList(commentLinesCount, lines.size()));
-        addItem(item, false);
-        lines.clear();
-    }
-    
-    private void addItem(Item item, boolean sort) {
-        writeOperation();
-        String key = item.getKey();
-        if (sort) {
-            assert key != null;
-            ListIterator<Item> it = state.items.listIterator();
-            while (it.hasNext()) {
-                String k = it.next().getKey();
-                if (k != null && k.compareToIgnoreCase(key) > 0) {
-                    it.previous();
-                    it.add(item);
-                    state.itemIndex.put(key, item);
-                    return;
-                }
-            }
-        }
-        state.items.add(item);
-        if (key != null) {
-            state.itemIndex.put(key, item);
-        }
-    }
-    
-    // does property declaration continue on next line?
-    private boolean isContinue(String line) {
-        int index = line.length() - 1;
-        int slashCount = 0;
-        while (index >= 0 && line.charAt(index) == '\\') {
-            slashCount++;
-            index--;
-        }
-        // if line ends with odd number of backslash then property definition 
-        // continues on next line
-        return (slashCount % 2 != 0);
-    }
-    
-    // does line start with comment delimiter? (whitespaces are ignored)
-    private static boolean isComment(String line) {
-        line = trimLeft(line);
-        if (line.length() > 0) {
-            switch (line.charAt(0)) {
-            case '#':
-            case '!':
-                return true;
-            }
-        }
-        return false;
-    }
-
-    // is line empty? (whitespaces are ignored)
-    private static boolean isEmpty(String line) {
-        return trimLeft(line).length() == 0;
-    }
-
-    // remove all whitespaces from left
-    private static String trimLeft(String line) {
-        int start = 0;
-        int len = line.length();
-        NONWS: while (start < len) {
-            switch (line.charAt(start)) {
-            case ' ':
-            case '\t':
-            case '\r':
-            case '\n':
-            case '\f':
-                start++;
-                break;
-            default:
-                break NONWS;
-            }
-        }
-        return line.substring(start);
-    }
-    
-    /**
-     * Representation of one item read from properties file. It can be either
-     * valid property declaration with associated comment or chunk of empty
-     * lines or lines with comment which are not associated with any property.
-     */
-    private static class Item implements Cloneable {
-
-        /** Lines of comment as read from properties file and as they will be
-         * written back to properties file. */
-        private List<String> commentLines;
-
-        /** Lines with property name and value declaration as read from 
-         * properties file and as they will be written back to properties file. */
-        private List<String> keyValueLines;
-
-        /** Property key */
-        private String key;
-        
-        /** Property value */
-        private String value;
-
-        /** Should this property be separated from previous one by at least
-         * one empty line. */
-        private boolean separate;
-        
-        // constructor only for cloning
-        private Item() {
-        }
-        
-        /**
-         * Create instance which does not have any key and value - just 
-         * some empty or comment lines. This item is READ-ONLY.
-         */
-        public Item(List<String> commentLines) {
-            this.commentLines = new ArrayList<String>(commentLines);
-        }
-
-        /**
-         * Create instance from the lines of comment and property declaration.
-         * Property name and value will be split.
-         */
-        public Item(List<String> commentLines, List<String> keyValueLines) {
-            this.commentLines = new ArrayList<String>(commentLines);
-            this.keyValueLines = new ArrayList<String>(keyValueLines);
-            parse(keyValueLines);
-        }
-
-        /**
-         * Create new instance with key and value.
-         */
-        public Item(String key, String value) {
-            this.key = key;
-            this.value = value;
-        }
-
-        /**
-         * Create new instance with key and value.
-         */
-        public Item(String key, List<String> value) {
-            this.key = key;
-            setValue(value);
-        }
-
-        // backdoor for merging non-key items
-        void addCommentLines(List<String> lines) {
-            assert key == null;
-            commentLines.addAll(lines);
-        }
-        
-        public String[] getComment() {
-            String[] res = new String[commentLines.size()];
-            for (int i = 0; i < res.length; i++) {
-                // #60249: the comment might have Unicode chars in escapes.
-                res[i] = decodeUnicode(commentLines.get(i));
-            }
-            return res;
-        }
-        
-        public void setComment(String[] commentLines, boolean separate) {
-            this.separate = separate;
-            this.commentLines = new ArrayList<String>(commentLines.length);
-            for (int i = 0; i < commentLines.length; i++) {
-                // #60249 again - write only ISO-8859-1.
-                this.commentLines.add(encodeUnicode(commentLines[i]));
-            }
-        }
-        
-        public String getKey() {
-            return key;
-        }
-        
-        public String getValue() {
-            return value;
-        }
-
-        public void setValue(String value) {
-            this.value = value;
-            keyValueLines = null;
-        }
-
-        public void setValue(List<String> value) {
-            StringBuilder val = new StringBuilder();
-            List<String> l = new ArrayList<String>();
-            if (!value.isEmpty()) {
-                l.add(encode(key, true) + "=\\"); // NOI18N
-                Iterator<String> it = value.iterator();
-                while (it.hasNext()) {
-                    String s = it.next();
-                    val.append(s);
-                    s = encode(s, false);
-                    l.add(it.hasNext() ? INDENT + s + '\\' : INDENT + s); // NOI18N
-                }
-            } else {
-                // #45061: for no vals, use just "prop="
-                l.add(encode(key, true) + '='); // NOI18N
-            }
-            this.value = val.toString();
-            keyValueLines = l;
-        }
-
-        public boolean isSeparate() {
-            return separate;
-        }
-
-        /**
-         * Returns persistent image of this property.
-         */
-        public List<String> getRawData() {
-            List<String> l = new ArrayList<String>();
-            if (commentLines != null) {
-                l.addAll(commentLines);
-            }
-            if (keyValueLines == null) {
-                keyValueLines = new ArrayList<String>();
-                if (key != null && value != null) {
-                    keyValueLines.add(encode(key, true)+"="+encode(value, false));
-                }
-            }
-            l.addAll(keyValueLines);
-            return l;
-        }
-        
-        private void parse(List<String> keyValueLines) {
-            // merge lines into one:
-            String line = mergeLines(keyValueLines);
-            // split key and value
-            splitKeyValue(line);
-        }
-        
-        private static String mergeLines(List<String> lines) {
-            if (lines.size() == 1) {
-                return trimLeft(lines.get(0));
-            }
-            StringBuilder line = new StringBuilder();
-            Iterator<String> it = lines.iterator();
-            while (it.hasNext()) {
-                String l = trimLeft(it.next());
-                // if this is not the last line then remove last backslash
-                if (it.hasNext()) {
-                    assert l.endsWith("\\") : lines;
-                    l = l.substring(0, l.length()-1);
-                }
-                line.append(l);
-            }
-            return line.toString();
-        }
-        
-        private void splitKeyValue(String line) {
-            int separatorIndex = 0;
-            int len = line.length();
-            POS: while (separatorIndex < len) {
-                char ch = line.charAt(separatorIndex);
-                if (ch == '\\') {
-                    // ignore next one character
-                    separatorIndex++;
-                } else {
-                    switch (ch) {
-                    case '=':
-                    case ':':
-                    case ' ':
-                    case '\t':
-                    case '\r':
-                    case '\n':
-                    case '\f':
-                        break POS;
-                    }
-                }
-                separatorIndex++;
-            }
-            key = decode(line.substring(0, separatorIndex));
-            line = trimLeft(line.substring(separatorIndex));
-            if (line.length() == 0) {
-                value = "";
-                return;
-            }
-            switch (line.charAt(0)) {
-            case '=':
-            case ':':
-                line = trimLeft(line.substring(1));
-            }
-            value = decode(line);
-        }
-        
-        private static String decode(String input) {
-            if (input.indexOf('\\') == -1) {
-                return input; // shortcut
-            }
-            char ch;
-            int len = input.length();
-            StringBuilder output = new StringBuilder(len);
-            for (int x=0; x<len; x++) {
-                ch = input.charAt(x);
-                if (ch != '\\') {
-                    output.append(ch);
-                    continue;
-                }
-                x++;
-                if (x==len) {
-                    // backslash at the end? syntax error: ignore it
-                    continue;
-                }
-                ch = input.charAt(x);
-                if (ch == 'u') {
-                    if (x+5>len) {
-                        // unicode character not finished? syntax error: ignore
-                        output.append(input.substring(x-1));
-                        x += 4;
-                        continue;
-                    }
-                    String val = input.substring(x+1, x+5);
-                    try {
-                        output.append((char)Integer.parseInt(val, 16));
-                    } catch (NumberFormatException e) {
-                        // #46234: handle gracefully
-                        output.append(input.substring(x - 1, x + 5));
-                    }
-                    x += 4;
-                } else {
-                    if (ch == 't') ch = '\t';
-                    else if (ch == 'r') ch = '\r';
-                    else if (ch == 'n') ch = '\n';
-                    else if (ch == 'f') ch = '\f';
-                    output.append(ch);
-                }
-            }
-            return output.toString();
-        }
-
-        private static String encode(String input, boolean forKey) {
-            int len = input.length();
-            StringBuilder output = new StringBuilder(len*2);
-
-            for(int x=0; x<len; x++) {
-                char ch = input.charAt(x);
-                switch(ch) {
-                    case ' ':
-                        if (x == 0 || forKey)  {
-                            output.append('\\');
-                        }
-                        output.append(ch);
-                        break;
-                    case '#':
-                        if (x == 0) {
-                            output.append('\\');
-                        }
-                        output.append(ch);
-                        break;
-                    case '\\':
-                        output.append("\\\\");
-                        break;
-                    case '\t':
-                        output.append("\\t");
-                        break;
-                    case '\n':
-                        output.append("\\n");
-                        break;
-                    case '\r':
-                        output.append("\\r");
-                        break;
-                    case '\f':
-                        output.append("\\f");
-                        break;
-                    case '=':
-                    case ':':
-                        if (forKey) {
-                            output.append('\\');
-                        }
-                        output.append(ch);
-                        break;
-                    default:
-                        if ((ch < 0x0020) || (ch > 0x007e)) {
-                            output.append("\\u");
-                            String hex = Integer.toHexString(ch);
-                            for (int i = 0; i < 4 - hex.length(); i++) {
-                                output.append('0');
-                            }
-                            output.append(hex);
-                        } else {
-                            output.append(ch);
-                        }
-                }
-            }
-            return output.toString();
-        }
-        
-        private static String decodeUnicode(String input) {
-            char ch;
-            int len = input.length();
-            StringBuilder output = new StringBuilder(len);
-            for (int x = 0; x < len; x++) {
-                ch = input.charAt(x);
-                if (ch != '\\') {
-                    output.append(ch);
-                    continue;
-                }
-                x++;
-                if (x==len) {
-                    // backslash at the end? syntax error: ignore it
-                    continue;
-                }
-                ch = input.charAt(x);
-                if (ch == 'u') {
-                    if (x+5>len) {
-                        // unicode character not finished? syntax error: ignore
-                        output.append(input.substring(x-1));
-                        x += 4;
-                        continue;
-                    }
-                    String val = input.substring(x+1, x+5);
-                    try {
-                        output.append((char)Integer.parseInt(val, 16));
-                    } catch (NumberFormatException e) {
-                        // #46234: handle gracefully
-                        output.append(input.substring(x - 1, x + 5));
-                    }
-                    x += 4;
-                } else {
-                    output.append(ch);
-                }
-            }
-            return output.toString();
-        }
-
-        private static String encodeUnicode(String input) {
-            int len = input.length();
-            StringBuilder output = new StringBuilder(len * 2);
-            for (int x = 0; x < len; x++) {
-                char ch = input.charAt(x);
-                if ((ch < 0x0020) || (ch > 0x007e)) {
-                    output.append("\\u"); // NOI18N
-                    String hex = Integer.toHexString(ch);
-                    for (int i = 0; i < 4 - hex.length(); i++) {
-                        output.append('0');
-                    }
-                    output.append(hex);
-                } else {
-                    output.append(ch);
-                }
-            }
-            return output.toString();
-        }
-
-        @Override
-        public Object clone() {
-            Item item = new Item();
-            if (keyValueLines != null) {
-                item.keyValueLines = new ArrayList<String>(keyValueLines);
-            }
-            if (commentLines != null) {
-                item.commentLines = new ArrayList<String>(commentLines);
-            }
-            item.key = key;
-            item.value = value;
-            item.separate = separate;
-            return item;
-        }
-    
-    }
-    
-    private class SetImpl extends AbstractSet<Map.Entry<String,String>> {
-
-        public SetImpl() {}
-        
-        public Iterator<Map.Entry<String,String>> iterator() {
-            return new IteratorImpl();
-        }
-        
-        public int size() {
-            return state.items.size();
-        }
-        
-    }
-    
-    private class IteratorImpl implements Iterator<Map.Entry<String,String>> {
-
-        private ListIterator<Item> delegate;
-        
-        public IteratorImpl() {
-            delegate = state.items.listIterator();
-        }
-        
-        public boolean hasNext() {
-            return findNext() != null;
-        }
-        
-        public Map.Entry<String,String> next() {
-            Item item = findNext();
-            if (item == null) {
-                throw new NoSuchElementException();
-            }
-            delegate.next();
-            return new MapEntryImpl(item);
-        }
-        
-        public void remove() {
-            delegate.previous();
-            Item item = findNext();
-            if (item == null) {
-                throw new IllegalStateException();
-            }
-            int index = delegate.nextIndex();
-            writeOperation();
-            Item removed = state.items.remove(index);
-            assert removed.getKey().equals(item.getKey());
-            state.itemIndex.remove(item.getKey());
-            delegate = state.items.listIterator(index);
-        }
-        
-        private Item findNext() {
-            while (delegate.hasNext()) {
-                Item item = delegate.next();
-                if (item.getKey() != null && item.getValue() != null) {
-                    // Found one. Back up!
-                    delegate.previous();
-                    return item;
-                }
-            }
-            return null;
-        }
-        
-    }
-    
-    private class MapEntryImpl implements Map.Entry<String,String> {
-        
-        private Item item;
-        
-        public MapEntryImpl(Item item) {
-            this.item = item;
-        }
-        
-        public String getKey() {
-            return item.getKey();
-        }
-        
-        public String getValue() {
-            return item.getValue();
-        }
-        
-        public String setValue(String value) {
-            writeOperation();
-            item = state.itemIndex.get(item.getKey());
-            String result = item.getValue();
-            item.setValue(value);
-            return result;
-        }
-        
-    }
-    
-}
diff --git a/src/org/openide/util/Enumerations.java b/src/org/openide/util/Enumerations.java
index aec0e02..794acaa 100644
--- a/src/org/openide/util/Enumerations.java
+++ b/src/org/openide/util/Enumerations.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/Exceptions.java b/src/org/openide/util/Exceptions.java
index 4661185..aa6bb86 100644
--- a/src/org/openide/util/Exceptions.java
+++ b/src/org/openide/util/Exceptions.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/HelpCtx.java b/src/org/openide/util/HelpCtx.java
index e6696a6..23ff32a 100644
--- a/src/org/openide/util/HelpCtx.java
+++ b/src/org/openide/util/HelpCtx.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/ImageUtilities.java b/src/org/openide/util/ImageUtilities.java
index 74185c0..bd646c8 100644
--- a/src/org/openide/util/ImageUtilities.java
+++ b/src/org/openide/util/ImageUtilities.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -50,11 +50,8 @@ import java.awt.Toolkit;
 import java.awt.Transparency;
 import java.awt.image.BufferedImage;
 import java.awt.image.ColorModel;
-import java.awt.image.FilteredImageSource;
 import java.awt.image.ImageObserver;
-import java.awt.image.ImageProducer;
 import java.awt.image.IndexColorModel;
-import java.awt.image.RGBImageFilter;
 import java.awt.image.WritableRaster;
 import java.io.IOException;
 import java.lang.ref.SoftReference;
@@ -279,31 +276,8 @@ public final class ImageUtilities {
         } else {
             return assignToolTipToImage(image, text);
         }
-    }
-
-    /**
-     * Creates disabled (color saturation lowered) icon.
-     * Icon image conversion is performed lazily.
-     * @param icon original icon used for conversion
-     * @return less saturated Icon
-     * @since 7.28
-     */
-    public static Icon createDisabledIcon(Icon icon)  {
-        Parameters.notNull("icon", icon);
-        return new LazyDisabledIcon(icon2Image(icon));
-    }
-
-    /**
-     * Creates disabled (color saturation lowered) image.
-     * @param image original image used for conversion
-     * @return less saturated Image
-     * @since 7.28
-     */
-    public static Image createDisabledImage(Image image)  {
-        Parameters.notNull("image", image);
-        return LazyDisabledIcon.createDisabledImage(image);
-    }
-
+    }    
+    
     /**
      * Get the class loader from lookup.
      * Since this is done very frequently, it is wasteful to query lookup each time.
@@ -789,61 +763,4 @@ public final class ImageUtilities {
             g.drawImage(this, x, y, null);
         }
     }
-
-    private static class LazyDisabledIcon implements Icon {
-
-        /** Shared instance of filter for disabled icons */
-        private static final RGBImageFilter DISABLED_BUTTON_FILTER = new DisabledButtonFilter();
-        private Image img;
-        private Icon disabledIcon;
-
-        public LazyDisabledIcon(Image img) {
-            assert null != img;
-            this.img = img;
-        }
-
-        public void paintIcon(Component c, Graphics g, int x, int y) {
-            getDisabledIcon().paintIcon(c, g, x, y);
-        }
-
-        public int getIconWidth() {
-            return getDisabledIcon().getIconWidth();
-        }
-
-        public int getIconHeight() {
-            return getDisabledIcon().getIconHeight();
-        }
-
-        private synchronized Icon getDisabledIcon() {
-            if (null == disabledIcon) {
-                disabledIcon = new ImageIcon(createDisabledImage(img));
-            }
-            return disabledIcon;
-        }
-
-        static Image createDisabledImage(Image img) {
-            ImageProducer prod = new FilteredImageSource(img.getSource(), DISABLED_BUTTON_FILTER);
-            return Toolkit.getDefaultToolkit().createImage(prod);
-        }
-    }
-
-    private static class DisabledButtonFilter extends RGBImageFilter {
-
-        DisabledButtonFilter() {
-            canFilterIndexColorModel = true;
-        }
-
-        public int filterRGB(int x, int y, int rgb) {
-            // Reduce the color bandwidth in quarter (>> 2) and Shift 0x88.
-            return (rgb & 0xff000000) + 0x888888 + ((((rgb >> 16) & 0xff) >> 2) << 16) + ((((rgb >> 8) & 0xff) >> 2) << 8) + (((rgb) & 0xff) >> 2);
-        }
-
-        // override the superclass behaviour to not pollute
-        // the heap with useless properties strings. Saves tens of KBs
-        @Override
-        public void setProperties(Hashtable props) {
-            props = (Hashtable) props.clone();
-            consumer.setProperties(props);
-        }
-    }
 }
diff --git a/src/org/openide/util/Lookup.java b/src/org/openide/util/Lookup.java
index 991ab4f..98151ff 100644
--- a/src/org/openide/util/Lookup.java
+++ b/src/org/openide/util/Lookup.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -41,15 +41,12 @@
 
 package org.openide.util;
 
-import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Iterator;
-import java.util.List;
 import java.util.Set;
 import org.openide.util.lookup.Lookups;
 import org.openide.util.lookup.ProxyLookup;
-import org.openide.util.lookup.ServiceProvider;
 
 /**
  * A general registry permitting clients to find instances of services
@@ -100,7 +97,6 @@ public abstract class Lookup {
      * is a JDK standard.
      *
      * @return the global lookup in the system
-     * @see ServiceProvider
      */
     public static synchronized Lookup getDefault() {
         if (defaultLookup != null) {
@@ -151,10 +147,8 @@ public abstract class Lookup {
         }
 
         DefLookup def = new DefLookup();
-        def.init(l, misl, false);
-        defaultLookup = def;
-        def.init(l, misl, true);
-        return defaultLookup;
+        def.init(l, misl);
+        return defaultLookup = def;
     }
     
     private static final class DefLookup extends ProxyLookup {
@@ -162,21 +156,12 @@ public abstract class Lookup {
             super(new Lookup[0]);
         }
         
-        public void init(ClassLoader loader, Lookup metaInfLookup, boolean addPath) {
+        public void init(ClassLoader loader, Lookup metaInfLookup) {
             // Had no such line, use simple impl.
             // It does however need to have ClassLoader available or many things will break.
             // Use the thread context classloader in effect now.
             Lookup clLookup = Lookups.singleton(loader);
-            List<Lookup> arr = new ArrayList<Lookup>();
-            arr.add(metaInfLookup);
-            arr.add(clLookup);
-            String paths = System.getProperty("org.openide.util.Lookup.paths"); // NOI18N
-            if (addPath && paths != null) {
-                for (String p : paths.split(":")) { // NOI18N
-                    arr.add(Lookups.forPath(p));
-                }
-            }
-            setLookups(arr.toArray(new Lookup[0]));
+            setLookups(new Lookup[] { metaInfLookup, clLookup });
         }
     }
     
@@ -186,7 +171,7 @@ public abstract class Lookup {
         if (defaultLookup instanceof DefLookup) {
             DefLookup def = (DefLookup)defaultLookup;
             ClassLoader l = Thread.currentThread().getContextClassLoader();
-            def.init(l, Lookups.metaInfServices(l), true);
+            def.init(l, Lookups.metaInfServices(l));
         }
     }
 
@@ -360,7 +345,6 @@ public abstract class Lookup {
         /* Computes hashcode for this template. The hashcode is cached.
          * @return hashcode
          */
-        @Override
         public int hashCode() {
             if (hashCode != 0) {
                 return hashCode;
@@ -376,7 +360,6 @@ public abstract class Lookup {
          * @param obj another template to check
          * @return true if so, false otherwise
          */
-        @Override
         public boolean equals(Object obj) {
             if (!(obj instanceof Template)) {
                 return false;
@@ -412,7 +395,6 @@ public abstract class Lookup {
         }
 
         /* for debugging */
-        @Override
         public String toString() {
             return "Lookup.Template[type=" + type + ",id=" + id + ",instance=" + instance + "]"; // NOI18N
         }
@@ -507,7 +489,6 @@ public abstract class Lookup {
         public abstract String getDisplayName();
 
         /* show ID for debugging */
-        @Override
         public String toString() {
             return getId();
         }
diff --git a/src/org/openide/util/LookupEvent.java b/src/org/openide/util/LookupEvent.java
index a41e8f1..39e5445 100644
--- a/src/org/openide/util/LookupEvent.java
+++ b/src/org/openide/util/LookupEvent.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/LookupListener.java b/src/org/openide/util/LookupListener.java
index be96dcc..9324046 100644
--- a/src/org/openide/util/LookupListener.java
+++ b/src/org/openide/util/LookupListener.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/MapFormat.java b/src/org/openide/util/MapFormat.java
index 2f6f91f..9c36481 100644
--- a/src/org/openide/util/MapFormat.java
+++ b/src/org/openide/util/MapFormat.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/Mutex.java b/src/org/openide/util/Mutex.java
index b5f3bb6..e40d85a 100644
--- a/src/org/openide/util/Mutex.java
+++ b/src/org/openide/util/Mutex.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/MutexException.java b/src/org/openide/util/MutexException.java
index d115d44..dff110e 100644
--- a/src/org/openide/util/MutexException.java
+++ b/src/org/openide/util/MutexException.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/NbBundle.java b/src/org/openide/util/NbBundle.java
index be9e570..d21f837 100644
--- a/src/org/openide/util/NbBundle.java
+++ b/src/org/openide/util/NbBundle.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -65,19 +65,17 @@ import java.util.logging.Level;
 import java.util.logging.Logger;
 
 /** Convenience class permitting easy loading of localized resources of various sorts.
-* Extends the functionality of {@link ResourceBundle} to handle branding, and interacts
-* better with class loaders in a module system.
+* Extends the functionality of the default Java resource support, and interacts
+* better with class loaders in a multiple-loader system.
 * <p>Example usage:
-* <pre>
+* <p><code><pre>
 * package com.mycom;
 * public class Foo {
-*     public String getDisplayName() {
-*         return {@link #getMessage(Class,String) NbBundle.getMessage}(Foo.class, "Foo.displayName");
-*     }
+*   // Search for tag Foo_theMessage in /com/mycom/Bundle.properties:
+*   private static String theMessage = {@link NbBundle#getMessage(Class, String) NbBundle.getMessage} (Foo.class, "Foo_theMessage");
+*   // Might also look in /com/mycom/Bundle_de.properties, etc.
 * }
-* </pre>
-* will in German locale look for the key {@code Foo.displayName} in
-* {@code com/mycom/Bundle_de.properties} and then {@code com/mycom/Bundle.properties} (in that order).
+* </pre></code>
 */
 public class NbBundle extends Object {
 
@@ -377,8 +375,7 @@ public class NbBundle extends Object {
 
     /** Get a resource bundle in the same package as the provided class,
     * with the default locale/branding and the class' own classloader.
-    * The usual style of invocation is {@link #getMessage(Class,String)}
-     * or one of the other overloads taking message formats.
+    * This is the usual style of invocation.
     *
     * @param clazz the class to take the package name from
     * @return the resource bundle
@@ -624,7 +621,7 @@ public class NbBundle extends Object {
 
     /**
      * Finds a localized and/or branded string in a bundle.
-    * @param clazz the class to use to locate the bundle (see {@link #getBundle(Class)} for details)
+    * @param clazz the class to use to locate the bundle
     * @param resName name of the resource to look for
     * @return the string associated with the resource
     * @throws MissingResourceException if either the bundle or the string cannot be found
@@ -638,7 +635,7 @@ public class NbBundle extends Object {
      * Finds a localized and/or branded string in a bundle and formats the message
     * by passing requested parameters.
     *
-    * @param clazz the class to use to locate the bundle (see {@link #getBundle(Class)} for details)
+    * @param clazz the class to use to locate the bundle
     * @param resName name of the resource to look for
     * @param param1 the argument to use when formatting the message
     * @return the string associated with the resource
@@ -654,7 +651,7 @@ public class NbBundle extends Object {
      * Finds a localized and/or branded string in a bundle and formats the message
     * by passing requested parameters.
     *
-    * @param clazz the class to use to locate the bundle (see {@link #getBundle(Class)} for details)
+    * @param clazz the class to use to locate the bundle
     * @param resName name of the resource to look for
     * @param param1 the argument to use when formatting the message
     * @param param2 the second argument to use for formatting
@@ -671,7 +668,7 @@ public class NbBundle extends Object {
      * Finds a localized and/or branded string in a bundle and formats the message
     * by passing requested parameters.
     *
-    * @param clazz the class to use to locate the bundle (see {@link #getBundle(Class)} for details)
+    * @param clazz the class to use to locate the bundle
     * @param resName name of the resource to look for
     * @param param1 the argument to use when formatting the message
     * @param param2 the second argument to use for formatting
@@ -689,34 +686,7 @@ public class NbBundle extends Object {
      * Finds a localized and/or branded string in a bundle and formats the message
     * by passing requested parameters.
     *
-    * @param clazz the class to use to locate the bundle (see {@link #getBundle(Class)} for details)
-    * @param resName name of the resource to look for
-    * @param param1 the argument to use when formatting the message
-    * @param param2 the second argument to use for formatting
-    * @param param3 the third argument to use for formatting
-    * @param param4 the fourth argument to use for formatting
-    * @param params fifth, sixth, ... arguments as needed
-    * @return the string associated with the resource
-    * @throws MissingResourceException if either the bundle or the string cannot be found
-    * @see java.text.MessageFormat#format(String,Object[])
-    * @since org.openide.util 7.27
-    */
-    public static String getMessage(Class clazz, String resName, Object param1, Object param2, Object param3, Object param4, Object... params)
-    throws MissingResourceException {
-        Object[] allParams = new Object[params.length + 4];
-        allParams[0] = param1;
-        allParams[1] = param2;
-        allParams[2] = param3;
-        allParams[3] = param4;
-        System.arraycopy(params, 0, allParams, 4, params.length);
-        return getMessage(clazz, resName, allParams);
-    }
-
-    /**
-     * Finds a localized and/or branded string in a bundle and formats the message
-    * by passing requested parameters.
-    *
-    * @param clazz the class to use to locate the bundle (see {@link #getBundle(Class)} for details)
+    * @param clazz the class to use to locate the bundle
     * @param resName name of the resource to look for
     * @param arr array of parameters to use for formatting the message
     * @return the string associated with the resource
@@ -790,7 +760,7 @@ public class NbBundle extends Object {
             this.attrs = attrs;
         }
 
-        public @Override String get(Object _k) {
+        public String get(Object _k) {
             if (!(_k instanceof String)) {
                 return null;
             }
@@ -835,7 +805,7 @@ public class NbBundle extends Object {
             return m.get(key);
         }
 
-        public @Override Locale getLocale() {
+        public Locale getLocale() {
             return locale;
         }
     }
@@ -860,7 +830,7 @@ public class NbBundle extends Object {
             this.sub2 = sub2;
         }
 
-        public @Override Locale getLocale() {
+        public Locale getLocale() {
             return loc;
         }
 
@@ -1076,7 +1046,7 @@ public class NbBundle extends Object {
             }
         }
 
-        public @Override InputStream getResourceAsStream(String name) {
+        public InputStream getResourceAsStream(String name) {
             InputStream base = super.getResourceAsStream(name);
 
             if (base == null) {
diff --git a/src/org/openide/util/NbCollections.java b/src/org/openide/util/NbCollections.java
index 937722c..45f0263 100644
--- a/src/org/openide/util/NbCollections.java
+++ b/src/org/openide/util/NbCollections.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/NbPreferences.java b/src/org/openide/util/NbPreferences.java
index 4167637..24fd1d9 100644
--- a/src/org/openide/util/NbPreferences.java
+++ b/src/org/openide/util/NbPreferences.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/NotImplementedException.java b/src/org/openide/util/NotImplementedException.java
index 21512cd..80d451d 100644
--- a/src/org/openide/util/NotImplementedException.java
+++ b/src/org/openide/util/NotImplementedException.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/Parameters.java b/src/org/openide/util/Parameters.java
index defc4f8..6b91237 100644
--- a/src/org/openide/util/Parameters.java
+++ b/src/org/openide/util/Parameters.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/Queue.java b/src/org/openide/util/Queue.java
index e20761b..89a4766 100644
--- a/src/org/openide/util/Queue.java
+++ b/src/org/openide/util/Queue.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/RE13.java b/src/org/openide/util/RE13.java
index 2899431..4dd7662 100644
--- a/src/org/openide/util/RE13.java
+++ b/src/org/openide/util/RE13.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/RequestProcessor.java b/src/org/openide/util/RequestProcessor.java
index f9e8fcf..c4f5120 100644
--- a/src/org/openide/util/RequestProcessor.java
+++ b/src/org/openide/util/RequestProcessor.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -126,10 +126,10 @@ public final class RequestProcessor implements Executor{
     // 50: a conservative value, just for case of misuse
 
     /** the static instance for users that do not want to have own processor */
-    private static final RequestProcessor UNLIMITED = new RequestProcessor("Default RequestProcessor", 50); // NOI18N
+    private static RequestProcessor UNLIMITED = new RequestProcessor("Default RequestProcessor", 50); // NOI18N
 
     /** A shared timer used to pass timeouted tasks to pending queue */
-    private static Timer starterThread = new Timer(true);
+    private static final Timer starterThread = new Timer(true);
 
     /** logger */
     private static Logger logger;
@@ -173,8 +173,6 @@ public final class RequestProcessor implements Executor{
     
     /** support for interrupts or not? */
     private boolean interruptThread;
-    /** fill stacktraces when task is posted? */
-    private boolean enableStackTraces;
 
     /** Creates new RequestProcessor with automatically assigned unique name. */
     public RequestProcessor() {
@@ -223,34 +221,11 @@ public final class RequestProcessor implements Executor{
      * @since 6.3
      */
     public RequestProcessor(String name, int throughput, boolean interruptThread) {
-        this(name, throughput, interruptThread, SLOW);
-    }
-
-    /** Creates a new named <code>RequestProcessor</code> that allows to disable stack trace filling.
-     * By default, when assertions are on, each task posted on <code>RequestProcessor</code> stores
-     * the stack trace at the time of posting. When an exception is later thrown from the task,
-     * it allows to print not only stack trace of the task but also stack trace of the code that posted it.
-     * However this may be a performance bottleneck in cases when hundreds of short task are scheduled.
-     * This constructor then allows to create <code>RequestProcessor</code> which never stores stack traces
-     * at the time of posting.
-     * <p>
-     * See constructor {@link #RequestProcessor(String, int, boolean)} for details of <code>interruptThread</code>
-     * parameter.
-     * </p>
-     * @param name the name to use for the request processor thread
-     * @param throughput the maximal count of requests allowed to run in parallel
-     * @param interruptThread true if {@link RequestProcessor.Task#cancel} shall interrupt the thread
-     * @param enableStackTraces <code>false</code> when request processor should not fill stack traces when task is posted.
-     *              Default is <code>true</code> when assertions are enabled, <code>false</code> otherwise.
-     * @since 7.24
-     */
-    public RequestProcessor(String name, int throughput, boolean interruptThread, boolean enableStackTraces) {
         this.throughput = throughput;
         this.name = (name != null) ? name : ("OpenIDE-request-processor-" + (counter++));
         this.interruptThread = interruptThread;
-        this.enableStackTraces = enableStackTraces;
     }
-
+    
     
     /** The getter for the shared instance of the <CODE>RequestProcessor</CODE>.
      * This instance is shared by anybody who
@@ -455,7 +430,7 @@ public final class RequestProcessor implements Executor{
     /** Logger for the error manager.
      */
     static Logger logger() {
-        synchronized (UNLIMITED) {
+        synchronized (starterThread) {
             if (logger == null) {
                 logger = Logger.getLogger("org.openide.util.RequestProcessor"); // NOI18N
             }
@@ -652,30 +627,14 @@ public final class RequestProcessor implements Executor{
                     item.clear(null);
                 }
 
-                item = enableStackTraces ?
-                    new SlowItem(this, RequestProcessor.this) :
-                    new FastItem(this, RequestProcessor.this);
+                item = new Item(this, RequestProcessor.this);
                 localItem = item;
             }
 
             if (delay == 0) { // Place it to pending queue immediatelly
                 enqueue(localItem);
             } else { // Post the starter
-                while (true) {
-                    Timer timer = starterThread;
-                    try {
-                        timer.schedule(new EnqueueTask(localItem), delay);
-                        break;
-                    } catch (IllegalStateException e) {
-                        logger().info(e.toString());
-                        // starterThread cancelled, create new one and try to schedule again
-                        synchronized (UNLIMITED) {
-                            if (timer == starterThread) {
-                                starterThread = new Timer(true);
-                            }
-                        }
-                    }
-                }
+                starterThread.schedule(new EnqueueTask(localItem), delay);
             }
         }
 
@@ -854,8 +813,8 @@ public final class RequestProcessor implements Executor{
     /* One item representing the task pending in the pending queue */
     private static class Item extends Exception {
         private final RequestProcessor owner;
-        Object action;
-        boolean enqueued;
+        private Object action;
+        private boolean enqueued;
         String message;
 
         Item(Task task, RequestProcessor rp) {
@@ -890,44 +849,31 @@ public final class RequestProcessor implements Executor{
             return getTask().getPriority();
         }
 
-        public @Override String getMessage() {
-            return message;
-        }
-
-    }
-
-    private static class FastItem extends Item {
-        FastItem(Task task, RequestProcessor rp) {
-            super(task, rp);
-        }
-
         @Override
         public Throwable fillInStackTrace() {
-            return this;
+            if (SLOW) {
+                Throwable ret = super.fillInStackTrace();
+                StackTraceElement[] arr = ret.getStackTrace();
+                for (int i = 1; i < arr.length; i++) {
+                    if (arr[i].getClassName().startsWith("java.lang")) {
+                        continue;
+                    }
+                    if (arr[i].getClassName().startsWith(RequestProcessor.class.getName())) {
+                        continue;
+                    }
+                    ret.setStackTrace(Arrays.asList(arr).subList(i - 1, arr.length).toArray(new StackTraceElement[0]));
+                    break;
+                }
+                return ret;
+            } else {
+                return this;
+            }
         }
-    }
-    private static class SlowItem extends Item {
 
-        SlowItem(Task task, RequestProcessor rp) {
-            super(task, rp);
+        public @Override String getMessage() {
+            return message;
         }
 
-        @Override
-        public Throwable fillInStackTrace() {
-            Throwable ret = super.fillInStackTrace();
-            StackTraceElement[] arr = ret.getStackTrace();
-            for (int i = 1; i < arr.length; i++) {
-                if (arr[i].getClassName().startsWith("java.lang")) {
-                    continue;
-                }
-                if (arr[i].getClassName().startsWith(RequestProcessor.class.getName())) {
-                    continue;
-                }
-                ret.setStackTrace(Arrays.asList(arr).subList(i - 1, arr.length).toArray(new StackTraceElement[0]));
-                break;
-            }
-            return ret;
-        }
     }
 
     //------------------------------------------------------------------------------
diff --git a/src/org/openide/util/SharedClassObject.java b/src/org/openide/util/SharedClassObject.java
index f507736..c0557ef 100644
--- a/src/org/openide/util/SharedClassObject.java
+++ b/src/org/openide/util/SharedClassObject.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/Task.java b/src/org/openide/util/Task.java
index 2ccce82..8490e65 100644
--- a/src/org/openide/util/Task.java
+++ b/src/org/openide/util/Task.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -198,7 +198,9 @@ public class Task extends Object implements Runnable {
     */
     protected final void notifyRunning() {
         synchronized (this) {
-            RequestProcessor.logger().log(Level.FINE, "notifyRunning: {0}", this); // NOI18N
+            if (RequestProcessor.logger().isLoggable(Level.FINE)) {
+                RequestProcessor.logger().fine("notifyRunning: " + this); // NOI18N
+            }
             this.finished = false;
             notifyAll();
         }
@@ -212,7 +214,9 @@ public class Task extends Object implements Runnable {
 
         synchronized (this) {
             finished = true;
-            RequestProcessor.logger().log(Level.FINE, "notifyFinished: {0}", this); // NOI18N
+            if (RequestProcessor.logger().isLoggable(Level.FINE)) {
+                RequestProcessor.logger().fine("notifyFinished: " + this); // NOI18N
+            }
             notifyAll();
 
             // fire the listeners
diff --git a/src/org/openide/util/TaskListener.java b/src/org/openide/util/TaskListener.java
index 768a411..d9268a3 100644
--- a/src/org/openide/util/TaskListener.java
+++ b/src/org/openide/util/TaskListener.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/TimedSoftReference.java b/src/org/openide/util/TimedSoftReference.java
index 2525bb7..23d1db5 100644
--- a/src/org/openide/util/TimedSoftReference.java
+++ b/src/org/openide/util/TimedSoftReference.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/TopologicalSortException.java b/src/org/openide/util/TopologicalSortException.java
index 4bb9f7d..646d29c 100644
--- a/src/org/openide/util/TopologicalSortException.java
+++ b/src/org/openide/util/TopologicalSortException.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/URLStreamHandlerRegistration.java b/src/org/openide/util/URLStreamHandlerRegistration.java
deleted file mode 100644
index e5a1f09..0000000
--- a/src/org/openide/util/URLStreamHandlerRegistration.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- *
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common
- * Development and Distribution License("CDDL") (collectively, the
- * "License"). You may not use this file except in compliance with the
- * License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html
- * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
- * specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header
- * Notice in each file and include the License file at
- * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the
- * License Header, with the fields enclosed by brackets [] replaced by
- * your own identifying information:
- * "Portions Copyrighted [year] [name of copyright owner]"
- *
- * If you wish your version of this file to be governed by only the CDDL
- * or only the GPL Version 2, indicate your decision by adding
- * "[Contributor] elects to include this software in this distribution
- * under the [CDDL or GPL Version 2] license." If you do not indicate a
- * single choice of license, a recipient has the option to distribute
- * your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above.
- * However, if you add GPL Version 2 code and therefore, elected the GPL
- * Version 2 license, then the option applies only if the new code is
- * made subject to such option by the copyright holder.
- *
- * Contributor(s):
- *
- * Portions Copyrighted 2009 Sun Microsystems, Inc.
- */
-
-package org.openide.util;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import java.net.URL;
-import java.net.URLStreamHandler;
-import java.net.URLStreamHandlerFactory;
-
-/**
- * Replacement for {@link URLStreamHandlerFactory} within the NetBeans platform.
- * (The JVM only permits one global factory to be set at a time,
- * whereas various independent modules may wish to register handlers.)
- * May be placed on a {@link URLStreamHandler} implementation to register it.
- * Your handler will be loaded and used if and when a URL of a matching protocol is created.
- * <p>A {@link URLStreamHandlerFactory} which uses these registrations may be found in {@link Lookup#getDefault}.
- * This factory is active whenever the module system is loaded.
- * You may also wish to call {@link URL#setURLStreamHandlerFactory}
- * from a unit test or otherwise without the module system active.
- * @since org.openide.util 7.31
- */
- at Retention(RetentionPolicy.SOURCE)
- at Target(ElementType.TYPE)
-public @interface URLStreamHandlerRegistration {
-
-    /**
-     * URL protocol(s) which are handled.
-     * {@link URLStreamHandler#openConnection} will be called with a matching {@link URL#getProtocol}.
-     */
-    String[] protocol();
-
-    /**
-     * An optional position in which to register this handler relative to others.
-     * The lowest-numbered handler is used in favor of any others, including unnumbered handlers.
-     */
-    int position() default Integer.MAX_VALUE;
-
-}
diff --git a/src/org/openide/util/Union2.java b/src/org/openide/util/Union2.java
index 8a90261..e3e2928 100644
--- a/src/org/openide/util/Union2.java
+++ b/src/org/openide/util/Union2.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/UserCancelException.java b/src/org/openide/util/UserCancelException.java
index 7c1c43a..cd425f4 100644
--- a/src/org/openide/util/UserCancelException.java
+++ b/src/org/openide/util/UserCancelException.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/UserQuestionException.java b/src/org/openide/util/UserQuestionException.java
index 8c54d90..1bf16b5 100644
--- a/src/org/openide/util/UserQuestionException.java
+++ b/src/org/openide/util/UserQuestionException.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/Utilities.java b/src/org/openide/util/Utilities.java
index 6e84029..171ddf7 100644
--- a/src/org/openide/util/Utilities.java
+++ b/src/org/openide/util/Utilities.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -737,9 +737,7 @@ widthcheck:  {
     * @param replaceFrom the substring to be find
     * @param replaceTo the substring to replace it with
     * @return a new string with all occurrences replaced
-     * @deprecated Use {@link String#replace(CharSequence,CharSequence)} instead
     */
-    @Deprecated
     public static String replaceString(String original, String replaceFrom, String replaceTo) {
         int index = 0;
 
diff --git a/src/org/openide/util/UtilitiesCompositeActionMap.java b/src/org/openide/util/UtilitiesCompositeActionMap.java
index 2566e9f..a1d151c 100644
--- a/src/org/openide/util/UtilitiesCompositeActionMap.java
+++ b/src/org/openide/util/UtilitiesCompositeActionMap.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/WeakListenerImpl.java b/src/org/openide/util/WeakListenerImpl.java
index 039f7e6..f7fe4df 100644
--- a/src/org/openide/util/WeakListenerImpl.java
+++ b/src/org/openide/util/WeakListenerImpl.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/WeakListeners.java b/src/org/openide/util/WeakListeners.java
index cf52d0e..79cf171 100644
--- a/src/org/openide/util/WeakListeners.java
+++ b/src/org/openide/util/WeakListeners.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/WeakSet.java b/src/org/openide/util/WeakSet.java
index 447b739..ac371ac 100644
--- a/src/org/openide/util/WeakSet.java
+++ b/src/org/openide/util/WeakSet.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/actions/ActionPerformer.java b/src/org/openide/util/actions/ActionPerformer.java
index 45c6232..ff80463 100644
--- a/src/org/openide/util/actions/ActionPerformer.java
+++ b/src/org/openide/util/actions/ActionPerformer.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/actions/BooleanStateAction.java b/src/org/openide/util/actions/BooleanStateAction.java
index e14f328..e2cbc8f 100644
--- a/src/org/openide/util/actions/BooleanStateAction.java
+++ b/src/org/openide/util/actions/BooleanStateAction.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/actions/CallableSystemAction.java b/src/org/openide/util/actions/CallableSystemAction.java
index 8545a9e..056b47e 100644
--- a/src/org/openide/util/actions/CallableSystemAction.java
+++ b/src/org/openide/util/actions/CallableSystemAction.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -47,19 +47,10 @@ import java.util.Set;
 import java.util.logging.Logger;
 import org.openide.util.WeakSet;
 
-/** Not preferred anymore, use <a href="@org-openide-awt@/org/openide/awt/Actions.html#alwaysEnabled(java.awt.event.ActionListener,%20java.lang.String,%20java.lang.String,%20boolean)">Actions.alwaysEnabled</a>
-* instead. To migrate your
-* <a href="@org-openide-modules@/org/openide/modules/doc-files/api.html#how-layer">
-* layer definition</a> use:
-* <pre>
-* &lt;file name="your-pkg-action-id.instance"&gt;
-*   &lt;attr name="instanceCreate" methodvalue="org.openide.awt.Actions.alwaysEnabled"/&gt;
-*   &lt;attr name="delegate" methodvalue="your.pkg.YourAction.factoryMethod"/&gt;
-*   &lt;attr name="displayName" bundlevalue="your.pkg.Bundle#key"/&gt;
-*   &lt;attr name="iconBase" stringvalue="your/pkg/YourImage.png"/&gt;
-*   &lt;!-- if desired: &lt;attr name="noIconInMenu" boolvalue="false"/&gt; --&gt;
-* &lt;/file&gt;
-* </pre>
+/** An action which may be called programmatically.
+* Typically a presenter will call its {@link #performAction} method,
+* which must be implemented.
+* <p>Provides default presenters using the <a href="@org-openide-awt@/org/openide/awt/Actions.html">Actions</a> utility class.
 *
 * @author   Ian Formanek, Jaroslav Tulach, Jan Jancura, Petr Hamernik
 */
diff --git a/src/org/openide/util/actions/CallbackSystemAction.java b/src/org/openide/util/actions/CallbackSystemAction.java
index d763965..23509c1 100644
--- a/src/org/openide/util/actions/CallbackSystemAction.java
+++ b/src/org/openide/util/actions/CallbackSystemAction.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -66,24 +66,11 @@ import org.openide.util.Utilities;
 import org.openide.util.WeakListeners;
 import org.openide.util.WeakSet;
 
-/** Not preferred anymore, the replacement is
-* <a href="@org-openide-awt@/org/openide/awt/Actions.html#callback(java.lang.String,%20javax.swing.Action,%20boolean,%20java.lang.String,%20java.lang.String,%20boolean)">Actions.callback</a> factory method.
-* To migrate to the new API just remove the definition of your action in
-* <a href="@org-openide-modules@/org/openide/modules/doc-files/api.html#how-layer">
-* layer file</a> and replace it with:
-* <pre>
-* &lt;file name="action-pkg-ClassName.instance"&gt;
-*   &lt;attr name="instanceCreate" methodvalue="org.openide.awt.Actions.callback"/&gt;
-*   &lt;attr name="key" stringvalue="KeyInActionMap"/&gt;
-*   &lt;attr name="surviveFocusChange" boolvalue="false"/&gt; &lt;!-- defaults to false --&gt;
-*   &lt;attr name="fallback" newvalue="action.pkg.DefaultAction"/&gt; &lt;!-- may be missing --&gt;
-*   &lt;attr name="displayName" bundlevalue="your.pkg.Bundle#key"/&gt;
-*   &lt;attr name="iconBase" stringvalue="your/pkg/YourImage.png"/&gt;
-*   &lt;!-- if desired: &lt;attr name="noIconInMenu" boolvalue="false"/&gt; --&gt;
-* &lt;/file&gt;
-* </pre>
-*
-*
+/** Action that can have a performer of the action attached to it at any time,
+* or changed.
+* The action will be automatically disabled
+* when it has no performer.
+* <p>Also may be made sensitive to changes in window focus.
 * @author   Ian Formanek, Jaroslav Tulach, Petr Hamernik
 */
 public abstract class CallbackSystemAction extends CallableSystemAction implements ContextAwareAction {
diff --git a/src/org/openide/util/actions/Presenter.java b/src/org/openide/util/actions/Presenter.java
index a568729..e42e044 100644
--- a/src/org/openide/util/actions/Presenter.java
+++ b/src/org/openide/util/actions/Presenter.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/actions/SystemAction.java b/src/org/openide/util/actions/SystemAction.java
index 0e0ec08..444be10 100644
--- a/src/org/openide/util/actions/SystemAction.java
+++ b/src/org/openide/util/actions/SystemAction.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/datatransfer/Bundle.properties b/src/org/openide/util/datatransfer/Bundle.properties
index 3992a4e..d160d92 100644
--- a/src/org/openide/util/datatransfer/Bundle.properties
+++ b/src/org/openide/util/datatransfer/Bundle.properties
@@ -1,6 +1,6 @@
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 #
-# Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+# Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
 #
 # The contents of this file are subject to the terms of either the GNU
 # General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/datatransfer/ClipboardEvent.java b/src/org/openide/util/datatransfer/ClipboardEvent.java
index 9fb8da8..c7c137c 100644
--- a/src/org/openide/util/datatransfer/ClipboardEvent.java
+++ b/src/org/openide/util/datatransfer/ClipboardEvent.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/datatransfer/ClipboardListener.java b/src/org/openide/util/datatransfer/ClipboardListener.java
index 8c8c5b0..749ddf9 100644
--- a/src/org/openide/util/datatransfer/ClipboardListener.java
+++ b/src/org/openide/util/datatransfer/ClipboardListener.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/datatransfer/ExClipboard.java b/src/org/openide/util/datatransfer/ExClipboard.java
index 301315b..0088d73 100644
--- a/src/org/openide/util/datatransfer/ExClipboard.java
+++ b/src/org/openide/util/datatransfer/ExClipboard.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/datatransfer/ExTransferable.java b/src/org/openide/util/datatransfer/ExTransferable.java
index b0d222f..6d67589 100644
--- a/src/org/openide/util/datatransfer/ExTransferable.java
+++ b/src/org/openide/util/datatransfer/ExTransferable.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/datatransfer/MultiTransferObject.java b/src/org/openide/util/datatransfer/MultiTransferObject.java
index 768b44b..dbbcc34 100644
--- a/src/org/openide/util/datatransfer/MultiTransferObject.java
+++ b/src/org/openide/util/datatransfer/MultiTransferObject.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/datatransfer/NewType.java b/src/org/openide/util/datatransfer/NewType.java
index b2af7b3..ece8a68 100644
--- a/src/org/openide/util/datatransfer/NewType.java
+++ b/src/org/openide/util/datatransfer/NewType.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/datatransfer/PasteType.java b/src/org/openide/util/datatransfer/PasteType.java
index 6ef242b..803e1b6 100644
--- a/src/org/openide/util/datatransfer/PasteType.java
+++ b/src/org/openide/util/datatransfer/PasteType.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/datatransfer/TransferListener.java b/src/org/openide/util/datatransfer/TransferListener.java
index 8200652..2e3a54f 100644
--- a/src/org/openide/util/datatransfer/TransferListener.java
+++ b/src/org/openide/util/datatransfer/TransferListener.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/doc-files/api.html b/src/org/openide/util/doc-files/api.html
index ce1b379..311d2de 100644
--- a/src/org/openide/util/doc-files/api.html
+++ b/src/org/openide/util/doc-files/api.html
@@ -1,7 +1,7 @@
 <!--
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
 
 
 The contents of this file are subject to the terms of either the GNU
diff --git a/src/org/openide/util/io/FoldingIOException.java b/src/org/openide/util/io/FoldingIOException.java
index 9adcc97..ec78e59 100644
--- a/src/org/openide/util/io/FoldingIOException.java
+++ b/src/org/openide/util/io/FoldingIOException.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/io/NbMarshalledObject.java b/src/org/openide/util/io/NbMarshalledObject.java
index 19f0950..bd90989 100644
--- a/src/org/openide/util/io/NbMarshalledObject.java
+++ b/src/org/openide/util/io/NbMarshalledObject.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/io/NbObjectInputStream.java b/src/org/openide/util/io/NbObjectInputStream.java
index 97220e4..33978f3 100644
--- a/src/org/openide/util/io/NbObjectInputStream.java
+++ b/src/org/openide/util/io/NbObjectInputStream.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/io/NbObjectOutputStream.java b/src/org/openide/util/io/NbObjectOutputStream.java
index c10376a..4637c39 100644
--- a/src/org/openide/util/io/NbObjectOutputStream.java
+++ b/src/org/openide/util/io/NbObjectOutputStream.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -204,8 +204,7 @@ public class NbObjectOutputStream extends ObjectOutputStream {
         Boolean okay = examinedClasses.get(classname);
         
         if (okay == null) {
-            if (classname.equals("java.util.HashSet") || classname.equals("java.util.ArrayList") || // NOI18N
-                clazz.isEnum() || classname.equals("java.lang.Enum")) { // NOI18N
+            if (classname.equals("java.util.HashSet") || classname.equals("java.util.ArrayList") || clazz.isEnum()) { // NOI18N
                 okay = Boolean.TRUE;
             } else {
                 okay = Boolean.FALSE;
@@ -223,7 +222,7 @@ public class NbObjectOutputStream extends ObjectOutputStream {
 
             examinedClasses.put(clazz.getName(), okay);
         }
-        
+
         return okay.booleanValue();
     }
 }
diff --git a/src/org/openide/util/io/NullInputStream.java b/src/org/openide/util/io/NullInputStream.java
index 7b488db..f47301f 100644
--- a/src/org/openide/util/io/NullInputStream.java
+++ b/src/org/openide/util/io/NullInputStream.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/io/NullOutputStream.java b/src/org/openide/util/io/NullOutputStream.java
index ccb8021..e1641a2 100644
--- a/src/org/openide/util/io/NullOutputStream.java
+++ b/src/org/openide/util/io/NullOutputStream.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/io/OperationException.java b/src/org/openide/util/io/OperationException.java
index af9f280..47d07da 100644
--- a/src/org/openide/util/io/OperationException.java
+++ b/src/org/openide/util/io/OperationException.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/io/ReaderInputStream.java b/src/org/openide/util/io/ReaderInputStream.java
index 80a0b98..0d00d98 100644
--- a/src/org/openide/util/io/ReaderInputStream.java
+++ b/src/org/openide/util/io/ReaderInputStream.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/io/SafeException.java b/src/org/openide/util/io/SafeException.java
index f7c663f..4ff7918 100644
--- a/src/org/openide/util/io/SafeException.java
+++ b/src/org/openide/util/io/SafeException.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/lookup/ALPairComparator.java b/src/org/openide/util/lookup/ALPairComparator.java
index e6163e6..29a5193 100644
--- a/src/org/openide/util/lookup/ALPairComparator.java
+++ b/src/org/openide/util/lookup/ALPairComparator.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/lookup/AbstractLookup.java b/src/org/openide/util/lookup/AbstractLookup.java
index 6e1cbc1..30a0ef4 100644
--- a/src/org/openide/util/lookup/AbstractLookup.java
+++ b/src/org/openide/util/lookup/AbstractLookup.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/lookup/ArrayStorage.java b/src/org/openide/util/lookup/ArrayStorage.java
index bb046c6..036f7f8 100644
--- a/src/org/openide/util/lookup/ArrayStorage.java
+++ b/src/org/openide/util/lookup/ArrayStorage.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -223,7 +223,6 @@ implements AbstractLookup.Storage<ArrayStorage.Transaction> {
             class JustPairs implements Enumeration<Pair<T>> {
                 private Pair<T> next;
 
-                @SuppressWarnings("unchecked")
                 private Pair<T> findNext() {
                     for (;;) {
                         if (next != null) {
@@ -235,7 +234,7 @@ implements AbstractLookup.Storage<ArrayStorage.Transaction> {
                         Object o = all.nextElement();
                         boolean ok;
                         if (o instanceof AbstractLookup.Pair) {
-                            ok = (clazz == null) || ((AbstractLookup.Pair<?>) o).instanceOf(clazz);
+                            ok = (clazz == null) || ((AbstractLookup.Pair) o).instanceOf(clazz);
                         } else {
                             ok = false;
                         }
@@ -367,23 +366,23 @@ implements AbstractLookup.Storage<ArrayStorage.Transaction> {
 
         public Transaction(int ensure, Object currentContent) {
             Integer trashold;
-            Object[] _arr;
+            Object[] arr;
 
             if (currentContent instanceof Integer) {
                 trashold = (Integer) currentContent;
-                _arr = null;
+                arr = null;
             } else {
-                _arr = (Object[]) currentContent;
+                arr = (Object[]) currentContent;
 
-                if (_arr[_arr.length - 1] instanceof Integer) {
-                    trashold = (Integer) _arr[_arr.length - 1];
+                if (arr[arr.length - 1] instanceof Integer) {
+                    trashold = (Integer) arr[arr.length - 1];
                 } else {
                     // nowhere to grow we have reached the limit
                     trashold = null;
                 }
             }
 
-            int maxSize = (trashold == null) ? _arr.length : trashold.intValue();
+            int maxSize = (trashold == null) ? arr.length : trashold.intValue();
 
             if (ensure > maxSize) {
                 throw new UnsupportedOperationException();
@@ -399,19 +398,19 @@ implements AbstractLookup.Storage<ArrayStorage.Transaction> {
 
             if (ensure == -2) {
                 // adding one
-                if (_arr == null) {
+                if (arr == null) {
                     // first time add, let's allocate the array
-                    _arr = new Object[2];
-                    _arr[1] = trashold;
+                    arr = new Object[2];
+                    arr[1] = trashold;
                 } else {
-                    if (_arr[_arr.length - 1] instanceof AbstractLookup.Pair) {
+                    if (arr[arr.length - 1] instanceof AbstractLookup.Pair) {
                         // we are full
                         throw new UnsupportedOperationException();
                     } else {
                         // ensure we have allocated enough space
-                        if (_arr.length < 2 || _arr[_arr.length - 2] != null) {
+                        if (arr.length < 2 || arr[arr.length - 2] != null) {
                             // double the array
-                            int newSize = (_arr.length - 1) * 2;
+                            int newSize = (arr.length - 1) * 2;
                             
                             if (newSize <= 1) {
                                 newSize = 2;
@@ -420,26 +419,26 @@ implements AbstractLookup.Storage<ArrayStorage.Transaction> {
                             if (newSize > maxSize) {
                                 newSize = maxSize;
 
-                                if (newSize <= _arr.length) {
+                                if (newSize <= arr.length) {
                                     // no space to get in
                                     throw new UnsupportedOperationException();
                                 }
 
-                                _arr = new Object[newSize];
+                                arr = new Object[newSize];
                             } else {
                                 // still a lot of space
-                                _arr = new Object[newSize + 1];
-                                _arr[newSize] = trashold;
+                                arr = new Object[newSize + 1];
+                                arr[newSize] = trashold;
                             }
 
                             // copy content of original array without the last Integer into 
                             // the new one
-                            System.arraycopy(currentContent, 0, _arr, 0, ((Object[]) currentContent).length - 1);
+                            System.arraycopy(currentContent, 0, arr, 0, ((Object[]) currentContent).length - 1);
                         }
                     }
                 }
 
-                this.current = _arr;
+                this.current = arr;
                 this.arr = null;
             } else {
                 // allocate array for complete replacement
diff --git a/src/org/openide/util/lookup/DelegatingStorage.java b/src/org/openide/util/lookup/DelegatingStorage.java
index e34ffbf..2f9370f 100644
--- a/src/org/openide/util/lookup/DelegatingStorage.java
+++ b/src/org/openide/util/lookup/DelegatingStorage.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/lookup/ExcludingLookup.java b/src/org/openide/util/lookup/ExcludingLookup.java
index 0399b68..0e3819f 100644
--- a/src/org/openide/util/lookup/ExcludingLookup.java
+++ b/src/org/openide/util/lookup/ExcludingLookup.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/lookup/InheritanceTree.java b/src/org/openide/util/lookup/InheritanceTree.java
index d777b5e..8f5d9ed 100644
--- a/src/org/openide/util/lookup/InheritanceTree.java
+++ b/src/org/openide/util/lookup/InheritanceTree.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/lookup/InstanceContent.java b/src/org/openide/util/lookup/InstanceContent.java
index 065bbd6..50d3218 100644
--- a/src/org/openide/util/lookup/InstanceContent.java
+++ b/src/org/openide/util/lookup/InstanceContent.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/lookup/Lookups.java b/src/org/openide/util/lookup/Lookups.java
index 47cb2c4..498896c 100644
--- a/src/org/openide/util/lookup/Lookups.java
+++ b/src/org/openide/util/lookup/Lookups.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -24,7 +24,7 @@
  * Contributor(s):
  *
  * The Original Software is NetBeans. The Initial Developer of the Original
- * Software is Sun Microsystems, Inc. Portions Copyright 1997-2009 Sun
+ * Software is Sun Microsystems, Inc. Portions Copyright 1997-2008 Sun
  * Microsystems, Inc. All Rights Reserved.
  *
  * If you wish your version of this file to be governed by only the CDDL
@@ -92,14 +92,6 @@ public class Lookups {
             throw new NullPointerException();
         }
 
-        if (objectsToLookup.length == 0) {
-            return Lookup.EMPTY;
-        }
-
-        if (objectsToLookup.length == 1) {
-            return singleton(objectsToLookup[0]);
-        }
-
         return new SimpleLookup(Arrays.asList(objectsToLookup));
     }
 
@@ -301,7 +293,7 @@ public class Lookups {
             return (Class<? extends T>)instance.getClass();
         }
 
-        public @Override boolean equals(Object object) {
+        public boolean equals(Object object) {
             if (object instanceof LookupItem) {
                 return instance == ((LookupItem) object).getInstance();
             }
@@ -309,7 +301,7 @@ public class Lookups {
             return false;
         }
 
-        public @Override int hashCode() {
+        public int hashCode() {
             return instance.hashCode();
         }
     }
diff --git a/src/org/openide/util/lookup/MetaInfServicesLookup.java b/src/org/openide/util/lookup/MetaInfServicesLookup.java
index 423b1ab..ba6b66a 100644
--- a/src/org/openide/util/lookup/MetaInfServicesLookup.java
+++ b/src/org/openide/util/lookup/MetaInfServicesLookup.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -60,7 +60,6 @@ import java.util.WeakHashMap;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import org.openide.util.Lookup;
-import org.openide.util.RequestProcessor;
 
 /**
  * @author Jaroslav Tulach, Jesse Glick
@@ -70,7 +69,6 @@ import org.openide.util.RequestProcessor;
 final class MetaInfServicesLookup extends AbstractLookup {
 
     private static final Logger LOGGER = Logger.getLogger(MetaInfServicesLookup.class.getName());
-    static final RequestProcessor RP = new RequestProcessor(MetaInfServicesLookup.class.getName(), 1);
     private static int knownInstancesCount;
     private static final List<Reference<Object>> knownInstances;
     static {
@@ -113,25 +111,26 @@ final class MetaInfServicesLookup extends AbstractLookup {
     protected final void beforeLookup(Lookup.Template t) {
         Class c = t.getType();
 
-        Collection<AbstractLookup.Pair<?>> toAdd = null;
+        HashSet<AbstractLookup.R> listeners;
+
         synchronized (this) {
-            if (classes.get(c) == null) { // NOI18N
-                toAdd = new ArrayList<Pair<?>>();
+            if (classes.put(c, "") == null) { // NOI18N
+                // Added new class, search for it.
+                LinkedHashSet<AbstractLookup.Pair<?>> arr = getPairsAsLHS();
+                search(c, arr);
+
+                // listeners are notified under while holding lock on class c, 
+                // let say it is acceptable now
+                listeners = setPairsAndCollectListeners(arr);
             } else {
                 // ok, nothing needs to be done
                 return;
             }
         }
-        if (toAdd != null) {
-            search(c, toAdd);
-        }
-        synchronized (this) {
-            if (classes.put(c, "") == null) { // NOI18N
-                // Added new class, search for it.
-                LinkedHashSet<AbstractLookup.Pair<?>> arr = getPairsAsLHS();
-                arr.addAll(toAdd);
-                setPairs(arr, RP);
-            }
+
+        NotifyListeners notify = new NotifyListeners(listeners);
+        if (notify.shallRun()) {
+            notify.run();
         }
     }
 
@@ -487,9 +486,6 @@ final class MetaInfServicesLookup extends AbstractLookup {
                     } catch (Exception ex) {
                         LOGGER.log(Level.WARNING, "Cannot create " + object, ex);
                         object = null;
-                    } catch (ExceptionInInitializerError x) { // #174055
-                        LOGGER.log(Level.WARNING, "Cannot create " + object, x);
-                        object = null;
                     }
                 }
             }
diff --git a/src/org/openide/util/lookup/ProxyLookup.java b/src/org/openide/util/lookup/ProxyLookup.java
index 6e58fa4..d879787 100644
--- a/src/org/openide/util/lookup/ProxyLookup.java
+++ b/src/org/openide/util/lookup/ProxyLookup.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/lookup/SimpleLookup.java b/src/org/openide/util/lookup/SimpleLookup.java
index 573ea0b..c0a931a 100644
--- a/src/org/openide/util/lookup/SimpleLookup.java
+++ b/src/org/openide/util/lookup/SimpleLookup.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/lookup/SimpleProxyLookup.java b/src/org/openide/util/lookup/SimpleProxyLookup.java
index 46c90d0..3ab6615 100644
--- a/src/org/openide/util/lookup/SimpleProxyLookup.java
+++ b/src/org/openide/util/lookup/SimpleProxyLookup.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/lookup/SingletonLookup.java b/src/org/openide/util/lookup/SingletonLookup.java
index 1692c88..725f4fa 100644
--- a/src/org/openide/util/lookup/SingletonLookup.java
+++ b/src/org/openide/util/lookup/SingletonLookup.java
@@ -170,4 +170,4 @@ class SingletonLookup extends Lookup {
 
     }
 
-}
+}
\ No newline at end of file
diff --git a/src/org/openide/util/lookup/WaitableResult.java b/src/org/openide/util/lookup/WaitableResult.java
index fb2342d..07ceaa7 100644
--- a/src/org/openide/util/lookup/WaitableResult.java
+++ b/src/org/openide/util/lookup/WaitableResult.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/util/lookup/package.html b/src/org/openide/util/lookup/package.html
index 49918f8..499cac2 100644
--- a/src/org/openide/util/lookup/package.html
+++ b/src/org/openide/util/lookup/package.html
@@ -1,7 +1,7 @@
 <!--
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
 
 
 The contents of this file are subject to the terms of either the GNU
diff --git a/src/org/openide/xml/EntityCatalog.java b/src/org/openide/xml/EntityCatalog.java
index b4cf886..d7367e3 100644
--- a/src/org/openide/xml/EntityCatalog.java
+++ b/src/org/openide/xml/EntityCatalog.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/src/org/openide/xml/XMLUtil.java b/src/org/openide/xml/XMLUtil.java
index d65a7da..ee4fc06 100644
--- a/src/org/openide/xml/XMLUtil.java
+++ b/src/org/openide/xml/XMLUtil.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -214,7 +214,7 @@ public final class XMLUtil extends Object {
      *
      * @return XMLReader configured according to passed parameters
      */
-    public static synchronized XMLReader createXMLReader(boolean validate, boolean namespaceAware)
+    public static XMLReader createXMLReader(boolean validate, boolean namespaceAware)
     throws SAXException {
         SAXParserFactory factory = saxes[validate ? 0 : 1][namespaceAware ? 0 : 1];
         if (factory == null) {
@@ -296,7 +296,7 @@ public final class XMLUtil extends Object {
     }
 
     private static DocumentBuilderFactory[][] doms = new DocumentBuilderFactory[2][2];
-    private static synchronized DocumentBuilderFactory getFactory(boolean validate, boolean namespaceAware) {
+    private static DocumentBuilderFactory getFactory(boolean validate, boolean namespaceAware) {
         DocumentBuilderFactory factory = doms[validate ? 0 : 1][namespaceAware ? 0 : 1];
         if (factory == null) {
             factory = DocumentBuilderFactory.newInstance();
@@ -816,14 +816,8 @@ public final class XMLUtil extends Object {
             doc = builder.newDocument();
         }
         for (int i = 0; i < nl.getLength(); i++) {
-            Node node = nl.item(i);
-            if (!(node instanceof DocumentType)) {
-                try {
-                    doc.appendChild(doc.importNode(node, true));
-                } catch (DOMException x) {
-                    // Thrown in NB-Core-Build #2896 & 2898 inside GeneratedFilesHelper.applyBuildExtensions
-                    throw (IOException) new IOException("Could not import or append " + node + " of " + node.getClass()).initCause(x);
-                }
+            if (!(nl.item(i) instanceof DocumentType)) {
+                doc.appendChild(doc.importNode(nl.item(i), true));
             }
         }
         doc.normalize();
diff --git a/src/org/openide/xml/package.html b/src/org/openide/xml/package.html
index c38e13a..627ab0a 100644
--- a/src/org/openide/xml/package.html
+++ b/src/org/openide/xml/package.html
@@ -1,7 +1,7 @@
 <!--
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
 
 
 The contents of this file are subject to the terms of either the GNU
diff --git a/test/unit/src/org/netbeans/modules/openide/util/ProxyURLStreamHandlerFactoryTest.java b/test/unit/src/org/netbeans/modules/openide/util/ProxyURLStreamHandlerFactoryTest.java
deleted file mode 100644
index 7833ab2..0000000
--- a/test/unit/src/org/netbeans/modules/openide/util/ProxyURLStreamHandlerFactoryTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- *
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common
- * Development and Distribution License("CDDL") (collectively, the
- * "License"). You may not use this file except in compliance with the
- * License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html
- * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
- * specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header
- * Notice in each file and include the License file at
- * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the
- * License Header, with the fields enclosed by brackets [] replaced by
- * your own identifying information:
- * "Portions Copyrighted [year] [name of copyright owner]"
- *
- * If you wish your version of this file to be governed by only the CDDL
- * or only the GPL Version 2, indicate your decision by adding
- * "[Contributor] elects to include this software in this distribution
- * under the [CDDL or GPL Version 2] license." If you do not indicate a
- * single choice of license, a recipient has the option to distribute
- * your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above.
- * However, if you add GPL Version 2 code and therefore, elected the GPL
- * Version 2 license, then the option applies only if the new code is
- * made subject to such option by the copyright holder.
- *
- * Contributor(s):
- *
- * Portions Copyrighted 2009 Sun Microsystems, Inc.
- */
-
-package org.netbeans.modules.openide.util;
-
-import java.io.IOException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.URLStreamHandler;
-import java.net.URLStreamHandlerFactory;
-import org.netbeans.junit.NbTestCase;
-import org.openide.util.URLStreamHandlerRegistration;
-
-public class ProxyURLStreamHandlerFactoryTest extends NbTestCase {
-
-    public ProxyURLStreamHandlerFactoryTest(String n) {
-        super(n);
-    }
-
-    public void testURLStreamHandlerRegistration() throws Exception {
-        URLStreamHandlerFactory factory = new ProxyURLStreamHandlerFactory();
-        assertEquals(MyHandler.class, factory.createURLStreamHandler("stuff").getClass());
-        assertEquals(MyHandler.class, factory.createURLStreamHandler("stuff").getClass());
-        assertNull(factory.createURLStreamHandler("whatever"));
-    }
-
-    @URLStreamHandlerRegistration(protocol="stuff")
-    public static class MyHandler extends URLStreamHandler {
-        protected URLConnection openConnection(URL u) throws IOException {
-            throw new IOException("unsupported");
-        }
-    }
-
-}
diff --git a/test/unit/src/org/openide/ErrorManagerCyclicDepTest.java b/test/unit/src/org/openide/ErrorManagerCyclicDepTest.java
index 3b4eba5..fdc55b2 100644
--- a/test/unit/src/org/openide/ErrorManagerCyclicDepTest.java
+++ b/test/unit/src/org/openide/ErrorManagerCyclicDepTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/ErrorManagerDelegatesToLoggingTest.java b/test/unit/src/org/openide/ErrorManagerDelegatesToLoggingTest.java
index 0b7ebad..474370c 100644
--- a/test/unit/src/org/openide/ErrorManagerDelegatesToLoggingTest.java
+++ b/test/unit/src/org/openide/ErrorManagerDelegatesToLoggingTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/ErrorManagerTest.java b/test/unit/src/org/openide/ErrorManagerTest.java
index bb7fc69..958784a 100644
--- a/test/unit/src/org/openide/ErrorManagerTest.java
+++ b/test/unit/src/org/openide/ErrorManagerTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/ChangeSupportTest.java b/test/unit/src/org/openide/util/ChangeSupportTest.java
index 9ac483b..bc8f15e 100644
--- a/test/unit/src/org/openide/util/ChangeSupportTest.java
+++ b/test/unit/src/org/openide/util/ChangeSupportTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/EditablePropertiesTest.java b/test/unit/src/org/openide/util/EditablePropertiesTest.java
deleted file mode 100644
index be56e62..0000000
--- a/test/unit/src/org/openide/util/EditablePropertiesTest.java
+++ /dev/null
@@ -1,417 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
- *
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common
- * Development and Distribution License("CDDL") (collectively, the
- * "License"). You may not use this file except in compliance with the
- * License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html
- * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
- * specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header
- * Notice in each file and include the License file at
- * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the
- * License Header, with the fields enclosed by brackets [] replaced by
- * your own identifying information:
- * "Portions Copyrighted [year] [name of copyright owner]"
- *
- * Contributor(s):
- *
- * The Original Software is NetBeans. The Initial Developer of the Original
- * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
- * Microsystems, Inc. All Rights Reserved.
- *
- * If you wish your version of this file to be governed by only the CDDL
- * or only the GPL Version 2, indicate your decision by adding
- * "[Contributor] elects to include this software in this distribution
- * under the [CDDL or GPL Version 2] license." If you do not indicate a
- * single choice of license, a recipient has the option to distribute
- * your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above.
- * However, if you add GPL Version 2 code and therefore, elected the GPL
- * Version 2 license, then the option applies only if the new code is
- * made subject to such option by the copyright holder.
- */
-
-package org.openide.util;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URI;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-import org.netbeans.junit.NbTestCase;
-
-public class EditablePropertiesTest extends NbTestCase {
-
-    public EditablePropertiesTest(String name) {
-        super(name);
-    }
-    
-    public void testLoad() throws Exception {
-        Map<String,String> content = new HashMap<String,String>();
-        for (int i=1; i<=26; i++) {
-            content.put("key"+i, "value"+i);
-        }
-        content.put("@!#$%^keyA", "valueA!@#$%^&*(){}");
-        content.put(" =:keyB", "valueB =:");
-        content.put(""+(char)0x1234+"keyC", "valueC"+(char)0x9876);
-        content.put("keyD", "");
-        content.put("keyE", "");
-        content.put("keyF", "");
-        content.put("keyG", "");
-        content.put("keyH", "value#this is not comment");
-        content.put("keyI", "incorrect end: \\u123");
-        // #46234: does not handle bad Unicode escapes well
-        content.put("keyJ", "malformed Unicode escape: \\uabyz");
-        
-        EditableProperties ep = loadTestProperties();
-        
-        for (Map.Entry<String,String> entry : content.entrySet()) {
-            String key = entry.getKey();
-            String value = entry.getValue();
-            String epValue = ep.getProperty(key);
-            assertEquals("Expected value for key "+key+" is different", value, epValue);
-        }
-        int count = 0;
-        for (Map.Entry<String,String> entry : ep.entrySet()) {
-            if (entry.getKey() != null) {
-                count++;
-            }
-        }
-        assertEquals("Number of items in property file", content.keySet().size(), count);
-    }
-    
-    /* Doesn't work; java.util.Properties throws IAE for malformed Unicode escapes:
-    public void testJavaUtilPropertiesEquivalence() throws Exception {
-        Properties p = loadTestJavaUtilProperties();
-        EditableProperties ep = loadTestProperties();
-        Iterator it = p.entrySet().iterator();
-        while (it.hasNext()) {
-            Map.Entry entry = (Map.Entry) it.next();
-            String key = (String) entry.getKey();
-            String val = (String) entry.getValue();
-            assertEquals("right value for " + key, val, ep.getProperty(key));
-        }
-        assertEquals("right number of items", p.size(), ep.size());
-    }
-     */
-
-    public void testSave() throws Exception {
-        clearWorkDir();
-        EditableProperties ep = loadTestProperties();
-        String dest = getWorkDirPath()+File.separatorChar+"new.properties";
-        saveProperties(ep, dest);
-        assertFile("Saved properties must be the same as original one", filenameOfTestProperties(), dest, (String)null);
-    }
-    
-    public void testClonability() throws Exception {
-        clearWorkDir();
-        EditableProperties ep = loadTestProperties();
-        
-        EditableProperties ep2 = ep.cloneProperties();
-        String dest = getWorkDirPath()+File.separatorChar+"new2.properties";
-        saveProperties(ep2, dest);
-        assertFile("Saved cloned properties must be the same as original one", filenameOfTestProperties(), dest, (String)null);
-        
-        EditableProperties ep3 = (EditableProperties)ep.clone();
-        dest = getWorkDirPath()+File.separatorChar+"new3.properties";
-        saveProperties(ep3, dest);
-        assertFile("Saved cloned properties must be the same as original one", filenameOfTestProperties(), dest, (String)null);
-    }
-
-    public void testCopyOnWriteClonability() throws Exception {
-        EditableProperties ep1 = new EditableProperties(true);
-        ep1.setProperty("k1", "v1");
-        EditableProperties ep2 = ep1.cloneProperties();
-        ep2.setProperty("k2", "v2");
-        EditableProperties ep3 = ep2.cloneProperties();
-        ep1.setProperty("k4", "v4");
-        ep2.setProperty("k2", "v2a");
-        Iterator<Map.Entry<String,String>> it = ep3.entrySet().iterator();
-        it.next().setValue("v1b");
-        it.next();
-        it.remove();
-        ep3.setProperty("k3", "v3");
-        assertEquals("{k1=v1, k4=v4}", ep1.toString());
-        assertEquals("{k1=v1, k2=v2a}", ep2.toString());
-        assertEquals("{k1=v1b, k3=v3}", ep3.toString());
-        ep1 = new EditableProperties(true);
-        ep1.setProperty("k", "v1");
-        ep2 = ep1.cloneProperties();
-        ep2.entrySet().iterator().next().setValue("v2");
-        assertEquals("{k=v1}", ep1.toString());
-        assertEquals("{k=v2}", ep2.toString());
-    }
-
-    // test that array values are stored correctly
-    public void testArrayValues() throws Exception {
-        EditableProperties ep = new EditableProperties(false);
-        ep.setProperty("key1", new String[]{"1. line;", "2. line;", "3. line"});
-        ep.setProperty("key2", "1. line;2. line;3. line");
-        String output = getAsString(ep);
-        String expected = 
-            "key1=\\"+System.getProperty("line.separator")+
-            "    1. line;\\"+System.getProperty("line.separator")+
-            "    2. line;\\"+System.getProperty("line.separator")+
-            "    3. line"+System.getProperty("line.separator")+
-            "key2=1. line;2. line;3. line"+System.getProperty("line.separator");
-        assertEquals(expected, output);
-        assertEquals(ep.getProperty("key1"), "1. line;2. line;3. line");
-        assertEquals(ep.getProperty("key2"), "1. line;2. line;3. line");
-        ep.setProperty("key1", "one; two; three");
-        output = getAsString(ep);
-        expected = 
-            "key1=one; two; three"+System.getProperty("line.separator")+
-            "key2=1. line;2. line;3. line"+System.getProperty("line.separator");
-        assertEquals(expected, output);
-        assertEquals(ep.getProperty("key1"), "one; two; three");
-        assertEquals(ep.getProperty("key2"), "1. line;2. line;3. line");
-        ep.setProperty("key2", new String[]{"1. line;", "2. line;", "3. line", "one;", "more;", "line;"});
-        ep.setProperty("key", new String[0]);
-        output = getAsString(ep);
-        expected = 
-            "key1=one; two; three"+System.getProperty("line.separator")+
-            "key2=\\"+System.getProperty("line.separator")+
-            "    1. line;\\"+System.getProperty("line.separator")+
-            "    2. line;\\"+System.getProperty("line.separator")+
-            "    3. line\\"+System.getProperty("line.separator")+
-            "    one;\\"+System.getProperty("line.separator")+
-            "    more;\\"+System.getProperty("line.separator")+
-            "    line;"+System.getProperty("line.separator")+
-            "key="+System.getProperty("line.separator"); // #45061
-        assertEquals(expected, output);
-        assertEquals(ep.getProperty("key1"), "one; two; three");
-        assertEquals(ep.getProperty("key2"), "1. line;2. line;3. lineone;more;line;");
-        assertEquals(ep.getProperty("key"), "");
-    }
-        
-    public void testSorting() throws Exception {
-        EditableProperties ep = new EditableProperties(false);
-        ep.setProperty("a", "val-a");
-        ep.setProperty("c", "val-c");
-        ep.put("b", "val-b");
-        String output = getAsString(ep);
-        String expected = "a=val-a"+System.getProperty("line.separator")+"c=val-c"+
-                System.getProperty("line.separator")+"b=val-b"+
-                System.getProperty("line.separator");
-        assertEquals(expected, output);
-        
-        ep = new EditableProperties(false);
-        ep.setProperty("a", "val-a");
-        ep.setProperty("c", "val-c");
-        ep.put("b", "val-b");
-        output = getAsString(ep);
-        expected = "a=val-a"+System.getProperty("line.separator")+"c=val-c"+
-                System.getProperty("line.separator")+"b=val-b"+
-                System.getProperty("line.separator");
-        assertEquals(expected, output);
-        
-        ep = new EditableProperties(true);
-        ep.setProperty("a", "val-a");
-        ep.setProperty("c", "val-c");
-        ep.put("b", "val-b");
-        output = getAsString(ep);
-        expected = "a=val-a"+System.getProperty("line.separator")+"b=val-b"+
-                System.getProperty("line.separator")+"c=val-c"+
-                System.getProperty("line.separator");
-        assertEquals(expected, output);
-    }
-
-    // test that changing comments work and modify only comments
-    // test that misc chars are correctly escaped, unicode encoded, etc.
-    public void testEscaping() throws Exception {
-        String umlaut = "" + (char)252;
-        EditableProperties ep = new EditableProperties(false);
-        ep.setProperty("a a", "a space a");
-        ep.setProperty("b"+(char)0x4567, "val"+(char)0x1234);
-        ep.setProperty("@!#$%^\\", "!@#$%^&*(){}\\");
-        ep.setProperty("d\nd", "d\nnewline\nd");
-        ep.setProperty("umlaut", umlaut);
-        ep.setProperty("_a a", new String[]{"a space a"});
-        ep.setProperty("_b"+(char)0x4567, new String[]{"val"+(char)0x1234});
-        ep.setProperty("_@!#$%^\\", new String[]{"!@#$%^&*\\", "(){}\\"});
-        ep.setProperty("_d\nd", new String[]{"d\nnew","line\nd", "\n", "end"});
-        ep.setProperty("_umlaut", new String[]{umlaut, umlaut});
-        String output = getAsString(ep);
-        String expected = "a\\ a=a space a"+System.getProperty("line.separator")+
-                "b\\u4567=val\\u1234"+System.getProperty("line.separator")+
-                "@!#$%^\\\\=!@#$%^&*(){}\\\\"+System.getProperty("line.separator")+
-                "d\\nd=d\\nnewline\\nd"+System.getProperty("line.separator")+
-                "umlaut=\\u00fc"+System.getProperty("line.separator")+
-                "_a\\ a=\\"+System.getProperty("line.separator")+"    a space a"+System.getProperty("line.separator")+
-                "_b\\u4567=\\"+System.getProperty("line.separator")+"    val\\u1234"+System.getProperty("line.separator")+
-                "_@!#$%^\\\\=\\"+System.getProperty("line.separator")+"    !@#$%^&*\\\\\\"+System.getProperty("line.separator")+
-                    "    (){}\\\\"+System.getProperty("line.separator")+
-                "_d\\nd=\\"+System.getProperty("line.separator")+"    d\\nnew\\"+System.getProperty("line.separator")+
-                    "    line\\nd\\"+System.getProperty("line.separator")+
-                    "    \\n\\"+System.getProperty("line.separator")+
-                    "    end"+System.getProperty("line.separator")+
-                "_umlaut=\\" +System.getProperty("line.separator")+"    \\u00fc\\"+System.getProperty("line.separator")+
-                    "    \\u00fc"+System.getProperty("line.separator");
-        assertEquals(expected, output);
-        assertEquals("a space a", ep.getProperty("a a"));
-        assertEquals("val"+(char)0x1234, ep.getProperty("b"+(char)0x4567));
-        assertEquals("!@#$%^&*(){}\\", ep.getProperty("@!#$%^\\"));
-        assertEquals("d\nnewline\nd", ep.getProperty("d\nd"));
-        assertEquals(umlaut, ep.getProperty("umlaut"));
-        assertEquals("a space a", ep.getProperty("_a a"));
-        assertEquals("val"+(char)0x1234, ep.getProperty("_b"+(char)0x4567));
-        assertEquals("!@#$%^&*\\(){}\\", ep.getProperty("_@!#$%^\\"));
-        assertEquals("d\nnewline\nd\nend", ep.getProperty("_d\nd"));
-        assertEquals(umlaut+umlaut, ep.getProperty("_umlaut"));
-    }
-
-    public void testMetaCharacters() throws Exception {
-        testRoundTrip("foo=bar", "v");
-        testRoundTrip("foo:bar", "v");
-        testRoundTrip("#foobar", "v");
-        testRoundTrip("foo#bar", "v");
-        testRoundTrip("foobar#", "v");
-        testRoundTrip("foobar", "#v");
-        testRoundTrip("foobar", "v#");
-        testRoundTrip(" #foo", " #bar");
-        testRoundTrip(" foo bar ", "v");
-        testRoundTrip("foobar", " v ");
-        testRoundTrip("= : # \\\n", "= : # \\\n");
-    }
-    private void testRoundTrip(String key, String value) throws Exception {
-        EditableProperties ep = new EditableProperties(false);
-        ep.setProperty(key, value);
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        ep.store(baos);
-        ep = new EditableProperties(false);
-        ep.load(new ByteArrayInputStream(baos.toByteArray()));
-        assertEquals(baos.toString(), Collections.singletonMap(key, value), ep);
-        Properties p = new Properties();
-        p.load(new ByteArrayInputStream(baos.toByteArray()));
-        assertEquals(baos.toString(), Collections.singletonMap(key, value), p);
-    }
-    
-    // test that iterator implementation is OK
-    public void testIterator() throws Exception {
-        EditableProperties ep = loadTestProperties();
-        Iterator<Map.Entry<String,String>> it1 = ep.entrySet().iterator();
-        while (it1.hasNext()) {
-            it1.next();
-        }
-        Iterator<String> it2 = ep.keySet().iterator();
-        while (it2.hasNext()) {
-            it2.next();
-        }
-        it2 = ep.keySet().iterator();
-        while (it2.hasNext()) {
-            it2.next();
-            it2.remove();
-        }
-        ep.put("a", "aval");
-        ep.remove("a");
-        ep = loadTestProperties();
-        it1 = ep.entrySet().iterator();
-        while (it1.hasNext()) {
-            Map.Entry<String,String> entry = it1.next();
-            assertNotNull("Property key cannot be null", entry.getKey());
-            assertNotNull("Property value cannot be null", entry.getValue());
-            entry.setValue(entry.getValue()+"-something-new");
-        }
-        it1 = ep.entrySet().iterator();
-        while (it1.hasNext()) {
-            it1.next();
-            it1.remove();
-        }
-    }
-    
-    // test that syntax errors are survived
-    public void testInvalidPropertiesFile() throws Exception {
-        String invalidProperty = "key=value without correct end\\";
-        ByteArrayInputStream is = new ByteArrayInputStream(invalidProperty.getBytes());
-        EditableProperties ep = new EditableProperties(false);
-        ep.load(is);
-        assertEquals("Syntax error should be resolved", 1, ep.keySet().size());
-        assertEquals("value without correct end", ep.getProperty("key"));
-    }
-    
-    public void testNonLatinComments() throws Exception {
-        // #60249.
-        String lsep = System.getProperty("line.separator");
-        EditableProperties p = new EditableProperties(false);
-        p.setProperty("k", "v");
-        p.setComment("k", new String[] {"# \u0158ekni koment teda!"}, false);
-        String expected = "# \\u0158ekni koment teda!" + lsep + "k=v" + lsep;
-        assertEquals("Storing non-Latin chars in comments works", expected, getAsString(p));
-        p = new EditableProperties(false);
-        p.load(new ByteArrayInputStream(expected.getBytes("ISO-8859-1")));
-        assertEquals("Reading non-Latin chars in comments works", Collections.singletonList("# \u0158ekni koment teda!"), Arrays.asList(p.getComment("k")));
-        p.setProperty("k", "v2");
-        expected = "# \\u0158ekni koment teda!" + lsep + "k=v2" + lsep;
-        assertEquals("Reading and re-writing non-Latin chars in comments works", expected, getAsString(p));
-    }
-
-    
-    // helper methods:
-    
-    
-    private String filenameOfTestProperties() {
-        // #50987: never use URL.path for this purpose...
-        return new File(URI.create(EditablePropertiesTest.class.getResource("data/test.properties").toExternalForm())).getAbsolutePath();
-    }
-    
-    private EditableProperties loadTestProperties() throws IOException {
-        URL u = EditablePropertiesTest.class.getResource("data/test.properties");
-        EditableProperties ep = new EditableProperties(false);
-        InputStream is = u.openStream();
-        try {
-            ep.load(is);
-        } finally {
-            is.close();
-        }
-        return ep;
-    }
-    
-    /*
-    private Properties loadTestJavaUtilProperties() throws IOException {
-        URL u = EditablePropertiesTest.class.getResource("data/test.properties");
-        Properties p = new Properties();
-        InputStream is = u.openStream();
-        try {
-            p.load(is);
-        } finally {
-            is.close();
-        }
-        return p;
-    }
-     */
-    
-    private void saveProperties(EditableProperties ep, String path) throws Exception {
-        OutputStream os = new FileOutputStream(path);
-        try {
-            ep.store(os);
-        } finally {
-            os.close();
-        }
-    }
-
-    private String getAsString(EditableProperties ep) throws Exception {
-        ByteArrayOutputStream os = new ByteArrayOutputStream();
-        ep.store(os);
-        os.close();
-        return os.toString("ISO-8859-1");
-    }
-    
-}
diff --git a/test/unit/src/org/openide/util/EnumerationsTest.java b/test/unit/src/org/openide/util/EnumerationsTest.java
index 0d452c8..6036503 100644
--- a/test/unit/src/org/openide/util/EnumerationsTest.java
+++ b/test/unit/src/org/openide/util/EnumerationsTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -41,17 +41,19 @@
 
 package org.openide.util;
 
+import java.lang.ref.WeakReference;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Enumeration;
 import java.util.Iterator;
-import java.util.List;
 import java.util.Map;
 import java.util.NoSuchElementException;
 import java.util.Set;
+import junit.textui.TestRunner;
 import org.netbeans.junit.NbTestCase;
+import org.netbeans.junit.NbTestSuite;
 
 /** This is the base test for new and old enumerations. It contains
  * factory methods for various kinds of enumerations and set of tests
@@ -70,50 +72,54 @@ public class EnumerationsTest extends NbTestCase {
     // Factory methods
     //
     
-    protected <T> Enumeration<T> singleton(T obj) {
+    protected Enumeration singleton(Object obj) {
         return Enumerations.singleton(obj);
     }
-    protected <T> Enumeration<T> concat(Enumeration<T> en1, Enumeration<T> en2) {
+    protected Enumeration concat(Enumeration en1, Enumeration en2) {
         return Enumerations.concat(en1, en2);
     }
-    protected <T> Enumeration<T> concat(Enumeration<Enumeration<T>> enumOfEnums) {
+    protected Enumeration concat(Enumeration enumOfEnums) {
         return Enumerations.concat(enumOfEnums);
     }
-    protected <T> Enumeration<T> removeDuplicates(Enumeration<T> en) {
+    protected Enumeration removeDuplicates(Enumeration en) {
         return Enumerations.removeDuplicates(en);
     }
-    protected <T> Enumeration<T> empty() {
+    protected Enumeration empty() {
         return Enumerations.empty();
     }
-    protected <T> Enumeration<T> array(T[] arr) {
+    protected Enumeration array(Object[] arr) {
         return Enumerations.array(arr);
     }
-    protected <T,R> Enumeration<R> convert(Enumeration<T> en, final Map<T,R> map) {
-        class P implements Enumerations.Processor<T,R> {
-            public R process(T obj, Collection<T> nothing) {
+    protected Enumeration convert(Enumeration en, final Map map) {
+        class P implements Enumerations.Processor {
+            public Object process(Object obj, Collection nothing) {
                 return map.get(obj);
             }
         }
+        
+        
         return Enumerations.convert(en, new P());
     }
-    protected <T> Enumeration<T> removeNulls(Enumeration<T> en) {
+    protected Enumeration removeNulls(Enumeration en) {
         return Enumerations.removeNulls(en);
     }
-    protected <T> Enumeration<T> filter(Enumeration<T> en, final Set<T> filter) {
-        class P implements Enumerations.Processor<T,T> {
-            public T process(T obj, Collection<T> nothing) {
+    protected Enumeration filter(Enumeration en, final Set filter) {
+        class P implements Enumerations.Processor {
+            public Object process(Object obj, Collection nothing) {
                 return filter.contains(obj) ? obj : null;
             }
         }
+        
         return Enumerations.filter(en, new P());
     }
     
-    protected <T,R> Enumeration<R> filter(Enumeration<T> en, final QueueProcess<T,R> filter) {
-        class P implements Enumerations.Processor<T,R> {
-            public R process(T obj, Collection<T> nothing) {
+    protected Enumeration filter(Enumeration en, final QueueProcess filter) {
+        class P implements Enumerations.Processor {
+            public Object process(Object obj, Collection nothing) {
                 return filter.process(obj, nothing);
             }
         }
+        
         return Enumerations.filter(en, new P());
     }
     
@@ -121,9 +127,9 @@ public class EnumerationsTest extends NbTestCase {
      * @param filter the set.contains (...) is called before each object is produced
      * @return Enumeration
      */
-    protected <T,R> Enumeration<R> queue(Collection<T> initContent, final QueueProcess<T,R> process) {
-        class C implements Enumerations.Processor<T,R> {
-            public R process(T object, Collection<T> toAdd) {
+    protected Enumeration queue(Collection initContent, final QueueProcess process) {
+        class C implements Enumerations.Processor {
+            public Object process(Object object, Collection toAdd) {
                 return process.process(object, toAdd);
             }
         }
@@ -135,8 +141,8 @@ public class EnumerationsTest extends NbTestCase {
     
     /** Processor interface.
      */
-    public static interface QueueProcess<T,R> {
-        public R process(T object, Collection<T> toAdd);
+    public static interface QueueProcess {
+        public Object process(Object object, Collection toAdd);
     }
     
     //
@@ -168,10 +174,10 @@ public class EnumerationsTest extends NbTestCase {
     }
     
     public void testConcatTwoAndArray() {
-        Object[] one = { 1, 2, 3 };
+        Object[] one = { new Integer(1), new Integer(2), new Integer(3) };
         Object[] two = { "1", "2", "3" };
         
-        List<Object> list = new ArrayList<Object>(Arrays.asList(one));
+        ArrayList list = new ArrayList(Arrays.asList(one));
         list.addAll(Arrays.asList(two));
         
         assertEnums(
@@ -181,16 +187,15 @@ public class EnumerationsTest extends NbTestCase {
     }
     
     public void testConcatTwoAndArrayAndTakeOnlyStrings() {
-        Object[] one = { 1, 2, 3 };
+        Object[] one = { new Integer(1), new Integer(2), new Integer(3) };
         Object[] two = { "1", "2", "3" };
-        Object[] three = { 1L };
+        Object[] three = { new Long(1) };
         Object[] four = { "Kuk" };
         
-        List<Object> list = new ArrayList<Object>(Arrays.asList(two));
+        ArrayList list = new ArrayList(Arrays.asList(two));
         list.addAll(Arrays.asList(four));
         
-        @SuppressWarnings("unchecked")
-        Enumeration<Object>[] alls = (Enumeration<Object>[]) new Enumeration<?>[] {
+        Enumeration[] alls = {
             array(one), array(two), array(three), array(four)
         };
         
@@ -201,19 +206,18 @@ public class EnumerationsTest extends NbTestCase {
     }
     
     public void testRemoveDuplicates() {
-        Object[] one = { 1, 2, 3 };
+        Object[] one = { new Integer(1), new Integer(2), new Integer(3) };
         Object[] two = { "1", "2", "3" };
-        Object[] three = { 1 };
+        Object[] three = { new Integer(1) };
         Object[] four = { "2", "3", "4" };
         
-        @SuppressWarnings("unchecked")
-        Enumeration<Object>[] alls = (Enumeration<Object>[]) new Enumeration<?>[] {
+        Enumeration[] alls = {
             array(one), array(two), array(three), array(four)
         };
         
         assertEnums(
                 removeDuplicates(concat(array(alls))),
-                array(new Object[] { 1, 2, 3, "1", "2", "3", "4" })
+                array(new Object[] { new Integer(1), new Integer(2), new Integer(3), "1", "2", "3", "4" })
                 );
         
     }
@@ -221,7 +225,7 @@ public class EnumerationsTest extends NbTestCase {
     public void testRemoveDuplicatesAndGCWorks() {
         
         /*** Return { i1, "", "", "", i2 } */
-        class WeakEnum implements Enumeration<Object> {
+        class WeakEnum implements Enumeration {
             public Object i1 = new Integer(1);
             public Object i2 = new Integer(1);
             
@@ -245,19 +249,15 @@ public class EnumerationsTest extends NbTestCase {
         
         assertTrue("Has some elements", en.hasMoreElements());
         assertEquals("And the first one is get", weak.i1, en.nextElement());
-
-        /*
+        
         try {
-            Reference<?> ref = new WeakReference<Object>(weak.i1);
-         */
+            WeakReference ref = new WeakReference(weak.i1);
             weak.i1 = null;
-        /*
             assertGC("Try hard to GC the first integer", ref);
             // does not matter whether it GCs or not
         } catch (Throwable tw) {
             // not GCed, but does not matter
         }
-         */
         assertTrue("Next object will be string", en.hasMoreElements());
         assertEquals("is empty string", "", en.nextElement());
         
@@ -266,11 +266,12 @@ public class EnumerationsTest extends NbTestCase {
     }
     
     public void testQueueEnum() {
-        class Pr implements QueueProcess<Integer,Integer> {
-            public Integer process(Integer i, Collection<Integer> c) {
-                int plus = i + 1;
+        class Pr implements QueueProcess {
+            public Object process(Object o, Collection c) {
+                Integer i = (Integer)o;
+                int plus = i.intValue() + 1;
                 if (plus < 10) {
-                    c.add(plus);
+                    c.add(new Integer(plus));
                 }
                 return i;
             }
@@ -278,7 +279,7 @@ public class EnumerationsTest extends NbTestCase {
         Pr p = new Pr();
         
         Enumeration en = queue(
-                Collections.nCopies(1, 0), p
+                Collections.nCopies(1, new Integer(0)), p
                 );
         
         for (int i = 0; i < 10; i++) {
@@ -290,15 +291,17 @@ public class EnumerationsTest extends NbTestCase {
     }
     
     public void testFilteringAlsoDoesConvertions() throws Exception {
-        class Pr implements QueueProcess<Integer,Integer> {
-            public Integer process(Integer i, Collection<Integer> ignore) {
-                return i + 1;
+        class Pr implements QueueProcess {
+            public Object process(Object o, Collection ignore) {
+                Integer i = (Integer)o;
+                int plus = i.intValue() + 1;
+                return new Integer(plus);
             }
         }
         Pr p = new Pr();
         
-        Enumeration<Integer> onetwo = array(new Integer[] { 1, 2 });
-        Enumeration<Integer> twothree = array(new Integer[] { 2, 3 });
+        Enumeration onetwo = array(new Object[] { new Integer(1), new Integer(2) });
+        Enumeration twothree = array(new Object[] { new Integer(2), new Integer(3) });
         
         assertEnums(
                 filter(onetwo, p), twothree
@@ -306,11 +309,11 @@ public class EnumerationsTest extends NbTestCase {
     }
     
     
-    private static <T> void assertEnums(Enumeration<T> e1, Enumeration<T> e2) {
+    private static void assertEnums(Enumeration e1, Enumeration e2) {
         int indx = 0;
         while (e1.hasMoreElements() && e2.hasMoreElements()) {
-            T i1 = e1.nextElement();
-            T i2 = e2.nextElement();
+            Object i1 = e1.nextElement();
+            Object i2 = e2.nextElement();
             assertEquals(indx++ + "th: ", i1, i2);
         }
         
@@ -337,7 +340,7 @@ public class EnumerationsTest extends NbTestCase {
     }
     
     public void testConvertIntegersToStringRemoveNulls() {
-        Object[] garbage = { 1, "kuk", "hle", 5 };
+        Object[] garbage = { new Integer(1), "kuk", "hle", new Integer(5) };
         
         assertEnums(
                 removeNulls(convert(array(garbage), new MapIntegers())),
@@ -348,8 +351,8 @@ public class EnumerationsTest extends NbTestCase {
     public void testQueueEnumerationCanReturnNulls() {
         Object[] nuls = { null, "NULL" };
         
-        class P implements QueueProcess<Object,Object> {
-            public Object process(Object toRet, Collection<Object> toAdd) {
+        class P implements QueueProcess {
+            public Object process(Object toRet, Collection toAdd) {
                 if (toRet == null) return null;
                 
                 if ("NULL".equals(toRet)) {
@@ -369,7 +372,7 @@ public class EnumerationsTest extends NbTestCase {
     
     /** Filters only strings.
      */
-    private static final class OnlyStrings implements Set<Object> {
+    private static final class OnlyStrings implements Set {
         public boolean add(Object o) {
             fail("Should not be every called");
             return false;
@@ -398,7 +401,7 @@ public class EnumerationsTest extends NbTestCase {
             return false;
         }
         
-        public Iterator<Object> iterator() {
+        public Iterator iterator() {
             fail("Should not be every called");
             return null;
         }
@@ -428,7 +431,7 @@ public class EnumerationsTest extends NbTestCase {
             return null;
         }
         
-        public <T> T[] toArray(T[] a) {
+        public Object[] toArray(Object[] a) {
             fail("Should not be every called");
             return null;
         }
@@ -436,7 +439,7 @@ public class EnumerationsTest extends NbTestCase {
     
     /** Filters only strings.
      */
-    private static final class MapIntegers implements Map<Object,Object> {
+    private static final class MapIntegers implements Map {
         public boolean containsKey(Object key) {
             fail("Should not be every called");
             return false;
@@ -447,7 +450,7 @@ public class EnumerationsTest extends NbTestCase {
             return false;
         }
         
-        public Set<Map.Entry<Object,Object>> entrySet() {
+        public Set entrySet() {
             fail("Should not be every called");
             return null;
         }
@@ -459,7 +462,7 @@ public class EnumerationsTest extends NbTestCase {
             return null;
         }
         
-        public Set<Object> keySet() {
+        public Set keySet() {
             fail("Should not be every called");
             return null;
         }
@@ -473,7 +476,7 @@ public class EnumerationsTest extends NbTestCase {
             fail("Should not be every called");
         }
         
-        public Collection<Object> values() {
+        public Collection values() {
             fail("Should not be every called");
             return null;
         }
diff --git a/test/unit/src/org/openide/util/ExceptionsTest.java b/test/unit/src/org/openide/util/ExceptionsTest.java
index c1b2056..945d973 100644
--- a/test/unit/src/org/openide/util/ExceptionsTest.java
+++ b/test/unit/src/org/openide/util/ExceptionsTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/ImageUtilitiesGetLoaderTest.java b/test/unit/src/org/openide/util/ImageUtilitiesGetLoaderTest.java
index 381491a..a414533 100644
--- a/test/unit/src/org/openide/util/ImageUtilitiesGetLoaderTest.java
+++ b/test/unit/src/org/openide/util/ImageUtilitiesGetLoaderTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/ImageUtilitiesTest.java b/test/unit/src/org/openide/util/ImageUtilitiesTest.java
index 98be2dd..3689d0c 100644
--- a/test/unit/src/org/openide/util/ImageUtilitiesTest.java
+++ b/test/unit/src/org/openide/util/ImageUtilitiesTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/InitJobTest.java b/test/unit/src/org/openide/util/InitJobTest.java
index 647a3b9..0f012c8 100644
--- a/test/unit/src/org/openide/util/InitJobTest.java
+++ b/test/unit/src/org/openide/util/InitJobTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/MapFormatTest.java b/test/unit/src/org/openide/util/MapFormatTest.java
index 427dcee..85a4e2a 100644
--- a/test/unit/src/org/openide/util/MapFormatTest.java
+++ b/test/unit/src/org/openide/util/MapFormatTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/MutexTest.java b/test/unit/src/org/openide/util/MutexTest.java
index 10a95bb..407127e 100644
--- a/test/unit/src/org/openide/util/MutexTest.java
+++ b/test/unit/src/org/openide/util/MutexTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/MutexWrapTest.java b/test/unit/src/org/openide/util/MutexWrapTest.java
index 97b24cb..1bd8b6c 100644
--- a/test/unit/src/org/openide/util/MutexWrapTest.java
+++ b/test/unit/src/org/openide/util/MutexWrapTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/NbBundleTest.java b/test/unit/src/org/openide/util/NbBundleTest.java
index 289549a..de45174 100644
--- a/test/unit/src/org/openide/util/NbBundleTest.java
+++ b/test/unit/src/org/openide/util/NbBundleTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -141,20 +141,13 @@ public class NbBundleTest extends TestCase {
     }
 
     public void testGetMessage() throws Exception {
-        ClassLoader l = fixedLoader(
-                "org/openide/util/Bundle.properties:" +
-                "k1=v1\n" +
-                "k2=v2 {0}\n" +
-                "k3=v3 {0} {1} {2} {3} {4}",
-                "org/openide/util/Bundle_ja.properties:" +
-                "k1=v1 ja");
+        ClassLoader l = fixedLoader("org/openide/util/Bundle.properties:k1=v1\nk2=v2 {0}", "org/openide/util/Bundle_ja.properties:k1=v1 ja");
         Class<?> c = l.loadClass(Dummy.class.getName());
         assertEquals(l, c.getClassLoader());
         assertEquals("v1", NbBundle.getMessage(c, "k1"));
         Locale.setDefault(Locale.JAPAN);
         assertEquals("v1 ja", NbBundle.getMessage(c, "k1"));
         assertEquals("v2 x", NbBundle.getMessage(c, "k2", "x"));
-        assertEquals("v3 a b c d e", NbBundle.getMessage(c, "k3", "a", "b", "c", "d", "e"));
     }
 
     static class Dummy {}
diff --git a/test/unit/src/org/openide/util/NbCollectionsTest.java b/test/unit/src/org/openide/util/NbCollectionsTest.java
index 55dbda6..07f6164 100644
--- a/test/unit/src/org/openide/util/NbCollectionsTest.java
+++ b/test/unit/src/org/openide/util/NbCollectionsTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/ParametersTest.java b/test/unit/src/org/openide/util/ParametersTest.java
index 9afadc2..1588b57 100644
--- a/test/unit/src/org/openide/util/ParametersTest.java
+++ b/test/unit/src/org/openide/util/ParametersTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/RequestProcessorTest.java b/test/unit/src/org/openide/util/RequestProcessorTest.java
index 321c21e..391278a 100644
--- a/test/unit/src/org/openide/util/RequestProcessorTest.java
+++ b/test/unit/src/org/openide/util/RequestProcessorTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -45,7 +45,6 @@ import java.lang.ref.*;
 import java.util.logging.Handler;
 import java.util.logging.LogRecord;
 import java.util.logging.Level;
-import java.util.logging.Logger;
 import junit.framework.Test;
 import org.openide.ErrorManager;
 import org.netbeans.junit.*;
@@ -1347,80 +1346,7 @@ class R extends Object implements Runnable {
             x.notifyAll();
         }
     }
-
-    private static class TestHandler extends Handler {
-        boolean stFilled = false;
-        boolean exceptionCaught = false;
-
-        @Override
-        public void publish(LogRecord rec) {
-            if (rec.getThrown() != null) {
-                for (StackTraceElement elem : rec.getThrown().getStackTrace()) {
-                    if (elem.getMethodName().contains("testStackTraceFillingDisabled")) {
-                        stFilled = true;
-                        break;
-                    }
-                }
-                exceptionCaught = true;
-            }
-        }
-
-        public void clear() {
-            stFilled = false;
-            exceptionCaught = false;
-        }
-
-        @Override
-        public void flush() {
-        }
-
-        @Override
-        public void close() throws SecurityException {
-        }
-    }
-
-    public void testStackTraceFillingDisabled() throws InterruptedException {
-        boolean ea = false;
-        assert (ea = true);
-        assertTrue("Test must be run with enabled assertions", ea);
-        Logger l = RequestProcessor.logger();
-        TestHandler handler = new TestHandler();
-        l.addHandler(handler);
-        try {
-            RequestProcessor rp = new RequestProcessor("test rp #1", 1);
-            Task t = rp.post(new Runnable() {
-
-                public void run() {
-                    throw new RuntimeException("Testing filled stacktrace");
-                }
-            });
-//            t.waitFinished(); // does not work, thread gets notified before the exception is logged
-            int timeout = 0;
-            while (! handler.exceptionCaught && timeout++ < 100) {
-                Thread.sleep(50);
-            }
-            assertTrue("Waiting for task timed out", timeout < 100);
-            assertTrue("Our testing method not found in stack trace", handler.stFilled);
-
-            handler.clear();
-            timeout = 0;
-            rp = new RequestProcessor("test rp #2", 1, false, false);
-            t = rp.post(new Runnable() {
-
-                public void run() {
-                    throw new RuntimeException("Testing 'short' stacktrace");
-                }
-            });
-            while (! handler.exceptionCaught && timeout++ < 100) {
-                Thread.sleep(50);
-            }
-            assertTrue("Waiting for task timed out", timeout < 100);
-            assertFalse("Our testing method found in stack trace", handler.stFilled);
-        } finally {
-            l.removeHandler(handler);
-        }
-    }
-
+    
     private static void doGc (int count, Reference toClear) {
         java.util.ArrayList<byte[]> l = new java.util.ArrayList<byte[]> (count);
         while (count-- > 0) {
diff --git a/test/unit/src/org/openide/util/SharedClassObjectTest.java b/test/unit/src/org/openide/util/SharedClassObjectTest.java
index 13dcab1..87c1bf0 100644
--- a/test/unit/src/org/openide/util/SharedClassObjectTest.java
+++ b/test/unit/src/org/openide/util/SharedClassObjectTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/TaskTest.java b/test/unit/src/org/openide/util/TaskTest.java
index f877438..d5594bf 100644
--- a/test/unit/src/org/openide/util/TaskTest.java
+++ b/test/unit/src/org/openide/util/TaskTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/Union2Test.java b/test/unit/src/org/openide/util/Union2Test.java
index 908962b..7df9f94 100644
--- a/test/unit/src/org/openide/util/Union2Test.java
+++ b/test/unit/src/org/openide/util/Union2Test.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/UtilitiesActionsTest.java b/test/unit/src/org/openide/util/UtilitiesActionsTest.java
index 05fa6c0..d8ead55 100644
--- a/test/unit/src/org/openide/util/UtilitiesActionsTest.java
+++ b/test/unit/src/org/openide/util/UtilitiesActionsTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/UtilitiesActiveQueueTest.java b/test/unit/src/org/openide/util/UtilitiesActiveQueueTest.java
index 214249b..f13149e 100644
--- a/test/unit/src/org/openide/util/UtilitiesActiveQueueTest.java
+++ b/test/unit/src/org/openide/util/UtilitiesActiveQueueTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/UtilitiesFileURLConvertorTest.java b/test/unit/src/org/openide/util/UtilitiesFileURLConvertorTest.java
index 0cecb02..cec729e 100644
--- a/test/unit/src/org/openide/util/UtilitiesFileURLConvertorTest.java
+++ b/test/unit/src/org/openide/util/UtilitiesFileURLConvertorTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/UtilitiesProgressCursorTest.java b/test/unit/src/org/openide/util/UtilitiesProgressCursorTest.java
index c17f562..505e78c 100644
--- a/test/unit/src/org/openide/util/UtilitiesProgressCursorTest.java
+++ b/test/unit/src/org/openide/util/UtilitiesProgressCursorTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/UtilitiesTest.java b/test/unit/src/org/openide/util/UtilitiesTest.java
index 81748d1..a9f72bf 100644
--- a/test/unit/src/org/openide/util/UtilitiesTest.java
+++ b/test/unit/src/org/openide/util/UtilitiesTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/UtilitiesTopologicalSortTest.java b/test/unit/src/org/openide/util/UtilitiesTopologicalSortTest.java
index 9b40783..8e3f53c 100644
--- a/test/unit/src/org/openide/util/UtilitiesTopologicalSortTest.java
+++ b/test/unit/src/org/openide/util/UtilitiesTopologicalSortTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/UtilitiesTranslateTest.java b/test/unit/src/org/openide/util/UtilitiesTranslateTest.java
index 918e8ae..cc6d0fc 100644
--- a/test/unit/src/org/openide/util/UtilitiesTranslateTest.java
+++ b/test/unit/src/org/openide/util/UtilitiesTranslateTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/WeakListenersSpeedTest.java b/test/unit/src/org/openide/util/WeakListenersSpeedTest.java
index 8cbf622..e4f4124 100644
--- a/test/unit/src/org/openide/util/WeakListenersSpeedTest.java
+++ b/test/unit/src/org/openide/util/WeakListenersSpeedTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/WeakListenersTest.java b/test/unit/src/org/openide/util/WeakListenersTest.java
index 2417ad9..48eb5b9 100644
--- a/test/unit/src/org/openide/util/WeakListenersTest.java
+++ b/test/unit/src/org/openide/util/WeakListenersTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/WeakSetTest.java b/test/unit/src/org/openide/util/WeakSetTest.java
index 6818916..50f5387 100644
--- a/test/unit/src/org/openide/util/WeakSetTest.java
+++ b/test/unit/src/org/openide/util/WeakSetTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/actions/ActionsInfraHid.java b/test/unit/src/org/openide/util/actions/ActionsInfraHid.java
index 576dc43..66b7c02 100644
--- a/test/unit/src/org/openide/util/actions/ActionsInfraHid.java
+++ b/test/unit/src/org/openide/util/actions/ActionsInfraHid.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/actions/AsynchronousTest.java b/test/unit/src/org/openide/util/actions/AsynchronousTest.java
index c185eb7..464e80f 100644
--- a/test/unit/src/org/openide/util/actions/AsynchronousTest.java
+++ b/test/unit/src/org/openide/util/actions/AsynchronousTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/actions/BooleanStateActionTest.java b/test/unit/src/org/openide/util/actions/BooleanStateActionTest.java
index 9676956..97257f5 100644
--- a/test/unit/src/org/openide/util/actions/BooleanStateActionTest.java
+++ b/test/unit/src/org/openide/util/actions/BooleanStateActionTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/actions/CallbackSystemActionTest.java b/test/unit/src/org/openide/util/actions/CallbackSystemActionTest.java
index e2c7671..2363cb1 100644
--- a/test/unit/src/org/openide/util/actions/CallbackSystemActionTest.java
+++ b/test/unit/src/org/openide/util/actions/CallbackSystemActionTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2008 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/actions/SystemActionTest.java b/test/unit/src/org/openide/util/actions/SystemActionTest.java
index 56a0bb9..ed40c6a 100644
--- a/test/unit/src/org/openide/util/actions/SystemActionTest.java
+++ b/test/unit/src/org/openide/util/actions/SystemActionTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/data/test.properties b/test/unit/src/org/openide/util/data/test.properties
deleted file mode 100644
index 5077509..0000000
--- a/test/unit/src/org/openide/util/data/test.properties
+++ /dev/null
@@ -1,134 +0,0 @@
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
-#
-# Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
-#
-# The contents of this file are subject to the terms of either the GNU
-# General Public License Version 2 only ("GPL") or the Common
-# Development and Distribution License("CDDL") (collectively, the
-# "License"). You may not use this file except in compliance with the
-# License. You can obtain a copy of the License at
-# http://www.netbeans.org/cddl-gplv2.html
-# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
-# specific language governing permissions and limitations under the
-# License.  When distributing the software, include this License Header
-# Notice in each file and include the License file at
-# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Sun in the GPL Version 2 section of the License file that
-# accompanied this code. If applicable, add the following below the
-# License Header, with the fields enclosed by brackets [] replaced by
-# your own identifying information:
-# "Portions Copyrighted [year] [name of copyright owner]"
-#
-# Contributor(s):
-#
-# The Original Software is NetBeans. The Initial Developer of the Original
-# Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
-# Microsystems, Inc. All Rights Reserved.
-#
-# If you wish your version of this file to be governed by only the CDDL
-# or only the GPL Version 2, indicate your decision by adding
-# "[Contributor] elects to include this software in this distribution
-# under the [CDDL or GPL Version 2] license." If you do not indicate a
-# single choice of license, a recipient has the option to distribute
-# your version of this file under either the CDDL, the GPL Version 2 or
-# to extend the choice of license to its licensees as provided above.
-# However, if you add GPL Version 2 code and therefore, elected the GPL
-# Version 2 license, then the option applies only if the new code is
-# made subject to such option by the copyright holder.
-
-key1=value1
-key2 = value2
-key3 =value3
-key4= value4
-
-key5:value5
-key6 : value6
-key7 :value7
-key8: value8
-
-key9 value9
-key10   value10
-key11  value11
-key12  value12
-
-#comment can end with slash but it does not mean anything\
-
-!different type of comment
-
-    #
-    #indented comment
-    #
-
-    !
-    ! indented comment
-    !
-
-# on the lines below there are some whitespaces which must be ignored
-
-
-
-
-
-
-
-   key13      =     value13
-
-
-key\
-14 value14
-key\
-  15 value15
-k\
-e\
-y\
-1\
-6 value16
-key\
-\
- \
-        17 value17
-key18\
-:value18
-key19 \
-value19
-key20 value\
-20
-key21 value\
-     21
-key22 v\
-a\
-    lue22
-key23 value\
-\
-   \
-  23
-
-#comment for property 24
-key24=value24
-#comment for property 25
-#second line of comment for property 25
-key25=\
-value25
-#comment for property 26
-key26=value26
-
-
-@!#$%^keyA valueA!@#$%^&*(){}
-\ \=\:keyB=valueB\ \=\:
-\u1234\keyC value\C\u9876
-
-  keyD    =
-  keyE
-keyF              
-
-keyG\
-    
-    
-    keyH        = value\
-    #this is not comment
-
-keyI=incorrect end: \u123
-
-keyJ=malformed Unicode escape: \uabyz
-
diff --git a/test/unit/src/org/openide/util/datatransfer/ExClipboardTest.java b/test/unit/src/org/openide/util/datatransfer/ExClipboardTest.java
index 9e93482..17d0a7a 100644
--- a/test/unit/src/org/openide/util/datatransfer/ExClipboardTest.java
+++ b/test/unit/src/org/openide/util/datatransfer/ExClipboardTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/datatransfer/ExTransferableTest.java b/test/unit/src/org/openide/util/datatransfer/ExTransferableTest.java
index cbdd737..343d695 100644
--- a/test/unit/src/org/openide/util/datatransfer/ExTransferableTest.java
+++ b/test/unit/src/org/openide/util/datatransfer/ExTransferableTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/io/SafeExceptionTest.java b/test/unit/src/org/openide/util/io/SafeExceptionTest.java
index 42212e3..822ff73 100644
--- a/test/unit/src/org/openide/util/io/SafeExceptionTest.java
+++ b/test/unit/src/org/openide/util/io/SafeExceptionTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/io/SerializationEnumTest.java b/test/unit/src/org/openide/util/io/SerializationEnumTest.java
index e969330..a8fc32a 100644
--- a/test/unit/src/org/openide/util/io/SerializationEnumTest.java
+++ b/test/unit/src/org/openide/util/io/SerializationEnumTest.java
@@ -52,11 +52,8 @@ public class SerializationEnumTest extends NbTestCase {
      * #164239: Test that NbObjectOutputStream.isSerialVersionUIDDeclared returns true for Enum.
      */
     public void testSerialVersionUIDDeclared () throws Exception {
-        assertTrue("NbObjectOutputStream.isSerialVersionUIDDeclared must return true for Enum subclass",
+        assertTrue("NbObjectOutputStream.isSerialVersionUIDDeclared must return true for Enum",
         NbObjectOutputStream.isSerialVersionUIDDeclared(Grade.A.getClass()));
-
-        assertTrue("NbObjectOutputStream.isSerialVersionUIDDeclared must return true for java.lang.Enum",
-        NbObjectOutputStream.isSerialVersionUIDDeclared(Enum.class));
     }
     
 }
diff --git a/test/unit/src/org/openide/util/lookup/AbstractLookupArrayStorageTest.java b/test/unit/src/org/openide/util/lookup/AbstractLookupArrayStorageTest.java
index 4698ca4..e42af65 100644
--- a/test/unit/src/org/openide/util/lookup/AbstractLookupArrayStorageTest.java
+++ b/test/unit/src/org/openide/util/lookup/AbstractLookupArrayStorageTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/lookup/AbstractLookupAsynchExecutorTest.java b/test/unit/src/org/openide/util/lookup/AbstractLookupAsynchExecutorTest.java
index a55c195..3c6753e 100644
--- a/test/unit/src/org/openide/util/lookup/AbstractLookupAsynchExecutorTest.java
+++ b/test/unit/src/org/openide/util/lookup/AbstractLookupAsynchExecutorTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/lookup/AbstractLookupBaseHid.java b/test/unit/src/org/openide/util/lookup/AbstractLookupBaseHid.java
index 7315e8d..6de1438 100644
--- a/test/unit/src/org/openide/util/lookup/AbstractLookupBaseHid.java
+++ b/test/unit/src/org/openide/util/lookup/AbstractLookupBaseHid.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -45,27 +45,21 @@ import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
-import java.io.Serializable;
+import javax.swing.ActionMap;
+import javax.swing.InputMap;
+
 import java.lang.ref.WeakReference;
+import java.util.*;
+import org.netbeans.junit.*;
+import java.io.Serializable;
 import java.lang.ref.Reference;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
 import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
-import javax.swing.ActionMap;
-import javax.swing.InputMap;
-import org.netbeans.junit.NbTestCase;
 import org.openide.util.Lookup;
 import org.openide.util.Lookup.Template;
 import org.openide.util.LookupEvent;
 import org.openide.util.LookupListener;
 
- at SuppressWarnings("unchecked") // XXX ought to be corrected, just a lot of them
 public class AbstractLookupBaseHid extends NbTestCase {
     private static AbstractLookupBaseHid running;
 
@@ -78,7 +72,7 @@ public class AbstractLookupBaseHid extends NbTestCase {
     /** implementation of methods that can influence the behaviour */
     Impl impl;
     
-    protected AbstractLookupBaseHid(String testName, Impl impl) {
+    protected AbstractLookupBaseHid(java.lang.String testName, Impl impl) {
         super(testName);
         if (impl == null && (this instanceof Impl)) {
             impl = (Impl)this;
@@ -86,7 +80,7 @@ public class AbstractLookupBaseHid extends NbTestCase {
         this.impl = impl;
     }
     
-    protected @Override void setUp() {
+    protected void setUp () {
         this.ic = new InstanceContent ();
         
         beforeActualTest(getName());
@@ -96,7 +90,7 @@ public class AbstractLookupBaseHid extends NbTestCase {
         running = this;
     }        
     
-    protected @Override void tearDown() {
+    protected void tearDown () {
         running = null;
     }
     
@@ -135,18 +129,18 @@ public class AbstractLookupBaseHid extends NbTestCase {
     /** Test if first is really first.
      */
     public void testFirst () {
-        Integer i1 = 1;
-        Integer i2 = 2;
+        Object i1 = new Integer (1);
+        Object i2 = new Integer (2);
         
         ic.add (i1);
         ic.add (i2);
         
-        Integer found = lookup.lookup(Integer.class);
+        Object found = lookup.lookup (Integer.class);
         if (found != i1) {
             fail ("First object is not first: " + found + " != " + i1);
         }
         
-        List<Integer> list = new ArrayList<Integer>();
+        ArrayList list = new ArrayList ();
         list.add (i2);
         list.add (i1);
         ic.set (list, null);
@@ -174,7 +168,7 @@ public class AbstractLookupBaseHid extends NbTestCase {
             fail ("First object in intances not found");
         }
 
-        Iterator<?> all = lookup.lookupAll(Object.class).iterator();
+        Iterator all = lookup.lookup (new Lookup.Template (Object.class)).allInstances ().iterator ();
         checkIterator ("Difference between instances added and found", all, Arrays.asList (INSTANCES));
     }
     
@@ -191,7 +185,7 @@ public class AbstractLookupBaseHid extends NbTestCase {
         Runnable r2 = new Runnable () {
             public void run () {}
         };
-        List<Object> l = new ArrayList<Object>();
+        ArrayList l = new ArrayList ();
 
         l.add (s1);
         l.add (s2);
@@ -216,16 +210,16 @@ public class AbstractLookupBaseHid extends NbTestCase {
         ic.add ("A serializable string");
         lookup.lookup (Serializable.class);
         
-        ic.set (Collections.emptyList(), null);
+        ic.set (Collections.EMPTY_LIST, null);
     }
     
     /** Tests a more complex reorder on nodes.
      */
     public void testComplexReorder () {
-        Integer i1 = 1;
-        Long i2 = 2L;
+        Integer i1 = new Integer (1);
+        Long i2 = new Long (2);
         
-        List<Object> l = new ArrayList<Object>();
+        ArrayList l = new ArrayList ();
         l.add (i1);
         l.add (i2);
         ic.set (l, null);
@@ -247,12 +241,12 @@ public class AbstractLookupBaseHid extends NbTestCase {
      */
     public void testSetPairs () {
         // test setPairs method
-        List<Object> li = new ArrayList<Object>();
+        ArrayList li = new ArrayList();
         li.addAll (Arrays.asList (INSTANCES));
         ic.set (li, null);
         
-        Lookup.Result<Object> res = lookup.lookupResult(Object.class);
-        Iterator<?> all = res.allInstances().iterator();
+        Lookup.Result res = lookup.lookup (new Lookup.Template (Object.class));
+        Iterator all = res.allInstances ().iterator ();
         checkIterator ("Original order not kept", all, li);
         
         // reverse the order
@@ -274,23 +268,23 @@ public class AbstractLookupBaseHid extends NbTestCase {
      */
     public void testSetPairsFire () {
         // test setPairs method
-        List<Object> li = new ArrayList<Object>();
+        ArrayList li = new ArrayList();
         li.addAll (Arrays.asList (INSTANCES));
         ic.set (li, null);
         
-        Lookup.Result<Integer> res = lookup.lookupResult(Integer.class);
-        Iterator<?> all = res.allInstances().iterator();
+        Lookup.Result res = lookup.lookup (new Lookup.Template (Integer.class));
+        Iterator all = res.allInstances ().iterator ();
         checkIterator ("Integer is not there", all, Collections.nCopies (1, INSTANCES[0]));
         
         // change the pairs
         LL listener = new LL (res);
         res.addLookupListener (listener);
 
-        List<Object> l2 = new ArrayList<Object>(li);
+        ArrayList l2 = new ArrayList (li);
         l2.remove (INSTANCES[0]);
         ic.set (l2, null);
 
-        all = lookup.lookupAll(Object.class).iterator();
+        all = lookup.lookup (new Lookup.Template (Object.class)).allInstances ().iterator ();
         checkIterator ("The removed integer is not noticed", all, l2);
 
         if (listener.getCount () != 1) {
@@ -303,24 +297,24 @@ public class AbstractLookupBaseHid extends NbTestCase {
     public void testSetPairsDoesNotFire () {
         Object tmp = new Object ();
 
-        List<Object> li = new ArrayList<Object>();
+        ArrayList li = new ArrayList();
         li.add (tmp);
         li.addAll (Arrays.asList (INSTANCES));
         ic.set (li, null);
         
-        Lookup.Result<Integer> res = lookup.lookupResult(Integer.class);
-        Iterator<?> all = res.allInstances ().iterator ();
+        Lookup.Result res = lookup.lookup (new Lookup.Template (Integer.class));
+        Iterator all = res.allInstances ().iterator ();
         checkIterator ("Integer is not there", all, Collections.nCopies (1, INSTANCES[0]));
         
         // change the pairs
         LL listener = new LL (res);
         res.addLookupListener (listener);
 
-        List<Object> l2 = new ArrayList<Object>(li);
+        ArrayList l2 = new ArrayList (li);
         l2.remove (tmp);
         ic.set (l2, null);
 
-        all = lookup.lookupAll(Object.class).iterator();
+        all = lookup.lookup (new Lookup.Template (Object.class)).allInstances ().iterator ();
         checkIterator ("The removed integer is not noticed", all, l2);
 
         if (listener.getCount () != 0) {
@@ -342,7 +336,7 @@ public class AbstractLookupBaseHid extends NbTestCase {
 
     /** Tries to find all classes and superclasses in the lookup.
     */
-    private void findAll(Lookup lookup, Class<?> clazz, boolean shouldBeThere) {
+    private void findAll (Lookup lookup, Class clazz, boolean shouldBeThere) {
         if (clazz == null) return;
 
         Object found = lookup.lookup (clazz);
@@ -360,8 +354,8 @@ public class AbstractLookupBaseHid extends NbTestCase {
             }
         }
 
-        Lookup.Result<?> res = lookup.lookupResult(clazz);
-        Collection<?> collection = res.allInstances();
+        Lookup.Result res = lookup.lookup (new Lookup.Template (clazz));
+        Collection collection = res.allInstances ();
 
         for (int i = 0; i < INSTANCES.length; i++) {
             boolean isSubclass = clazz.isInstance (INSTANCES[i]);
@@ -404,8 +398,8 @@ public class AbstractLookupBaseHid extends NbTestCase {
     }
     
     public void testCanReturnReallyStrangeResults () throws Exception {
-        class QueryingPair extends AbstractLookup.Pair<Object> {
-            private Integer i = 434;
+        class QueryingPair extends org.openide.util.lookup.AbstractLookup.Pair {
+            private Integer i = new Integer (434);
             
             //
             // do the test
@@ -424,28 +418,28 @@ public class AbstractLookupBaseHid extends NbTestCase {
             // Implementation of pair
             // 
         
-            public String getId() {
+            public java.lang.String getId() {
                 return getType ().toString();
             }
 
-            public String getDisplayName() {
+            public java.lang.String getDisplayName() {
                 return getId ();
             }
 
-            public Class<?> getType() {
+            public java.lang.Class getType() {
                 return getClass ();
             }
 
-            protected boolean creatorOf(Object obj) {
+            protected boolean creatorOf(java.lang.Object obj) {
                 return obj == this;
             }
 
-            protected boolean instanceOf(Class<?> c) {
+            protected boolean instanceOf(java.lang.Class c) {
                 assertEquals ("Integer found or exception is thrown", i, lookup.lookup (Integer.class));
                 return c.isAssignableFrom(getType ());
             }
 
-            public Object getInstance() {
+            public java.lang.Object getInstance() {
                 return this;
             }
             
@@ -459,8 +453,8 @@ public class AbstractLookupBaseHid extends NbTestCase {
     
     /** Test of firing events. */
     public void testLookupListener() {
-        Object inst = 10;
-        Lookup.Result<?> res = lookup.lookupResult(inst.getClass());
+        Integer inst = new Integer(10);
+        Lookup.Result res = lookup.lookup(new Lookup.Template(inst.getClass()));
         res.allInstances ();
         
         LL listener = new LL(res);
@@ -490,39 +484,42 @@ public class AbstractLookupBaseHid extends NbTestCase {
     /** Testing identity of the lookup.
      */
     public void testId () {
-        Lookup.Template<?> templ;
+        AbstractLookup.Template templ;
         int cnt;
         
         addInstances (INSTANCES);
         
-        Lookup.Result<?> res = lookup.lookupResult(Object.class);
-        for (AbstractLookup.Item<?> item : res.allItems()) {
+        AbstractLookup.Result res = lookup.lookup (new AbstractLookup.Template ());
+        Iterator it;
+        it = res.allItems ().iterator ();
+        while (it.hasNext ()) {
+            AbstractLookup.Item item = (AbstractLookup.Item)it.next ();
             
-            templ = new Lookup.Template<Object>(null, item.getId(), null);
+            templ = new AbstractLookup.Template (null, item.getId (), null);
             cnt = lookup.lookup (templ).allInstances ().size ();
             if (cnt != 1) {
                 fail ("Identity lookup failed. Instances = " + cnt);
             }
 
-            templ = makeTemplate(item.getType(), item.getId());
+            templ = new AbstractLookup.Template (item.getType (), item.getId (), null);
             cnt = lookup.lookup (templ).allInstances ().size ();
             if (cnt != 1) {
                 fail ("Identity lookup with type failed. Instances = " + cnt);
             }
             
-            templ = makeTemplate(this.getClass(), item.getId());
+            templ = new AbstractLookup.Template (this.getClass (), item.getId (), null);
             cnt = lookup.lookup (templ).allInstances ().size ();
             if (cnt != 0) {
                 fail ("Identity lookup with wrong type failed. Instances = " + cnt);
             }
             
-            templ = new Lookup.Template<Object>(null, null, item.getInstance());
+            templ = new AbstractLookup.Template (null, null, item.getInstance ());
             cnt = lookup.lookup (templ).allInstances ().size ();
             if (cnt != 1) {
                 fail ("Instance lookup failed. Instances = " + cnt);
             }
 
-            templ = new Lookup.Template<Object>(null, item.getId(), item.getInstance());
+            templ = new AbstractLookup.Template (null, item.getId (), item.getInstance ());
             cnt = lookup.lookup (templ).allInstances ().size ();
             if (cnt != 1) {
                 fail ("Instance & identity lookup failed. Instances = " + cnt);
@@ -530,9 +527,6 @@ public class AbstractLookupBaseHid extends NbTestCase {
             
         }
     }
-    private static <T> Lookup.Template<T> makeTemplate(Class<T> clazz, String id) { // captures type parameter
-        return new Lookup.Template<T>(clazz, id, null);
-    }
     
     /** Tests adding and removing.
      */
@@ -540,7 +534,7 @@ public class AbstractLookupBaseHid extends NbTestCase {
         Object map = new javax.swing.ActionMap ();
         LL ll = new LL ();
         
-        Lookup.Result<?> res = lookup.lookupResult(map.getClass());
+        Lookup.Result res = lookup.lookup (new Lookup.Template (map.getClass ()));
         res.allItems();
         res.addLookupListener (ll);
         ll.source = res;
@@ -567,8 +561,8 @@ public class AbstractLookupBaseHid extends NbTestCase {
      */
     public void testGarbageCollect () throws Exception {
         ClassLoader l = new CL ();
-        Class<?> c = l.loadClass(Garbage.class.getName());
-        Reference<?> ref = new WeakReference<Object>(c);
+        Class c = l.loadClass (Garbage.class.getName ());
+        WeakReference ref = new WeakReference (c);
 
         lookup.lookup (c);
         
@@ -584,15 +578,18 @@ public class AbstractLookupBaseHid extends NbTestCase {
     public void testItemsAndIntances () {
         addInstances (INSTANCES);
         
-        Lookup.Result<Object> r = lookup.lookupResult(Object.class);
-        Collection<? extends Lookup.Item<?>> items = r.allItems();
-        Collection<?> insts = r.allInstances();
+        Lookup.Template t = new Lookup.Template (Object.class);
+        Lookup.Result r = lookup.lookup (t);
+        Collection items = r.allItems ();
+        Collection insts = r.allInstances ();
         
         if (items.size () != insts.size ()) {
             fail ("Different size of sets");
         }
-
-        for (Lookup.Item<?> item : items) {
+        
+        Iterator it = items.iterator ();
+        while (it.hasNext ()) {
+            Lookup.Item item = (Lookup.Item)it.next ();
             if (!insts.contains (item.getInstance ())) {
                 fail ("Intance " + item.getInstance () + " is missing in " + insts);
             }
@@ -602,7 +599,7 @@ public class AbstractLookupBaseHid extends NbTestCase {
     /** Checks search for interface.
      */
     public void testSearchForInterface () {
-        Lookup.Template<Serializable> t = new Lookup.Template<Serializable>(Serializable.class, null, null);
+        Lookup.Template t = new Lookup.Template (Serializable.class, null, null);
         
         assertNull("Nothing to find", lookup.lookupItem (t));
         
@@ -618,7 +615,7 @@ public class AbstractLookupBaseHid extends NbTestCase {
     public void testIncorectInstanceOf40364 () {
         final Long sharedLong = new Long (0);
         
-        class P extends AbstractLookup.Pair<Object> {
+        class P extends AbstractLookup.Pair {
             public boolean isLong;
             
             P (boolean b) {
@@ -641,19 +638,19 @@ public class AbstractLookupBaseHid extends NbTestCase {
                 return sharedLong;
             }
             
-            public Class<?> getType() {
+            public Class getType () {
                 return isLong ? Long.class : Number.class;
             }
             
-            protected boolean instanceOf(Class<?> c) {
+            protected boolean instanceOf (Class c) {
                 return c.isAssignableFrom (getType ());
             }
     
-            public @Override int hashCode() {
+            public int hashCode () {
                 return getClass ().hashCode ();
             }    
 
-            public @Override boolean equals(Object obj) {
+            public boolean equals (Object obj) {
                 return obj != null && getClass ().equals (obj.getClass ());
             }
         }
@@ -669,16 +666,16 @@ public class AbstractLookupBaseHid extends NbTestCase {
         P lng2 = new P (false);
         ic.setPairs (Collections.singleton (lng2));
         
-        Collection<? extends Lookup.Item<?>> res = lookup.lookupResult(Object.class).allItems();
+        Collection res = lookup.lookup (new Lookup.Template (Object.class)).allItems ();
         assertEquals ("Just one pair", 1, res.size ());
     }
 
     public void testAbsolutelyCrazyWayToSimulateIssue48590ByChangingTheBehaviourOfEqualOnTheFly () throws Exception {
-        class X implements TestInterfaceInheritanceA, TestInterfaceInheritanceB {
+        class X implements testInterfaceInheritanceA, testInterfaceInheritanceB {
         }
         final X shared = new X ();
         
-        class P extends AbstractLookup.Pair<Object> {
+        class P extends AbstractLookup.Pair {
             public int howLong;
             
             P (int b) {
@@ -701,19 +698,19 @@ public class AbstractLookupBaseHid extends NbTestCase {
                 return shared;
             }
             
-            public Class<?> getType() {
-                return howLong == 0 ? TestInterfaceInheritanceB.class : TestInterfaceInheritanceA.class;
+            public Class getType () {
+                return howLong == 0 ? testInterfaceInheritanceB.class : testInterfaceInheritanceA.class;
             }
             
-            protected boolean instanceOf(Class<?> c) {
+            protected boolean instanceOf (Class c) {
                 return c.isAssignableFrom (getType ());
             }
     
-            public @Override int hashCode() {
+            public int hashCode () {
                 return getClass ().hashCode ();
             }    
 
-            public @Override boolean equals(Object obj) {
+            public boolean equals (Object obj) {
                 if (obj instanceof P) {
                     P p = (P)obj;
                     if (this.howLong > 0) {
@@ -731,8 +728,8 @@ public class AbstractLookupBaseHid extends NbTestCase {
         }
         
         // to create the right structure in the lookup
-        Lookup.Result<?> a = lookup.lookupResult(TestInterfaceInheritanceA.class);
-        Lookup.Result<?> b = lookup.lookupResult(TestInterfaceInheritanceB.class);
+        Lookup.Result a = lookup.lookup (new Lookup.Template (testInterfaceInheritanceA.class));
+        Lookup.Result b = lookup.lookup (new Lookup.Template (testInterfaceInheritanceB.class));
         
         P lng1 = new P (0);
         ic.addPair (lng1);
@@ -772,15 +769,15 @@ public class AbstractLookupBaseHid extends NbTestCase {
                 
             }
             
-            public void assertOnlyMe (String msg, Lookup.Result<?> res) {
-                Collection<?> col = res.allInstances();
+            public void assertOnlyMe (String msg, Lookup.Result res) {
+                Collection col = res.allInstances ();
                 assertEquals (msg + " just one", 1, col.size ());
                 assertSame (msg + " and it is me", this, col.iterator ().next ());
             }
         }
         
-        Lookup.Result<?> runnable = lookup.lookupResult(Runnable.class);
-        Lookup.Result<?> serial = lookup.lookupResult(Serializable.class);
+        Lookup.Result runnable = lookup.lookup (new Lookup.Template (Runnable.class));
+        Lookup.Result serial = lookup.lookup (new Lookup.Template (Serializable.class));
         
         
         X x = new X ();
@@ -817,13 +814,13 @@ public class AbstractLookupBaseHid extends NbTestCase {
         int size1, size2;
         
         //interface query
-        size1 = lookup.lookupAll(java.rmi.Remote.class).size();
+        size1 = lookup.lookup(new Lookup.Template(java.rmi.Remote.class)).allInstances().size();
         size2 = countInstances(types, java.rmi.Remote.class);
         
         if (size1 != size2) fail("Lookup with interface failed: " + size1 + " != " + size2);
         
         // superclass query
-        size1 = lookup.lookupAll(A.class).size();
+        size1 = lookup.lookup(new Lookup.Template(A.class)).allInstances().size();
         size2 = countInstances(types, A.class);
         
         if (size1 != size2) fail("Lookup with superclass failed: " + size1 + " != " + size2);
@@ -832,11 +829,11 @@ public class AbstractLookupBaseHid extends NbTestCase {
     /** Test interface inheritance.
      */
     public void testInterfaceInheritance() {
-        TestInterfaceInheritanceA[] types = {
-            new TestInterfaceInheritanceB() {},
-            new TestInterfaceInheritanceBB() {},
-            new TestInterfaceInheritanceC() {},
-            new TestInterfaceInheritanceD() {}
+        testInterfaceInheritanceA[] types = {
+            new testInterfaceInheritanceB() {}, 
+            new testInterfaceInheritanceBB() {}, 
+            new testInterfaceInheritanceC() {}, 
+            new testInterfaceInheritanceD() {}
         };
         
         for (int i = 0; i < types.length; i++) {
@@ -851,7 +848,7 @@ public class AbstractLookupBaseHid extends NbTestCase {
         
         //interface query
         LL l = new LL ();
-        Lookup.Result<?> res = lookup.lookupResult(java.rmi.Remote.class);
+        Lookup.Result res = lookup.lookup(new Lookup.Template(java.rmi.Remote.class));
         l.source = res;
         size1 = res.allInstances().size();
         size2 = countInstances(types, java.rmi.Remote.class);
@@ -859,8 +856,8 @@ public class AbstractLookupBaseHid extends NbTestCase {
         if (size1 != size2) fail("Lookup with interface failed: " + size1 + " != " + size2);
         
         // superclass query
-        size1 = lookup.lookupAll(TestInterfaceInheritanceA.class).size();
-        size2 = countInstances(types, TestInterfaceInheritanceA.class);
+        size1 = lookup.lookup(new Lookup.Template(testInterfaceInheritanceA.class)).allInstances().size();
+        size2 = countInstances(types, testInterfaceInheritanceA.class);
         
         if (size1 != size2) fail("Lookup with superclass failed: " + size1 + " != " + size2);
         
@@ -879,8 +876,8 @@ public class AbstractLookupBaseHid extends NbTestCase {
         BrokenPair broken = new BrokenPair (true, false);
         ic.addPair (broken);
         
-        Lookup.Template<BrokenPair> templ = new Lookup.Template<BrokenPair>(BrokenPair.class);
-        Lookup.Item<BrokenPair> item = lookup.lookupItem (templ);
+        Lookup.Template templ = new Lookup.Template (BrokenPair.class);
+        Object item = lookup.lookupItem (templ);
         assertEquals ("Broken is found", broken, item);
     }
     
@@ -888,9 +885,9 @@ public class AbstractLookupBaseHid extends NbTestCase {
         BrokenPair broken = new BrokenPair (false, true);
         ic.addPair (broken);
         
-        Lookup.Template<BrokenPair> templ = new Lookup.Template<BrokenPair>(BrokenPair.class);
+        Lookup.Template templ = new Lookup.Template (BrokenPair.class);
         
-        Collection<? extends BrokenPair> c = lookup.lookup (templ).allInstances();
+        Collection c = lookup.lookup (templ).allInstances();
         assertEquals ("One item", 1, c.size ());
         assertEquals ("Broken is found again", broken, c.iterator().next ());
     }
@@ -899,11 +896,11 @@ public class AbstractLookupBaseHid extends NbTestCase {
         BrokenPair broken = new BrokenPair (false, true);
         ic.addPair (broken);
         
-        Lookup.Template<BrokenPair> templ = new Lookup.Template<BrokenPair>(BrokenPair.class);
-        Lookup.Item<BrokenPair> item = lookup.lookupItem (templ);
+        Lookup.Template templ = new Lookup.Template (BrokenPair.class);
+        Object item = lookup.lookupItem (templ);
         assertEquals ("Broken is found", broken, item);
         
-        Collection<? extends BrokenPair> c = lookup.lookup(templ).allInstances();
+        Collection c = lookup.lookup (templ).allInstances();
         assertEquals ("One item", 1, c.size ());
         assertEquals ("Broken is found again", broken, c.iterator().next ());
     }
@@ -912,8 +909,8 @@ public class AbstractLookupBaseHid extends NbTestCase {
         BrokenPair broken = new BrokenPair (false, true);
         ic.addPair (broken);
         
-        Lookup.Template<BrokenPair> templ = new Lookup.Template<BrokenPair>(BrokenPair.class);
-        Collection<? extends BrokenPair> c = lookup.lookup(templ).allInstances();
+        Lookup.Template templ = new Lookup.Template (BrokenPair.class);
+        Collection c = lookup.lookup (templ).allInstances();
         assertEquals ("One item", 1, c.size ());
         assertEquals ("Broken is found again", broken, c.iterator().next ());
         
@@ -922,9 +919,9 @@ public class AbstractLookupBaseHid extends NbTestCase {
     }
     
     public void testAddALotOfPairsIntoTheLookupOneByOne () throws Exception {
-        Lookup.Result<Integer> res = lookup.lookupResult(Integer.class);
+        Lookup.Result res = lookup.lookup (new Lookup.Template (Integer.class));
         for (int i = 0; i < 1000; i++) {
-            ic.add(i);
+            ic.add (new Integer (i));
         }
         assertEquals (
             "there is the right count", 
@@ -934,30 +931,31 @@ public class AbstractLookupBaseHid extends NbTestCase {
     }
     
     public void testAddALotOfPairsIntoTheLookup () throws Exception {
-        List<Integer> arr = new ArrayList<Integer>();
+        ArrayList arr = new ArrayList ();
         for (int i = 0; i < 1000; i++) {
-            arr.add(i);
+            arr.add (new Integer (i));
         }
         ic.set (arr, null);
         
         assertEquals (
             "there is the right count", 
             1000, 
-            lookup.lookupResult(Integer.class).allItems().size()
+            lookup.lookup (new Lookup.Template (Integer.class)).allItems().size ()
         );
     }
 
     
     public void testDoubleAddIssue35274 () throws Exception {
-        class P extends AbstractLookup.Pair<Object> {
+        class P extends AbstractLookup.Pair {
             protected boolean creatorOf(Object obj) { return false; }
             public String getDisplayName() { return ""; }
             public String getId() { return ""; }
             public Object getInstance() { return null; }
-            public Class<?> getType() { return Object.class; }
-            protected boolean instanceOf(Class<?> c) { return c.isAssignableFrom(getType ()); }
-            public @Override int hashCode() {return getClass().hashCode();}
-            public @Override boolean equals(Object obj) {return getClass() == obj.getClass();}
+            public Class getType() { return Object.class; }
+            protected boolean instanceOf(Class c) { return c.isAssignableFrom(getType ()); }
+            
+            public int hashCode () { return getClass ().hashCode(); };
+            public boolean equals (Object obj) { return getClass () == obj.getClass (); };
         }
         
         P p = new P ();
@@ -965,7 +963,7 @@ public class AbstractLookupBaseHid extends NbTestCase {
         ic.addPair (p);
         ic.addPair (p);
         
-        Lookup.Result<Object> result = lookup.lookupResult(Object.class);
+        Lookup.Result result = lookup.lookup (new Lookup.Template (Object.class));
         Collection res = result.allItems ();
         assertEquals ("One item there", 1, res.size ());
         assertTrue ("It is the p", p == res.iterator ().next ());
@@ -973,13 +971,13 @@ public class AbstractLookupBaseHid extends NbTestCase {
         P p2 = new P ();
         ic.addPair (p2);
         
-        Reference<?> ref = new WeakReference<Object>(result);
+        WeakReference ref = new WeakReference (result);
         result = null;
         assertGC ("The result can disappear", ref);
         
         impl.clearCaches ();
         
-        result = lookup.lookupResult(Object.class);
+        result = lookup.lookup (new Lookup.Template (Object.class));
         res = result.allItems ();
         assertEquals ("One item is still there", 1, res.size ());
         assertTrue ("But the p2 replaced p", p2 == res.iterator ().next ());
@@ -1180,7 +1178,7 @@ public class AbstractLookupBaseHid extends NbTestCase {
         synchronized (pair) {
             class BlockInInstanceOf implements Runnable {
                 public void run () {
-                    Integer i = my.lookup(Integer.class);
+                    Integer i = (Integer)my.lookup (Integer.class);
                     assertEquals (new Integer (10), i);
                 }
             }
@@ -1251,12 +1249,12 @@ public class AbstractLookupBaseHid extends NbTestCase {
     }
     
     /** Checks the iterator */
-    private <T> void checkIterator(String msg, Iterator<? extends T> it1, List<? extends T> list) {
+    private void checkIterator (String msg, Iterator it1, List list) {
         int cnt = 0;
-        Iterator<? extends T> it2 = list.iterator();
+        Iterator it2 = list.iterator ();
         while (it1.hasNext () && it2.hasNext ()) {
-            T n1 = it1.next();
-            T n2 = it2.next();
+            Object n1 = it1.next ();
+            Object n2 = it2.next ();
             
             if (n1 != n2) {
                 fail (msg + " iterator[" + cnt + "] = " + n1 + " but list[" + cnt + "] = " + n2);
@@ -1415,7 +1413,7 @@ public class AbstractLookupBaseHid extends NbTestCase {
                 this.ic = ic;
             }
 
-            protected @Override void beforeLookup(Template template) {
+            protected void beforeLookup(Template template) {
                 if (ic != null) {
                     ic.add(am);
                     ic = null;
@@ -1449,7 +1447,7 @@ public class AbstractLookupBaseHid extends NbTestCase {
                 return delegate;
             }
             
-            public void setLookups(Lookup... arr) {
+            public void setLookups(Lookup[] arr) {
                 if (wrapBySimple) {
                     delegate = new ProxyLookup(arr);                    
                 } else {
@@ -1481,10 +1479,10 @@ public class AbstractLookupBaseHid extends NbTestCase {
         assertEquals("No change in ActionMap 2", 0, ll.getCount());
         ic.add(m2);
         assertEquals("No change in ActionMap 3", 0, ll.getCount());
-        p.setLookups(lookup, actionMapLookup, Lookup.EMPTY);
+        p.setLookups(new Lookup[]{ lookup, actionMapLookup, Lookup.EMPTY });
         assertEquals("No change in ActionMap 4", 0, ll.getCount());
         
-        ActionMap am2 = p.query.lookup(ActionMap.class);
+        ActionMap am2 = (ActionMap)p.query.lookup(ActionMap.class);
         assertEquals("Still the same action map", am, am2);
         
         
@@ -1499,7 +1497,7 @@ public class AbstractLookupBaseHid extends NbTestCase {
                 this.ic = ic;
             }
 
-            protected @Override void beforeLookup(Template template) {
+            protected void beforeLookup(Template template) {
                 if (ic != null) {
                     ic.add(am);
                     ic = null;
@@ -1828,11 +1826,11 @@ public class AbstractLookupBaseHid extends NbTestCase {
 
     /** A set of interfaces for testInterfaceInheritance
      */
-    interface TestInterfaceInheritanceA {}
-    interface TestInterfaceInheritanceB extends TestInterfaceInheritanceA, java.rmi.Remote {}
-    interface TestInterfaceInheritanceBB extends TestInterfaceInheritanceB {}
-    interface TestInterfaceInheritanceC extends TestInterfaceInheritanceA, java.rmi.Remote {}
-    interface TestInterfaceInheritanceD extends TestInterfaceInheritanceA {}
+    interface testInterfaceInheritanceA {}
+    interface testInterfaceInheritanceB extends testInterfaceInheritanceA, java.rmi.Remote {}
+    interface testInterfaceInheritanceBB extends testInterfaceInheritanceB {}
+    interface testInterfaceInheritanceC extends testInterfaceInheritanceA, java.rmi.Remote {}
+    interface testInterfaceInheritanceD extends testInterfaceInheritanceA {}
     
     /** A special class for garbage test */
     public static final class Garbage extends Object implements Serializable {
@@ -1846,7 +1844,7 @@ public class AbstractLookupBaseHid extends NbTestCase {
             super (null);
         }
 
-        public @Override Class findClass(String name) throws ClassNotFoundException {
+        public Class findClass (String name) throws ClassNotFoundException {
             if (name.equals (Garbage.class.getName ())) {
                 String n = name.replace ('.', '/');
                 java.io.InputStream is = getClass ().getResourceAsStream ("/" + n + ".class");
diff --git a/test/unit/src/org/openide/util/lookup/AbstractLookupExecutorTest.java b/test/unit/src/org/openide/util/lookup/AbstractLookupExecutorTest.java
index eb87a0b..2a56535 100644
--- a/test/unit/src/org/openide/util/lookup/AbstractLookupExecutorTest.java
+++ b/test/unit/src/org/openide/util/lookup/AbstractLookupExecutorTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/lookup/AbstractLookupMemoryTest.java b/test/unit/src/org/openide/util/lookup/AbstractLookupMemoryTest.java
index ab8e126..7fc4a11 100644
--- a/test/unit/src/org/openide/util/lookup/AbstractLookupMemoryTest.java
+++ b/test/unit/src/org/openide/util/lookup/AbstractLookupMemoryTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -77,7 +77,7 @@ public class AbstractLookupMemoryTest extends NbTestCase {
     }
     
     public void testLookupWithPairs () {
-        Lookup.Template<Object> t = new Lookup.Template<Object>(Object.class);
+        Lookup.Template t = new Lookup.Template (Object.class);
         class L implements org.openide.util.LookupListener {
             public int cnt;
             public void resultChanged (org.openide.util.LookupEvent ev) {
@@ -86,18 +86,12 @@ public class AbstractLookupMemoryTest extends NbTestCase {
         }
         L listener = new L ();
         L listener2 = new L ();
-
-        EmptyPair[] pairs = {
-            new EmptyPair(),
-            new EmptyPair(),
-            new EmptyPair(),
-            new EmptyPair(),
-        };
+        
         Object[] ignore = {
-            pairs[0],
-            pairs[1],
-            pairs[2],
-            pairs[3],
+            new EmptyPair (),
+            new EmptyPair (),
+            new EmptyPair (),
+            new EmptyPair (),
             t,
             ActiveQueue.queue(),
             listener,
@@ -114,10 +108,10 @@ public class AbstractLookupMemoryTest extends NbTestCase {
         c.addPair ((EmptyPair)ignore[1]);
         assertSize ("Is bigger I guess (not counting the pair sizes)", Collections.singleton (l), 56, ignore);
         
-        c.setPairs(Arrays.asList(pairs).subList(0, 3));
+        c.setPairs((Collection)Arrays.asList (ignore).subList (0, 3));
         assertSize ("Even bigger (not counting the pair sizes)", Collections.singleton (l), 64, ignore);
         
-        c.setPairs(Arrays.asList(pairs).subList(0, 4));
+        c.setPairs((Collection)Arrays.asList (ignore).subList (0, 4));
         assertSize ("Now not that much(not counting the pair sizes)", Collections.singleton (l), 64, ignore);
         
         Lookup.Result res = l.lookup (t);
diff --git a/test/unit/src/org/openide/util/lookup/AbstractLookupTest.java b/test/unit/src/org/openide/util/lookup/AbstractLookupTest.java
index 2ea56f7..517c4ee 100644
--- a/test/unit/src/org/openide/util/lookup/AbstractLookupTest.java
+++ b/test/unit/src/org/openide/util/lookup/AbstractLookupTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -51,7 +51,6 @@ import org.netbeans.junit.*;
 import org.openide.util.Lookup;
 import org.openide.util.lookup.AbstractLookup.Pair;
 
- at SuppressWarnings("unchecked") // XXX ought to be corrected, just a lot of them
 public class AbstractLookupTest extends AbstractLookupBaseHid implements AbstractLookupBaseHid.Impl {
     public AbstractLookupTest(java.lang.String testName) {
         super(testName, null);
@@ -87,7 +86,7 @@ public class AbstractLookupTest extends AbstractLookupBaseHid implements Abstrac
         public int cleared;
         public int dirty;
 
-        synchronized @Override boolean cleanUpResult(Template t) {
+        synchronized boolean cleanUpResult (Template t) {
             boolean res = super.cleanUpResult (t);
             if (res) {
                 cleared++;
@@ -173,7 +172,7 @@ public class AbstractLookupTest extends AbstractLookupBaseHid implements Abstrac
                 this.ic = ic;
             }
             
-            protected @Override void initialize() {
+            protected void initialize () {
                 if (direct) {
                     run ();
                 } else {
@@ -215,7 +214,7 @@ public class AbstractLookupTest extends AbstractLookupBaseHid implements Abstrac
                 this.ic = c;
             }
         
-            protected @Override void beforeLookup(Template t) {
+            protected void beforeLookup (Template t) {
                 if (toAdd != null) {
                     list.add (0, new SerialPair (toAdd));
                     setPairs (list);
diff --git a/test/unit/src/org/openide/util/lookup/ExcludingLookupTest.java b/test/unit/src/org/openide/util/lookup/ExcludingLookupTest.java
index 4ddc16d..f4e7cde 100644
--- a/test/unit/src/org/openide/util/lookup/ExcludingLookupTest.java
+++ b/test/unit/src/org/openide/util/lookup/ExcludingLookupTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -46,7 +46,6 @@ import org.openide.util.Lookup;
 
 /** Runs all NbLookupTest tests on ProxyLookup and adds few additional.
  */
- at SuppressWarnings("unchecked") // XXX ought to be corrected, just a lot of them
 public class ExcludingLookupTest extends AbstractLookupBaseHid
 implements AbstractLookupBaseHid.Impl {
     public ExcludingLookupTest(java.lang.String testName) {
diff --git a/test/unit/src/org/openide/util/lookup/InheritanceTreeTest.java b/test/unit/src/org/openide/util/lookup/InheritanceTreeTest.java
index 102f498..3ab8464 100644
--- a/test/unit/src/org/openide/util/lookup/InheritanceTreeTest.java
+++ b/test/unit/src/org/openide/util/lookup/InheritanceTreeTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/lookup/InitializationBug44134Test.java b/test/unit/src/org/openide/util/lookup/InitializationBug44134Test.java
index 317619d..006c905 100644
--- a/test/unit/src/org/openide/util/lookup/InitializationBug44134Test.java
+++ b/test/unit/src/org/openide/util/lookup/InitializationBug44134Test.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/lookup/LookupBugTest.java b/test/unit/src/org/openide/util/lookup/LookupBugTest.java
index 38e3525..5329f26 100644
--- a/test/unit/src/org/openide/util/lookup/LookupBugTest.java
+++ b/test/unit/src/org/openide/util/lookup/LookupBugTest.java
@@ -76,4 +76,4 @@ public class LookupBugTest implements LookupListener
         }
         else return false;
     }
-}
+}
\ No newline at end of file
diff --git a/test/unit/src/org/openide/util/lookup/LookupsProxyTest.java b/test/unit/src/org/openide/util/lookup/LookupsProxyTest.java
index 7ef5ab4..d6dba3d 100644
--- a/test/unit/src/org/openide/util/lookup/LookupsProxyTest.java
+++ b/test/unit/src/org/openide/util/lookup/LookupsProxyTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -51,7 +51,6 @@ import org.openide.util.LookupListener;
 
 /** Runs all NbLookupTest tests on ProxyLookup and adds few additional.
  */
- at SuppressWarnings("unchecked") // XXX ought to be corrected, just a lot of them
 public class LookupsProxyTest extends AbstractLookupBaseHid
 implements AbstractLookupBaseHid.Impl {
     public LookupsProxyTest(java.lang.String testName) {
diff --git a/test/unit/src/org/openide/util/lookup/MetaInfServicesLookupTest.java b/test/unit/src/org/openide/util/lookup/MetaInfServicesLookupTest.java
index aa6220c..3e09631 100644
--- a/test/unit/src/org/openide/util/lookup/MetaInfServicesLookupTest.java
+++ b/test/unit/src/org/openide/util/lookup/MetaInfServicesLookupTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -41,7 +41,6 @@
 
 package org.openide.util.lookup;
 
-import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
@@ -51,8 +50,6 @@ import java.lang.ref.Reference;
 import java.lang.ref.WeakReference;
 import java.net.URL;
 import java.net.URLClassLoader;
-import java.net.URLConnection;
-import java.net.URLStreamHandler;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -65,7 +62,8 @@ import java.util.Map;
 import java.util.Set;
 import java.util.TreeSet;
 import java.util.WeakHashMap;
-import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
 import java.util.jar.JarEntry;
 import java.util.jar.JarOutputStream;
 import java.util.logging.Level;
@@ -75,8 +73,6 @@ import java.util.regex.Pattern;
 import org.bar.Comparator2;
 import org.netbeans.junit.MockServices;
 import org.netbeans.junit.NbTestCase;
-import org.openide.util.Enumerations;
-import org.openide.util.Exceptions;
 import org.openide.util.Lookup;
 import org.openide.util.LookupEvent;
 import org.openide.util.LookupListener;
@@ -224,39 +220,38 @@ public class MetaInfServicesLookupTest extends NbTestCase {
 
     public void testBasicUsage() throws Exception {
         Lookup l = getTestedLookup(c2);
-        Class<?> xface = c1.loadClass("org.foo.Interface");
-        List<?> results = new ArrayList<Object>(l.lookupAll(xface));
+        Class xface = c1.loadClass("org.foo.Interface");
+        List results = new ArrayList(l.lookup(new Lookup.Template(xface)).allInstances());
         assertEquals("Two items in result: " + results, 2, results.size());
         // Note that they have to be in order:
         assertEquals("org.foo.impl.Implementation1", results.get(0).getClass().getName());
         assertEquals("org.bar.Implementation2", results.get(1).getClass().getName());
         // Make sure it does not gratuitously replace items:
-        List<?> results2 = new ArrayList<Object>(l.lookupAll(xface));
+        List results2 = new ArrayList(l.lookup(new Lookup.Template(xface)).allInstances());
         assertEquals(results, results2);
     }
 
     public void testLoaderSkew() throws Exception {
-        Class<?> xface1 = c1.loadClass("org.foo.Interface");
+        Class xface1 = c1.loadClass("org.foo.Interface");
         Lookup l3 = getTestedLookup(c3);
         // If we cannot load Interface, there should be no impls of course... quietly!
-        assertEquals(Collections.emptyList(),
-                new ArrayList<Object>(l3.lookupAll(xface1)));
+        assertEquals(Collections.EMPTY_LIST,
+                new ArrayList(l3.lookup(new Lookup.Template(xface1)).allInstances()));
         Lookup l4 = getTestedLookup(c4);
         // If we can load Interface but it is the wrong one, ignore it.
-        assertEquals(Collections.emptyList(),
-                new ArrayList<Object>(l4.lookupAll(xface1)));
+        assertEquals(Collections.EMPTY_LIST,
+                new ArrayList(l4.lookup(new Lookup.Template(xface1)).allInstances()));
         // Make sure l4 is really OK - it can load from its own JARs.
-        Class<?> xface4 = c4.loadClass("org.foo.Interface");
-        assertEquals(2, l4.lookupAll(xface4).size());
+        Class xface4 = c4.loadClass("org.foo.Interface");
+        assertEquals(2, l4.lookup(new Lookup.Template(xface4)).allInstances().size());
     }
 
     public void testStability() throws Exception {
         Lookup l = getTestedLookup(c2);
-        Class<?> xface = c1.loadClass("org.foo.Interface");
-        Object first = l.lookup(xface);
-        assertEquals(first, l.lookupAll(xface).iterator().next());
+        Class xface = c1.loadClass("org.foo.Interface");
+        Object first = l.lookup(new Lookup.Template(xface)).allInstances().iterator().next();
         l = getTestedLookup(c2a);
-        Object second = l.lookup(xface);
+        Object second = l.lookup(new Lookup.Template(xface)).allInstances().iterator().next();
         assertEquals(first, second);
     }
 
@@ -272,13 +267,13 @@ public class MetaInfServicesLookupTest extends NbTestCase {
 
     public void testOrdering() throws Exception {
         Lookup l = getTestedLookup(c1);
-        Class<?> xface = c1.loadClass("java.util.Comparator");
-        List<?> results = new ArrayList<Object>(l.lookupAll(xface));
+        Class xface = c1.loadClass("java.util.Comparator");
+        List results = new ArrayList(l.lookup(new Lookup.Template(xface)).allInstances());
         assertEquals(1, results.size());
 
         l = getTestedLookup(c2);
         xface = c2.loadClass("java.util.Comparator");
-        results = new ArrayList<Object>(l.lookupAll(xface));
+        results = new ArrayList(l.lookup(new Lookup.Template(xface)).allInstances());
         assertEquals(2, results.size());
         // Test order:
         assertEquals("org.bar.Comparator2", results.get(0).getClass().getName());
@@ -287,7 +282,7 @@ public class MetaInfServicesLookupTest extends NbTestCase {
         // test that items without position are always at the end
         l = getTestedLookup(c2);
         xface = c2.loadClass("java.util.Iterator");
-        results = new ArrayList<Object>(l.lookupAll(xface));
+        results = new ArrayList(l.lookup(new Lookup.Template(xface)).allInstances());
         assertEquals(2, results.size());
         // Test order:
         assertEquals("org.bar.Iterator2", results.get(0).getClass().getName());
@@ -311,11 +306,14 @@ public class MetaInfServicesLookupTest extends NbTestCase {
             }
 
             @Override
-            protected Enumeration<URL> findResources(String name) throws IOException {
+            protected Enumeration findResources(String name) throws IOException {
                 if (name.equals(prefix() + "java.lang.Object")) {
                     counter++;
                 }
-                return super.findResources(name);
+                Enumeration retValue;
+
+                retValue = super.findResources(name);
+                return retValue;
             }
         }
         Loader loader = new Loader();
@@ -363,7 +361,7 @@ public class MetaInfServicesLookupTest extends NbTestCase {
 
 
             @Override
-            protected Enumeration<URL> findResources(String name) throws IOException {
+            protected Enumeration findResources(String name) throws IOException {
                 if (name.equals(prefix() + "java.lang.Runnable")) {
                     return Collections.enumeration(Collections.singleton(findResource(name)));
                 }
@@ -391,26 +389,39 @@ public class MetaInfServicesLookupTest extends NbTestCase {
         assertGC("Class can be garbage collected", ref);
     }
 
-    public void testSuperTypes() throws Exception {
-        doTestSuperTypes(createLookup(c2));
-        doTestSuperTypes(new ProxyLookup(createLookup(c2)));
-    }
-    private void doTestSuperTypes(Lookup l) throws Exception {
-        final Class<?> xface = c1.loadClass("org.foo.Interface");
-        final Lookup.Result<Object> res = l.lookupResult(Object.class);
-        assertEquals("Nothing yet", 0, res.allInstances().size());
-        final AtomicBoolean event = new AtomicBoolean();
-        final Thread here = Thread.currentThread();
-        res.addLookupListener(new LookupListener() {
-            public void resultChanged(LookupEvent ev) {
-                if (Thread.currentThread() == here) {
-                    event.set(true);
+    public void testListenersAreNotifiedWithoutHoldingALockIssue36035() throws Exception {
+        final Lookup l = getTestedLookup(c2);
+        final Class xface = c1.loadClass("org.foo.Interface");
+        final Lookup.Result res = l.lookup(new Lookup.Template(Object.class));
+
+        class L implements LookupListener, Runnable {
+            private Thread toInterrupt;
+
+            public void run() {
+                assertNotNull("Possible to query lookup", l.lookup(xface));
+                assertEquals("and there are two items", 2, res.allInstances().size());
+                toInterrupt.interrupt();
+            }
+
+            public synchronized void resultChanged(LookupEvent ev) {
+                toInterrupt = Thread.currentThread();
+                Executors.newSingleThreadScheduledExecutor().schedule(this, 0, TimeUnit.MICROSECONDS);
+                try {
+                    wait(3000);
+                    fail("Should be interrupted - means it was not possible to finish query in run() method");
+                } catch (InterruptedException ex) {
+                    // this is what we want
                 }
             }
-        });
+        }
+        L listener = new L();
+
+        res.addLookupListener(listener);
+        assertEquals("Nothing yet", 0, res.allInstances().size());
+
         assertNotNull("Interface found", l.lookup(xface));
-        assertFalse(event.get());
-        MetaInfServicesLookup.RP.post(new Runnable() {public void run() {}}).waitFinished();
+        assertNotNull("Listener notified", listener.toInterrupt);
+
         assertEquals("Now two", 2, res.allInstances().size());
     }
     
@@ -442,94 +453,4 @@ public class MetaInfServicesLookupTest extends NbTestCase {
             fail("Collections are different:\nFirst: " + col1 + "\nLast:  " + col3);
         }
     }
-
-    public void testContentionWhenLoadingMetainfServices() throws Exception {
-        class My extends ClassLoader implements Runnable {
-            Lookup query;
-            Integer value;
-
-            public void run() {
-                value = query.lookup(Integer.class);
-            }
-
-
-            @Override
-            protected URL findResource(String name) {
-                waitForTask(name);
-                return super.findResource(name);
-            }
-
-            @Override
-            protected Enumeration<URL> findResources(String name) throws IOException {
-                waitForTask(name);
-                return super.findResources(name);
-            }
-
-            private synchronized void waitForTask(String name) {
-                if (name.startsWith(prefix()) && Thread.currentThread().getName().contains("block")) {
-                    try {
-                        wait();
-                    } catch (InterruptedException ex) {
-                        Exceptions.printStackTrace(ex);
-                    }
-                }
-            }
-        }
-
-        My loader = new My();
-        loader.query = createLookup(loader);
-        Thread t = new Thread(loader, "block when querying");
-        t.start();
-        t.join(1000);
-
-        // this blocks waiting for the waitForTask to finish
-        // right now
-        Float f = loader.query.lookup(Float.class);
-        assertNull("Nothing found", f);
-
-        synchronized (loader) {
-            loader.notifyAll();
-        }
-        t.join();
-
-        assertNull("Nothing found", loader.value);
-    }
-
-    public void testInitializerRobustness() throws Exception { // #174055
-        check(Broken1.class.getName());
-        check(Broken2.class.getName());
-    }
-    private void check(final String n) {
-        assertNull(Lookups.metaInfServices(new ClassLoader() {
-            protected @Override Enumeration<URL> findResources(String name) throws IOException {
-                if (name.equals("META-INF/services/java.lang.Object")) {
-                    return Enumerations.singleton(new URL(null, "dummy:stuff", new URLStreamHandler() {
-                        protected URLConnection openConnection(URL u) throws IOException {
-                            return new URLConnection(u) {
-                                public void connect() throws IOException {}
-                                public @Override InputStream getInputStream() throws IOException {
-                                    return new ByteArrayInputStream(n.getBytes("UTF-8"));
-                                }
-                            };
-                        }
-                    }));
-                } else {
-                    return Enumerations.empty();
-                }
-            }
-        }).lookup(Object.class));
-    }
-    public static class Broken1 {
-        public Broken1() {
-            throw new NullPointerException("broken1");
-        }
-    }
-    public static class Broken2 {
-        static {
-            if (true) { // otherwise javac complains
-                throw new NullPointerException("broken2");
-            }
-        }
-    }
-
 }
diff --git a/test/unit/src/org/openide/util/lookup/MetaInfServicesLookupTestRunnable.java b/test/unit/src/org/openide/util/lookup/MetaInfServicesLookupTestRunnable.java
index 4ba3bc9..4474a92 100644
--- a/test/unit/src/org/openide/util/lookup/MetaInfServicesLookupTestRunnable.java
+++ b/test/unit/src/org/openide/util/lookup/MetaInfServicesLookupTestRunnable.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/lookup/NamedServicesLookupTest.java b/test/unit/src/org/openide/util/lookup/NamedServicesLookupTest.java
index 9f81faf..b461652 100644
--- a/test/unit/src/org/openide/util/lookup/NamedServicesLookupTest.java
+++ b/test/unit/src/org/openide/util/lookup/NamedServicesLookupTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -74,12 +74,25 @@ public class NamedServicesLookupTest extends MetaInfServicesLookupTest {
     // anyway, but the infrastructure to generate the JAR files is useful
     //
     
-    public @Override void testLoaderSkew() {}
-    public @Override void testStability() throws Exception {}
-    public @Override void testMaskingOfResources() throws Exception {}
-    public @Override void testOrdering() throws Exception {}
-    public @Override void testNoCallToGetResourceForObjectIssue65124() throws Exception {}
-    public @Override void testSuperTypes() throws Exception {}
-    public @Override void testWrongOrderAsInIssue100320() throws Exception {}
+    public void testLoaderSkew() throws Exception {
+    }
+
+    public void testStability() throws Exception {
+    }
+
+    public void testMaskingOfResources() throws Exception {
+    }
+
+    public void testOrdering() throws Exception {
+    }
+
+    public void testNoCallToGetResourceForObjectIssue65124() throws Exception {
+    }
+
+    public void testListenersAreNotifiedWithoutHoldingALockIssue36035() throws Exception {
+    }
+    
+    public void testWrongOrderAsInIssue100320() throws Exception {
+    }    
     
 }
diff --git a/test/unit/src/org/openide/util/lookup/PathInLookupTest.java b/test/unit/src/org/openide/util/lookup/PathInLookupTest.java
deleted file mode 100644
index 950d622..0000000
--- a/test/unit/src/org/openide/util/lookup/PathInLookupTest.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
- *
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common
- * Development and Distribution License("CDDL") (collectively, the
- * "License"). You may not use this file except in compliance with the
- * License. You can obtain a copy of the License at
- * http://www.netbeans.org/cddl-gplv2.html
- * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
- * specific language governing permissions and limitations under the
- * License.  When distributing the software, include this License Header
- * Notice in each file and include the License file at
- * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Sun in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the
- * License Header, with the fields enclosed by brackets [] replaced by
- * your own identifying information:
- * "Portions Copyrighted [year] [name of copyright owner]"
- *
- * Contributor(s):
- *
- * The Original Software is NetBeans. The Initial Developer of the Original
- * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
- * Microsystems, Inc. All Rights Reserved.
- *
- * If you wish your version of this file to be governed by only the CDDL
- * or only the GPL Version 2, indicate your decision by adding
- * "[Contributor] elects to include this software in this distribution
- * under the [CDDL or GPL Version 2] license." If you do not indicate a
- * single choice of license, a recipient has the option to distribute
- * your version of this file under either the CDDL, the GPL Version 2 or
- * to extend the choice of license to its licensees as provided above.
- * However, if you add GPL Version 2 code and therefore, elected the GPL
- * Version 2 license, then the option applies only if the new code is
- * made subject to such option by the copyright holder.
- */
-
-package org.openide.util.lookup;
-
-import java.util.logging.Level;
-import org.netbeans.junit.MockServices;
-import org.netbeans.junit.NbTestCase;
-import org.netbeans.modules.openide.util.NamedServicesProvider;
-import org.openide.util.Lookup;
-
-/** 
- * @author Jaroslav Tulach
- */
-public class PathInLookupTest extends NbTestCase {
-    static {
-        System.setProperty("org.openide.util.Lookup.paths", "MyServices:YourServices");
-        MockServices.setServices(P.class);
-        Lookup.getDefault();
-    }
-
-    public PathInLookupTest(String name) {
-        super(name);
-    }
-
-    @Override
-    protected Level logLevel() {
-        return Level.FINE;
-    }
-    
-    public void testInterfaceFoundInMyServices() throws Exception {
-        assertNull("not found", Lookup.getDefault().lookup(Shared.class));
-        Shared v = new Shared();
-        P.ic1.add(v);
-        assertNotNull("found", Lookup.getDefault().lookup(Shared.class));
-        P.ic1.remove(v);
-        assertNull("not found again", Lookup.getDefault().lookup(Shared.class));
-    }
-    public void testInterfaceFoundInMyServices2() throws Exception {
-        assertNull("not found", Lookup.getDefault().lookup(Shared.class));
-        Shared v = new Shared();
-        P.ic2.add(v);
-        assertNotNull("found", Lookup.getDefault().lookup(Shared.class));
-        P.ic2.remove(v);
-        assertNull("not found again", Lookup.getDefault().lookup(Shared.class));
-    }
-
-    static final class Shared extends Object {}
-
-    public static final class P extends NamedServicesProvider {
-        static InstanceContent ic1 = new InstanceContent();
-        static InstanceContent ic2 = new InstanceContent();
-        static AbstractLookup[] arr = {
-            new AbstractLookup(ic1), new AbstractLookup(ic2)
-        };
-
-
-        @Override
-        public Lookup create(String path) {
-            int indx = -1;
-            if (path.equals("MyServices/")) {
-                indx = 0;
-            }
-            if (path.equals("YourServices/")) {
-                indx = 1;
-            }
-            if (indx == -1) {
-                fail("Unexpected lookup query: " + path);
-            }
-            return arr[indx];
-        }
-    }
-
-}
diff --git a/test/unit/src/org/openide/util/lookup/PrefixServicesLookupTest.java b/test/unit/src/org/openide/util/lookup/PrefixServicesLookupTest.java
index ab8dce7..edcfee2 100644
--- a/test/unit/src/org/openide/util/lookup/PrefixServicesLookupTest.java
+++ b/test/unit/src/org/openide/util/lookup/PrefixServicesLookupTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/lookup/ProxyLookupTest.java b/test/unit/src/org/openide/util/lookup/ProxyLookupTest.java
index ed7abef..6110a92 100644
--- a/test/unit/src/org/openide/util/lookup/ProxyLookupTest.java
+++ b/test/unit/src/org/openide/util/lookup/ProxyLookupTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -57,7 +57,6 @@ import org.openide.util.LookupListener;
 
 /** Runs all NbLookupTest tests on ProxyLookup and adds few additional.
  */
- at SuppressWarnings("unchecked") // XXX ought to be corrected, just a lot of them
 public class ProxyLookupTest extends AbstractLookupBaseHid
 implements AbstractLookupBaseHid.Impl {
     public ProxyLookupTest(java.lang.String testName) {
@@ -460,7 +459,6 @@ implements AbstractLookupBaseHid.Impl {
             }
 
             @Override
-            @SuppressWarnings("EqualsWhichDoesntCheckParameterClass")
             public boolean equals(Object obj) {
                 if (set != null) {
                     cnt[0]++;
diff --git a/test/unit/src/org/openide/util/lookup/SimpleLookupTest.java b/test/unit/src/org/openide/util/lookup/SimpleLookupTest.java
index a6dee69..9b5da78 100644
--- a/test/unit/src/org/openide/util/lookup/SimpleLookupTest.java
+++ b/test/unit/src/org/openide/util/lookup/SimpleLookupTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -24,7 +24,7 @@
  * Contributor(s):
  *
  * The Original Software is NetBeans. The Initial Developer of the Original
- * Software is Sun Microsystems, Inc. Portions Copyright 1997-2009 Sun
+ * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
  * Microsystems, Inc. All Rights Reserved.
  *
  * If you wish your version of this file to be governed by only the CDDL
@@ -59,10 +59,6 @@ public class SimpleLookupTest extends NbTestCase {
         super(testName);
     }
 
-    public void testEmptyLookup() {
-        assertSize("Lookup.EMPTY should be small", 8, Lookup.EMPTY);
-    }
-
     /**
      * Simple tests testing singleton lookup.
      */
@@ -81,18 +77,6 @@ public class SimpleLookupTest extends NbTestCase {
         assertNotNull(p2.lookup(java.io.Serializable.class));
     }
     
-    public void testEmptyFixed() {
-        Lookup l = Lookups.fixed();
-        assertSize("Lookups.fixed() for empty list of items should be small", 8, l);
-        assertSame(Lookup.EMPTY, l);
-    }
-
-    public void testSingleItemFixed() {
-        Object o = new Object();
-        Lookup l = Lookups.fixed(o);
-        assertSize("Lookups.fixed(o) for a single item should be small", 24, l);
-    }
-
     /**
      * Simple tests testing fixed lookup.
      */
diff --git a/test/unit/src/org/openide/util/lookup/SimpleProxyLookupIssue42244Test.java b/test/unit/src/org/openide/util/lookup/SimpleProxyLookupIssue42244Test.java
index 2bb5c13..ee83793 100644
--- a/test/unit/src/org/openide/util/lookup/SimpleProxyLookupIssue42244Test.java
+++ b/test/unit/src/org/openide/util/lookup/SimpleProxyLookupIssue42244Test.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -49,7 +49,6 @@ import org.openide.util.Lookup;
 
 /** To simulate issue 42244.
  */
- at SuppressWarnings("unchecked") // XXX ought to be corrected, just a lot of them
 public class SimpleProxyLookupIssue42244Test extends AbstractLookupBaseHid implements AbstractLookupBaseHid.Impl {
     public SimpleProxyLookupIssue42244Test (java.lang.String testName) {
         super(testName, null);
diff --git a/test/unit/src/org/openide/util/lookup/SimpleProxyLookupSpeedIssue42244Test.java b/test/unit/src/org/openide/util/lookup/SimpleProxyLookupSpeedIssue42244Test.java
index d6ca737..be7cd39 100644
--- a/test/unit/src/org/openide/util/lookup/SimpleProxyLookupSpeedIssue42244Test.java
+++ b/test/unit/src/org/openide/util/lookup/SimpleProxyLookupSpeedIssue42244Test.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/lookup/SimpleProxyLookupTest.java b/test/unit/src/org/openide/util/lookup/SimpleProxyLookupTest.java
index 2eb78db..d2135e0 100644
--- a/test/unit/src/org/openide/util/lookup/SimpleProxyLookupTest.java
+++ b/test/unit/src/org/openide/util/lookup/SimpleProxyLookupTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
@@ -45,18 +45,22 @@ import java.lang.ref.WeakReference;
 import org.netbeans.junit.NbTestCase;
 import org.openide.util.Lookup;
 import org.openide.util.Lookup.Provider;
+import org.openide.util.Lookup.Result;
+import org.openide.util.Lookup.Template;
 
 /**
  *
  * @author Jan Lahoda
  */
- at SuppressWarnings("unchecked") // XXX ought to be corrected, just a lot of them
 public class SimpleProxyLookupTest extends NbTestCase {
 
     public SimpleProxyLookupTest(String testName) {
         super(testName);
     }
 
+    protected void setUp() throws Exception {
+    }
+
     public void test69810() throws Exception {
         Lookup.Template t = new Lookup.Template(String.class);
         SimpleProxyLookup spl = new SimpleProxyLookup(new Provider() {
diff --git a/test/unit/src/org/openide/util/test/MockChangeListener.java b/test/unit/src/org/openide/util/test/MockChangeListener.java
index 492258b..5273899 100644
--- a/test/unit/src/org/openide/util/test/MockChangeListener.java
+++ b/test/unit/src/org/openide/util/test/MockChangeListener.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/test/MockChangeListenerTest.java b/test/unit/src/org/openide/util/test/MockChangeListenerTest.java
index 7f78207..0577735 100644
--- a/test/unit/src/org/openide/util/test/MockChangeListenerTest.java
+++ b/test/unit/src/org/openide/util/test/MockChangeListenerTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/test/MockLookup.java b/test/unit/src/org/openide/util/test/MockLookup.java
index 26d2e22..4f4a3b2 100644
--- a/test/unit/src/org/openide/util/test/MockLookup.java
+++ b/test/unit/src/org/openide/util/test/MockLookup.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/test/MockLookupTest.java b/test/unit/src/org/openide/util/test/MockLookupTest.java
index 94b3218..dd36825 100644
--- a/test/unit/src/org/openide/util/test/MockLookupTest.java
+++ b/test/unit/src/org/openide/util/test/MockLookupTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/test/MockPropertyChangeListener.java b/test/unit/src/org/openide/util/test/MockPropertyChangeListener.java
index 32e3c00..8941d98 100644
--- a/test/unit/src/org/openide/util/test/MockPropertyChangeListener.java
+++ b/test/unit/src/org/openide/util/test/MockPropertyChangeListener.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/test/MockPropertyChangeListenerTest.java b/test/unit/src/org/openide/util/test/MockPropertyChangeListenerTest.java
index 41b68de..7e55c25 100644
--- a/test/unit/src/org/openide/util/test/MockPropertyChangeListenerTest.java
+++ b/test/unit/src/org/openide/util/test/MockPropertyChangeListenerTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/test/RestrictThreadCreation.java b/test/unit/src/org/openide/util/test/RestrictThreadCreation.java
index 0c41df2..e11f882 100644
--- a/test/unit/src/org/openide/util/test/RestrictThreadCreation.java
+++ b/test/unit/src/org/openide/util/test/RestrictThreadCreation.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/util/test/TestFileUtils.java b/test/unit/src/org/openide/util/test/TestFileUtils.java
index a065687..d2caa5f 100644
--- a/test/unit/src/org/openide/util/test/TestFileUtils.java
+++ b/test/unit/src/org/openide/util/test/TestFileUtils.java
@@ -53,7 +53,6 @@ import java.util.Set;
 import java.util.zip.CRC32;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipOutputStream;
-import junit.framework.Assert;
 
 /**
  * Common utility methods for massaging and inspecting files from tests.
@@ -147,24 +146,4 @@ public class TestFileUtils {
         os.close();
     }
 
-    /**
-     * Make sure the timestamp on a file changes.
-     * @param f a file to touch (make newer)
-     * @param ref if not null, make f newer than this file; else make f newer than it was before
-     */
-    public static void touch(File f, File ref) throws IOException, InterruptedException {
-        long older = f.lastModified();
-        if (ref != null) {
-            older = Math.max(older, ref.lastModified());
-        }
-        for (long pause = 1; pause < 9999; pause *= 2) {
-            Thread.sleep(pause);
-            f.setLastModified(System.currentTimeMillis() + 1);  // plus 1 needed for FileObject tests (initially FO lastModified is set to currentTimeMillis)
-            if (f.lastModified() > older) {
-                return;
-            }
-        }
-        Assert.fail("Did not manage to touch " + f);
-    }
-
 }
diff --git a/test/unit/src/org/openide/util/test/package-info.java b/test/unit/src/org/openide/util/test/package-info.java
index 07cd10f..934df68 100644
--- a/test/unit/src/org/openide/util/test/package-info.java
+++ b/test/unit/src/org/openide/util/test/package-info.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/xml/XMLUtilReflectionTest.java b/test/unit/src/org/openide/xml/XMLUtilReflectionTest.java
index 5f7fea8..087abc7 100644
--- a/test/unit/src/org/openide/xml/XMLUtilReflectionTest.java
+++ b/test/unit/src/org/openide/xml/XMLUtilReflectionTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common
diff --git a/test/unit/src/org/openide/xml/XMLUtilTest.java b/test/unit/src/org/openide/xml/XMLUtilTest.java
index 041960e..592d429 100644
--- a/test/unit/src/org/openide/xml/XMLUtilTest.java
+++ b/test/unit/src/org/openide/xml/XMLUtilTest.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common


hooks/post-receive
-- 
Openide utilities library



More information about the pkg-java-commits mailing list