You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2019/09/10 19:24:22 UTC

[GitHub] [netbeans] BradWalker commented on a change in pull request #1489: [NETBEANS-3075] - reduce number of warning w/ raw type iterator

BradWalker commented on a change in pull request #1489: [NETBEANS-3075] - reduce number of warning w/ raw type iterator
URL: https://github.com/apache/netbeans/pull/1489#discussion_r322920392
 
 

 ##########
 File path: platform/openide.filesystems/src/org/openide/filesystems/FileUtil.java
 ##########
 @@ -2324,24 +2320,17 @@ private static boolean isArchiveFileImpl(final URL url, final boolean strict) {
     }
 
     private static Iterable<? extends ArchiveRootProvider> getArchiveRootProviders() {
-        if (archiveRootProviderCache == null) {
-            Lookup.Result<ArchiveRootProvider> res = archiveRootProviders.get();
-            if (res == null) {
-                res = new ProxyLookup(
-                    Lookups.singleton(new JarArchiveRootProvider()),
-                    Lookup.getDefault()).lookupResult(ArchiveRootProvider.class);
-                if (!archiveRootProviders.compareAndSet(null, res)) {
-                    res = archiveRootProviders.get();
-                    res.addLookupListener((ev) -> {
-                        archiveRootProviderCache = null;
-                    });
-                }
+        Lookup.Result<ArchiveRootProvider> res = archiveRootProviders.get();
+        if (res == null) {
+            res = new ProxyLookup(
+                Lookups.singleton(new JarArchiveRootProvider()),
+                Lookup.getDefault()).lookupResult(ArchiveRootProvider.class);
+            if (!archiveRootProviders.compareAndSet(null, res)) {
+                res = archiveRootProviders.get();
             }
-            archiveRootProviderCache = new LinkedList<>(res.allInstances());
         }
-        return archiveRootProviderCache;
+        return res.allInstances();
 
 Review comment:
   I think I properly reverted it.. Thanks for catching this..

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists