Path bootPath; if (device.isMidp1()) { bootPath = this.midp1BootClassPath; } else { if (device.isCldc10()) { bootPath = this.midp2BootClassPath; } else { bootPath = this.midp2Cldc11BootClassPath; } }
Path bootPath = new Path( getProject(), device.getBootClassPath() );
	private void obfuscate( Device device, Locale locale ) {		if (this.polishLogger != null) {			this.polishLogger.setObfuscateMode( true );		}		Path bootPath;		if (device.isMidp1()) {			bootPath = this.midp1BootClassPath;		} else {			if (device.isCldc10()) {				bootPath = this.midp2BootClassPath;			} else {				bootPath = this.midp2Cldc11BootClassPath;			}		}		// create the initial jar-file: only include to class files,		// for accelerating the obfuscation:		File sourceFile = new File( this.buildSetting.getWorkDir().getAbsolutePath()				+ File.separatorChar + "source.jar");		//long time = System.currentTimeMillis();		try {			JarUtil.jar( new File( device.getClassesDir()), sourceFile, false );		} catch (IOException e) {			e.printStackTrace();			throw new BuildException("Unable to prepare the obfuscation-jar from [" + sourceFile.getAbsolutePath() + "] to [" + device.getClassesDir() + "]: " + e.getMessage(), e );		}		//System.out.println("Jaring took " + ( System.currentTimeMillis() - time) + " ms.");					File destFile = new File( this.buildSetting.getWorkDir().getAbsolutePath()				+ File.separatorChar + "dest.jar");				// start the obfuscation:		int maxIndex = this.obfuscators.length - 1;		BooleanEvaluator evaluator = this.environment.getBooleanEvaluator();		Project antProject = getProject();		boolean hasBeenObfuscated = false;		for (int i=0; i <= maxIndex ; i++ ) {			Obfuscator obfuscator = this.obfuscators[i];			if (obfuscator.getSetting().isActive(evaluator, antProject) ) {				if (!hasBeenObfuscated) {					System.out.println("obfuscating for device [" + device.getIdentifier() + "].");					hasBeenObfuscated = true;				}				obfuscator.obfuscate(device, sourceFile, destFile, this.preserveClasses, bootPath );				if ( i != maxIndex ) {					sourceFile = destFile;					destFile = new File( this.buildSetting.getWorkDir().getAbsolutePath()							+ File.separatorChar + "dest" + (i + 1) + ".jar");				}			}		}						//time = System.currentTimeMillis();		//unjar destFile to build/[vendor]/[name]/obfuscated:		if (hasBeenObfuscated) {			try {				File targetDir;				if (this.buildSetting.isInCompilerMode()) {					targetDir = this.buildSetting.getCompilerDestDir();				} else {					String targetPath = device.getBaseDir() + File.separatorChar + "obfuscated";					device.setClassesDir(targetPath);					targetDir = new File( targetPath );				}				if (targetDir.exists()) {					// when the directory for extracting the obfuscated files					// exists, delete it so that no old classes are remaining					// in it:					FileUtil.delete( targetDir );				}				JarUtil.unjar( destFile,  targetDir  );			} catch (IOException e) {				e.printStackTrace();				throw new BuildException("Unable to extract the obfuscated jar file: " + e.getMessage(), e );			}		}				if (this.polishLogger != null) {			this.polishLogger.setObfuscateMode( false );		}	}