login
Header Space

 
 

[JGIT PATCH 02/22] Replaced Java 6 API useage with Java 5 equivalent.

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git@...>
Cc: Florian Koeberle <florianskarten@...>
Date: Saturday, May 10, 2008 - 9:00 am

Signed-off-by: Florian Koeberle <florianskarten@web.de>
---
 .../src/org/spearce/jgit/pgm/MainProgram.java      |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/org.spearce.jgit/src/org/spearce/jgit/pgm/MainProgram.java b/org.spearce.jgit/src/org/spearce/jgit/pgm/MainProgram.java
index 72b0156..69cd96f 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/pgm/MainProgram.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/pgm/MainProgram.java
@@ -17,7 +17,6 @@
 package org.spearce.jgit.pgm;
 
 import java.io.IOException;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
@@ -59,8 +58,11 @@ public class MainProgram {
 			if (command == null) {
 				throw new WrongCallException("Require one argument!");
 			}
-			final String[] commandArguments = Arrays.copyOfRange(args, 1,
-					args.length);
+
+			final String[] commandArguments = new String[args.length - 1];
+			System.arraycopy(args, 1, commandArguments, 0,
+					commandArguments.length);
+
 			command.execute(commandArguments);
 
 		} catch (WrongCallException e) {
-- 
1.5.2.5

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[JGIT PATCH 11/22] Added the class StarPattern., Florian Koeberle, (Sat May 10, 9:00 am)
Re: [JGIT PATCH 11/22] Added the class StarPattern., Robin Rosenberg, (Sat May 10, 4:53 pm)
[JGIT PATCH 07/22] Added the class Rule., Florian Koeberle, (Sat May 10, 9:00 am)
[JGIT PATCH 17/22] Added the class TreeFilePattern., Florian Koeberle, (Sat May 10, 9:00 am)
[JGIT PATCH 16/22] Added test class OverallIgnoreRulestest., Florian Koeberle, (Sat May 10, 9:00 am)
[JGIT PATCH 19/22] Added the class AddRuleListFactory., Florian Koeberle, (Sat May 10, 9:00 am)
Re: [JGIT PATCH 19/22] Added the class AddRuleListFactory., Robin Rosenberg, (Sat May 10, 4:53 pm)
[JGIT PATCH 13/22] Added the class ComplexFilePattern., Florian Koeberle, (Sat May 10, 9:00 am)
Re: [JGIT PATCH 13/22] Added the class ComplexFilePattern., Robin Rosenberg, (Sat May 10, 4:53 pm)
[JGIT PATCH 10/22] Added class FileTreeIterable., Florian Koeberle, (Sat May 10, 9:00 am)
[JGIT PATCH 14/22] Added the class IgnoreRuleListFactory., Florian Koeberle, (Sat May 10, 9:00 am)
[JGIT PATCH 12/22] Added the class GlobalFilePattern, Florian Koeberle, (Sat May 10, 9:00 am)
[JGIT PATCH 08/22] Added the iterface Rules., Florian Koeberle, (Sat May 10, 9:00 am)
Re: [JGIT PATCH 08/22] Added the iterface Rules., Robin Rosenberg, (Sat May 10, 4:46 pm)
[JGIT PATCH 05/22] Added ProjectSeeker class., Florian Koeberle, (Sat May 10, 9:00 am)
Re: [JGIT PATCH 05/22] Added ProjectSeeker class., Robin Rosenberg, (Sat May 10, 4:45 pm)
[JGIT PATCH 06/22] Added the interface FilePattern., Florian Koeberle, (Sat May 10, 9:00 am)
[JGIT PATCH 02/22] Replaced Java 6 API useage with Java 5 eq..., Florian Koeberle, (Sat May 10, 9:00 am)
speck-geostationary