git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[EGIT PATCH 5/6] Drop unused GitBlobStorage class

From
Robin Rosenberg <robin.rosenberg@dewire.com>
Date
Feb 5, 2008, 00:15 UTC
Message-ID
<1202170534-15788-6-git-send-email-robin.rosenberg@dewire.com>
In-Reply-To
<1202170534-15788-5-git-send-email-robin.rosenberg@dewire.com>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
 .../src/org/spearce/egit/core/GitBlobStorage.java  |   99 --------------------
 1 files changed, 0 insertions(+), 99 deletions(-)
 delete mode 100644 org.spearce.egit.core/src/org/spearce/egit/core/GitBlobStorage.java
diff --git a/org.spearce.egit.core/src/org/spearce/egit/core/GitBlobStorage.java b/org.spearce.egit.core/src/org/spearce/egit/core/GitBlobStorage.java
deleted file mode 100644
index f7a062c..0000000
--- a/org.spearce.egit.core/src/org/spearce/egit/core/GitBlobStorage.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- *  Copyright (C) 2006  Robin Rosenberg
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License, version 2.1, as published by the Free Software Foundation.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
- */
-package org.spearce.egit.core;
-
-import java.io.ByteArrayInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.eclipse.core.internal.resources.ResourceException;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.spearce.egit.core.project.RepositoryMapping;
-import org.spearce.jgit.lib.ObjectId;
-import org.spearce.jgit.lib.ObjectLoader;
-import org.spearce.jgit.lib.Tree;
-import org.spearce.jgit.lib.TreeEntry;
-
-public class GitBlobStorage implements IStorage {
-
-	private final IResource resource;
-
-	private TreeEntry entry;
-
-	public GitBlobStorage(ObjectId treeId, IResource resource, String relativeResourceName) {
-		this.resource = resource;
-		if (treeId == null)
-			return;
-
-		RepositoryMapping repositoryMapping = RepositoryMapping.getMapping(resource);
-		Tree tree;
-		try {
-			tree = repositoryMapping.getRepository().mapTree(treeId);
-			String name = repositoryMapping.getRepoRelativePath(resource);
-			entry = tree.findBlobMember(name);
-		} catch (IOException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-	}
-
-	public InputStream getContents() throws CoreException {
-		try {
-			if (entry == null) {
-				return ((IFile) resource).getContents();
-			} else {
-				ObjectId id = entry.getId();
-				ObjectLoader reader = entry.getRepository().openBlob(id);
-				byte[] bytes = reader.getBytes();
-				return new ByteArrayInputStream(bytes);
-			}
-		} catch (FileNotFoundException e) {
-			throw new ResourceException(IResourceStatus.FAILED_READ_LOCAL,
-					resource.getFullPath(), "Could not read file", e);
-		} catch (IOException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-			throw new ResourceException(33, resource.getFullPath(), e
-					.getMessage(), e);
-		}
-	}
-
-	public IPath getFullPath() {
-		return resource.getFullPath();
-	}
-
-	public String getName() {
-		return resource.getName();
-	}
-
-	public boolean isReadOnly() {
-		// TODO Auto-generated method stub
-		return false;
-	}
-
-	public Object getAdapter(Class adapter) {
-		System.out.println("GitStorage("+adapter.getName()+")");
-		return null;
-	}
-
-}
-- 
1.5.4.rc4.25.g81cc
Previous: Robin RosenbergNext: Robin Rosenberg
Message 6 of 13 in “Cleanups and javadocs”
  1. Cleanups and javadocsRobin Rosenberg, Feb 5, 2008
  2. 1/6 Comment some empty blocks that should be emptyRobin Rosenberg, Feb 5, 2008
  3. 2/6 Cleanup unboxing/boxingRobin Rosenberg, Feb 5, 2008
  4. 3/6 Do not require javadoc in egit.core test projectRobin Rosenberg, Feb 5, 2008
  5. 4/6 Javadoc update for EgitRobin Rosenberg, Feb 5, 2008
  6. 5/6 Drop unused GitBlobStorage classRobin Rosenberg, Feb 5, 2008
  7. 6/6 Tighten requirements on javadoc.Robin Rosenberg, Feb 5, 2008
  8. Shawn O. PearceFeb 6, 2008
  9. 1/2 Use Boolean.valueOf instead of new BooleanRobin Rosenberg, Feb 6, 2008
  10. 2/2 Use Integer.valueOf instead of new IntegerRobin Rosenberg, Feb 6, 2008
  11. Roger C. SoaresFeb 8, 2008
  12. Roger C. SoaresFeb 5, 2008
  13. Robin RosenbergFeb 5, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.