User: reverbel Date: 02/02/18 14:20:43 Modified: iiop/src/main/org/jboss/iiop/rmi AttributeAnalysis.java ContainerAnalysis.java ExceptionAnalysis.java InterfaceAnalysis.java OperationAnalysis.java ParameterAnalysis.java Util.java ValueAnalysis.java WorkCacheManager.java Log: System.err calls replaced by logger calls, tabs removed, indentation changes. Revision Changes Path 1.4 +5 -5 contrib/iiop/src/main/org/jboss/iiop/rmi/AttributeAnalysis.java Index: AttributeAnalysis.java =================================================================== RCS file: /cvsroot/jboss/contrib/iiop/src/main/org/jboss/iiop/rmi/AttributeAnalysis.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- AttributeAnalysis.java 30 Oct 2001 12:26:05 -0000 1.3 +++ AttributeAnalysis.java 18 Feb 2002 22:20:42 -0000 1.4 @@ -20,7 +20,7 @@ * Specification", version 1.1 (01-06-07). * * @author <a href="mailto:[EMAIL PROTECTED]">Ole Husgaard</a> - * @version $Revision: 1.3 $ + * @version $Revision: 1.4 $ */ public class AttributeAnalysis extends AbstractAnalysis @@ -142,10 +142,10 @@ // If the first char is an uppercase letter and the second char is not // an uppercase letter, then convert the first char to lowercase. if (idlName.charAt(0) >= 0x41 && idlName.charAt(0) <= 0x5a - && (idlName.length() <= 1 - || idlName.charAt(1) < 0x41 || idlName.charAt(1) > 0x5a)) { - idlName = - idlName.substring(0, 1).toLowerCase() + idlName.substring(1); + && (idlName.length() <= 1 + || idlName.charAt(1) < 0x41 || idlName.charAt(1) > 0x5a)) { + idlName = + idlName.substring(0, 1).toLowerCase() + idlName.substring(1); } if (accessorAnalysis != null) 1.6 +17 -15 contrib/iiop/src/main/org/jboss/iiop/rmi/ContainerAnalysis.java Index: ContainerAnalysis.java =================================================================== RCS file: /cvsroot/jboss/contrib/iiop/src/main/org/jboss/iiop/rmi/ContainerAnalysis.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ContainerAnalysis.java 21 Nov 2001 12:43:03 -0000 1.5 +++ ContainerAnalysis.java 18 Feb 2002 22:20:43 -0000 1.6 @@ -42,7 +42,7 @@ * Specification", version 1.1 (01-06-07). * * @author <a href="mailto:[EMAIL PROTECTED]">Ole Husgaard</a> - * @version $Revision: 1.5 $ + * @version $Revision: 1.6 $ */ public abstract class ContainerAnalysis extends ClassAnalysis @@ -153,6 +153,9 @@ // Static -------------------------------------------------------- + private static final org.jboss.logging.Logger logger = + org.jboss.logging.Logger.getLogger(ContainerAnalysis.class); + // Constructors ------------------------------------------------- protected ContainerAnalysis(Class cls) @@ -189,7 +192,7 @@ */ public InterfaceAnalysis[] getInterfaces() { -System.err.println("Interface count: " + interfaces.length); + logger.debug("Interface count: " + interfaces.length); return (InterfaceAnalysis[])interfaces.clone(); } @@ -198,7 +201,7 @@ */ public AttributeAnalysis[] getAttributes() { -System.err.println("Attribute count: " + attributes.length); + logger.debug("Attribute count: " + attributes.length); return (AttributeAnalysis[])attributes.clone(); } @@ -207,7 +210,7 @@ */ public ConstantAnalysis[] getConstants() { -System.err.println("Constants count: " + constants.length); + logger.debug("Constants count: " + constants.length); return (ConstantAnalysis[])constants.clone(); } @@ -407,8 +410,8 @@ for (int i = 0; i < methods.length; ++i) mutators[i] = -1; // no mutator here for (int i = 0; i < methods.length; ++i) { -System.err.println("analyzeMethods(): method["+i+"].getName()=\"" + - methods[i].getName() + "\"."); + logger.debug("analyzeMethods(): method["+i+"].getName()=\"" + + methods[i].getName() + "\"."); if (isAccessor(methods[i]) && (m_flags[i]&M_READ) == 0) { String attrName = attributeReadName(methods[i].getName()); @@ -506,7 +509,7 @@ ArrayList a = new ArrayList(); for (int i = 0; i < fields.length; ++i) { -System.err.println("f_flags["+i+"]=" + f_flags[i]); + logger.debug("f_flags["+i+"]=" + f_flags[i]); if ((f_flags[i] & F_CONSTANT) == 0) continue; @@ -533,13 +536,13 @@ throw new RuntimeException(ex.toString()); } -System.err.println("Constant["+i+"] name= " + name); -System.err.println("Constant["+i+"] type= " + type.getName()); -System.err.println("Constant["+i+"] value= " + value); + logger.debug("Constant["+i+"] name= " + name); + logger.debug("Constant["+i+"] type= " + type.getName()); + logger.debug("Constant["+i+"] value= " + value); a.add(new ConstantAnalysis(name, type, value)); } -System.err.println("Constants count: " + a.size()); + logger.debug("Constants count: " + a.size()); constants = new ConstantAnalysis[a.size()]; constants = (ConstantAnalysis[])a.toArray(constants); } @@ -554,7 +557,7 @@ ArrayList a = new ArrayList(); for (int i = 0; i < methods.length; ++i) { -System.err.println("m_flags["+i+"]=" + m_flags[i]); + logger.debug("m_flags["+i+"]=" + m_flags[i]); //if ((m_flags[i]&M_INHERITED) != 0) // continue; @@ -562,7 +565,7 @@ // Read method of an attribute. String name = attributeReadName(methods[i].getName()); -System.err.println("Attribute["+i+"] name= " + name); + logger.debug("Attribute["+i+"] name= " + name); if ((m_flags[i]&M_READONLY) != 0) a.add(new AttributeAnalysis(name, methods[i])); else @@ -571,7 +574,7 @@ } } -System.err.println("Attribute count: " + a.size()); + logger.debug("Attribute count: " + a.size()); attributes = new AttributeAnalysis[a.size()]; attributes = (AttributeAnalysis[])a.toArray(attributes); } @@ -779,4 +782,3 @@ private String idlModuleName = null; } - 1.4 +5 -2 contrib/iiop/src/main/org/jboss/iiop/rmi/ExceptionAnalysis.java Index: ExceptionAnalysis.java =================================================================== RCS file: /cvsroot/jboss/contrib/iiop/src/main/org/jboss/iiop/rmi/ExceptionAnalysis.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ExceptionAnalysis.java 30 Oct 2001 12:37:39 -0000 1.3 +++ ExceptionAnalysis.java 18 Feb 2002 22:20:43 -0000 1.4 @@ -36,7 +36,7 @@ * Specification", version 1.1 (01-06-07). * * @author <a href="mailto:[EMAIL PROTECTED]">Ole Husgaard</a> - * @version $Revision: 1.3 $ + * @version $Revision: 1.4 $ */ public class ExceptionAnalysis extends ValueAnalysis @@ -47,6 +47,9 @@ // Static -------------------------------------------------------- + private static final org.jboss.logging.Logger logger = + org.jboss.logging.Logger.getLogger(ExceptionAnalysis.class); + private static WorkCacheManager cache = new WorkCacheManager(ExceptionAnalysis.class); @@ -61,7 +64,7 @@ protected ExceptionAnalysis(Class cls) { super(cls); -System.err.println("ExceptionAnalysis(\""+cls.getName()+"\") entered."); + logger.debug("ExceptionAnalysis(\""+cls.getName()+"\") entered."); } protected void doAnalyze() 1.5 +5 -2 contrib/iiop/src/main/org/jboss/iiop/rmi/InterfaceAnalysis.java Index: InterfaceAnalysis.java =================================================================== RCS file: /cvsroot/jboss/contrib/iiop/src/main/org/jboss/iiop/rmi/InterfaceAnalysis.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- InterfaceAnalysis.java 13 Nov 2001 21:28:24 -0000 1.4 +++ InterfaceAnalysis.java 18 Feb 2002 22:20:43 -0000 1.5 @@ -42,7 +42,7 @@ * Specification", version 1.1 (01-06-07). * * @author <a href="mailto:[EMAIL PROTECTED]">Ole Husgaard</a> - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ */ public class InterfaceAnalysis extends ContainerAnalysis @@ -58,6 +58,9 @@ // Static -------------------------------------------------------- + private static final org.jboss.logging.Logger logger = + org.jboss.logging.Logger.getLogger(InterfaceAnalysis.class); + private static WorkCacheManager cache = new WorkCacheManager(InterfaceAnalysis.class); @@ -72,7 +75,7 @@ protected InterfaceAnalysis(Class cls) { super(cls); -System.err.println("new InterfaceAnalysis: " + cls.getName()); + logger.debug("new InterfaceAnalysis: " + cls.getName()); } protected void doAnalyze() 1.4 +9 -8 contrib/iiop/src/main/org/jboss/iiop/rmi/OperationAnalysis.java Index: OperationAnalysis.java =================================================================== RCS file: /cvsroot/jboss/contrib/iiop/src/main/org/jboss/iiop/rmi/OperationAnalysis.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- OperationAnalysis.java 13 Nov 2001 22:43:28 -0000 1.3 +++ OperationAnalysis.java 18 Feb 2002 22:20:43 -0000 1.4 @@ -22,7 +22,7 @@ * Specification", version 1.1 (01-06-07). * * @author <a href="mailto:[EMAIL PROTECTED]">Ole Husgaard</a> - * @version $Revision: 1.3 $ + * @version $Revision: 1.4 $ */ public class OperationAnalysis extends AbstractAnalysis @@ -33,13 +33,16 @@ // Static -------------------------------------------------------- + private static final org.jboss.logging.Logger logger = + org.jboss.logging.Logger.getLogger(OperationAnalysis.class); + // Constructors -------------------------------------------------- OperationAnalysis(Method method) throws RMIIIOPViolationException { super(method.getName()); -System.err.println("new OperationAnalysis: " + method.getName()); + logger.debug("new OperationAnalysis: " + method.getName()); this.method = method; // Check if valid return type, IF it is a remote interface. @@ -72,12 +75,11 @@ // Analyze parameters Class[] params = method.getParameterTypes(); parameters = new ParameterAnalysis[params.length]; - for (int i = 0; i < params.length; ++i) -{ -System.err.println("new OperationAnalysis: " + method.getName() + - " has parameter [" + params[i].getName() + "]"); + for (int i = 0; i < params.length; ++i) { + logger.debug("new OperationAnalysis: " + method.getName() + + " has parameter [" + params[i].getName() + "]"); parameters[i] = new ParameterAnalysis("param" + (i+1), params[i]); -} + } } // Public -------------------------------------------------------- @@ -134,4 +136,3 @@ private ParameterAnalysis[] parameters; } - 1.3 +6 -4 contrib/iiop/src/main/org/jboss/iiop/rmi/ParameterAnalysis.java Index: ParameterAnalysis.java =================================================================== RCS file: /cvsroot/jboss/contrib/iiop/src/main/org/jboss/iiop/rmi/ParameterAnalysis.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ParameterAnalysis.java 8 Aug 2001 20:19:39 -0000 1.2 +++ ParameterAnalysis.java 18 Feb 2002 22:20:43 -0000 1.3 @@ -17,7 +17,7 @@ * Specification", version 1.1 (01-06-07). * * @author <a href="mailto:[EMAIL PROTECTED]">Ole Husgaard</a> - * @version $Revision: 1.2 $ + * @version $Revision: 1.3 $ */ public class ParameterAnalysis extends AbstractAnalysis @@ -26,6 +26,9 @@ // Attributes ---------------------------------------------------- + private static final org.jboss.logging.Logger logger = + org.jboss.logging.Logger.getLogger(ParameterAnalysis.class); + // Static -------------------------------------------------------- // Constructors -------------------------------------------------- @@ -38,7 +41,7 @@ this.cls = cls; typeIDLName = Util.getTypeIDLName(cls); -System.err.println("ParameterAnalysis(): cls=["+cls.getName()+ + logger.debug("ParameterAnalysis(): cls=["+cls.getName()+ "] typeIDLName=["+typeIDLName+"]."); } @@ -66,7 +69,7 @@ */ public String getTypeIDLName() { -System.err.println("ParameterAnalysis.getTypeIDLName(): cls=["+cls.getName()+ + logger.debug("ParameterAnalysis.getTypeIDLName(): cls=["+cls.getName()+ "] typeIDLName=["+typeIDLName+"]."); return typeIDLName; } @@ -86,4 +89,3 @@ private String typeIDLName; } - 1.3 +10 -10 contrib/iiop/src/main/org/jboss/iiop/rmi/Util.java Index: Util.java =================================================================== RCS file: /cvsroot/jboss/contrib/iiop/src/main/org/jboss/iiop/rmi/Util.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Util.java 8 Aug 2001 20:19:39 -0000 1.2 +++ Util.java 18 Feb 2002 22:20:43 -0000 1.3 @@ -41,7 +41,7 @@ * Specification", version 1.1 (01-06-07). * * @author <a href="mailto:[EMAIL PROTECTED]">Ole Husgaard</a> - * @version $Revision: 1.2 $ + * @version $Revision: 1.3 $ */ public class Util { @@ -53,6 +53,8 @@ private static ORB orb = ORB.init(); + private static final org.jboss.logging.Logger logger = + org.jboss.logging.Logger.getLogger(Util.class); /** * Return the IDL type name for the given class. @@ -123,8 +125,8 @@ // interface? if (cls.isInterface() && java.rmi.Remote.class.isAssignableFrom(cls)) { -System.err.println("Util.isValidRMIIIOP(): doing interface analysis on " + - cls.getName()); + logger.debug("Util.isValidRMIIIOP(): doing interface analysis on " + + cls.getName()); InterfaceAnalysis.getInterfaceAnalysis(cls); return true; } @@ -132,12 +134,11 @@ // exception? if (Throwable.class.isAssignableFrom(cls)) { if (Exception.class.isAssignableFrom(cls) && - !RuntimeException.class.isAssignableFrom(cls)) -{ -System.err.println("Util.isValidRMIIIOP(): doing exception analysis on " + - cls.getName()); + !RuntimeException.class.isAssignableFrom(cls)) { + logger.debug("Util.isValidRMIIIOP(): doing exception analysis on " + + cls.getName()); ExceptionAnalysis.getExceptionAnalysis(cls); -} + } return true; } @@ -146,7 +147,7 @@ return true; // got to be value -System.err.println("Util.isValidRMIIIOP(): doing value analysis on " + + logger.debug("Util.isValidRMIIIOP(): doing value analysis on " + cls.getName()); ValueAnalysis.getValueAnalysis(cls); return true; @@ -623,4 +624,3 @@ } } - 1.4 +16 -15 contrib/iiop/src/main/org/jboss/iiop/rmi/ValueAnalysis.java Index: ValueAnalysis.java =================================================================== RCS file: /cvsroot/jboss/contrib/iiop/src/main/org/jboss/iiop/rmi/ValueAnalysis.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ValueAnalysis.java 10 Aug 2001 16:14:31 -0000 1.3 +++ ValueAnalysis.java 18 Feb 2002 22:20:43 -0000 1.4 @@ -37,7 +37,7 @@ * Specification", version 1.1 (01-06-07). * * @author <a href="mailto:[EMAIL PROTECTED]">Ole Husgaard</a> - * @version $Revision: 1.3 $ + * @version $Revision: 1.4 $ */ public class ValueAnalysis extends ContainerAnalysis @@ -48,6 +48,9 @@ // Static -------------------------------------------------------- + private static final org.jboss.logging.Logger logger = + org.jboss.logging.Logger.getLogger(ValueAnalysis.class); + private static WorkCacheManager cache = new WorkCacheManager(ValueAnalysis.class); @@ -62,7 +65,7 @@ protected ValueAnalysis(Class cls) { super(cls); -System.err.println("ValueAnalysis(\""+cls.getName()+"\") entered."); + logger.debug("ValueAnalysis(\""+cls.getName()+"\") entered."); } protected void doAnalyze() @@ -176,17 +179,17 @@ // Map all fields not flagged constant or serialPersistentField. SortedSet m = new TreeSet(new ValueMemberComparator()); -System.err.println("ValueAnalysis(\""+cls.getName()+"\"): " + + logger.debug("ValueAnalysis(\""+cls.getName()+"\"): " + "fields.length="+fields.length); for (int i = 0; i < fields.length; ++i) { -System.err.println("ValueAnalysis(\""+cls.getName()+"\"): " + - "Considering field["+i+"] \"" + fields[i].getName() + "\"" + - " f_flags=" + f_flags[i]); + logger.debug("ValueAnalysis(\""+cls.getName()+"\"): " + + "Considering field["+i+"] \"" + fields[i].getName() + + "\"" + " f_flags=" + f_flags[i]); if (f_flags[i] != 0) continue; // flagged int mods = fields[i].getModifiers(); -System.err.println("ValueAnalysis(\""+cls.getName()+"\"): mods=" + mods); + logger.debug("ValueAnalysis(\""+cls.getName()+"\"): mods=" + mods); if (Modifier.isStatic(mods) || Modifier.isTransient(mods)) continue; // don't map this @@ -199,7 +202,7 @@ members = new ValueMemberAnalysis[m.size()]; members = (ValueMemberAnalysis[])m.toArray(members); -System.err.println("ValueAnalysis(\""+cls.getName()+"\") value member count: " + logger.debug("ValueAnalysis(\""+cls.getName()+"\") value member count: " + members.length); // Get superclass analysis @@ -208,19 +211,18 @@ superClass = null; if (superClass == null) superAnalysis = null; - else -{ -System.err.println("ValueAnalysis(\""+cls.getName()+"\"): superclass: " + - superClass.getName()); + else { + logger.debug("ValueAnalysis(\""+cls.getName()+"\"): superclass: " + + superClass.getName()); superAnalysis = getValueAnalysis(superClass); -} + } if (!Serializable.class.isAssignableFrom(cls)) abstractValue = true; fixupCaseNames(); -System.err.println("ValueAnalysis(\""+cls.getName()+"\") done."); + logger.debug("ValueAnalysis(\""+cls.getName()+"\") done."); } // Public -------------------------------------------------------- @@ -357,4 +359,3 @@ } } - 1.3 +5 -2 contrib/iiop/src/main/org/jboss/iiop/rmi/WorkCacheManager.java Index: WorkCacheManager.java =================================================================== RCS file: /cvsroot/jboss/contrib/iiop/src/main/org/jboss/iiop/rmi/WorkCacheManager.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- WorkCacheManager.java 8 Aug 2001 20:19:39 -0000 1.2 +++ WorkCacheManager.java 18 Feb 2002 22:20:43 -0000 1.3 @@ -36,7 +36,7 @@ * working on this analysis. * * @author <a href="mailto:[EMAIL PROTECTED]">Ole Husgaard</a> - * @version $Revision: 1.2 $ + * @version $Revision: 1.3 $ */ class WorkCacheManager { @@ -46,6 +46,9 @@ // Static -------------------------------------------------------- + private static final org.jboss.logging.Logger logger = + org.jboss.logging.Logger.getLogger(WorkCacheManager.class); + // Constructors -------------------------------------------------- /** @@ -55,7 +58,7 @@ */ WorkCacheManager(Class cls) { -System.err.println("Class: " + cls.getName()); + logger.debug("Class: " + cls.getName()); // Find the constructor and initializer. try { constructor = cls.getDeclaredConstructor(new Class[]{Class.class});
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development