harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r574542 - /harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/FontManager.java
Date Tue, 11 Sep 2007 10:19:32 GMT
Author: apetrenko
Date: Tue Sep 11 03:19:30 2007
New Revision: 574542

URL: http://svn.apache.org/viewvc?rev=574542&view=rev
Log:
Patch for HARMONY-4685 "[classlib][awt][startup] FontManager implementation without regex
classes loading"

Modified:
    harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/FontManager.java

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/FontManager.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/FontManager.java?rev=574542&r1=574541&r2=574542&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/FontManager.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/FontManager.java
Tue Sep 11 03:19:30 2007
@@ -611,10 +611,31 @@
 
             pathname = javaHome + pathname;
 
-            pathname = pathname.replaceAll("Language", language). //$NON-NLS-1$
-                                replaceAll("Country", country). //$NON-NLS-1$
-                                replaceAll("Encoding", fileEncoding). //$NON-NLS-1$
-                                replaceAll("Version", version); //$NON-NLS-1$
+//            pathname = pathname.replaceAll("Language", language). //$NON-NLS-1$
+//                                replaceAll("Country", country). //$NON-NLS-1$
+//                                replaceAll("Encoding", fileEncoding). //$NON-NLS-1$
+//                                replaceAll("Version", version); //$NON-NLS-1$
+	     int curPos;
+            StringBuilder result = new StringBuilder(pathname);
+
+            curPos = result.indexOf("Language"); //$NON-NLS-1$
+            if (curPos >= 0) {
+            	result.replace( curPos, curPos+8, language);
+            }
+            curPos = result.indexOf("Country"); //$NON-NLS-1$
+            if (curPos >= 0) {
+            	result.replace( curPos, curPos+7, country);
+            }
+            curPos = result.indexOf("Encoding"); //$NON-NLS-1$
+            if (curPos >= 0) {
+            	result.replace( curPos, curPos+8, fileEncoding);
+            }
+            curPos = result.indexOf("Version"); //$NON-NLS-1$
+            if (curPos >= 0) {
+            	result.replace( curPos, curPos+7, version);
+            }
+            pathname =  result.toString();
+
 
             file = new File(pathname);
 



Mime
View raw message