XPathExpression versionExpr = xpath.compile(CoreConstants.PREFERENCES_VERSION);
int currentVersion = ((Double)versionExpr.evaluate(configurationDocument, XPathConstants.NUMBER)).intValue();
int applicationVersion = Integer.parseInt(preferenceService.getProperty(CoreConstants.PREFERENCES_VERSION, "0"));
if(applicationVersion>currentVersion){
PreferencesDefinition preferencesDefinition = ApplicationContext.getInstance().getPluginRegistry().getPreferencesDefinition();
String updateConfFilename = preferencesDefinition.getUpdateFile().getFile();
Document updateDocument = builder.parse(getClass().getClassLoader().getResourceAsStream(updateConfFilename));
XPathExpression preferencesExpr = xpath.compile("//preference");
NodeList updatePreferenceNodes = (NodeList)preferencesExpr.evaluate(updateDocument, XPathConstants.NODESET);
for(int i=0; i<updatePreferenceNodes.getLength(); i++){