Changeset 14782 in josm
- Timestamp:
- 2019-02-11T22:52:05+01:00 (6 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/.classpath
r14604 r14782 43 43 </attributes> 44 44 </classpathentry> 45 <classpathentry kind="lib" path="test/lib/ reflections/reflections-0.9.11.jar">45 <classpathentry kind="lib" path="test/lib/classgraph-4.6.32.jar" sourcepath="C:/Users/vippy/.m2/repository/io/github/classgraph/classgraph/4.6.32/classgraph-4.6.32-sources.jar"> 46 46 <attributes> 47 47 <attribute name="test" value="true"/> 48 48 </attributes> 49 49 </classpathentry> 50 <classpathentry kind="lib" path="test/lib/reflections/guava-21.0.jar"> 51 <attributes> 52 <attribute name="test" value="true"/> 53 </attributes> 54 </classpathentry> 55 <classpathentry kind="lib" path="test/lib/reflections/javassist-3.21.0-GA.jar"> 50 <classpathentry kind="lib" path="tools/guava.jar"> 56 51 <attributes> 57 52 <attribute name="test" value="true"/> -
trunk/build.xml
r14695 r14782 43 43 <property name="error_prone_core.jar" location="${tools.dir}/error_prone_core.jar"/> 44 44 <property name="error_prone_javac.jar" location="${tools.dir}/error_prone_javac.jar"/> 45 <property name="failureaccess.jar" location="${tools.dir}/failureaccess.jar"/> 46 <property name="guava.jar" location="${tools.dir}/guava.jar"/> 45 47 <property name="jformatstring.jar" location="${spotbugs.dir}/jFormatString-3.0.0.jar"/> 46 48 <property name="dist.jar" location="${dist.dir}/josm-custom.jar"/> … … 93 95 <path id="processor.path"> 94 96 <pathelement location="${error_prone_core.jar}"/> 97 <pathelement location="${failureaccess.jar}"/> 98 <pathelement location="${guava.jar}"/> 95 99 <pathelement location="${jformatstring.jar}"/> 96 100 </path> -
trunk/netbeans/nbproject/project.properties
r14093 r14782 32 32 endorsed.classpath= 33 33 excludes=org/apache/commons/compress/compressors/CompressorException.java,org/apache/commons/compress/compressors/CompressorStreamFactory.java,org/apache/commons/compress/compressors/CompressorStreamProvider.java,org/apache/commons/compress/compressors/FileNameUtil.java,org/apache/commons/compress/compressors/brotli/**,org/apache/commons/compress/compressors/bzip2/BZip2Utils.java,org/apache/commons/compress/compressors/deflate/**,org/apache/commons/compress/compressors/gzip/**,org/apache/commons/compress/compressors/lz4/**,org/apache/commons/compress/compressors/lz77support/**,org/apache/commons/compress/compressors/lzma/**,org/apache/commons/compress/compressors/pack200/**,org/apache/commons/compress/compressors/snappy/**,org/apache/commons/compress/compressors/xz/XZUtils.java,org/apache/commons/compress/compressors/z/**,org/apache/commons/compress/compressors/zstandard/**,org/apache/commons/compress/utils/ArchiveUtils.java,org/apache/commons/jcs/JCS.java,org/apache/commons/jcs/access/GroupCacheAccess.java,org/apache/commons/jcs/access/PartitionedCacheAccess.java,org/apache/commons/jcs/access/behavior/IGroupCacheAccess.java,org/apache/commons/jcs/access/exception/InvalidGroupException.java,org/apache/commons/jcs/admin/servlet/**,org/apache/commons/jcs/auxiliary/AbstractAuxiliaryCacheMonitor.java,org/apache/commons/jcs/auxiliary/disk/jdbc/**,org/apache/commons/jcs/auxiliary/lateral/**,org/apache/commons/jcs/auxiliary/remote/AbstractRemoteAuxiliaryCache.java,org/apache/commons/jcs/auxiliary/remote/AbstractRemoteCacheListener.java,org/apache/commons/jcs/auxiliary/remote/AbstractRemoteCacheNoWaitFacade.java,org/apache/commons/jcs/auxiliary/remote/RemoteCache.java,org/apache/commons/jcs/auxiliary/remote/RemoteCacheFactory.java,org/apache/commons/jcs/auxiliary/remote/RemoteCacheFailoverRunner.java,org/apache/commons/jcs/auxiliary/remote/RemoteCacheListener.java,org/apache/commons/jcs/auxiliary/remote/RemoteCacheManager.java,org/apache/commons/jcs/auxiliary/remote/RemoteCacheMonitor.java,org/apache/commons/jcs/auxiliary/remote/RemoteCacheNoWait.java,org/apache/commons/jcs/auxiliary/remote/RemoteCacheNoWaitFacade.java,org/apache/commons/jcs/auxiliary/remote/RemoteCacheRestore.java,org/apache/commons/jcs/auxiliary/remote/http/**,org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheStartupServlet.java,org/apache/commons/jcs/auxiliary/remote/server/TimeoutConfigurableRMISocketFactory.java,org/apache/commons/jcs/engine/CacheAdaptor.java,org/apache/commons/jcs/engine/CacheGroup.java,org/apache/commons/jcs/engine/CacheWatchRepairable.java,org/apache/commons/jcs/engine/ZombieCacheService.java,org/apache/commons/jcs/engine/ZombieCacheServiceNonLocal.java,org/apache/commons/jcs/engine/ZombieCacheWatch.java,org/apache/commons/jcs/engine/logging/CacheEventLoggerDebugLogger.java,org/apache/commons/jcs/utils/access/**,org/apache/commons/jcs/utils/discovery/**,org/apache/commons/jcs/utils/net/**,org/apache/commons/jcs/utils/props/**,org/apache/commons/jcs/utils/servlet/**,org/apache/commons/logging/impl/AvalonLogger.java,org/apache/commons/logging/impl/Jdk13LumberjackLogger.java,org/apache/commons/logging/impl/Log4JLogger.java,org/apache/commons/logging/impl/LogKitLogger.java,org/apache/commons/logging/impl/ServletContextCleaner.java,org/openstreetmap/gui/jmapviewer/Demo.java,org/openstreetmap/gui/jmapviewer/JMapViewerTree.java,org/openstreetmap/gui/jmapviewer/checkBoxTree/**,org/apache/commons/compress/archivers/**,org/apache/commons/compress/changes/**,org/apache/commons/compress/parallel/**,org/apache/commons/compress/PasswordRequiredException.java 34 file.reference.commons-lang-3. 7.jar=../tools/pmd/commons-lang-3.7.jar34 file.reference.commons-lang-3.8.1.jar=../tools/pmd/commons-lang-3.8.1.jar 35 35 file.reference.commons-testing-2.1.0.jar=../test/lib/commons-testing/commons-testing-2.1.0.jar 36 36 file.reference.core-src=../src 37 file.reference.equalsverifier- 2.5.1.jar=../test/lib/equalsverifier-2.5.1.jar37 file.reference.equalsverifier-3.1.2.jar=../test/lib/equalsverifier-3.1.2.jar 38 38 file.reference.spotbugs.jar=../tools/spotbugs/spotbugs.jar 39 file.reference.guava -21.0.jar=../test/lib/reflections/guava-21.0.jar39 file.reference.guava.jar=../tools/guava.jar 40 40 file.reference.hamcrest-core-1.3.jar=../test/lib/junit/hamcrest-core-1.3.jar 41 file.reference.javassist-3.21.0-GA.jar=../test/lib/reflections/javassist-3.21.0-GA.jar42 41 file.reference.jfcunit.jar=../test/lib/jfcunit.jar 43 file.reference.jmockit -1.41.jar=../test/lib/jmockit-1.41.jar42 file.reference.jmockit.jar=../test/lib/jmockit.jar 44 43 file.reference.junit-4.12.jar=../test/lib/junit/junit-4.12.jar 45 file.reference. reflections-0.9.10.jar=../test/lib/reflections/reflections-0.9.10.jar44 file.reference.classgraph.jar=../test/lib/classgraph-4.6.32.jar 46 45 file.reference.test-functional=../test/functional 47 46 file.reference.test-performance=../test/performance 48 47 file.reference.test-unit=../test/unit 49 file.reference.system-rules-1.1 6.1.jar=../test/lib/system-rules-1.16.1.jar50 file.reference.wiremock-standalone-2. 18.0.jar=../test/lib/wiremock-standalone-2.18.0.jar51 file.reference.awaitility-3.1. 2.jar=../test/lib/awaitility-3.1.2.jar48 file.reference.system-rules-1.19.0.jar=../test/lib/system-rules-1.19.0.jar 49 file.reference.wiremock-standalone-2.20.0.jar=../test/lib/wiremock-standalone-2.20.0.jar 50 file.reference.awaitility-3.1.5.jar=../test/lib/awaitility-3.1.5.jar 52 51 includes=**/*.java 53 52 jar.compress=false … … 65 64 ${build.classes.dir}:\ 66 65 ${file.reference.junit-4.12.jar}:\ 67 ${file.reference.jmockit -1.41.jar}:\66 ${file.reference.jmockit.jar}:\ 68 67 ${file.reference.jfcunit.jar}:\ 69 ${file.reference.equalsverifier- 2.5.1.jar}:\68 ${file.reference.equalsverifier-3.1.2.jar}:\ 70 69 ${file.reference.hamcrest-core-1.3.jar}:\ 71 ${file.reference.guava-21.0.jar}:\ 72 ${file.reference.javassist-3.21.0-GA.jar}:\ 73 ${file.reference.reflections-0.9.11.jar}:\ 74 ${file.reference.commons-lang-3.7.jar}:\ 75 ${file.reference.system-rules-1.16.1.jar}:\ 76 ${file.reference.wiremock-standalone-2.18.0.jar}:\ 77 ${file.reference.awaitility-3.1.2.jar}:\ 70 ${file.reference.guava.jar}:\ 71 ${file.reference.classgraph.jar}:\ 72 ${file.reference.commons-lang-3.8.1.jar}:\ 73 ${file.reference.system-rules-1.19.0.jar}:\ 74 ${file.reference.wiremock-standalone-2.20.0.jar}:\ 75 ${file.reference.awaitility-3.1.5.jar}:\ 78 76 ${file.reference.spotbugs.jar}:\ 79 77 ${file.reference.commons-testing-2.1.0.jar} -
trunk/test/unit/org/openstreetmap/josm/TestUtils.java
r14528 r14782 30 30 import java.util.concurrent.ExecutionException; 31 31 import java.util.concurrent.ThreadPoolExecutor; 32 import java.util.function.Function; 32 33 import java.util.stream.Collectors; 33 34 import java.util.stream.Stream; … … 55 56 import org.openstreetmap.josm.tools.Utils; 56 57 import org.openstreetmap.josm.tools.WikiReader; 57 import org.reflections.Reflections;58 58 59 59 import com.github.tomakehurst.wiremock.WireMockServer; … … 62 62 63 63 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 64 import io.github.classgraph.ClassGraph; 65 import io.github.classgraph.ClassInfoList; 66 import io.github.classgraph.ScanResult; 64 67 import mockit.integration.TestRunnerDecorator; 65 68 … … 571 574 */ 572 575 public static <T> Set<Class<? extends T>> getJosmSubtypes(Class<T> superClass) { 573 return new Reflections("org.openstreetmap.josm").getSubTypesOf(superClass); 576 try (ScanResult scan = new ClassGraph().whitelistPackages("org.openstreetmap.josm").ignoreClassVisibility().scan()) { 577 Function<String, ClassInfoList> lambda = superClass.isInterface() ? scan::getClassesImplementing : scan::getSubclasses; 578 return lambda.apply(superClass.getName()) 579 .asMap().values().stream().map(x -> x.loadClass(superClass)).collect(Collectors.toSet()); 580 } 574 581 } 575 582
Note:
See TracChangeset
for help on using the changeset viewer.