lbownik commented on code in PR #5158:
URL: https://github.com/apache/netbeans/pull/5158#discussion_r1059787718


##########
extide/gradle/src/org/netbeans/modules/gradle/GradleBrokenRuntimeProblemProvider.java:
##########
@@ -54,10 +56,10 @@ public GradleJavaProjectProblemProvider(Project project) {
     @NbBundle.Messages({
         "LBL_BrokenPlatform=Broken Platform.",
     })
-    public Collection<? extends ProjectProblem> getProblems() {
-        List<ProjectProblem> ret = new ArrayList<>();
-        if (JavaRunUtils.getActivePlatform(project) == null) {
-            ret.add(ProjectProblem.createWarning(Bundle.LBL_BrokenPlatform(), 
Bundle.LBL_BrokenPlatform()));
+    public Collection<? extends ProjectProblemsProvider.ProjectProblem> 
getProblems() {
+        List<ProjectProblemsProvider.ProjectProblem> ret = new ArrayList<>();

Review Comment:
   if this line is moved into if block, Collections.emptyList() could be 
returned in else block to avoid unnecessary allocation in case the default 
runtime is not broken 



-- 
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

Reply via email to