if (newExp.isConstant()) {
if (newExp!=expr) {
    public Object visitSwitchStatement(JSwitchStatement self,				       JExpression expr,				       JSwitchGroup[] body) {	if(!write) {	    expr.accept(this);	    for(int i = 0; i < body.length; i++) {		body[i].accept(this);	    }	} else {	    JExpression newExp = (JExpression)expr.accept(this);	    // reset if constant	    if (newExp.isConstant()) {		self.setExpression(newExp);	    }	    Propagator[] propagators=new Propagator[body.length];	    for (int i = 0; i < body.length; i++) {		Propagator prop=construct(cloneTable(constants),true);		propagators[i]=prop;		body[i].accept(prop);	    }	    if(body.length>0) {		Hashtable constants=propagators[0].constants; //Shadow the main constants		//Remove if value is not same in all switch bodies		for(int i=1;i<propagators.length;i++) {		    Propagator prop=propagators[i];		    LinkedList remove=new LinkedList();		    Enumeration enum=constants.keys();		    while(enum.hasMoreElements()) {			Object key=enum.nextElement();			if(!(prop.constants.get(key).equals(constants.get(key))))			    remove.add(key);			if((prop.constants.get(key) instanceof Object[])&&(constants.get(key) instanceof Object[])) {			    Object[] array1=(Object[])prop.constants.get(key);			    Object[] array2=(Object[])constants.get(key);			    if(array1.length!=array2.length)				remove.add(key);			    else				for(int j=0;j<array1.length;j++)				    if(((array1[j]!=array2[j])&&(array1[j]!=null)&&(!array1[j].equals(array2[j]))))					remove.add(key);			}		    }		    for(int j=0;j<remove.size();j++) {			constants.remove(remove.get(j));			//changed.put(remove.get(j),Boolean.TRUE);		    }		}		// mark anything that's in <newConstants> but not in		// <constants> as <changed>		for (Enumeration e=this.constants.keys(); e.hasMoreElements(); ) {		    Object key=e.nextElement();		    if (!constants.containsKey(key)) {			changed.put(key, Boolean.TRUE);		    }		}		this.constants=constants;	    }	}