[arquillian-issues] [JBoss JIRA] (ARQGRA-433) FieldAccessValidatorEnricher checks access to fields uniformly

Lukáš Fryč (JIRA) issues at jboss.org
Thu May 29 06:11:16 EDT 2014


    [ https://issues.jboss.org/browse/ARQGRA-433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12971558#comment-12971558 ] 

Lukáš Fryč commented on ARQGRA-433:
-----------------------------------

+1, Juraj's solution seems to be most viable :-)

> FieldAccessValidatorEnricher checks access to fields uniformly
> --------------------------------------------------------------
>
>                 Key: ARQGRA-433
>                 URL: https://issues.jboss.org/browse/ARQGRA-433
>             Project: Arquillian Graphene
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 2.0.2.Final
>            Reporter: Stefan Miklosovic
>            Priority: Optional
>             Fix For: 2.0.3.Final
>
>
> I have this test
> {code}
>     @Rule
>     public ExpectedException expectedException = ExpectedException.none();
>     @Test
>     @InSequence(2)
>     @ReportMessage("This method should pass.")
>     public void testWithExpectedExceptionRule() {
>         expectedException.expect(RuntimeException.class);
>         throw new RuntimeException("this exception is expected");
>     }
> {code}
> Logger writes this out:
> WARNING: Public field 'expectedException' found in org.arquillian.droidium.devconf.AeroGearTestCase. Direct access to fields outside of the declaring class is not allowed.
> Apr 01, 2014 11:50:27 AM org.jboss.arquillian.graphene.enricher.FieldAccessValidatorEnricher checkFieldValidity
> However that @Rule field _has to be_ public
> {quote}
> A field must be public, not static, and a subtype of TestRule
> {quote}
> So in this case  validation does not make sense.



--
This message was sent by Atlassian JIRA
(v6.2.3#6260)



More information about the arquillian-issues mailing list