Skip to content

Commit

Permalink
fix: find meta_properties_path from path or classpath (#522)
Browse files Browse the repository at this point in the history
Co-authored-by: Yuqing Zhu <yuqing.zhu@139.com>
  • Loading branch information
aqni and zhuyuqing authored Dec 11, 2024
1 parent 01c0296 commit c320360
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundE
} else {
clazz = super.loadClass(name, resolve);
}
if (clazz == null) {
throw new ClassNotFoundException(name);
}
classMap.put(name, clazz);
return clazz;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* IGinX - the polystore system with high performance
* Copyright (C) Tsinghua University
* TSIGinX@gmail.com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package cn.edu.tsinghua.iginx.engine.physical.storage;

import static org.junit.jupiter.api.Assertions.*;

import org.junit.jupiter.api.Test;

class StorageEngineClassLoaderTest {
@Test
void testNotFound() {
assertThrows(
ClassNotFoundException.class,
() -> {
StorageEngineClassLoader classLoader = new StorageEngineClassLoader("not_found");
classLoader.loadClass("not_found");
});
}
}

0 comments on commit c320360

Please sign in to comment.