Skip to content

Commit

Permalink
Add workaround code for java.security.Provider.put().
Browse files Browse the repository at this point in the history
Added README notes on this specific fix.
  • Loading branch information
Atsushi Eno committed Aug 29, 2011
1 parent a3bfdb4 commit 1906d17
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
10 changes: 8 additions & 2 deletions JavaClass.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
}
Expand Down
10 changes: 6 additions & 4 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1906d17

Please sign in to comment.