@@ -69,7 +69,7 @@ public boolean hasRho() {
6969
7070 @ Override
7171 public Phi take (final String name ) {
72- final String obj = this . eoPackage ( name );
72+ final String obj = String . join ( "." , this . pkg , name );
7373 final String key = new JavaPath (obj ).toString ();
7474 return this .objects .computeIfAbsent (
7575 key ,
@@ -109,23 +109,16 @@ public byte[] delta() {
109109 throw new ExFailure ("Can't take #data() from package object \" %s\" " , this .pkg );
110110 }
111111
112- /**
113- * Creates eo-package path by name.
114- * @param name The name of an en object.
115- * @return Eo-package path.
116- */
117- private String eoPackage (final String name ) {
118- return String .join ("." , this .pkg , name );
119- }
120-
121112 /**
122113 * Load phi object by package name from ClassLoader.
123114 * @param path Path to directory or .java file
124115 * @param object Object FQN
125116 * @return Phi
126117 */
127118 private Phi loadPhi (final String path , final String object ) {
128- final Path pth = Paths .get ("target/classes" , path .replace ("." , File .separator ));
119+ final Path pth = new File (
120+ this .getClass ().getProtectionDomain ().getCodeSource ().getLocation ().getPath ()
121+ ).toPath ().resolve (path .replace ("." , File .separator ));
129122 final Phi phi ;
130123 if (Files .exists (pth ) && Files .isDirectory (pth )) {
131124 phi = new PhPackage (object );
0 commit comments