Change Java version to 1.6

This commit is contained in:
Anton Tananaev 2013-01-12 16:56:42 +13:00
parent 1f5489c018
commit de9487c9c3
3 changed files with 13 additions and 9 deletions

View File

@ -1,7 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.compiler.source=1.6

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<installed facet="java" version="1.7"/>
<installed facet="java" version="1.6"/>
</faceted-project>

View File

@ -116,7 +116,7 @@ public class DataServiceImpl extends RemoteServiceServlet implements DataService
try {
entityManager.persist(user);
entityManager.getTransaction().commit();
} catch (Exception e) {
} catch (RuntimeException e) {
entityManager.getTransaction().rollback();
throw e;
}
@ -140,7 +140,7 @@ public class DataServiceImpl extends RemoteServiceServlet implements DataService
entityManager.persist(device);
user.getDevices().add(device);
entityManager.getTransaction().commit();
} catch (Exception e) {
} catch (RuntimeException e) {
entityManager.getTransaction().rollback();
throw e;
}
@ -153,7 +153,7 @@ public class DataServiceImpl extends RemoteServiceServlet implements DataService
try {
device = entityManager.merge(device);
entityManager.getTransaction().commit();
} catch (Exception e) {
} catch (RuntimeException e) {
entityManager.getTransaction().rollback();
throw e;
}
@ -170,9 +170,9 @@ public class DataServiceImpl extends RemoteServiceServlet implements DataService
// If you want to remove device you need to remove all linked positions
//entityManager.remove(device);
entityManager.getTransaction().commit();
} catch (Exception e) {
} catch (RuntimeException e) {
entityManager.getTransaction().rollback();
throw e;
}
return device;
}