1 Reply Latest reply on May 26, 2009 7:42 PM by Norman Richards

# Outjection and compiler warnings

So this is a minor IDE-related issue in the context of outjected context variables.

@Out(required=false, scope=ScopeType.SESSION)

public boolean authenticate() {

return true;
}

So the compiler/IDE complains as such:

The field BypassAuthenticator.domainAndUsername is never read locally

What is the best practice solution to fix this warning?

I am given 3 options to resolve by the IDE, one of which is to add @SuppressWarning("unused").  The other is remove the variable and the other is create getter/setter.  I don't need getter/setter for this context variable in my backing SFSB.  Remove is obviously out of the question.

• ###### 1. Re: Outjection and compiler warnings

You can set in the session context yourself.  If that is not natural state of the object, there's really no reason to make it state so you can trigger outjection.