mbien commented on code in PR #4999:
URL: https://github.com/apache/netbeans/pull/4999#discussion_r1181330522
##########
java/maven.indexer/src/org/netbeans/modules/maven/indexer/NexusRepositoryIndexerImpl.java:
##########
@@ -702,6 +723,25 @@ public void indexRepo(final RepositoryInfo repo) {
}
}
+
+ private static boolean shouldSkipIndexRequest(RepositoryInfo repo) {
+ if (repo.isRemoteDownloadable()) {
+ if (!RepositoryPreferences.isIndexDownloadEnabledEffective()) {
+ return true;
+ }
+ if (RepositoryPreferences.isIndexDownloadDeniedFor(repo)) {
+ return true;
+ }
+ if (!RepositoryPreferences.isIndexDownloadAllowedFor(repo)) {
+ IndexingNotificationProvider np =
Lookup.getDefault().lookup(IndexingNotificationProvider.class);
+ if(np != null) {
+ np.requestPermissionsFor(repo);
+ }
+ return true;
Review Comment:
i thought about returning false when no `IndexingNotificationProvider` is
found. But it is probably better to add a dummy implementation which simply
allows everything. Once all users of this API have their own implementation,
the dummy can be removed.
I think it is a better behavior to not a allow downloads by default if there
is no provider.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists