aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-01-12 16:56:42 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-01-12 16:56:42 +1300
commitde9487c9c3e1b088bb2774751f8b0d0e3a5c7fce (patch)
tree8fd144779f3584850b1bf70c09179c6f6a2e1b9d
parent1f5489c0188dd3e063b9e226891f0fce662ee4b4 (diff)
downloadtrackermap-web-de9487c9c3e1b088bb2774751f8b0d0e3a5c7fce.tar.gz
trackermap-web-de9487c9c3e1b088bb2774751f8b0d0e3a5c7fce.tar.bz2
trackermap-web-de9487c9c3e1b088bb2774751f8b0d0e3a5c7fce.zip
Change Java version to 1.6
-rw-r--r--.settings/org.eclipse.jdt.core.prefs10
-rw-r--r--.settings/org.eclipse.wst.common.project.facet.core.xml2
-rw-r--r--src/org/traccar/web/server/model/DataServiceImpl.java10
3 files changed, 13 insertions, 9 deletions
diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
index f42de363..8000cd6c 100644
--- a/.settings/org.eclipse.jdt.core.prefs
+++ b/.settings/org.eclipse.jdt.core.prefs
@@ -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
diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml
index bc0009a4..bcfc3250 100644
--- a/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ b/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -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>
diff --git a/src/org/traccar/web/server/model/DataServiceImpl.java b/src/org/traccar/web/server/model/DataServiceImpl.java
index a1ea80be..57357aa8 100644
--- a/src/org/traccar/web/server/model/DataServiceImpl.java
+++ b/src/org/traccar/web/server/model/DataServiceImpl.java
@@ -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;
}