[armedbear-cvs] r14423 - trunk/abcl/src/org/armedbear/lisp
rschlatte at common-lisp.net
rschlatte at common-lisp.net
Tue Mar 5 21:07:12 UTC 2013
Author: rschlatte
Date: Tue Mar 5 13:07:11 2013
New Revision: 14423
Log:
Don't error when re-adding an identical package-local nickname
Modified:
trunk/abcl/src/org/armedbear/lisp/Package.java
Modified: trunk/abcl/src/org/armedbear/lisp/Package.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Package.java Tue Mar 5 12:45:10 2013 (r14422)
+++ trunk/abcl/src/org/armedbear/lisp/Package.java Tue Mar 5 13:07:11 2013 (r14423)
@@ -787,8 +787,13 @@
localNicknames = new ConcurrentHashMap<String, Package>();
}
if (localNicknames.containsKey(name)) {
- return error(new LispError(name + " is already a nickname for "
- + pack.getName()));
+ if (localNicknames.get(name) != pack) {
+ return error(new LispError(name + " is already a nickname for "
+ + pack.getName()));
+ } else {
+ // nothing to do
+ return pack;
+ }
} else {
localNicknames.put(name, pack);
return pack;
More information about the armedbear-cvs
mailing list