summaryrefslogtreecommitdiffstats
path: root/sandbox/mobile-android/tuscany-implementation-java/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/mobile-android/tuscany-implementation-java/src/main')
-rw-r--r--sandbox/mobile-android/tuscany-implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/JavaIntrospectionHelper.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/sandbox/mobile-android/tuscany-implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/JavaIntrospectionHelper.java b/sandbox/mobile-android/tuscany-implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/JavaIntrospectionHelper.java
index 8297738be8..d800450453 100644
--- a/sandbox/mobile-android/tuscany-implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/JavaIntrospectionHelper.java
+++ b/sandbox/mobile-android/tuscany-implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/JavaIntrospectionHelper.java
@@ -306,7 +306,18 @@ public final class JavaIntrospectionHelper {
if (!name.startsWith("set")) {
return name;
}
- return Introspector.decapitalize(name.substring(3));
+
+ if (name == null || name.length() == 0) {
+ return name;
+ }
+ if (name.length() > 1 && Character.isUpperCase(name.charAt(1)) &&
+ Character.isUpperCase(name.charAt(0))){
+ return name;
+ }
+ char chars[] = name.toCharArray();
+ chars[0] = Character.toLowerCase(chars[0]);
+ return new String(chars);
+
}
public static Class<?> getErasure(Type type) {