#BUGFIX by cg
authorClaus Gittinger <cg@exept.de>
Wed, 09 May 2018 12:10:53 +0200
changeset 4315 0d6042c723e7
parent 4314 4d0fb5563a49
child 4316 147565855769
#BUGFIX by cg class: ProjectChecker changed: #checkClassesForNonQualifiedSharedPools: fix for pool name search
ProjectChecker.st
--- a/ProjectChecker.st	Mon May 07 12:58:30 2018 +0200
+++ b/ProjectChecker.st	Wed May 09 12:10:53 2018 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 2006 by eXept Software AG
               All Rights Reserved
@@ -340,16 +342,14 @@
 
     classesToCheck do:[:cls|
         cls sharedPoolNames do:[:poolName|
-            (Smalltalk at: poolName asSymbol) isNil ifTrue:[
-                | ns |
+            |pool|
 
-                ns := cls nameSpace.
-                (ns == Smalltalk or:[(ns at: poolName asSymbol) isNil]) ifTrue:[
-                    self addProblem:
-                        (ProjectProblem newClassUsesPoolButItIsNotASharedPool
-                                className: cls name;
-                                poolName: poolName)
-                ]
+            pool := cls sharedPoolNamed:poolName.
+            (pool notNil and:[pool isSharedPool]) ifFalse:[
+                self addProblem:
+                    (ProjectProblem newClassUsesPoolButItIsNotASharedPool
+                            className:(cls name);
+                            poolName: poolName)
             ]
         ]
     ].