If statement in interpreted java

im trying to write an if statement in interpreted java, no matter what i do it always uses the last case... seems it doesnt test the condition... my guess it my syntax is wrong... can you please help
here is the script.

import org.htmlparser.util.Translate;
import java.io.*;

String sDownloadUrl = dataRecord.get("DOWNLOAD_URL");
String sReferralNumber = session.getVariable("LOAN_NUMBER");
String sPackageType = session.getVariable("PACKAGE_TYPE");

if (sPackageType = "Something")
{
do case 1
}
else
{
do case 2
}

If statement in interpreted java

Hi,

To strip the spaces, try something like this:

PACKAGE_TYPE = "This - This"
PACKAGE_TYPE = PACKAGE_TYPE.replaceAll( " ", "" );
session.log( "PACKAGE_TYPE: " + PACKAGE_TYPE );

Kind regards,

Todd Wilson

If statement in interpreted java

its amazing what some trial and error can get done...

ok well i have been able to use || in this if statement..

now the only question i have is how do i remove the spaces from the variable that is scraped using a extractor pattern..(see above)

Thanks

ok so i found this

i found this

if ( "Yes".equals( session.getVariable( "ProcessThis" ) ) )
{
session.log( "This is processed" );
}
else
{
session.log( "That was not processed" );
}

and was able to get it to work but my next question is... what if i want to see if the variable = this or that.....

like...

if ( "Yes" || "Yes1" .equals( session.getVariable( "ProcessThis" ) ) )

this i cant get to work.. any help would be great.

Also another small issue, im using a session variable .. might look like this..
PACKAGE_TYPE = "This - This"
I want to get the spaces removed, is there a way to do this...
like
PACKAGE_TYPE = "This-This"
im using this in a interpreted java script...

Thanks so much for the help.....