diff options
author | Henning Heinold <heinold@inf.fu-berlin.de> | 2012-07-18 22:48:50 +0200 |
---|---|---|
committer | Henning Heinold <heinold@inf.fu-berlin.de> | 2012-07-19 17:37:39 +0200 |
commit | ea76b80108b4c292379e37e01cdbb9d984d74759 (patch) | |
tree | 8b3d9567925bfaaaa295e396c6f2ecb907356afe /recipes-core/classpath/classpath-0.98/SimpleName.diff | |
parent | 817d88937ea7fed7d8812ba905a88e2c24d661d7 (diff) | |
download | meta-java-ea76b80108b4c292379e37e01cdbb9d984d74759.tar.gz |
classpath: update to version 0.99
* switch to INC_PR for native and initial
* clean up dependencies
* inherit gettext class instead of depeding directly on the package
* clean up patches
Diffstat (limited to 'recipes-core/classpath/classpath-0.98/SimpleName.diff')
-rw-r--r-- | recipes-core/classpath/classpath-0.98/SimpleName.diff | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/recipes-core/classpath/classpath-0.98/SimpleName.diff b/recipes-core/classpath/classpath-0.98/SimpleName.diff deleted file mode 100644 index ff2bec0..0000000 --- a/recipes-core/classpath/classpath-0.98/SimpleName.diff +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | Index: vm/reference/java/lang/VMClass.java | ||
2 | =================================================================== | ||
3 | RCS file: /sources/classpath/classpath/vm/reference/java/lang/VMClass.java,v | ||
4 | retrieving revision 1.20 | ||
5 | diff -u -r1.20 VMClass.java | ||
6 | --- vm/reference/java/lang/VMClass.java 18 Sep 2007 21:52:38 -0000 1.20 | ||
7 | +++ vm/reference/java/lang/VMClass.java 19 Apr 2008 15:19:00 -0000 | ||
8 | @@ -296,27 +296,43 @@ | ||
9 | */ | ||
10 | static String getSimpleName(Class klass) | ||
11 | { | ||
12 | + int arrayCount = 0; | ||
13 | + while (klass.isArray()) | ||
14 | + { | ||
15 | + klass = klass.getComponentType(); | ||
16 | + ++arrayCount; | ||
17 | + } | ||
18 | + // now klass is the component type | ||
19 | + | ||
20 | + String simpleComponentName = null; | ||
21 | if (isAnonymousClass(klass)) | ||
22 | - return ""; | ||
23 | - if (isArray(klass)) | ||
24 | { | ||
25 | - return getComponentType(klass).getSimpleName() + "[]"; | ||
26 | + simpleComponentName = ""; | ||
27 | } | ||
28 | - String fullName = getName(klass); | ||
29 | - int pos = fullName.lastIndexOf("$"); | ||
30 | - if (pos == -1) | ||
31 | - pos = 0; | ||
32 | else | ||
33 | { | ||
34 | - ++pos; | ||
35 | - while (Character.isDigit(fullName.charAt(pos))) | ||
36 | - ++pos; | ||
37 | + String fullName = getName(klass); | ||
38 | + int pos = fullName.lastIndexOf("$"); | ||
39 | + if (pos != -1) | ||
40 | + { //inner class or local class | ||
41 | + // skip digits of local classes | ||
42 | + while (Character.isDigit(fullName.charAt(pos+1))) | ||
43 | + pos++; | ||
44 | + } | ||
45 | + else | ||
46 | + { | ||
47 | + pos = fullName.lastIndexOf("."); | ||
48 | + } | ||
49 | + simpleComponentName = fullName.substring(pos+1); | ||
50 | } | ||
51 | - int packagePos = fullName.lastIndexOf(".", pos); | ||
52 | - if (packagePos == -1) | ||
53 | - return fullName.substring(pos); | ||
54 | - else | ||
55 | - return fullName.substring(packagePos + 1); | ||
56 | + | ||
57 | + if (arrayCount == 0) | ||
58 | + return simpleComponentName; | ||
59 | + | ||
60 | + StringBuffer sb = new StringBuffer(simpleComponentName); | ||
61 | + while (arrayCount-- > 0) | ||
62 | + sb.append("[]"); | ||
63 | + return sb.toString(); | ||
64 | } | ||
65 | |||
66 | /** | ||