[ 
https://issues.apache.org/jira/browse/NETBEANS-5623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17332924#comment-17332924
 ] 

Svatopluk Dedic commented on NETBEANS-5623:
-------------------------------------------

No, this was a very simple testcase :) The complete test was:
{code:java}
    public void testUntrustedProjectCannotGoUp() throws Exception {
        Project prj = createProject();
        
        NbGradleProjectImpl prjImpl = 
prj.getLookup().lookup(NbGradleProjectImpl.class);
        
assertTrue(prjImpl.getGradleProject().getQuality().worseThan(NbGradleProject.Quality.EVALUATED));
        // attempt to load everything
        prjImpl.setAimedQuality(NbGradleProject.Quality.FULL);
        // ... it loaded, but did not escalate the quality bcs not trusted
        
assertTrue(prjImpl.getGradleProject().getQuality().worseThan(NbGradleProject.Quality.EVALUATED));
    }
{code}
so when I attempted to setAimedQuality (the project was untrusted, so nothing 
was executed), the project transitioned "upwards" in quality: FALLBACK -> 
EVALUATED. This may be minor, but still according to what you say, technically 
incorrect as the project was never loaded "better" than fallback. 

> 'fallback' project without trust can turn to 'evaluated'
> --------------------------------------------------------
>
>                 Key: NETBEANS-5623
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-5623
>             Project: NetBeans
>          Issue Type: Bug
>          Components: projects - Gradle
>            Reporter: Svatopluk Dedic
>            Assignee: Laszlo Kishalmi
>            Priority: Major
>
>  
> During prototyping, I've encountered a strange thing:
>  
> {code:java}
>         NbGradleProjectImpl prjImpl = 
> prj.getLookup().lookup(NbGradleProjectImpl.class);
>         
> assertTrue(prjImpl.getGradleProject().getQuality().worseThan(NbGradleProject.Quality.EVALUATED));
>         // attempt to load everything
>         prjImpl.setAimedQuality(NbGradleProject.Quality.FULL);
>         // ... it loaded, but did not escalate the quality bcs not trusted
>         
> assertTrue(prjImpl.getGradleProject().getQuality().worseThan(NbGradleProject.Quality.EVALUATED));
> {code}
> I expected (the assert at the end) that a fallback project won't change as 
> it's not permitted to execute gradle for it. But it turned to evaluated (no 
> gradle was executed, in fact).
> I consider that a bug - is it ? If so, pls. reassign to me, will fix it in my 
> implementation & make PR.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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