From b52df1839a58f3398ebf1820d83b2e7282cba3e2 Mon Sep 17 00:00:00 2001 From: Robin Stocker Date: Fri, 29 Oct 2010 15:04:27 +0200 Subject: [PATCH] Use Character.valueOf instead of new Character Otherwise a new Character is allocated each time instead of using the cache. Change-Id: I648d0b012f66ba9dc46a37a390986f9c61e5a19c --- org.eclipse.jgit/src/org/eclipse/jgit/ignore/IgnoreRule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/IgnoreRule.java b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/IgnoreRule.java index ac3ec66ee..b43b1118a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/IgnoreRule.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/IgnoreRule.java @@ -105,7 +105,7 @@ public class IgnoreRule { if (pattern.contains("*") || pattern.contains("?") || pattern.contains("[")) { try { - matcher = new FileNameMatcher(pattern, new Character('/')); + matcher = new FileNameMatcher(pattern, Character.valueOf('/')); } catch (InvalidPatternException e) { e.printStackTrace(); }