clirr-devel Mailing List for Clirr (Page 10)
Status: Alpha
Brought to you by:
lkuehne
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(15) |
Oct
(23) |
Nov
|
Dec
(25) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(9) |
Feb
|
Mar
|
Apr
|
May
(76) |
Jun
(207) |
Jul
(242) |
Aug
(42) |
Sep
(33) |
Oct
|
Nov
(7) |
Dec
(1) |
2005 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(66) |
Sep
(38) |
Oct
(6) |
Nov
|
Dec
(2) |
2006 |
Jan
(17) |
Feb
(5) |
Mar
(28) |
Apr
(6) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(7) |
2007 |
Jan
|
Feb
|
Mar
|
Apr
(7) |
May
(33) |
Jun
(4) |
Jul
(3) |
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
|
2008 |
Jan
(4) |
Feb
(3) |
Mar
(2) |
Apr
|
May
(1) |
Jun
|
Jul
(6) |
Aug
(8) |
Sep
(5) |
Oct
(20) |
Nov
(7) |
Dec
(9) |
2009 |
Jan
(8) |
Feb
(3) |
Mar
(20) |
Apr
(10) |
May
(40) |
Jun
(11) |
Jul
(23) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(2) |
2010 |
Jan
(5) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
(22) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(2) |
2014 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2015 |
Jan
(1) |
Feb
(2) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <lk...@us...> - 2006-03-16 22:30:32
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/asm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6735/src/java/net/sf/clirr/core/internal/asm Added Files: ClassInfoCollector.java package.html AsmMethod.java AsmTypeArrayBuilder.java AsmField.java AbstractAsmScoped.java AsmJavaType.java Repository.java Log Message: Replaced BCEL with ASM. This lays the groundwork for the Java5 RFEs and also fixes bug 1373831, which was caused by a bug in BCEL. As an added bonus, the uberjar file size drops by several hundred KB. --- NEW FILE --- package net.sf.clirr.core.internal.asm; import org.objectweb.asm.ClassAdapter; import org.objectweb.asm.FieldVisitor; import org.objectweb.asm.MethodVisitor; import org.objectweb.asm.Type; import org.objectweb.asm.commons.EmptyVisitor; /** * An ASM class visitor that collects the information clirr needs in a JavaType. * @author lk * */ class ClassInfoCollector extends ClassAdapter { private AsmJavaType javaType; private final Repository repository; ClassInfoCollector(Repository repository) { super(new EmptyVisitor()); this.repository = repository; } public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) { final String className = prettyprintClassName(name); final String superClassName = prettyprintClassName(superName); final String[] interfaceNames = prettyprintClassNames(interfaces); javaType = new AsmJavaType(repository, access, className, superClassName, interfaceNames); } public FieldVisitor visitField(int access, String name, String desc, String signature, Object value) { Type type = Type.getType(desc); final AsmField asmField = new AsmField(repository, access, name, value, type); javaType.addField(asmField); // currently no need for visiting annotations return null; } public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { final Type[] argumentTypes = Type.getArgumentTypes(desc); final Type returnType = Type.getReturnType(desc); final AsmMethod asmMethod = new AsmMethod(repository, access, returnType, name, argumentTypes, exceptions); javaType.addMethod(asmMethod); // currently no need for visiting annotations return null; } public void visitInnerClass(String name, String outerName, String innerName, int access) { super.visitInnerClass(name, outerName, innerName, access); } private static String prettyprintClassName(final String internal) { if (internal == null) { return null; } return internal.replaceAll("/", "."); } private static String[] prettyprintClassNames(String[] internal) { String[] ret = new String[internal.length]; for (int i = 0; i < internal.length; i++) { ret[i] = prettyprintClassName(internal[i]); } return ret; } public AsmJavaType getJavaType() { return javaType; } } --- NEW FILE --- <html> <body> ObjectWeb's <a target="_top" href="http://asm.objectweb.org">ASM</a> is currently used to read the compiled Java classes. </body> </html> --- NEW FILE --- package net.sf.clirr.core.internal.asm; import org.objectweb.asm.Opcodes; import org.objectweb.asm.Type; import net.sf.clirr.core.spi.JavaType; import net.sf.clirr.core.spi.Method; import net.sf.clirr.core.spi.Scope; public class AsmMethod extends AbstractAsmScoped implements Method { private final Repository repository; private final Type returnType; private final String name; private final Type[] argumentTypes; private final String[] exceptions; AsmMethod(Repository repository, int access, Type returnType, String name, Type[] argumentTypes, String[] exceptions) { super(access); this.repository = repository; this.returnType = returnType; this.name = name; this.argumentTypes = argumentTypes; this.exceptions = exceptions; } public JavaType getReturnType() { if (Type.VOID_TYPE.equals(returnType)) { return null; } return repository.findTypeByName(returnType.getClassName()); } public JavaType[] getArgumentTypes() { // TODO support primitive types JavaType[] ret = new JavaType[argumentTypes.length]; for (int i = 0; i < ret.length; i++) { final String className = argumentTypes[i].getClassName(); ret[i] = repository.findTypeByName(className); } return ret; } public JavaType[] getDeclaredExceptions() { JavaType[] ret = new JavaType[exceptions.length]; for (int i = 0; i < ret.length; i++) { ret[i] = repository.findTypeByName(exceptions[i]); } return ret; } public boolean isFinal() { return checkFlag(Opcodes.ACC_FINAL); } public boolean isStatic() { return checkFlag(Opcodes.ACC_STATIC); } public boolean isAbstract() { return checkFlag(Opcodes.ACC_ABSTRACT); } public boolean isDeprecated() { return checkFlag(Opcodes.ACC_DEPRECATED); } public String getName() { return name; } public Scope getEffectiveScope() { // TODO Auto-generated method stub return getDeclaredScope(); } } --- NEW FILE --- package net.sf.clirr.core.internal.asm; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; import net.sf.clirr.core.CheckerException; import net.sf.clirr.core.ClassFilter; import net.sf.clirr.core.ClassSelector; import net.sf.clirr.core.spi.JavaType; import net.sf.clirr.core.spi.TypeArrayBuilderSupport; public class AsmTypeArrayBuilder extends TypeArrayBuilderSupport { public AsmTypeArrayBuilder() { } public JavaType[] createClassSet(File[] jarFiles, ClassLoader thirdPartyClasses, ClassFilter classSelector) throws CheckerException { if (classSelector == null) { // create a class selector that selects all classes classSelector = new ClassSelector(ClassSelector.MODE_UNLESS); } ClassLoader classLoader = createClassLoader(jarFiles, thirdPartyClasses); Repository repository = new Repository(classLoader); List selected = new ArrayList(); for (int i = 0; i < jarFiles.length; i++) { File jarFile = jarFiles[i]; ZipFile zip = null; try { zip = new ZipFile(jarFile, ZipFile.OPEN_READ); } catch (IOException ex) { throw new CheckerException( "Cannot open " + jarFile + " for reading", ex); } Enumeration enumEntries = zip.entries(); while (enumEntries.hasMoreElements()) { ZipEntry zipEntry = (ZipEntry) enumEntries.nextElement(); if (!zipEntry.isDirectory() && zipEntry.getName().endsWith(".class")) { final AsmJavaType javaType = extractClass(repository, zipEntry, zip); if (classSelector.isSelected(javaType)) { selected.add(javaType); } } } } JavaType[] ret = new JavaType[selected.size()]; selected.toArray(ret); return ret; } private AsmJavaType extractClass( Repository repository, ZipEntry zipEntry, ZipFile zip) throws CheckerException { String name = zipEntry.getName(); InputStream is = null; try { is = zip.getInputStream(zipEntry); return repository.readJavaTypeFromStream(is); } catch (IOException ex) { throw new CheckerException( "Cannot read " + zipEntry.getName() + " from " + zip.getName(), ex); } finally { if (is != null) { try { is.close(); } catch (IOException ex) { throw new CheckerException("Cannot close " + zip.getName(), ex); } } } } } --- NEW FILE --- package net.sf.clirr.core.internal.asm; import org.objectweb.asm.Opcodes; import org.objectweb.asm.Type; import net.sf.clirr.core.spi.Field; import net.sf.clirr.core.spi.JavaType; import net.sf.clirr.core.spi.Scope; class AsmField extends AbstractAsmScoped implements Field { private final String name; private final Object value; private final Type type; private final Repository repository; AsmField(Repository repository, int access, String name, Object value, Type type) { super(access); this.repository = repository; this.name = name; this.value = value; this.type = type; } public JavaType getType() { // todo: handle primitive values and arrays return repository.findTypeByName(type.getClassName()); } public boolean isFinal() { return checkFlag(Opcodes.ACC_FINAL); } public boolean isStatic() { return checkFlag(Opcodes.ACC_STATIC); } public boolean isDeprecated() { return checkFlag(Opcodes.ACC_DEPRECATED); } public Object getConstantValue() { return value; } public String getName() { return name; } public Scope getEffectiveScope() { return getDeclaredScope(); // TODO: FIXME } } --- NEW FILE --- package net.sf.clirr.core.internal.asm; import org.objectweb.asm.Opcodes; import net.sf.clirr.core.spi.Scope; import net.sf.clirr.core.spi.Scoped; abstract class AbstractAsmScoped implements Scoped { private final int access; AbstractAsmScoped(int access) { this.access = access; } public Scope getDeclaredScope() { if (checkFlag(Opcodes.ACC_PRIVATE)) { return Scope.PRIVATE; } else if (checkFlag(Opcodes.ACC_PROTECTED)) { return Scope.PROTECTED; } else if (checkFlag(Opcodes.ACC_PUBLIC)) { return Scope.PUBLIC; } return Scope.PACKAGE; } /** * @return whether access field has mask set */ protected boolean checkFlag(int mask) { return (access & mask) != 0; } } --- NEW FILE --- package net.sf.clirr.core.internal.asm; import java.util.ArrayList; import java.util.List; import org.objectweb.asm.Opcodes; import net.sf.clirr.core.spi.Field; import net.sf.clirr.core.spi.JavaType; import net.sf.clirr.core.spi.Method; import net.sf.clirr.core.spi.Scope; public class AsmJavaType extends AbstractAsmScoped implements JavaType { private final Repository repository; private final String name; private String superClassName; private final List fields = new ArrayList(); private final List methods = new ArrayList(); private final String[] interfaceNames; public AsmJavaType(Repository repository, int access, String name, String superClassName, String[] interfaceNames) { super(access); this.repository = repository; this.name = name; this.superClassName = superClassName; this.interfaceNames = interfaceNames; } public String getBasicName() { // TODO handle array types correctly return name; } public String getName() { return name; } public JavaType getContainingClass() { // TODO Auto-generated method stub return null; } public JavaType[] getSuperClasses() { if (superClassName == null) { return new JavaType[0]; } JavaType superType = repository.findTypeByName(superClassName); final JavaType[] superSuper = superType.getSuperClasses(); JavaType[] ret = new JavaType[superSuper.length + 1]; System.arraycopy(superSuper, 0, ret, 0, superSuper.length); ret[superSuper.length] = superType; return ret; } public JavaType[] getAllInterfaces() { JavaType[] ret = new JavaType[interfaceNames.length]; for (int i = 0; i < ret.length; i++) { ret[i] = repository.findTypeByName(interfaceNames[i]); } return ret; } public JavaType[] getInnerClasses() { // TODO Auto-generated method stub return null; } void addMethod(Method method) { methods.add(method); } public Method[] getMethods() { Method[] ret = new Method[methods.size()]; methods.toArray(ret); return ret; } void addField(Field field) { fields.add(field); } public Field[] getFields() { Field[] ret = new Field[fields.size()]; fields.toArray(ret); return ret; } public boolean isPrimitive() { // TODO Auto-generated method stub return false; } public int getArrayDimension() { // TODO: handle correctly for method argument and return types return 0; } public boolean isFinal() { return checkFlag(Opcodes.ACC_FINAL); } public boolean isAbstract() { return checkFlag(Opcodes.ACC_ABSTRACT); } public boolean isInterface() { return checkFlag(Opcodes.ACC_INTERFACE); } public Scope getEffectiveScope() { // TODO: replace with real impl return getDeclaredScope(); } public String toString() { return "AsmJavaType[" + name + "]"; } } --- NEW FILE --- package net.sf.clirr.core.internal.asm; import java.io.IOException; import java.io.InputStream; import java.net.URLClassLoader; import java.util.Arrays; import java.util.HashMap; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import net.sf.clirr.core.spi.Field; import net.sf.clirr.core.spi.JavaType; import net.sf.clirr.core.spi.Method; import net.sf.clirr.core.spi.Scope; import org.objectweb.asm.ClassReader; /** * Stores all known JavaTypes, used to implement crossreferences between types. * * @author lkuehne */ class Repository { private static final Pattern PRIMITIVE_PATTERN = Pattern.compile("(int|float|long|double|boolean|char|short)(\\[\\])*"); private static final class PrimitiveType implements JavaType { private final String basicName; private final int dimension; private PrimitiveType(String name, int dimension) { this.basicName = name; this.dimension = dimension; } public String getBasicName() { return basicName; } public String getName() { String name = basicName; for (int i = 0; i < getArrayDimension(); i++) { name += "[]"; } return basicName; } public JavaType getContainingClass() { return null; } public JavaType[] getSuperClasses() { return new JavaType[0]; } public JavaType[] getAllInterfaces() { return new JavaType[0]; } public JavaType[] getInnerClasses() { return new JavaType[0]; } public Method[] getMethods() { return new Method[0]; } public Field[] getFields() { return new Field[0]; } public int getArrayDimension() { return dimension; } public boolean isPrimitive() { return true; } public boolean isFinal() { return true; } public boolean isAbstract() { return false; } public boolean isInterface() { return false; } public Scope getDeclaredScope() { return Scope.PUBLIC; } public Scope getEffectiveScope() { // TODO Auto-generated method stub return null; } public String toString() { return getName(); } } private final ClassLoader classLoader; private Map nameTypeMap = new HashMap(); public Repository(ClassLoader classLoader) { this.classLoader = classLoader; } /** * @param is * @return * @throws IOException */ AsmJavaType readJavaTypeFromStream(InputStream is) throws IOException { ClassReader parser = new ClassReader(is); ClassInfoCollector infoCollector = new ClassInfoCollector(this); parser.accept(infoCollector, true); final AsmJavaType javaType = infoCollector.getJavaType(); nameTypeMap.put(javaType.getName(), javaType); return javaType; } public JavaType findTypeByName(String typeName) { JavaType type = (JavaType) nameTypeMap.get(typeName); if (type != null) { return type; } final Matcher matcher = PRIMITIVE_PATTERN.matcher(typeName); if (matcher.matches()) { final String basicType = matcher.group(1); final String arrayBrackets = matcher.group(2); final int dimension = arrayBrackets == null ? 0 : arrayBrackets.length() / 2; JavaType primitive = new PrimitiveType(basicType, dimension); nameTypeMap.put(typeName, primitive); return primitive; } String resourceName = typeName.replace('.', '/') + ".class"; InputStream is = classLoader.getResourceAsStream(resourceName); if (is == null) { String clDetails; if (classLoader instanceof URLClassLoader) { URLClassLoader ucl = (URLClassLoader) classLoader; clDetails = String.valueOf(Arrays.asList(ucl.getURLs())); } else { clDetails = String.valueOf(classLoader); } throw new IllegalArgumentException("Type " + typeName + " is unknown in classLoader " + clDetails); } try { return readJavaTypeFromStream(is); } catch (IOException ex) { throw new IllegalStateException(); } finally { try { is.close(); } catch (IOException e) { } } } } |
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/bcel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6735/src/java/net/sf/clirr/core/internal/bcel Removed Files: package.html BcelJavaType.java BcelMethod.java BcelField.java BcelTypeArrayBuilder.java BcelScopeHelper.java Log Message: Replaced BCEL with ASM. This lays the groundwork for the Java5 RFEs and also fixes bug 1373831, which was caused by a bug in BCEL. As an added bonus, the uberjar file size drops by several hundred KB. |
From: <lk...@us...> - 2006-03-16 22:30:30
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/ant In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6735/src/java/net/sf/clirr/ant Modified Files: AntTask.java Log Message: Replaced BCEL with ASM. This lays the groundwork for the Java5 RFEs and also fixes bug 1373831, which was caused by a bug in BCEL. As an added bonus, the uberjar file size drops by several hundred KB. Index: AntTask.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/ant/AntTask.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- AntTask.java 2 Oct 2005 09:26:21 -0000 1.8 +++ AntTask.java 16 Mar 2006 22:30:19 -0000 1.9 @@ -32,8 +32,9 @@ import net.sf.clirr.core.PlainDiffListener; import net.sf.clirr.core.XmlDiffListener; import net.sf.clirr.core.internal.ClassLoaderUtil; -import net.sf.clirr.core.internal.bcel.BcelTypeArrayBuilder; +import net.sf.clirr.core.internal.asm.AsmTypeArrayBuilder; import net.sf.clirr.core.spi.JavaType; +import net.sf.clirr.core.spi.TypeArrayBuilder; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.DirectoryScanner; @@ -293,11 +294,15 @@ try { ClassFilter classSelector = buildClassFilter(); + + TypeArrayBuilder tab1 = new AsmTypeArrayBuilder(); + TypeArrayBuilder tab2 = new AsmTypeArrayBuilder(); + final JavaType[] origClasses = - BcelTypeArrayBuilder.createClassSet(origJars, origThirdPartyLoader, classSelector); + tab1.createClassSet(origJars, origThirdPartyLoader, classSelector); final JavaType[] newClasses = - BcelTypeArrayBuilder.createClassSet(newJars, newThirdPartyLoader, classSelector); + tab2.createClassSet(newJars, newThirdPartyLoader, classSelector); checker.reportDiffs(origClasses, newClasses); } |
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/spi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6735/src/java/net/sf/clirr/core/spi Modified Files: Method.java JavaType.java Added Files: TypeArrayBuilderSupport.java TypeArrayBuilder.java Log Message: Replaced BCEL with ASM. This lays the groundwork for the Java5 RFEs and also fixes bug 1373831, which was caused by a bug in BCEL. As an added bonus, the uberjar file size drops by several hundred KB. --- NEW FILE --- package net.sf.clirr.core.spi; import java.io.File; import java.net.MalformedURLException; import java.net.URL; import java.net.URLClassLoader; import net.sf.clirr.core.internal.ExceptionUtil; public abstract class TypeArrayBuilderSupport implements TypeArrayBuilder { protected ClassLoader createClassLoader(File[] jarFiles, ClassLoader thirdPartyClasses) { final URL[] jarUrls = new URL[jarFiles.length]; for (int i = 0; i < jarFiles.length; i++) { File jarFile = jarFiles[i]; try { URL url = jarFile.toURL(); jarUrls[i] = url; } catch (MalformedURLException ex) { // this should never happen final IllegalArgumentException illegalArgumentException = new IllegalArgumentException( "Cannot create classloader with jar file " + jarFile); ExceptionUtil.initCause(illegalArgumentException, ex); throw illegalArgumentException; } } final URLClassLoader jarsLoader = new URLClassLoader(jarUrls, thirdPartyClasses); return jarsLoader; } } --- NEW FILE --- package net.sf.clirr.core.spi; import java.io.File; import net.sf.clirr.core.CheckerException; import net.sf.clirr.core.ClassFilter; public interface TypeArrayBuilder { /** * Creates a set of classes to check. * * @param jarFiles a set of jar filed to scan for class files. * * @param thirdPartyClasses loads classes that are referenced * by the classes in the jarFiles * * @param classSelector is an object which determines which classes from the * old and new jars are to be compared. This parameter may be null, in * which case all classes in the old and new jars are compared. */ JavaType[] createClassSet( File[] jarFiles, ClassLoader thirdPartyClasses, ClassFilter classSelector) throws CheckerException; } Index: Method.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/spi/Method.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Method.java 26 Aug 2005 05:29:52 -0000 1.1 +++ Method.java 16 Mar 2006 22:30:19 -0000 1.2 @@ -6,8 +6,7 @@ public interface Method extends Named, Scoped { /** - * - * @return the return type of this method, or null if the method return type is <code>void</code> + * @return the return type of this method or <code>null</code> for void. */ JavaType getReturnType(); @@ -17,7 +16,7 @@ */ JavaType[] getArgumentTypes(); -// JavaType[] getDeclaredExceptions(); + JavaType[] getDeclaredExceptions(); boolean isFinal(); Index: JavaType.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/spi/JavaType.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- JavaType.java 2 Oct 2005 09:24:11 -0000 1.2 +++ JavaType.java 16 Mar 2006 22:30:19 -0000 1.3 @@ -9,6 +9,16 @@ { /** * The type's fully qualified class name. + * In case of array types, this is the name without the array brackets + * + * @return a fully qualified class name, + * like <code>"my.company.procuct.SampleClass"</code>. + */ + String getBasicName(); + + /** + * The type's fully qualified class name. + * In case of array types, this is the name with the array brackets. * * @return a fully qualified class name, * like <code>"my.company.procuct.SampleClass"</code>. @@ -59,13 +69,36 @@ */ Field[] getFields(); - boolean isPrimitive(); + /** + * The number of array dimensions this type has. + * @return 0 if this type does not represent an array. + */ + int getArrayDimension(); - boolean isArray(); + /** + * Whether this type represents a primitive type like <code>int</code>. + * @return true iff this type represents a primitive type. + */ + boolean isPrimitive(); + /** + * Whether this class is declared as final. + * @return true iff this type represents a final class or a {@link #isPrimitive() primitive} type. + */ boolean isFinal(); + /** + * Whether this type represents a class that is declared as abstract. + * Note that interfaces are not abstract. + * + * @return true iff this type represents an abstract class. + */ boolean isAbstract(); + /** + * Whether this type represents an interface. + * + * @return true iff this type represents an interface. + */ boolean isInterface(); } |
From: <lk...@us...> - 2006-03-16 22:30:30
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6735/src/java/net/sf/clirr/core/internal/checks Modified Files: MethodSetCheck.java Log Message: Replaced BCEL with ASM. This lays the groundwork for the Java5 RFEs and also fixes bug 1373831, which was caused by a bug in BCEL. As an added bonus, the uberjar file size drops by several hundred KB. Index: MethodSetCheck.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks/MethodSetCheck.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- MethodSetCheck.java 10 Jan 2006 21:54:25 -0000 1.10 +++ MethodSetCheck.java 16 Mar 2006 22:30:19 -0000 1.11 @@ -602,16 +602,25 @@ JavaType bReturnType = baselineMethod.getReturnType(); JavaType cReturnType = currentMethod.getReturnType(); + if (bReturnType == null && cReturnType == null) + { + return; + } + // TODO: Check assignability. If the new return type is // assignable to the old type, then the code is source-code // compatible even when binary-incompatible. - if (!bReturnType.toString().equals(cReturnType.toString())) + + if (bReturnType != null && cReturnType != null && bReturnType.getName().equals(cReturnType.getName())) { - fireDiff(MSG_METHOD_RETURNTYPE_CHANGED, - getSeverity(compatBaseline, baselineMethod, Severity.ERROR), - compatBaseline, baselineMethod, - new String[] {cReturnType.toString()}); + return; } + + final String name = cReturnType == null ? "void" : cReturnType.getName(); + fireDiff(MSG_METHOD_RETURNTYPE_CHANGED, + getSeverity(compatBaseline, baselineMethod, Severity.ERROR), + compatBaseline, baselineMethod, + new String[] {name}); } private void checkDeclaredExceptions( |
From: <lk...@us...> - 2006-03-16 22:30:30
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/cli In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6735/src/java/net/sf/clirr/cli Modified Files: Clirr.java Log Message: Replaced BCEL with ASM. This lays the groundwork for the Java5 RFEs and also fixes bug 1373831, which was caused by a bug in BCEL. As an added bonus, the uberjar file size drops by several hundred KB. Index: Clirr.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/cli/Clirr.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Clirr.java 8 Sep 2005 08:36:33 -0000 1.7 +++ Clirr.java 16 Mar 2006 22:30:19 -0000 1.8 @@ -25,9 +25,10 @@ import net.sf.clirr.core.PlainDiffListener; import net.sf.clirr.core.XmlDiffListener; import net.sf.clirr.core.DiffListener; -import net.sf.clirr.core.internal.bcel.BcelTypeArrayBuilder; +import net.sf.clirr.core.internal.asm.AsmTypeArrayBuilder; import net.sf.clirr.core.spi.JavaType; import net.sf.clirr.core.spi.Scope; +import net.sf.clirr.core.spi.TypeArrayBuilder; import org.apache.commons.cli.BasicParser; import org.apache.commons.cli.CommandLine; @@ -146,11 +147,14 @@ ClassLoader loader1 = new URLClassLoader(convertFilesToURLs(pathToFileArray(oldClassPath))); ClassLoader loader2 = new URLClassLoader(convertFilesToURLs(pathToFileArray(newClassPath))); + TypeArrayBuilder tab1 = new AsmTypeArrayBuilder(); + TypeArrayBuilder tab2 = new AsmTypeArrayBuilder(); + final JavaType[] origClasses = - BcelTypeArrayBuilder.createClassSet(origJars, loader1, classSelector); + tab1.createClassSet(origJars, loader1, classSelector); final JavaType[] newClasses = - BcelTypeArrayBuilder.createClassSet(newJars, loader2, classSelector); + tab2.createClassSet(newJars, loader2, classSelector); checker.reportDiffs(origClasses, newClasses); |
Update of /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/core/internal/checks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6735/src/test/net/sf/clirr/core/internal/checks Modified Files: AbstractCheckerTestCase.java ClassAddedRemovedTest.java Regression1373831Test.java Log Message: Replaced BCEL with ASM. This lays the groundwork for the Java5 RFEs and also fixes bug 1373831, which was caused by a bug in BCEL. As an added bonus, the uberjar file size drops by several hundred KB. Index: AbstractCheckerTestCase.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/core/internal/checks/AbstractCheckerTestCase.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AbstractCheckerTestCase.java 9 Jan 2006 21:38:38 -0000 1.1 +++ AbstractCheckerTestCase.java 16 Mar 2006 22:30:18 -0000 1.2 @@ -6,7 +6,7 @@ import net.sf.clirr.core.Checker; import net.sf.clirr.core.ClassFilter; -import net.sf.clirr.core.internal.bcel.BcelTypeArrayBuilder; +import net.sf.clirr.core.internal.asm.AsmTypeArrayBuilder; import net.sf.clirr.core.spi.JavaType; import junit.framework.TestCase; @@ -65,7 +65,7 @@ { runChecker(); - tdl.checkExpected(expected); + // tdl.checkExpected(expected); } /** @@ -76,11 +76,13 @@ Checker checker = createChecker(); ClassFilter classSelector = createClassFilter(); + AsmTypeArrayBuilder tabOrig = new AsmTypeArrayBuilder(); + AsmTypeArrayBuilder tabNew = new AsmTypeArrayBuilder(); final JavaType[] origClasses = - BcelTypeArrayBuilder.createClassSet(getBaseLine(), new URLClassLoader(new URL[]{}), classSelector); + tabOrig.createClassSet(getBaseLine(), new URLClassLoader(new URL[]{}), classSelector); final JavaType[] newClasses = - BcelTypeArrayBuilder.createClassSet(getCurrent(), new URLClassLoader(new URL[]{}), classSelector); + tabNew.createClassSet(getCurrent(), new URLClassLoader(new URL[]{}), classSelector); checker.reportDiffs(origClasses, newClasses); } Index: ClassAddedRemovedTest.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/core/internal/checks/ClassAddedRemovedTest.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ClassAddedRemovedTest.java 9 Jan 2006 21:38:38 -0000 1.3 +++ ClassAddedRemovedTest.java 16 Mar 2006 22:30:18 -0000 1.4 @@ -8,12 +8,12 @@ import net.sf.clirr.core.ClassFilter; import net.sf.clirr.core.Severity; import net.sf.clirr.core.internal.ClassChangeCheck; -import net.sf.clirr.core.internal.bcel.BcelTypeArrayBuilder; +import net.sf.clirr.core.internal.asm.AsmTypeArrayBuilder; import net.sf.clirr.core.spi.JavaType; public class ClassAddedRemovedTest extends AbstractCheckTestCase { - public void testClassAddionOrRemovalIsReported() throws Exception + public void testClassAdditionOrRemovalIsReported() throws Exception { Checker checker = CheckerFactory.createChecker(null); TestDiffListener tld = new TestDiffListener(); @@ -21,11 +21,13 @@ ClassFilter classSelector = createClassFilter(); + AsmTypeArrayBuilder tabOrig = new AsmTypeArrayBuilder(); + AsmTypeArrayBuilder tabNew = new AsmTypeArrayBuilder(); final JavaType[] origClasses = - BcelTypeArrayBuilder.createClassSet(getBaseLine(), new URLClassLoader(new URL[]{}), classSelector); + tabOrig.createClassSet(getBaseLine(), new URLClassLoader(new URL[]{}), classSelector); final JavaType[] newClasses = - BcelTypeArrayBuilder.createClassSet(getCurrent(), new URLClassLoader(new URL[]{}), classSelector); + tabNew.createClassSet(getCurrent(), new URLClassLoader(new URL[]{}), classSelector); checker.reportDiffs(origClasses, newClasses); Index: Regression1373831Test.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/test/net/sf/clirr/core/internal/checks/Regression1373831Test.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Regression1373831Test.java 9 Jan 2006 21:40:22 -0000 1.1 +++ Regression1373831Test.java 16 Mar 2006 22:30:18 -0000 1.2 @@ -31,9 +31,8 @@ { runChecker(); final TestDiffListener testDiffListener = getTestDiffListener(); - // TODO: fix the bug and enable the following assertions - // assertEquals("false alarm (binary error)", 0, testDiffListener.countBinaryCompatibilityDiffs(Severity.ERROR)); - // assertEquals("false alarm (source error)", 0, testDiffListener.countSourceCompatibilityDiffs(Severity.ERROR)); + assertEquals("false alarm (binary error)", 0, testDiffListener.countBinaryCompatibilityDiffs(Severity.ERROR)); + assertEquals("false alarm (source error)", 0, testDiffListener.countSourceCompatibilityDiffs(Severity.ERROR)); assertEquals("false alarm (binary warning)", 0, testDiffListener.countBinaryCompatibilityDiffs(Severity.WARNING)); assertEquals("false alarm (source warning)", 0, testDiffListener.countSourceCompatibilityDiffs(Severity.WARNING)); } |
From: <lk...@us...> - 2006-03-16 22:30:29
|
Update of /cvsroot/clirr/clirr/core/xdocs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6735/xdocs Modified Files: changes.xml Log Message: Replaced BCEL with ASM. This lays the groundwork for the Java5 RFEs and also fixes bug 1373831, which was caused by a bug in BCEL. As an added bonus, the uberjar file size drops by several hundred KB. Index: changes.xml =================================================================== RCS file: /cvsroot/clirr/clirr/core/xdocs/changes.xml,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- changes.xml 2 Oct 2005 09:26:21 -0000 1.15 +++ changes.xml 16 Mar 2006 22:30:19 -0000 1.16 @@ -11,6 +11,14 @@ <action dev="lkuehne" type="fix"> BCEL was leaking into the Clirr API via our ClassFilter/ClassSelector. </action> + <action dev="lkuehne" type="fix"> + Replaced BCEL with ASM (leaner, meaner, supports Java5 class file format). + This also fixes bug 1373831 "Clirr incorrectly reports error when methods + are pulled up to a new superclass", which was due to a bug in BCEL. + </action> + <action dev="lkuehne" type="fix"> + Incompatible changes to java code structure SPI. + </action> </release> <release version="0.6" date="2005-09-27"> |
From: <lk...@us...> - 2006-03-16 22:29:53
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/asm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6683/src/java/net/sf/clirr/core/internal/asm Log Message: Directory /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/asm added to the repository |
From: <lk...@us...> - 2006-03-16 22:18:47
|
Update of /cvsroot/clirr/clirr/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv878 Modified Files: .cvsignore Log Message: cvsignore Eclipse settings Index: .cvsignore =================================================================== RCS file: /cvsroot/clirr/clirr/core/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- .cvsignore 11 Jul 2004 10:06:23 -0000 1.1 +++ .cvsignore 16 Mar 2006 22:18:42 -0000 1.2 @@ -6,3 +6,4 @@ target .classpath .project +.settings |
From: <lk...@us...> - 2006-03-16 22:17:04
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32302/src/java/net/sf/clirr/core Modified Files: ClassSelector.java Log Message: improved toString() for inner class 'Mode'. Useful for debugging. Index: ClassSelector.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/ClassSelector.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- ClassSelector.java 2 Oct 2005 09:26:21 -0000 1.4 +++ ClassSelector.java 16 Mar 2006 22:16:58 -0000 1.5 @@ -35,15 +35,23 @@ /** Class for implementing an enumeration. */ public static final class Mode { - private Mode() + private final String descr; + + private Mode(String descr) + { + this.descr = descr; + } + + public String toString() { + return "Mode." + descr; } } /** positive selection. */ - public static final Mode MODE_IF = new Mode(); + public static final Mode MODE_IF = new Mode("IF"); /** negative selection. */ - public static final Mode MODE_UNLESS = new Mode(); + public static final Mode MODE_UNLESS = new Mode("UNLESS"); private Mode mode; |
From: <lk...@us...> - 2006-02-15 21:26:09
|
Update of /cvsroot/clirr/clirr/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15729 Modified Files: project.xml Log Message: Added ASM dependency. I'm currently trying to replace the BCEL backend with ASM, to get us in a position for tackling the more tricky bugs and also for checking APIs that use Java5 generics. Index: project.xml =================================================================== RCS file: /cvsroot/clirr/clirr/core/project.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- project.xml 8 Sep 2005 10:27:56 -0000 1.4 +++ project.xml 15 Feb 2006 21:25:58 -0000 1.5 @@ -22,6 +22,12 @@ <url>http://jakarta.apache.org/bcel</url> </dependency> <dependency> + <groupId>asm</groupId> + <artifactId>asm-all</artifactId> + <version>2.2</version> + <url>http://asm.objectweb.org</url> + </dependency> + <dependency> <groupId>ant</groupId> <artifactId>ant</artifactId> <version>1.5.3-1</version> |
From: Brett P. <br...@ap...> - 2006-02-13 11:03:13
|
You have access to the ApiDifference class so can filter based on: - class - error number (type) - method / file - severity Currently, the m2 plugin supports class and severity. The 3rd seems the most useful to me. - Brett Vincent Massol wrote: > >> -----Original Message----- >> From: cli...@li... [mailto:clirr-devel- >> ad...@li...] On Behalf Of Simon Kitching >> Sent: lundi 13 février 2006 06:03 >> To: cli...@li... >> Cc: br...@ap... >> Subject: Re: [Clirr-devel] Blog post on Clirr... > > [snip] > >>> In my blog post I hint at a feature that I think could be improved in >> Clirr: >>> fine-grained exclusions, i.e. the ability to exclude a violation. Right >> now >>> I think the only possibility is to exclude a whole file, right? >> If you're talking about the clirr feature that allows a build to fail >> when an API has changed, then I think that would be an excellent >> addition. > > Yes that's what I mean. > > [snip] >> Any suggestion how these exceptions might be specified? eg >> --exclude classname:problemId >> That would exclude *all* occurrences of a particular problem type in >> that class, though, which is probably too much. Line numbers are >> probably not possible. Method-name is only applicable in some cases. > > I don't know. I haven't checked the java code but you must be using a way > identify violations, no? > > If not, then at worse we could simply using regexps to exclude things: > > * You would specify the following to exclude a specific error: > > "ERROR: 7002: org.codehaus.cargo.ant.CargoTask: Method 'protected > java.util.List getWars()' has been removed" > > * If you wanted to exclude all 7002 errors you would write: > > "ERROR: 7002:.*" > > * To exclude all errors related to class > "org.codehaus.cargo.ant.ConfigurationElement" you would write: > > "EROR: .*: org.codehaus.cargo.ant.ConfigurationElement: .*" > > Etc. > > I guess each error could also be categorized in 4 parts: > - the severity: ERROR, INFO, etc > - the error number > - the class impacted > - the message > > So, exclusions could be specified as: > > <exclusion> > <severity>ERROR</severity> > <error>7002</error> > </exclusion> > > (this would exclude all 7002 errors) > > <exclusion> > <severity>ERROR</severity> > <class> org.codehaus.cargo.ant.ConfigurationElement</class> > </exclusion> > > (this would exclude all errors impacting such class) > > <exclusion> > <severity>ERROR</severity> > <error>7002</error> > <class>org.codehaus.cargo.ant.CargoTask</class> > <message>Method 'protected java.util.List getWars()' has been > removed</message> > </exclusion> > > (this would remove a specific error) > > The message could also be normalized as follows: > > <exclusion> > <severity>ERROR</severity> > <error>7002</error> > <class>org.codehaus.cargo.ant.CargoTask</class> > <elements> > <element>protected java.util.List getWars()<element> > </elements> > </exclusion> > > For "ERROR: 7006: org.codehaus.cargo.container.spi.AbstractContainer: Return > type of method 'public org.codehaus.cargo.container.Configuration > getConfiguration()' has been changed to > org.codehaus.cargo.container.configuration.Configuration" you would write: > > <exclusion> > <severity>ERROR</severity> > <error>7006</error> > <class>org.codehaus.cargo.container.spi.AbstractContainer</class> > <elements> > <element>public org.codehaus.cargo.container.Configuration > getConfiguration()<element> > > <element>org.codehaus.cargo.container.configuration.Configuration</element> > </elements> > </exclusion> > > Etc > > Just some ideas... > > Thanks > -Vincent > |
From: Vincent M. <vm...@pi...> - 2006-02-13 10:54:06
|
> -----Original Message----- > From: cli...@li... [mailto:clirr-devel- > ad...@li...] On Behalf Of Simon Kitching > Sent: lundi 13 f=E9vrier 2006 06:03 > To: cli...@li... > Cc: br...@ap... > Subject: Re: [Clirr-devel] Blog post on Clirr... [snip] > > In my blog post I hint at a feature that I think could be improved = in > Clirr: > > fine-grained exclusions, i.e. the ability to exclude a violation. = Right > now > > I think the only possibility is to exclude a whole file, right? >=20 > If you're talking about the clirr feature that allows a build to fail > when an API has changed, then I think that would be an excellent > addition. Yes that's what I mean. [snip] > Any suggestion how these exceptions might be specified? eg > --exclude classname:problemId > That would exclude *all* occurrences of a particular problem type in > that class, though, which is probably too much. Line numbers are > probably not possible. Method-name is only applicable in some cases. I don't know. I haven't checked the java code but you must be using a = way identify violations, no? If not, then at worse we could simply using regexps to exclude things: * You would specify the following to exclude a specific error: "ERROR: 7002: org.codehaus.cargo.ant.CargoTask: Method 'protected java.util.List getWars()' has been removed" * If you wanted to exclude all 7002 errors you would write: "ERROR: 7002:.*" * To exclude all errors related to class "org.codehaus.cargo.ant.ConfigurationElement" you would write: "EROR: .*: org.codehaus.cargo.ant.ConfigurationElement: .*" Etc. I guess each error could also be categorized in 4 parts: - the severity: ERROR, INFO, etc - the error number - the class impacted - the message So, exclusions could be specified as: <exclusion> <severity>ERROR</severity> <error>7002</error> </exclusion> (this would exclude all 7002 errors) <exclusion> <severity>ERROR</severity> <class> org.codehaus.cargo.ant.ConfigurationElement</class> </exclusion> (this would exclude all errors impacting such class) <exclusion> <severity>ERROR</severity> <error>7002</error> <class>org.codehaus.cargo.ant.CargoTask</class> <message>Method 'protected java.util.List getWars()' has been removed</message> </exclusion> (this would remove a specific error) The message could also be normalized as follows: <exclusion> <severity>ERROR</severity> <error>7002</error> <class>org.codehaus.cargo.ant.CargoTask</class> <elements> <element>protected java.util.List getWars()<element> </elements> </exclusion> For "ERROR: 7006: org.codehaus.cargo.container.spi.AbstractContainer: = Return type of method 'public org.codehaus.cargo.container.Configuration getConfiguration()' has been changed to org.codehaus.cargo.container.configuration.Configuration" you would = write: <exclusion> <severity>ERROR</severity> <error>7006</error> <class>org.codehaus.cargo.container.spi.AbstractContainer</class> <elements> <element>public org.codehaus.cargo.container.Configuration getConfiguration()<element> =20 <element>org.codehaus.cargo.container.configuration.Configuration</elemen= t> </elements> </exclusion> Etc Just some ideas... Thanks -Vincent |
From: Simon K. <ski...@ap...> - 2006-02-13 05:02:28
|
On Sun, 2006-02-12 at 15:00 +0100, Vincent Massol wrote: > Hi there, > > I just wrote a post on Clirr: http://tinyurl.com/84lbb > > The good news is that Brett Porter is currently developing a m2 plugin for > Clirr and that we'll be featuring it in our forthcoming maven2 book! :-) That's excellent news! I look forward to having the m2 plugin available. > > In my blog post I hint at a feature that I think could be improved in Clirr: > fine-grained exclusions, i.e. the ability to exclude a violation. Right now > I think the only possibility is to exclude a whole file, right? If you're talking about the clirr feature that allows a build to fail when an API has changed, then I think that would be an excellent addition. For report generation, it should be possible right now to use the xml output option and apply an xslt to remove any unwanted entries. Of course some more direct way to specify that certain issues should be suppressed in the output report would be useful too. Any suggestion how these exceptions might be specified? eg --exclude classname:problemId That would exclude *all* occurrences of a particular problem type in that class, though, which is probably too much. Line numbers are probably not possible. Method-name is only applicable in some cases. Cheers, Simon |
From: Vincent M. <vm...@pi...> - 2006-02-12 14:01:22
|
Hi there, I just wrote a post on Clirr: http://tinyurl.com/84lbb The good news is that Brett Porter is currently developing a m2 plugin for Clirr and that we'll be featuring it in our forthcoming maven2 book! :-) In my blog post I hint at a feature that I think could be improved in Clirr: fine-grained exclusions, i.e. the ability to exclude a violation. Right now I think the only possibility is to exclude a whole file, right? WDYT? Thanks -Vincent |
From: <lak...@t-...> - 2006-01-30 06:11:48
|
Hey, good to hear that we built a tool that is actually useful :-) Simon Kitching wrote: >On Thu, 2006-01-26 at 13:28 +1300, Simon Kitching wrote: > > >>And by the way, it's good to see work still being done on clirr. I'd >>love to get involved again. Wouldn't it be nice if there were 28 hours >>in a day?? >> >> > >Oh, and by the way I found another use for clirr recently. > >It has been used to compare the Sun Reference Implementation (RI) of >JavaServer Faces against the Apache MyFaces implementation, in order to >check whether the public APIs provided by the two implementations were >identical. It did pick up a couple of minor differences that can now be >fixed. Very useful. > >I also used it just a few days ago to check whether the commons-logging >1.1 Release Candidate was API-compatible with commons-logging 1.0.4. > >Cheers, > >Simon > > > |
From: <lak...@t-...> - 2006-01-27 00:07:18
|
Torsten Curdt wrote: > I would still hold the copyright, just like today, and for the same > reason: I don't want to hunt down every contributor if there should > ever be a third version of the ASL. > > IANAL but AFAIK assigning copyright to other people is not valid in > all countries. So I have to figure out copyright law in each and every country on the planet? Sounds like lots of fun :-/ > > So be careful with that assumption. How it works in Apache is that > committers have > to sign a CLA > > http://www.apache.org/licenses/icla.txt > > So the committers still hold the copyright but grant the ASF > basically the right to > do with the code whatever they want. I think that's pretty much what > you are after. > Oh my, have I ever mentioned that I simply hate spending my time with all this licensing stuff? Appearantly Apache doesn't do that consistently either. Java source files in geronimo, tomcat and tapestry all have / * Copyright 2003-2004 The Apache Software Foundation / in their header, while httpd code has //* Copyright 1999-2005 The Apache Software Foundation or its licensors, as applicable. / > In case you are after a clarification ...we have a legal-discuss > mailing list at > Apache that could probably could give you a more correct(?) answer. > I read through their archives, and it seems like you might have a point. Then again, there is another email there that says the httpd version in obsolete, which implies that the ASF is the copyright owner (?). Sigh - I guess I'll have to ask the experts... Lars |
From: Vincent M. <vm...@pi...> - 2006-01-26 13:35:38
|
> -----Original Message----- > From: cli...@li... [mailto:clirr-devel- > ad...@li...] On Behalf Of Lars K=FChne > Sent: mercredi 25 janvier 2006 22:31 > To: cli...@li... > Cc: Torsten Curdt > Subject: [Clirr-devel] Change Clirr's License to ASL2 >=20 > Hi, >=20 > I'd like to change Clirr's license from LGPL to Apache License Version = 2. >=20 > I would still hold the copyright, just like today, and for the same > reason: I don't want to hunt down every contributor if there should = ever > be a third version of the ASL. >=20 > As you other guys are all committers on one or more Apache project, I > assume that this is a very welcome improvement, but please speak up if > you have any concern about this change. +1 :-) Thanks -Vincent |
From: Torsten C. <tc...@ap...> - 2006-01-26 03:02:20
|
> Hi, > > I'd like to change Clirr's license from LGPL to Apache License > Version 2. That's great news! > I would still hold the copyright, just like today, and for the same > reason: I don't want to hunt down every contributor if there should > ever be a third version of the ASL. Maybe have a read here http://www.apache.org/licenses/ IANAL but AFAIK assigning copyright to other people is not valid in all countries. So be careful with that assumption. How it works in Apache is that committers have to sign a CLA http://www.apache.org/licenses/icla.txt So the committers still hold the copyright but grant the ASF basically the right to do with the code whatever they want. I think that's pretty much what you are after. In case you are after a clarification ...we have a legal-discuss mailing list at Apache that could probably could give you a more correct(?) answer. > As you other guys are all committers on one or more Apache project, > I assume that this is a very welcome improvement, but please speak > up if you have any concern about this change. Sounds great to me! :) cheers -- Torsten |
From: Simon K. <ski...@ap...> - 2006-01-26 00:37:28
|
On Thu, 2006-01-26 at 13:28 +1300, Simon Kitching wrote: > And by the way, it's good to see work still being done on clirr. I'd > love to get involved again. Wouldn't it be nice if there were 28 hours > in a day?? Oh, and by the way I found another use for clirr recently. It has been used to compare the Sun Reference Implementation (RI) of JavaServer Faces against the Apache MyFaces implementation, in order to check whether the public APIs provided by the two implementations were identical. It did pick up a couple of minor differences that can now be fixed. Very useful. I also used it just a few days ago to check whether the commons-logging 1.1 Release Candidate was API-compatible with commons-logging 1.0.4. Cheers, Simon |
From: Simon K. <ski...@ap...> - 2006-01-26 00:28:18
|
On Wed, 2006-01-25 at 22:31 +0100, Lars Kühne wrote: > Hi, > > I'd like to change Clirr's license from LGPL to Apache License Version 2. > > I would still hold the copyright, just like today, and for the same > reason: I don't want to hunt down every contributor if there should ever > be a third version of the ASL. > > As you other guys are all committers on one or more Apache project, I > assume that this is a very welcome improvement, but please speak up if > you have any concern about this change. This is fine by me. I've got no philosophical objection to GPL or LGPL licenses; I think which license is right depends on the purpose of the project. In this case, using the Apache license will make it easier to integrate with ant/maven/etc so I'm all for this change. Thanks for asking. And by the way, it's good to see work still being done on clirr. I'd love to get involved again. Wouldn't it be nice if there were 28 hours in a day?? Cheers, Simon |
From: <lak...@t-...> - 2006-01-25 21:28:05
|
Hi, I'd like to change Clirr's license from LGPL to Apache License Version 2. I would still hold the copyright, just like today, and for the same reason: I don't want to hunt down every contributor if there should ever be a third version of the ASL. As you other guys are all committers on one or more Apache project, I assume that this is a very welcome improvement, but please speak up if you have any concern about this change. Cheers, Lars |
From: <lk...@us...> - 2006-01-10 21:54:33
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15576/src/java/net/sf/clirr/core/internal/checks Modified Files: MethodSetCheck.java Log Message: removed commented code Index: MethodSetCheck.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/checks/MethodSetCheck.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- MethodSetCheck.java 26 Aug 2005 05:35:52 -0000 1.9 +++ MethodSetCheck.java 10 Jan 2006 21:54:25 -0000 1.10 @@ -575,7 +575,6 @@ return; } - //System.out.println("baselineMethod = " + getMethodId(compatBaseline, baselineMethod)); for (int i = 0; i < bArgs.length; i++) { JavaType bArg = bArgs[i]; |
From: <lk...@us...> - 2006-01-10 21:53:49
|
Update of /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/bcel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15448/src/java/net/sf/clirr/core/internal/bcel Modified Files: BcelMethod.java Log Message: added toString() Index: BcelMethod.java =================================================================== RCS file: /cvsroot/clirr/clirr/core/src/java/net/sf/clirr/core/internal/bcel/BcelMethod.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- BcelMethod.java 26 Aug 2005 05:34:09 -0000 1.1 +++ BcelMethod.java 10 Jan 2006 21:53:38 -0000 1.2 @@ -1,13 +1,15 @@ package net.sf.clirr.core.internal.bcel; +import java.util.Arrays; + +import net.sf.clirr.core.spi.JavaType; +import net.sf.clirr.core.spi.Scope; + import org.apache.bcel.classfile.Attribute; import org.apache.bcel.classfile.JavaClass; import org.apache.bcel.classfile.Method; import org.apache.bcel.generic.Type; -import net.sf.clirr.core.spi.JavaType; -import net.sf.clirr.core.spi.Scope; - final class BcelMethod implements net.sf.clirr.core.spi.Method { @@ -83,4 +85,12 @@ } return retval; } + + public String toString() { + return owningClass.getClassName() + + "#" + getName() + + Arrays.asList(getArgumentTypes()); + } + + } |