diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2013-01-28 12:11:06 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2013-01-28 12:11:06 +0100 |
commit | 5baa0cc83836e52d2245120891f236004dfa9d27 (patch) | |
tree | e2f11c95be7ea434be5e7f3765d31e139c3d3e68 | |
parent | 4c9dc8885ba131a7538f3c4d30b932b9561dc300 (diff) | |
download | sonarqube-5baa0cc83836e52d2245120891f236004dfa9d27.tar.gz sonarqube-5baa0cc83836e52d2245120891f236004dfa9d27.zip |
Fix compatibility with java 5
-rw-r--r-- | sonar-core/src/main/java/org/sonar/core/component/PerspectiveLoaders.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/component/PerspectiveLoaders.java b/sonar-core/src/main/java/org/sonar/core/component/PerspectiveLoaders.java index 8aa6e930c79..bf8025f6456 100644 --- a/sonar-core/src/main/java/org/sonar/core/component/PerspectiveLoaders.java +++ b/sonar-core/src/main/java/org/sonar/core/component/PerspectiveLoaders.java @@ -37,25 +37,25 @@ public class PerspectiveLoaders implements ServerComponent { } @CheckForNull - <T extends Perspective> T as(String componentKey, String perspectiveKey) { + Perspective as(String componentKey, String perspectiveKey) { GraphDto graphDto = dao.selectByComponent(perspectiveKey, componentKey); return doAs(perspectiveKey, graphDto); } @CheckForNull - <T extends Perspective> T as(long snapshotId, String perspectiveKey) { + Perspective as(long snapshotId, String perspectiveKey) { GraphDto graphDto = dao.selectBySnapshot(perspectiveKey, snapshotId); return doAs(perspectiveKey, graphDto); } - private <T extends Perspective> T doAs(String perspectiveKey, GraphDto graphDto) { - T result = null; + private Perspective doAs(String perspectiveKey, GraphDto graphDto) { + Perspective result = null; if (graphDto != null) { ComponentGraph graph = new GraphReader().read(graphDto.getData(), graphDto.getRootVertexId()); if (perspectiveKey.equals("testplan")) { - result = (T) graph.wrap(graph.getRootVertex(), DefaultTestPlan.class); + result = graph.wrap(graph.getRootVertex(), DefaultTestPlan.class); } else if (perspectiveKey.equals("testable")) { - result = (T) graph.wrap(graph.getRootVertex(), DefaultTestable.class); + result = graph.wrap(graph.getRootVertex(), DefaultTestable.class); } } return result; |