[SCM] UNNAMED PROJECT branch, jh-symbols, updated. 0.37-13-g915286c
Niels Thykier
nthykier at alioth.debian.org
Sat Jul 30 10:23:07 UTC 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "UNNAMED PROJECT".
The branch, jh-symbols has been updated
via 915286c76e5cdb49983049fbc4bbdb50ff0a30f0 (commit)
from b852c25eb2f2d985a071d844b7bba66d3134b812 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 915286c76e5cdb49983049fbc4bbdb50ff0a30f0
Author: Niels Thykier <niels at thykier.net>
Date: Sat Jul 30 12:19:57 2011 +0200
Check base classes and interfaces for missing symbols
-----------------------------------------------------------------------
Summary of changes:
.../javahelper/symbols/cmd/DependencyProgram.java | 58 +++++++++++++++++---
1 files changed, 49 insertions(+), 9 deletions(-)
diff --git a/src/org/debian/javahelper/symbols/cmd/DependencyProgram.java b/src/org/debian/javahelper/symbols/cmd/DependencyProgram.java
index 6ba44a1..caecb00 100644
--- a/src/org/debian/javahelper/symbols/cmd/DependencyProgram.java
+++ b/src/org/debian/javahelper/symbols/cmd/DependencyProgram.java
@@ -51,19 +51,46 @@ public class DependencyProgram implements IProgram {
continue;
}
cs = s.asClassSymbol();
- for(ISymbol c : cs.getSymbols()){
- if(nm.remove(c.getName()) != null){
- debug("N: found-class-symbol: " + c.getFullSymbolName());
- neededVer = highest(vMap, neededVer, c.getVersion());
- if(nm.size() < 1) {
- break;
- }
- }
- }
+ neededVer = updateNeededSymbols(cs, nm, vMap, neededVer);
if(nm.size() < 1) {
neededVer = highest(vMap, neededVer, cs.getVersion());
neededCl.remove(clname);
debug("N: satisfied-class: " + clname);
+ } else {
+ // We still need symbols for this class...
+ // Most likely they will be provided by the parent, so lets check
+ String pcl = cs.getParentClassName();
+ ISymbol cparent = prov.getSymbol(pcl);
+ IClassSymbol csp;
+ for( ; cparent != null ; cparent = prov.getSymbol(pcl)){
+ if(!cparent.isClassSymbol() || cparent.getClassName().startsWith("java/lang/")){
+ break;
+ }
+ csp = cparent.asClassSymbol();
+ pcl = csp.getParentClassName();
+ neededVer = updateNeededSymbols(csp, nm, vMap, neededVer);
+ }
+ if(nm.size() < 1) {
+ neededVer = highest(vMap, neededVer, cs.getVersion());
+ neededCl.remove(clname);
+ debug("N: satisfied-class (via base-class): " + clname);
+ } else {
+ // Check interfaces
+ for(String it : cs.getImplementedInterfaceNames()){
+ ISymbol isym = prov.getSymbol(it);
+ IClassSymbol clsym;
+ if(isym == null || !isym.isClassSymbol() || it.startsWith("java/lang/")){
+ continue;
+ }
+ clsym = isym.asClassSymbol();
+ neededVer = updateNeededSymbols(clsym, nm, vMap, neededVer);
+ }
+ if(nm.size() < 1) {
+ neededVer = highest(vMap, neededVer, cs.getVersion());
+ neededCl.remove(clname);
+ debug("N: satisfied-class (via interface): " + clname);
+ }
+ }
}
} else {
String fn = s.getFullSymbolName();
@@ -126,6 +153,19 @@ public class DependencyProgram implements IProgram {
return v2;
}
+ private static String updateNeededSymbols(IClassSymbol cs, Map<String, Boolean> nm, Map<String, Boolean> vMap, String neededVer) throws Exception{
+ for(ISymbol c : cs.getSymbols()){
+ if(nm.remove(c.getName()) != null){
+ debug("N: found-class-symbol: " + c.getFullSymbolName());
+ neededVer = highest(vMap, neededVer, c.getVersion());
+ if(nm.size() < 1) {
+ break;
+ }
+ }
+ }
+ return neededVer;
+ }
+
private static void debug(String msg){
if(doutput) {
System.out.println(msg);
hooks/post-receive
--
UNNAMED PROJECT
More information about the pkg-java-commits
mailing list