From 1906d172d61427777fb49d5bc1261b1318bcc8cd Mon Sep 17 00:00:00 2001 From: Atsushi Eno Date: Mon, 29 Aug 2011 22:54:51 +0900 Subject: [PATCH] Add workaround code for java.security.Provider.put(). Added README notes on this specific fix. --- JavaClass.java | 10 ++++++++-- README | 10 ++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/JavaClass.java b/JavaClass.java index a304148..ad65c5d 100644 --- a/JavaClass.java +++ b/JavaClass.java @@ -468,8 +468,14 @@ public void appendToDocument (Document doc, Element parent) int base_mods = base_method.getModifiers (); int base_decl_class_mods = base_method.getDeclaringClass ().getModifiers (); // This is to not exclude methods that are excluded in the base type by modifiers (e.g. some AbstractStringBuilder methods) if (!Modifier.isStatic (base_mods) && !Modifier.isAbstract (base_mods) && (Modifier.isPublic (mmods) == Modifier.isPublic (base_mods)) && Modifier.isPublic (base_decl_class_mods)) { - if (!Modifier.isAbstract (mmods) || method.getName ().equals ("finalize")) // this is to not exclude some "override-as-abstract" methods e.g. android.net.Uri.toString(), android.view.ViewGroup.onLayout() - continue; + // this is to not exclude some "override-as-abstract" methods e.g. android.net.Uri.toString(), android.view.ViewGroup.onLayout(). + if (!Modifier.isAbstract (mmods) || method.getName ().equals ("finalize")) { + // FIXME: This is the only one workaround for overriden and missing method i.e. do not exclude java.security.Provider.put(). + // If we remove this entire check, it causes property override conflicts (e.g. base has both getter and setter and becomes property, this derived class only has the overriden setter and becomes), so we don't want to simply do it. + + if (!method.getName ().equals ("put") || !jclass.getName ().equals ("java.security.Provider")) + continue; + } } } } diff --git a/README b/README index 48d4809..42f6c97 100644 --- a/README +++ b/README @@ -66,12 +66,14 @@ and associated documentation. The information is stored in XML format. * TODO -** could be resolved after preview - before release +** Postponed - java.security.Provider.put() : missing in jar2xml output. - maybe disappeared in the shade of Hashtable.put(). - -** Postponed + Disappeared in the shade of Hashtable.put(). + -> workarounded by explicitly excluding the case (hardcoded in jar2xml!) + This issue should rather get fixed by improving overrload resolution + in XML level i.e. change XML format to include *any* overloaded methods + that AOSP XML does not do. - java.net.ssl.KeyStoreBuilderParameters.Parameters and .ctor() : types differ - generic list