mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-06 13:35:44 +01:00
suppress unchecked warnings
This commit is contained in:
@@ -72,6 +72,7 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import sonia.scm.util.IOUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -99,7 +100,6 @@ public class GitBrowseCommand extends AbstractGitCommand
|
||||
*
|
||||
* @param context
|
||||
* @param repository
|
||||
* @param repositoryDirectory
|
||||
*/
|
||||
public GitBrowseCommand(GitContext context, Repository repository)
|
||||
{
|
||||
@@ -120,6 +120,7 @@ public class GitBrowseCommand extends AbstractGitCommand
|
||||
* @throws RepositoryException
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public BrowserResult getBrowserResult(BrowseCommandRequest request)
|
||||
throws IOException, RepositoryException
|
||||
{
|
||||
@@ -462,6 +463,7 @@ public class GitBrowseCommand extends AbstractGitCommand
|
||||
* @throws IOException
|
||||
* @throws RepositoryException
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
private Map<String,
|
||||
SubRepository> getSubRepositories(org.eclipse.jgit.lib.Repository repo,
|
||||
ObjectId revision)
|
||||
@@ -474,10 +476,11 @@ public class GitBrowseCommand extends AbstractGitCommand
|
||||
}
|
||||
|
||||
Map<String, SubRepository> subRepositories = null;
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
ByteArrayOutputStream baos = null;
|
||||
|
||||
try
|
||||
{
|
||||
baos = new ByteArrayOutputStream();
|
||||
new GitCatCommand(context, repository).getContent(repo, revision,
|
||||
PATH_MODULES, baos);
|
||||
subRepositories = GitSubModuleParser.parse(baos.toString());
|
||||
@@ -486,6 +489,8 @@ public class GitBrowseCommand extends AbstractGitCommand
|
||||
{
|
||||
logger.trace("could not find .gitmodules", ex);
|
||||
subRepositories = Collections.EMPTY_MAP;
|
||||
} finally {
|
||||
IOUtil.close(baos);
|
||||
}
|
||||
|
||||
return subRepositories;
|
||||
@@ -494,6 +499,6 @@ public class GitBrowseCommand extends AbstractGitCommand
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
/** Field description */
|
||||
private Map<ObjectId, Map<String, SubRepository>> subrepositoryCache =
|
||||
private final Map<ObjectId, Map<String, SubRepository>> subrepositoryCache =
|
||||
Maps.newHashMap();
|
||||
}
|
||||
|
||||
@@ -163,6 +163,7 @@ public class GitLogCommand extends AbstractGitCommand implements LogCommand
|
||||
* @throws RepositoryException
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public ChangesetPagingResult getChangesets(LogCommandRequest request)
|
||||
throws IOException, RepositoryException
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user