Update of /cvsroot/jython/jython/org/python/core In directory usw-pr-cvs1:/tmp/cvs-serv4687 Modified Files: ArgParser.java AutoInternalTables.java BytecodeLoader.java BytecodeLoader1.java BytecodeLoader2.java CachedJarsPackageManager.java ClassDictInit.java CollectionProxy.java InternalTables.java InternalTables1.java InternalTables2.java Java2Accessibility.java JavaAccessibility.java MakeProxies.java Options.java PackageManager.java PathPackageManager.java Py.java PyArray.java PyBeanEventProperty.java PyBeanProperty.java PyBuiltinFunctionSet.java PyClass.java PyCode.java PyComplex.java PyDictionary.java PyException.java PyFile.java PyFloat.java PyFrame.java PyFunction.java PyInstance.java PyInteger.java PyJavaClass.java PyJavaInstance.java PyJavaPackage.java PyList.java PyLong.java PyMethod.java PyModule.java PyObject.java PyProxy.java PyReflectedConstructor.java PyReflectedField.java PyReflectedFunction.java PySequence.java PyString.java PyStringMap.java PySyntaxError.java PySystemState.java PyTableCode.java PyTuple.java PyXRange.java ReflectedArgs.java ReflectedCallData.java SoftIInternalTables.java StdoutWrapper.java SysPackageManager.java SyspathJavaLoader.java ThreadState.java ThreadStateMapping.java ThreadStateMapping2.java WeakInternalTables.java __builtin__.java codecs.java imp.java parser.java Log Message: Consistent formatting. Removed traling spaces and tabs. Index: ArgParser.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/ArgParser.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** ArgParser.java 2000/10/28 11:53:10 1.1 --- ArgParser.java 2001/02/01 16:41:10 1.2 *************** *** 3,11 **** /** * A utilityclass for handling mixed positional and keyword arguments. ! * * A typical usage: * <pre> * public MatchObject search(PyObject[] args, String[] kws) { ! * ArgParser ap = new ArgParser("search", args, kws, * "pattern", "pos", "endpos"); * String string = ap.getString(0); --- 3,11 ---- /** * A utilityclass for handling mixed positional and keyword arguments. ! * * A typical usage: * <pre> * public MatchObject search(PyObject[] args, String[] kws) { ! * ArgParser ap = new ArgParser("search", args, kws, * "pattern", "pos", "endpos"); * String string = ap.getString(0); *************** *** 46,50 **** } ! public ArgParser(String funcname, PyObject[] args, String[] kws, String p0, String p1) { this(funcname, args, kws); --- 46,50 ---- } ! public ArgParser(String funcname, PyObject[] args, String[] kws, String p0, String p1) { this(funcname, args, kws); *************** *** 60,64 **** } ! public ArgParser(String funcname, PyObject[] args, String[] kws, String[] paramnames) { this(funcname, args, kws); --- 60,64 ---- } ! public ArgParser(String funcname, PyObject[] args, String[] kws, String[] paramnames) { this(funcname, args, kws); *************** *** 117,121 **** PyObject ret = getOptionalArg(pos); if (ret == null) ! throw Py.TypeError(funcname + ": The " + ordinal(pos) + " argument is required"); return ret; --- 117,121 ---- PyObject ret = getOptionalArg(pos); if (ret == null) ! throw Py.TypeError(funcname + ": The " + ordinal(pos) + " argument is required"); return ret; *************** *** 149,153 **** Object ret = value.__tojava__(clss); ! if (ret == Py.NoConversion) throw Py.TypeError("argument " + (pos+1) + ": expected " + classname + ", " + Py.safeRepr(value) + --- 149,153 ---- Object ret = value.__tojava__(clss); ! if (ret == Py.NoConversion) throw Py.TypeError("argument " + (pos+1) + ": expected " + classname + ", " + Py.safeRepr(value) + Index: AutoInternalTables.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/AutoInternalTables.java,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** AutoInternalTables.java 2001/02/01 13:48:26 2.3 --- AutoInternalTables.java 2001/02/01 16:41:10 2.4 *************** *** 1,4 **** // Copyright 2000 Samuele Pedroni ! package org.python.core; --- 1,4 ---- // Copyright 2000 Samuele Pedroni ! package org.python.core; *************** *** 7,17 **** public abstract class AutoInternalTables extends InternalTables2 { ! protected ReferenceQueue queue = new ReferenceQueue(); protected abstract Reference newAutoRef(short type,Object key, Object obj); ! protected abstract short getAutoRefType(Reference ref); protected abstract Object getAutoRefKey(Reference ref); ! private synchronized void cleanup() { if (keepstable >= GSTABLE) --- 7,17 ---- public abstract class AutoInternalTables extends InternalTables2 { ! protected ReferenceQueue queue = new ReferenceQueue(); protected abstract Reference newAutoRef(short type,Object key, Object obj); ! protected abstract short getAutoRefType(Reference ref); protected abstract Object getAutoRefKey(Reference ref); ! private synchronized void cleanup() { if (keepstable >= GSTABLE) *************** *** 25,29 **** Class cl = (Class)key; classes.remove(cl); ! classesDec(cl.getName()); break; case LAZY_JCLASS: --- 25,29 ---- Class cl = (Class)key; classes.remove(cl); ! classesDec(cl.getName()); break; case LAZY_JCLASS: *************** *** 31,45 **** break; case ADAPTER_CLASS: ! adapterClasses.remove(key); } } } ! ! protected boolean queryCanonical(String name) { cleanup(); return super.queryCanonical(name); } ! protected PyJavaClass getCanonical(Class c) { cleanup(); --- 31,45 ---- break; case ADAPTER_CLASS: ! adapterClasses.remove(key); } } } ! ! protected boolean queryCanonical(String name) { cleanup(); return super.queryCanonical(name); } ! protected PyJavaClass getCanonical(Class c) { cleanup(); *************** *** 48,52 **** return (PyJavaClass)ref.get(); } ! protected PyJavaClass getLazyCanonical(String name) { cleanup(); --- 48,52 ---- return (PyJavaClass)ref.get(); } ! protected PyJavaClass getLazyCanonical(String name) { cleanup(); *************** *** 55,64 **** return (PyJavaClass)ref.get(); } ! protected void putCanonical(Class c,PyJavaClass canonical) { cleanup(); classesPut(c,newAutoRef(JCLASS,c,canonical)); } ! protected void putLazyCanonical(String name,PyJavaClass canonical) { cleanup(); --- 55,64 ---- return (PyJavaClass)ref.get(); } ! protected void putCanonical(Class c,PyJavaClass canonical) { cleanup(); classesPut(c,newAutoRef(JCLASS,c,canonical)); } ! protected void putLazyCanonical(String name,PyJavaClass canonical) { cleanup(); *************** *** 72,76 **** return (Class)ref.get(); } ! protected void putAdapterClass(Class c,Class ac) { cleanup(); --- 72,76 ---- return (Class)ref.get(); } ! protected void putAdapterClass(Class c,Class ac) { cleanup(); *************** *** 82,94 **** return super.getAdapter(o,evc); } ! protected void putAdapter(Object o,String evc,Object ad) { cleanup(); super.putAdapter(o,evc,ad); } ! ! public boolean _doesSomeAutoUnload() { return true; } ! public void _forceCleanup() { cleanup(); } --- 82,94 ---- return super.getAdapter(o,evc); } ! protected void putAdapter(Object o,String evc,Object ad) { cleanup(); super.putAdapter(o,evc,ad); } ! ! public boolean _doesSomeAutoUnload() { return true; } ! public void _forceCleanup() { cleanup(); } *************** *** 97,106 **** super._beginCanonical(); } ! public void _beginLazyCanonical() { cleanup(); super._beginLazyCanonical(); } ! public void _beginOverAdapterClasses() { cleanup(); --- 97,106 ---- super._beginCanonical(); } ! public void _beginLazyCanonical() { cleanup(); super._beginLazyCanonical(); } ! public void _beginOverAdapterClasses() { cleanup(); *************** *** 108,112 **** } ! public void _beginOverAdapters() { cleanup(); --- 108,112 ---- } ! public void _beginOverAdapters() { cleanup(); *************** *** 117,122 **** if (iterType == ADAPTER) { Object ret = super._next(); ! if (ret != null) return ret; ! } else { while(iter.hasNext()) { cur = iter.next(); --- 117,122 ---- if (iterType == ADAPTER) { Object ret = super._next(); ! if (ret != null) return ret; ! } else { while(iter.hasNext()) { cur = iter.next(); *************** *** 139,152 **** cur = null; iter = null; ! endStable(); } cleanup(); return null; } ! public void _flush(PyJavaClass jc) { cleanup(); super._flush(jc); } ! } --- 139,152 ---- cur = null; iter = null; ! endStable(); } cleanup(); return null; } ! public void _flush(PyJavaClass jc) { cleanup(); super._flush(jc); } ! } Index: BytecodeLoader.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/BytecodeLoader.java,v retrieving revision 2.10 retrieving revision 2.11 diff -C2 -r2.10 -r2.11 *** BytecodeLoader.java 2000/12/17 19:46:26 2.10 --- BytecodeLoader.java 2001/02/01 16:41:10 2.11 *************** *** 16,20 **** ! static Class findParentClass(Vector parents, String name) throws ClassNotFoundException { --- 16,20 ---- ! static Class findParentClass(Vector parents, String name) throws ClassNotFoundException { *************** *** 24,28 **** } catch(ClassNotFoundException e) { } } ! // couldn't find the .class file on sys.path throw new ClassNotFoundException(name); } --- 24,28 ---- } catch(ClassNotFoundException e) { } } ! // couldn't find the .class file on sys.path throw new ClassNotFoundException(name); } Index: BytecodeLoader1.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/BytecodeLoader1.java,v retrieving revision 2.1 retrieving revision 2.2 diff -C2 -r2.1 -r2.2 *** BytecodeLoader1.java 2000/12/17 19:46:26 2.1 --- BytecodeLoader1.java 2001/02/01 16:41:10 2.2 *************** *** 7,11 **** public class BytecodeLoader1 extends ClassLoader implements Loader { private Vector parents; ! public BytecodeLoader1() { parents = BytecodeLoader.init(); --- 7,11 ---- public class BytecodeLoader1 extends ClassLoader implements Loader { private Vector parents; ! public BytecodeLoader1() { parents = BytecodeLoader.init(); *************** *** 16,24 **** parents.addElement(referent); } ! // override from abstract base class protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException ! { Class c = findLoadedClass(name); if (c != null) --- 16,24 ---- parents.addElement(referent); } ! // override from abstract base class protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException ! { Class c = findLoadedClass(name); if (c != null) Index: BytecodeLoader2.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/BytecodeLoader2.java,v retrieving revision 2.1 retrieving revision 2.2 diff -C2 -r2.1 -r2.2 *** BytecodeLoader2.java 2000/12/17 19:46:26 2.1 --- BytecodeLoader2.java 2001/02/01 16:41:10 2.2 *************** *** 8,12 **** public class BytecodeLoader2 extends SecureClassLoader implements Loader { private Vector parents; ! public BytecodeLoader2() { parents = BytecodeLoader.init(); --- 8,12 ---- public class BytecodeLoader2 extends SecureClassLoader implements Loader { private Vector parents; ! public BytecodeLoader2() { parents = BytecodeLoader.init(); *************** *** 17,25 **** parents.addElement(referent); } ! // override from abstract base class protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException ! { Class c = findLoadedClass(name); if (c != null) --- 17,25 ---- parents.addElement(referent); } ! // override from abstract base class protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException ! { Class c = findLoadedClass(name); if (c != null) Index: CachedJarsPackageManager.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/CachedJarsPackageManager.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** CachedJarsPackageManager.java 2001/01/15 04:43:30 1.4 --- CachedJarsPackageManager.java 2001/02/01 16:41:10 1.5 *************** *** 175,186 **** addJarToPackages(null,jarfile,cache); } ! private void addJarToPackages(URL jarurl,File jarfile,boolean cache) { ! try { boolean caching = jarfiles!=null; URLConnection jarconn = null; boolean localfile = true; ! if (jarfile == null) { jarconn = jarurl.openConnection(); --- 175,186 ---- addJarToPackages(null,jarfile,cache); } ! private void addJarToPackages(URL jarurl,File jarfile,boolean cache) { ! try { boolean caching = jarfiles!=null; URLConnection jarconn = null; boolean localfile = true; ! if (jarfile == null) { jarconn = jarurl.openConnection(); *************** *** 190,199 **** if(jarconn.getURL().getProtocol().equals("file")) { // ??pending: need to use java2 URLDecoder.decode? ! // but under 1.1 this is absent and should be simulated. ! jarfile = new File(jarurl.getFile().replace('/',File.separatorChar)); } else localfile = false; } ! if (localfile && !jarfile.exists()) return; --- 190,199 ---- if(jarconn.getURL().getProtocol().equals("file")) { // ??pending: need to use java2 URLDecoder.decode? ! // but under 1.1 this is absent and should be simulated. ! jarfile = new File(jarurl.getFile().replace('/',File.separatorChar)); } else localfile = false; } ! if (localfile && !jarfile.exists()) return; *************** *** 260,264 **** if (jarconn == null) jarin = new BufferedInputStream(new FileInputStream(jarfile)); else jarin = jarconn.getInputStream(); ! zipPackages = getZipPackages(jarin); --- 260,264 ---- if (jarconn == null) jarin = new BufferedInputStream(new FileInputStream(jarfile)); else jarin = jarconn.getInputStream(); ! zipPackages = getZipPackages(jarin); *************** *** 401,405 **** // hooks for changing cache storage ! /** To pass a cachefile id by ref. And for internal use. * @see #outCreateCacheFile --- 401,405 ---- // hooks for changing cache storage ! /** To pass a cachefile id by ref. And for internal use. * @see #outCreateCacheFile Index: ClassDictInit.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/ClassDictInit.java,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** ClassDictInit.java 2000/10/17 19:14:19 2.2 --- ClassDictInit.java 2001/02/01 16:41:10 2.3 *************** *** 4,8 **** /** ! * An empty tagging interface. If a java class implements this * interface, it must also have a method like: * <pre> --- 4,8 ---- /** ! * An empty tagging interface. If a java class implements this * interface, it must also have a method like: * <pre> Index: CollectionProxy.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/CollectionProxy.java,v retrieving revision 2.1 retrieving revision 2.2 diff -C2 -r2.1 -r2.2 *** CollectionProxy.java 1999/05/17 19:59:37 2.1 --- CollectionProxy.java 2001/02/01 16:41:10 2.2 *************** *** 6,10 **** public class CollectionProxy { public static final CollectionProxy NoProxy = new EnumerationProxy(null); ! private static boolean checkedJava2 = false; private static CollectionProxy java2Proxy = null; --- 6,10 ---- public class CollectionProxy { public static final CollectionProxy NoProxy = new EnumerationProxy(null); ! private static boolean checkedJava2 = false; private static CollectionProxy java2Proxy = null; *************** *** 12,19 **** return null; } ! public static CollectionProxy findCollection(Object object) { if (object == null) return NoProxy; ! if (!checkedJava2) { checkedJava2 = true; --- 12,19 ---- return null; } ! public static CollectionProxy findCollection(Object object) { if (object == null) return NoProxy; ! if (!checkedJava2) { checkedJava2 = true; *************** *** 109,122 **** class VectorProxy extends CollectionProxy { Vector proxy; ! public VectorProxy(Vector proxy) { this.proxy = proxy; ! } ! public int __len__() { return proxy.size(); ! } ! ! public PyObject __finditem__(int key) { try { --- 109,122 ---- class VectorProxy extends CollectionProxy { Vector proxy; ! public VectorProxy(Vector proxy) { this.proxy = proxy; ! } ! public int __len__() { return proxy.size(); ! } ! ! public PyObject __finditem__(int key) { try { *************** *** 126,130 **** } } ! public PyObject __finditem__(PyObject key) { if (key instanceof PyInteger) { --- 126,130 ---- } } ! public PyObject __finditem__(PyObject key) { if (key instanceof PyInteger) { *************** *** 134,138 **** } } ! public void __setitem__(PyObject key, PyObject value) { if (key instanceof PyInteger) { --- 134,138 ---- } } ! public void __setitem__(PyObject key, PyObject value) { if (key instanceof PyInteger) { *************** *** 154,175 **** class DictionaryProxy extends CollectionProxy { Dictionary proxy; ! public DictionaryProxy(Dictionary proxy) { this.proxy = proxy; ! } ! public int __len__() { return proxy.size(); } ! public PyObject __finditem__(PyObject key) { return Py.java2py(proxy.get(Py.tojava(key, Object.class))); } ! public void __setitem__(PyObject key, PyObject value) { proxy.put(Py.tojava(key, Object.class), Py.tojava(value, Object.class)); } ! public void __delitem__(PyObject key) { proxy.remove(Py.tojava(key, Object.class)); --- 154,175 ---- class DictionaryProxy extends CollectionProxy { Dictionary proxy; ! public DictionaryProxy(Dictionary proxy) { this.proxy = proxy; ! } ! public int __len__() { return proxy.size(); } ! public PyObject __finditem__(PyObject key) { return Py.java2py(proxy.get(Py.tojava(key, Object.class))); } ! public void __setitem__(PyObject key, PyObject value) { proxy.put(Py.tojava(key, Object.class), Py.tojava(value, Object.class)); } ! public void __delitem__(PyObject key) { proxy.remove(Py.tojava(key, Object.class)); Index: InternalTables.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/InternalTables.java,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** InternalTables.java 2001/02/01 13:48:26 2.5 --- InternalTables.java 2001/02/01 16:41:10 2.6 *************** *** 1,8 **** // Copyright 2000 Samuele Pedroni ! package org.python.core; public abstract class InternalTables { ! // x__ --> org.python.core.X__InternalTables // (x|X)__> --> org.python.core.X__InternalTables --- 1,8 ---- // Copyright 2000 Samuele Pedroni ! package org.python.core; public abstract class InternalTables { ! // x__ --> org.python.core.X__InternalTables // (x|X)__> --> org.python.core.X__InternalTables *************** *** 34,38 **** // System.err.println("*InternalTables*-create-try: "+id); // ??dbg return (InternalTables)Class.forName(id).newInstance(); ! } catch(Throwable e) { // System.err.println(" exc: "+e); // ??dbg --- 34,38 ---- // System.err.println("*InternalTables*-create-try: "+id); // ??dbg return (InternalTables)Class.forName(id).newInstance(); ! } catch(Throwable e) { // System.err.println(" exc: "+e); // ??dbg *************** *** 40,44 **** } } ! static InternalTables createInternalTables() { String cands = PySystemState.registry.getProperty("python.options.internalTablesImpl"); --- 40,44 ---- } } ! static InternalTables createInternalTables() { String cands = PySystemState.registry.getProperty("python.options.internalTablesImpl"); *************** *** 54,62 **** return null; // never reached } ! protected abstract boolean queryCanonical(String name); protected abstract PyJavaClass getCanonical(Class c); protected abstract PyJavaClass getLazyCanonical(String name); ! protected abstract void putCanonical(Class c,PyJavaClass canonical); protected abstract void putLazyCanonical(String name,PyJavaClass canonical); --- 54,62 ---- return null; // never reached } ! protected abstract boolean queryCanonical(String name); protected abstract PyJavaClass getCanonical(Class c); protected abstract PyJavaClass getLazyCanonical(String name); ! protected abstract void putCanonical(Class c,PyJavaClass canonical); protected abstract void putLazyCanonical(String name,PyJavaClass canonical); *************** *** 67,91 **** protected abstract Object getAdapter(Object o,String evc); protected abstract void putAdapter(Object o,String evc,Object ad); ! public boolean _doesSomeAutoUnload() { return false; } ! public void _forceCleanup() {} public abstract void _beginCanonical(); public abstract void _beginLazyCanonical(); ! public abstract void _beginOverAdapterClasses(); public abstract void _beginOverAdapters(); ! public abstract Object _next(); public abstract void _flushCurrent(); ! public abstract void _flush(PyJavaClass jc); - static public class _LazyRep { public String name; public PackageManager mgr; ! _LazyRep(String name, PackageManager mgr) { this.name = name; --- 67,91 ---- protected abstract Object getAdapter(Object o,String evc); protected abstract void putAdapter(Object o,String evc,Object ad); ! public boolean _doesSomeAutoUnload() { return false; } ! public void _forceCleanup() {} public abstract void _beginCanonical(); public abstract void _beginLazyCanonical(); ! public abstract void _beginOverAdapterClasses(); public abstract void _beginOverAdapters(); ! public abstract Object _next(); public abstract void _flushCurrent(); ! public abstract void _flush(PyJavaClass jc); + static public class _LazyRep { public String name; public PackageManager mgr; ! _LazyRep(String name, PackageManager mgr) { this.name = name; *************** *** 93,96 **** } } ! } --- 93,96 ---- } } ! } Index: InternalTables1.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/InternalTables1.java,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** InternalTables1.java 2001/02/01 13:48:26 2.3 --- InternalTables1.java 2001/02/01 16:41:10 2.4 *************** *** 1,4 **** // Copyright 2000 Samuele Pedroni ! package org.python.core; --- 1,4 ---- // Copyright 2000 Samuele Pedroni ! package org.python.core; *************** *** 17,36 **** private static class TableProvid1 extends Hashtable implements Table { } ! final protected static short JCLASS=0; final protected static short LAZY_JCLASS=1; final protected static short ADAPTER_CLASS=2; final protected static short ADAPTER = 3; ! protected Table classes; protected Table temp; protected Table counters; protected Table lazyClasses; ! protected Table adapterClasses; ! protected final short GSTABLE=1; protected final short JCSTABLE=2; ! protected short keepstable; --- 17,36 ---- private static class TableProvid1 extends Hashtable implements Table { } ! final protected static short JCLASS=0; final protected static short LAZY_JCLASS=1; final protected static short ADAPTER_CLASS=2; final protected static short ADAPTER = 3; ! protected Table classes; protected Table temp; protected Table counters; protected Table lazyClasses; ! protected Table adapterClasses; ! protected final short GSTABLE=1; protected final short JCSTABLE=2; ! protected short keepstable; *************** *** 38,42 **** keepstable = lvl; } ! protected void classesPut(Class c,Object jc) { if (keepstable == JCSTABLE) { --- 38,42 ---- keepstable = lvl; } ! protected void classesPut(Class c,Object jc) { if (keepstable == JCSTABLE) { *************** *** 55,59 **** } } ! protected Object classesGet(Class c) { Object o = classes.get(c); --- 55,59 ---- } } ! protected Object classesGet(Class c) { Object o = classes.get(c); *************** *** 67,71 **** keepstable = 0; } ! protected void classesDec(String name) { int c = ((Integer)counters.get(name)).intValue(); --- 67,71 ---- keepstable = 0; } ! protected void classesDec(String name) { int c = ((Integer)counters.get(name)).intValue(); *************** *** 75,79 **** counters.put(name,new Integer(c-1)); } ! protected void commitTemp() { for(Enumeration e=((Hashtable)temp).keys();e.hasMoreElements();) { --- 75,79 ---- counters.put(name,new Integer(c-1)); } ! protected void commitTemp() { for(Enumeration e=((Hashtable)temp).keys();e.hasMoreElements();) { *************** *** 83,111 **** temp.clear(); } ! protected boolean queryCanonical(String name) { return counters.get(name) != null || lazyClasses.get(name) != null; } ! protected PyJavaClass getCanonical(Class c) { return (PyJavaClass)classesGet(c); } ! protected PyJavaClass getLazyCanonical(String name) { return (PyJavaClass)lazyClasses.get(name); } ! protected void putCanonical(Class c,PyJavaClass canonical) { classesPut(c,canonical); } ! protected void putLazyCanonical(String name,PyJavaClass canonical) { lazyClasses.put(name,canonical); } ! protected Class getAdapterClass(Class c) { return (Class)adapterClasses.get(c); } ! protected void putAdapterClass(Class c,Class ac) { adapterClasses.put(c,ac); --- 83,111 ---- temp.clear(); } ! protected boolean queryCanonical(String name) { return counters.get(name) != null || lazyClasses.get(name) != null; } ! protected PyJavaClass getCanonical(Class c) { return (PyJavaClass)classesGet(c); } ! protected PyJavaClass getLazyCanonical(String name) { return (PyJavaClass)lazyClasses.get(name); } ! protected void putCanonical(Class c,PyJavaClass canonical) { classesPut(c,canonical); } ! protected void putLazyCanonical(String name,PyJavaClass canonical) { lazyClasses.put(name,canonical); } ! protected Class getAdapterClass(Class c) { return (Class)adapterClasses.get(c); } ! protected void putAdapterClass(Class c,Class ac) { adapterClasses.put(c,ac); *************** *** 113,121 **** private Hashtable adapters; ! protected Object getAdapter(Object o,String evc) { ! return adapters.get(evc+'$'+System.identityHashCode(o)); } ! protected void putAdapter(Object o,String evc,Object ad) { adapters.put(evc+'$'+System.identityHashCode(o),ad); --- 113,121 ---- private Hashtable adapters; ! protected Object getAdapter(Object o,String evc) { ! return adapters.get(evc+'$'+System.identityHashCode(o)); } ! protected void putAdapter(Object o,String evc,Object ad) { adapters.put(evc+'$'+System.identityHashCode(o),ad); *************** *** 127,131 **** private Enumeration enum; private Hashtable enumTable; ! public void _beginCanonical() { beginStable(JCSTABLE); --- 127,131 ---- private Enumeration enum; private Hashtable enumTable; ! public void _beginCanonical() { beginStable(JCSTABLE); *************** *** 134,138 **** iterType = JCLASS; } ! public void _beginLazyCanonical() { enum = ((TableProvid1)lazyClasses).keys(); --- 134,138 ---- iterType = JCLASS; } ! public void _beginLazyCanonical() { enum = ((TableProvid1)lazyClasses).keys(); *************** *** 140,153 **** iterType = LAZY_JCLASS; } ! public void _beginOverAdapterClasses() { enum = ((TableProvid1)adapterClasses).keys(); enumTable = (TableProvid1)adapterClasses; iterType = ADAPTER_CLASS; ! } ! public void _beginOverAdapters() { ! enum = adapters.keys(); enumTable = adapters; iterType = ADAPTER; --- 140,153 ---- iterType = LAZY_JCLASS; } ! public void _beginOverAdapterClasses() { enum = ((TableProvid1)adapterClasses).keys(); enumTable = (TableProvid1)adapterClasses; iterType = ADAPTER_CLASS; ! } ! public void _beginOverAdapters() { ! enum = adapters.keys(); enumTable = adapters; iterType = ADAPTER; *************** *** 155,159 **** public Object _next() { ! if(enum.hasMoreElements()) { cur = enum.nextElement(); switch(iterType) { --- 155,159 ---- public Object _next() { ! if(enum.hasMoreElements()) { cur = enum.nextElement(); switch(iterType) { *************** *** 174,183 **** return null; } ! public void _flushCurrent() { enumTable.remove(cur); if (iterType == JCLASS) classesDec(((Class)cur).getName()); } ! public void _flush(PyJavaClass jc) { Class c = jc.proxyClass; --- 174,183 ---- return null; } ! public void _flushCurrent() { enumTable.remove(cur); if (iterType == JCLASS) classesDec(((Class)cur).getName()); } ! public void _flush(PyJavaClass jc) { Class c = jc.proxyClass; *************** *** 189,196 **** } } ! protected InternalTables1(boolean fake) { } ! public InternalTables1() { classes = new TableProvid1(); --- 189,196 ---- } } ! protected InternalTables1(boolean fake) { } ! public InternalTables1() { classes = new TableProvid1(); *************** *** 198,204 **** counters = new TableProvid1(); lazyClasses = new TableProvid1(); ! adapterClasses = new TableProvid1(); ! adapters = new Hashtable(); } --- 198,204 ---- counters = new TableProvid1(); lazyClasses = new TableProvid1(); ! adapterClasses = new TableProvid1(); ! adapters = new Hashtable(); } Index: InternalTables2.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/InternalTables2.java,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** InternalTables2.java 2001/01/23 02:07:22 2.3 --- InternalTables2.java 2001/02/01 16:41:10 2.4 *************** *** 1,4 **** // Copyright 2000 Samuele Pedroni ! package org.python.core; --- 1,4 ---- // Copyright 2000 Samuele Pedroni ! package org.python.core; *************** *** 7,11 **** public class InternalTables2 extends InternalTables1 { ! protected static class TableProvid2 extends HashMap implements Table { } --- 7,11 ---- public class InternalTables2 extends InternalTables1 { ! protected static class TableProvid2 extends HashMap implements Table { } *************** *** 14,21 **** ((TableProvid2)classes).putAll((TableProvid2)temp); temp.clear(); ! } protected WeakHashMap adapters; ! protected Object getAdapter(Object o,String evc) { HashMap ads = (HashMap)adapters.get(o); --- 14,21 ---- ((TableProvid2)classes).putAll((TableProvid2)temp); temp.clear(); ! } protected WeakHashMap adapters; ! protected Object getAdapter(Object o,String evc) { HashMap ads = (HashMap)adapters.get(o); *************** *** 25,29 **** return adw.get(); } ! protected void putAdapter(Object o,String evc,Object ad) { HashMap ads = (HashMap)adapters.get(o); --- 25,29 ---- return adw.get(); } ! protected void putAdapter(Object o,String evc,Object ad) { HashMap ads = (HashMap)adapters.get(o); *************** *** 35,41 **** } ! protected Iterator iter; protected Iterator grand; ! public void _beginCanonical() { beginStable(JCSTABLE); --- 35,41 ---- } ! protected Iterator iter; protected Iterator grand; ! public void _beginCanonical() { beginStable(JCSTABLE); *************** *** 43,47 **** iterType = JCLASS; } ! public void _beginLazyCanonical() { beginStable(GSTABLE); --- 43,47 ---- iterType = JCLASS; } ! public void _beginLazyCanonical() { beginStable(GSTABLE); *************** *** 49,60 **** iterType = LAZY_JCLASS; } ! public void _beginOverAdapterClasses() { beginStable(GSTABLE); iter = ((TableProvid2)adapterClasses).entrySet().iterator(); iterType = ADAPTER_CLASS; ! } ! public void _beginOverAdapters() { beginStable((short)0); --- 49,60 ---- iterType = LAZY_JCLASS; } ! public void _beginOverAdapterClasses() { beginStable(GSTABLE); iter = ((TableProvid2)adapterClasses).entrySet().iterator(); iterType = ADAPTER_CLASS; ! } ! public void _beginOverAdapters() { beginStable((short)0); *************** *** 101,105 **** return null; } ! public void _flushCurrent() { iter.remove(); --- 101,105 ---- return null; } ! public void _flushCurrent() { iter.remove(); *************** *** 112,126 **** } } ! public InternalTables2() { super(true); ! classes = new TableProvid2(); temp = new TableProvid2(); counters = new TableProvid2(); lazyClasses = new TableProvid2(); ! adapterClasses = new TableProvid2(); ! adapters = new WeakHashMap(); } --- 112,126 ---- } } ! public InternalTables2() { super(true); ! classes = new TableProvid2(); temp = new TableProvid2(); counters = new TableProvid2(); lazyClasses = new TableProvid2(); ! adapterClasses = new TableProvid2(); ! adapters = new WeakHashMap(); } Index: Java2Accessibility.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/Java2Accessibility.java,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** Java2Accessibility.java 1999/09/16 21:56:58 2.2 --- Java2Accessibility.java 2001/02/01 16:41:10 2.3 *************** *** 12,20 **** { void setAccess(Field field, boolean flag) throws SecurityException { ! field.setAccessible(flag); } void setAccess(Method method, boolean flag) throws SecurityException { ! method.setAccessible(flag); } --- 12,20 ---- { void setAccess(Field field, boolean flag) throws SecurityException { ! field.setAccessible(flag); } void setAccess(Method method, boolean flag) throws SecurityException { ! method.setAccessible(flag); } *************** *** 22,26 **** throws SecurityException { ! constructor.setAccessible(flag); } } --- 22,26 ---- throws SecurityException { ! constructor.setAccessible(flag); } } Index: JavaAccessibility.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/JavaAccessibility.java,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** JavaAccessibility.java 1999/09/16 21:56:08 2.2 --- JavaAccessibility.java 2001/02/01 16:41:10 2.3 *************** *** 17,33 **** static void initialize() { ! // If we can find it, and the registry option ! // python.security.respectJavaAccessibility is set, then we set the ! // access object to an instance of the subclass Java2Accessibility if (Options.respectJavaAccessibility) return; ! try { Class c = Class.forName("org.python.core.Java2Accessibility"); Class.forName("java.lang.reflect.AccessibleObject"); access = (JavaAccessibility)c.newInstance(); } ! catch (InstantiationException e) {} ! catch (IllegalAccessException e) {} ! catch (ClassNotFoundException e) {} } --- 17,33 ---- static void initialize() { ! // If we can find it, and the registry option ! // python.security.respectJavaAccessibility is set, then we set the ! // access object to an instance of the subclass Java2Accessibility if (Options.respectJavaAccessibility) return; ! try { Class c = Class.forName("org.python.core.Java2Accessibility"); Class.forName("java.lang.reflect.AccessibleObject"); access = (JavaAccessibility)c.newInstance(); } ! catch (InstantiationException e) {} ! catch (IllegalAccessException e) {} ! catch (ClassNotFoundException e) {} } *************** *** 52,71 **** throws SecurityException { ! if (access != null) ! access.setAccess(field, flag); } ! public static void setAccessible(Method method, boolean flag) throws SecurityException { ! if (access != null) ! access.setAccess(method, flag); } ! public static void setAccessible(Constructor constructor, boolean flag) throws SecurityException { ! if (access != null) ! access.setAccess(constructor, flag); } } --- 52,71 ---- throws SecurityException { ! if (access != null) ! access.setAccess(field, flag); } ! public static void setAccessible(Method method, boolean flag) throws SecurityException { ! if (access != null) ! access.setAccess(method, flag); } ! public static void setAccessible(Constructor constructor, boolean flag) throws SecurityException { ! if (access != null) ! access.setAccess(constructor, flag); } } Index: MakeProxies.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/MakeProxies.java,v retrieving revision 2.13 retrieving revision 2.14 diff -C2 -r2.13 -r2.14 *** MakeProxies.java 2000/12/17 19:46:26 2.13 --- MakeProxies.java 2001/02/01 16:41:10 2.14 *************** *** 12,16 **** ! class MakeProxies { private static Class makeClass(Class referent, Vector secondary,String name, --- 12,16 ---- ! class MakeProxies { private static Class makeClass(Class referent, Vector secondary,String name, *************** *** 18,22 **** { Vector referents = null; ! if (secondary != null) { if (referent != null) { --- 18,22 ---- { Vector referents = null; ! if (secondary != null) { if (referent != null) { *************** *** 30,34 **** } } ! return BytecodeLoader.makeClass(name, referents, bytes.toByteArray()); } --- 30,34 ---- } } ! return BytecodeLoader.makeClass(name, referents, bytes.toByteArray()); } *************** *** 68,74 **** if (mn==null) pythonModuleName = "foo"; ! else pythonModuleName = (String)mn.__tojava__(String.class); ! JavaMaker jm = new JavaMaker(superclass, interfaces, name, pythonModuleName, proxyName, dict); --- 68,74 ---- if (mn==null) pythonModuleName = "foo"; ! else pythonModuleName = (String)mn.__tojava__(String.class); ! JavaMaker jm = new JavaMaker(superclass, interfaces, name, pythonModuleName, proxyName, dict); Index: Options.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/Options.java,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** Options.java 2000/12/15 03:19:00 2.4 --- Options.java 2001/02/01 16:41:10 2.5 *************** *** 11,15 **** public static boolean showJavaExceptions = false; ! // if this is not null, it must be a string indicating the directory to // save proxy adapter class files to public static String proxyCacheDirectory = null; --- 11,15 ---- public static boolean showJavaExceptions = false; ! // if this is not null, it must be a string indicating the directory to // save proxy adapter class files to public static String proxyCacheDirectory = null; *************** *** 42,46 **** public static boolean extendedClassLoader = true; */ ! // TBD public static boolean importSite = true; --- 42,46 ---- public static boolean extendedClassLoader = true; */ ! // TBD public static boolean importSite = true; *************** *** 48,55 **** // TBD public static int verbose = Py.MESSAGE; ! // TBD public static boolean deprecatedKeywordMangling = true; ! // TBD public static boolean parserVerboseExceptions = false; --- 48,55 ---- // TBD public static int verbose = Py.MESSAGE; ! // TBD public static boolean deprecatedKeywordMangling = true; ! // TBD public static boolean parserVerboseExceptions = false; *************** *** 69,73 **** return prop.equalsIgnoreCase("true") || prop.equalsIgnoreCase("yes"); } ! private static String getStringOption(String name, String defaultValue) { String prop = PySystemState.registry.getProperty("python."+name); --- 69,73 ---- return prop.equalsIgnoreCase("true") || prop.equalsIgnoreCase("yes"); } ! private static String getStringOption(String name, String defaultValue) { String prop = PySystemState.registry.getProperty("python."+name); *************** *** 83,94 **** Options.showJavaExceptions); ! Options.showPythonProxyExceptions = getBooleanOption("options.showPythonProxyExceptions", Options.showPythonProxyExceptions); ! Options.skipCompile = getBooleanOption("options.skipCompile", Options.skipCompile); ! Options.deprecatedKeywordMangling = getBooleanOption("deprecated.keywordMangling", Options.deprecatedKeywordMangling); --- 83,94 ---- Options.showJavaExceptions); ! Options.showPythonProxyExceptions = getBooleanOption("options.showPythonProxyExceptions", Options.showPythonProxyExceptions); ! Options.skipCompile = getBooleanOption("options.skipCompile", Options.skipCompile); ! Options.deprecatedKeywordMangling = getBooleanOption("deprecated.keywordMangling", Options.deprecatedKeywordMangling); Index: PackageManager.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PackageManager.java,v retrieving revision 2.5 retrieving revision 2.6 diff -C2 -r2.5 -r2.6 *** PackageManager.java 2000/12/16 13:37:14 2.5 --- PackageManager.java 2001/02/01 16:41:10 2.6 *************** *** 15,19 **** abstract public Class findClass(String pkg,String name,String reason); ! public Class findClass(String pkg,String name) { return findClass(pkg,name,"java class"); --- 15,19 ---- abstract public Class findClass(String pkg,String name,String reason); ! public Class findClass(String pkg,String name) { return findClass(pkg,name,"java class"); *************** *** 21,25 **** public void notifyPackageImport(String pkg,String name) {} ! /** Dynamically check if pkg.name exists as java pkg in the controlled hierarchy. * Should be overriden. --- 21,25 ---- public void notifyPackageImport(String pkg,String name) {} ! /** Dynamically check if pkg.name exists as java pkg in the controlled hierarchy. * Should be overriden. *************** *** 115,124 **** if (classes != null) p.addPlaceholders(classes); ! return p; } private static final int MAXSKIP = 512; ! /** Check that a given stream is a valid Java .class file. * And return its access permissions as an int. --- 115,124 ---- if (classes != null) p.addPlaceholders(classes); ! return p; } private static final int MAXSKIP = 512; ! /** Check that a given stream is a valid Java .class file. * And return its access permissions as an int. Index: PathPackageManager.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PathPackageManager.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** PathPackageManager.java 2000/11/25 21:11:43 1.2 --- PathPackageManager.java 2001/02/01 16:41:10 1.3 *************** *** 88,93 **** int acc = checkAccess(new BufferedInputStream(new FileInputStream(cand))); if ((acc == -1) || filterByAccess(jname, acc) ) continue; ! } catch(IOException e) { ! continue; } } --- 88,93 ---- int acc = checkAccess(new BufferedInputStream(new FileInputStream(cand))); if ((acc == -1) || filterByAccess(jname, acc) ) continue; ! } catch(IOException e) { ! continue; } } *************** *** 117,121 **** ! // ??pending: // Uses simply split and not a StringTokenizer+trim to adhere to sun jvm parsing of classpath. // E.g. "a;" is parsed by sun jvm as a, ""; the latter is interpreted as cwd. --- 117,121 ---- ! // ??pending: // Uses simply split and not a StringTokenizer+trim to adhere to sun jvm parsing of classpath. // E.g. "a;" is parsed by sun jvm as a, ""; the latter is interpreted as cwd. *************** *** 138,142 **** } } ! } public PyList doDir(PyJavaPackage jpkg,boolean instantiate,boolean exclpkgs) { --- 138,142 ---- } } ! } public PyList doDir(PyJavaPackage jpkg,boolean instantiate,boolean exclpkgs) { Index: Py.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/Py.java,v retrieving revision 2.32 retrieving revision 2.33 diff -C2 -r2.32 -r2.33 *** Py.java 2001/01/21 14:00:33 2.32 --- Py.java 2001/02/01 16:41:10 2.33 *************** *** 12,22 **** private final static Object PRESENT=new Object(); static java.util.Hashtable frozenModules; ! static boolean initialized; ! /* Holds the singleton None and Ellipsis objects */ /** The singleton None Python object **/ public static PyObject None; ! /** The singleton Ellipsis Python object - written as ... when indexing **/ public static PyObject Ellipsis; --- 12,22 ---- private final static Object PRESENT=new Object(); static java.util.Hashtable frozenModules; ! static boolean initialized; ! /* Holds the singleton None and Ellipsis objects */ /** The singleton None Python object **/ public static PyObject None; ! /** The singleton Ellipsis Python object - written as ... when indexing **/ public static PyObject Ellipsis; *************** *** 25,39 **** don't have any keyword arguments **/ public static String[] NoKeywords; ! /** A zero-length array of PyObject's to pass to functions that expect zero-arguments **/ public static PyObject[] EmptyObjects; ! /** A tuple with zero elements **/ public static PyTuple EmptyTuple; ! /** The Python integer 0 - also used as false **/ public static PyInteger Zero; ! /** The Python integer 1 - also used as true **/ public static PyInteger One; --- 25,39 ---- don't have any keyword arguments **/ public static String[] NoKeywords; ! /** A zero-length array of PyObject's to pass to functions that expect zero-arguments **/ public static PyObject[] EmptyObjects; ! /** A tuple with zero elements **/ public static PyTuple EmptyTuple; ! /** The Python integer 0 - also used as false **/ public static PyInteger Zero; ! /** The Python integer 1 - also used as true **/ public static PyInteger One; *************** *** 41,60 **** /** A zero-length Python string **/ public static PyString EmptyString; ! /** A Python string containing '\n' **/ public static PyString Newline; ! /** A Python string containing ' ' **/ public static PyString Space; ! /** A unique object to indicate no conversion is possible in __tojava__ methods **/ ! public static Object NoConversion; ! public static PyObject OSError; public static PyObject NotImplementedError; public static PyObject EnvironmentError; ! ! /* The standard Python exceptions */ public static PyObject OverflowError; --- 41,60 ---- /** A zero-length Python string **/ public static PyString EmptyString; ! /** A Python string containing '\n' **/ public static PyString Newline; ! /** A Python string containing ' ' **/ public static PyString Space; ! /** A unique object to indicate no conversion is possible in __tojava__ methods **/ ! public static Object NoConversion; ! public static PyObject OSError; public static PyObject NotImplementedError; public static PyObject EnvironmentError; ! ! /* The standard Python exceptions */ public static PyObject OverflowError; *************** *** 164,168 **** } else { if (value != Py.None) { ! try { Py.println(value); System.exit(1); --- 164,168 ---- } else { if (value != Py.None) { ! try { Py.println(value); System.exit(1); *************** *** 174,179 **** } } - public static PyObject ImportError; public static PyException ImportError(String message) { --- 174,179 ---- } } + public static PyObject ImportError; public static PyException ImportError(String message) { *************** *** 206,210 **** System.exit(-1); } ! public static PyException MemoryError(String message) { return new PyException(Py.MemoryError, message); --- 206,210 ---- System.exit(-1); } ! public static PyException MemoryError(String message) { return new PyException(Py.MemoryError, message); *************** *** 241,245 **** // Don't allow any constructors. Class only provides static methods. ! private Py() { ; } /** @deprecated **/ --- 241,245 ---- // Don't allow any constructors. Class only provides static methods. ! private Py() { ; } /** @deprecated **/ *************** *** 250,254 **** Identical to <code>o.__tojava__(c)</code> except that it will raise a <code>TypeError</code> if the conversion fails. ! @param o the <code>PyObject</code> to convert. @param c the class to convert it to. --- 250,254 ---- Identical to <code>o.__tojava__(c)</code> except that it will raise a <code>TypeError</code> if the conversion fails. ! @param o the <code>PyObject</code> to convert. @param c the class to convert it to. *************** *** 269,275 **** return tojava(o, c); // prev:Class.forName } ! /* Helper functions for PyProxy's */ ! /** @deprecated **/ public static PyObject jfindattr(PyProxy proxy, String name) { --- 269,275 ---- return tojava(o, c); // prev:Class.forName } ! /* Helper functions for PyProxy's */ ! /** @deprecated **/ public static PyObject jfindattr(PyProxy proxy, String name) { *************** *** 280,284 **** if (ret == null) return null; ! // Set the current system state to match proxy -- usually this is a waste of time :-( Py.setSystemState(proxy._getPySystemState()); --- 280,284 ---- if (ret == null) return null; ! // Set the current system state to match proxy -- usually this is a waste of time :-( Py.setSystemState(proxy._getPySystemState()); *************** *** 303,307 **** /* Convenience methods to create new constants without using "new" */ private static PyInteger[] integerCache = null; ! public static final PyInteger newInteger(int i) { if (integerCache == null) { --- 303,307 ---- /* Convenience methods to create new constants without using "new" */ private static PyInteger[] integerCache = null; ! public static final PyInteger newInteger(int i) { if (integerCache == null) { *************** *** 324,356 **** return newInteger((int)i); } ! public static PyLong newLong(String s) { return new PyLong(s); } ! public static PyComplex newImaginary(double v) { return new PyComplex(0, v); } ! public static PyFloat newFloat(float v) { return new PyFloat((double)v); ! } ! public static PyFloat newFloat(double v) { return new PyFloat(v); } ! public static PyString newString(char c) { return makeCharacter(c); ! } ! public static PyString newString(String s) { return new PyString(s); } ! public static PyInteger newBoolean(boolean t) { return t ? Py.One : Py.Zero; } ! public static PyCode newCode(int argcount, String varnames[], String filename, String name, --- 324,356 ---- return newInteger((int)i); } ! public static PyLong newLong(String s) { return new PyLong(s); } ! public static PyComplex newImaginary(double v) { return new PyComplex(0, v); } ! public static PyFloat newFloat(float v) { return new PyFloat((double)v); ! } ! public static PyFloat newFloat(double v) { return new PyFloat(v); } ! public static PyString newString(char c) { return makeCharacter(c); ! } ! public static PyString newString(String s) { return new PyString(s); } ! public static PyInteger newBoolean(boolean t) { return t ? Py.One : Py.Zero; } ! public static PyCode newCode(int argcount, String varnames[], ... [truncated message content] |