From 7afb00d1c8088c6cf777d3db72bffaaf980e587a Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Mon, 31 Dec 2012 14:13:56 +0000 Subject: [PATCH] non necessary local variable git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1427126 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/archiva/xml/XMLReader.java | 3 +-- .../archiva/rest/services/DefaultRepositoriesService.java | 3 +-- .../metadata/repository/file/FileMetadataRepository.java | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/archiva-modules/archiva-base/archiva-xml-tools/src/main/java/org/apache/archiva/xml/XMLReader.java b/archiva-modules/archiva-base/archiva-xml-tools/src/main/java/org/apache/archiva/xml/XMLReader.java index 3e5269bf9..d87c176f7 100644 --- a/archiva-modules/archiva-base/archiva-xml-tools/src/main/java/org/apache/archiva/xml/XMLReader.java +++ b/archiva-modules/archiva-base/archiva-xml-tools/src/main/java/org/apache/archiva/xml/XMLReader.java @@ -158,8 +158,7 @@ public class XMLReader if ( evaluated instanceof Element ) { - Element evalElem = (Element) evaluated; - return evalElem; + return (Element) evaluated; } else { diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java index 012b32c2a..c8b6423ae 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java @@ -1063,8 +1063,7 @@ public class DefaultRepositoriesService try { - boolean res = userRepositories.isAuthorizedToDeleteArtifacts( userName, repoId ); - return res; + return userRepositories.isAuthorizedToDeleteArtifacts( userName, repoId ); } catch ( ArchivaSecurityException e ) { diff --git a/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java b/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java index 0e62fe375..f0a3abc33 100644 --- a/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java +++ b/archiva-modules/plugins/metadata-store-file/src/main/java/org/apache/archiva/metadata/repository/file/FileMetadataRepository.java @@ -89,8 +89,7 @@ public class FileMetadataRepository { // TODO: should be configurable, like the index String basedir = configuration.getConfiguration().getManagedRepositoriesAsMap().get( repoId ).getLocation(); - File dir = new File( basedir, ".archiva" ); - return dir; + return new File( basedir, ".archiva" ); } private File getDirectory( String repoId ) -- 2.39.5