Changeset 10850 in josm


Ignore:
Timestamp:
2016-08-19T01:16:51+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #13344 - Unable to run unit tests in Eclipse

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/.classpath

    r10833 r10850  
    22<classpath>
    33        <classpathentry excluding="org/apache/commons/compress/compressors/CompressorStreamFactory.java|org/apache/commons/compress/compressors/deflate/|org/apache/commons/compress/compressors/gzip/|org/apache/commons/compress/compressors/lzma/|org/apache/commons/compress/compressors/lzw/|org/apache/commons/compress/compressors/pack200/|org/apache/commons/compress/compressors/snappy/|org/apache/commons/compress/compressors/xz/|org/apache/commons/compress/compressors/z/|org/apache/commons/jcs/auxiliary/disk/jdbc/|org/apache/commons/jcs/utils/servlet/|org/apache/commons/logging/impl/AvalonLogger.java|org/apache/commons/logging/impl/Log4JLogger.java|org/apache/commons/logging/impl/LogKitLogger.java|org/apache/commons/logging/impl/ServletContextCleaner.java|org/apache/commons/jcs/admin/servlet/|org/apache/commons/jcs/auxiliary/remote/http/|org/apache/commons/jcs/auxiliary/remote/AbstractRemoteAuxiliaryCache.java|org/apache/commons/jcs/auxiliary/remote/AbstractRemoteCacheListener.java|org/apache/commons/jcs/auxiliary/remote/RemoteCache.java|org/apache/commons/jcs/auxiliary/remote/RemoteCacheFactory.java|org/apache/commons/jcs/auxiliary/remote/RemoteCacheNoWaitFacade.java|org/apache/commons/jcs/auxiliary/remote/AbstractRemoteCacheNoWaitFacade.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/RemoteCacheRestore.java|org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheStartupServlet.java|org/apache/commons/jcs/auxiliary/remote/server/TimeoutConfigurableRMISocketFactory.java|org/apache/commons/logging/impl/Jdk13LumberjackLogger.java|org/apache/commons/compress/compressors/bzip2/BZip2Utils.java|org/apache/commons/compress/compressors/CompressorException.java|org/apache/commons/compress/compressors/FileNameUtil.java|org/apache/commons/jcs/auxiliary/lateral/socket/tcp/|org/apache/commons/jcs/auxiliary/lateral/LateralCache.java|org/apache/commons/jcs/auxiliary/lateral/LateralCacheAttributes.java|org/apache/commons/jcs/auxiliary/lateral/LateralCacheMonitor.java|org/apache/commons/jcs/auxiliary/lateral/LateralCacheNoWait.java|org/apache/commons/jcs/auxiliary/lateral/LateralCacheNoWaitFacade.java|org/apache/commons/jcs/auxiliary/lateral/LateralCommand.java|org/apache/commons/jcs/auxiliary/lateral/LateralElementDescriptor.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/utils/discovery/|org/apache/commons/jcs/utils/net/|org/apache/commons/jcs/utils/access/|org/apache/commons/jcs/JCS.java|org/apache/commons/jcs/access/PartitionedCacheAccess.java|org/apache/commons/jcs/utils/props/" kind="src" path="src"/>
     4        <classpathentry including="data/|images/|resources/|styles/" kind="src" path=""/>
    45        <classpathentry kind="src" path="test/unit"/>
    56        <classpathentry kind="src" path="test/functional"/>
    67        <classpathentry kind="src" path="test/performance"/>
    7         <classpathentry kind="src" output="bin2/data" path="data"/>
    8         <classpathentry kind="src" output="bin2/images" path="images"/>
    9         <classpathentry kind="src" output="bin2/styles" path="styles"/>
    10         <classpathentry kind="src" output="bin2/resources" path="resources"/>
    11         <classpathentry kind="src" output="bin2/scripts" path="scripts"/>
     8        <classpathentry kind="src" path="scripts"/>
    129        <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
    1310        <classpathentry kind="lib" path="test/lib/fest/fest-assert-1.0.jar"/>
  • trunk/.externalToolBuilders/revision.launch

    r2453 r10850  
    11<?xml version="1.0" encoding="UTF-8" standalone="no"?>
    22<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
    3 <stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_AFTER_CLEAN_TARGETS" value="create-revision-eclipse,"/>
    4 <stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_MANUAL_TARGETS" value="create-revision-eclipse,"/>
     3<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_AFTER_CLEAN_TARGETS" value="create-revision-eclipse,epsg"/>
     4<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_MANUAL_TARGETS" value="create-revision-eclipse,epsg"/>
    55<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
    66<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
     
    1111<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
    1212<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value=""/>
     13<mapAttribute key="org.eclipse.ui.externaltools.ATTR_ANT_PROPERTIES">
     14<mapEntry key="build.dir" value="${build_project}/bin"/>
     15<mapEntry key="eclipse.running" value="true"/>
     16</mapAttribute>
    1317<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="true"/>
    1418<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${build_project}/build.xml"/>
  • trunk/.project

    r8935 r10850  
    3232                </buildCommand>
    3333                <buildCommand>
    34                         <name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
    35                         <arguments>
    36                         </arguments>
    37                 </buildCommand>
    38                 <buildCommand>
    3934                        <name>org.sonarlint.eclipse.core.sonarlintBuilder</name>
    4035                        <arguments>
     
    4944                <nature>sf.eclipse.javacc.javaccnature</nature>
    5045                <nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
    51                 <nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
    5246        </natures>
    5347</projectDescription>
  • trunk/.settings/edu.umd.cs.findbugs.core.prefs

    r10223 r10850  
    11#FindBugs User Preferences
    2 #Mon May 16 03:41:36 CEST 2016
     2#Fri Aug 19 00:50:13 CEST 2016
    33cloud_id=edu.umd.cs.findbugs.cloud.doNothingCloud
    44detectorAppendingToAnObjectOutputStream=AppendingToAnObjectOutputStream|true
    55detectorAtomicityProblem=AtomicityProblem|true
    66detectorBadAppletConstructor=BadAppletConstructor|false
     7detectorBadHexadecimalConversionDetector=BadHexadecimalConversionDetector|true
    78detectorBadResultSetAccess=BadResultSetAccess|true
    89detectorBadSyntaxForRegularExpression=BadSyntaxForRegularExpression|true
     
    1011detectorBadlyOverriddenAdapter=BadlyOverriddenAdapter|true
    1112detectorBooleanReturnNull=BooleanReturnNull|true
     13detectorBroadcastDetector=BroadcastDetector|true
    1214detectorCallToUnsupportedMethod=CallToUnsupportedMethod|true
    1315detectorCheckExpectedWarnings=CheckExpectedWarnings|false
     
    1517detectorCheckRelaxingNullnessAnnotation=CheckRelaxingNullnessAnnotation|true
    1618detectorCheckTypeQualifiers=CheckTypeQualifiers|true
     19detectorCipherWithNoIntegrityDetector=CipherWithNoIntegrityDetector|true
    1720detectorCloneIdiom=CloneIdiom|true
     21detectorCommandInjectionDetector=CommandInjectionDetector|true
    1822detectorComparatorIdiom=ComparatorIdiom|true
    1923detectorConfusedInheritance=ConfusedInheritance|true
    2024detectorConfusionBetweenInheritedAndOuterMethod=ConfusionBetweenInheritedAndOuterMethod|true
     25detectorConstantPasswordDetector=ConstantPasswordDetector|true
     26detectorCookieFlagsDetector=CookieFlagsDetector|true
     27detectorCookieReadDetector=CookieReadDetector|true
    2128detectorCovariantArrayAssignment=CovariantArrayAssignment|true
     29detectorCrlfLogInjectionDetector=CrlfLogInjectionDetector|true
    2230detectorCrossSiteScripting=CrossSiteScripting|true
     31detectorCustomInjectionDetector=CustomInjectionDetector|true
     32detectorCustomMessageDigestDetector=CustomMessageDigestDetector|true
    2333detectorDefaultEncodingDetector=DefaultEncodingDetector|true
     34detectorDesUsageDetector=DesUsageDetector|true
     35detectorDeserializationGadgetDetector=DeserializationGadgetDetector|true
    2436detectorDoInsideDoPrivileged=DoInsideDoPrivileged|true
    2537detectorDontCatchIllegalMonitorStateException=DontCatchIllegalMonitorStateException|true
     
    3244detectorEmptyZipFileEntry=EmptyZipFileEntry|true
    3345detectorEqualsOperandShouldHaveClassCompatibleWithThis=EqualsOperandShouldHaveClassCompatibleWithThis|true
     46detectorEsapiEncryptorDetector=EsapiEncryptorDetector|true
    3447detectorExplicitSerialization=ExplicitSerialization|true
     48detectorExternalConfigurationControlDetector=ExternalConfigurationControlDetector|true
     49detectorExternalFileAccessDetector=ExternalFileAccessDetector|true
     50detectorFileUploadFilenameDetector=FileUploadFilenameDetector|true
    3551detectorFinalizerNullsFields=FinalizerNullsFields|true
    3652detectorFindBadCast2=FindBadCast2|true
     
    7793detectorFindUselessObjects=FindUselessObjects|true
    7894detectorFormatStringChecker=FormatStringChecker|true
     95detectorGeolocationDetector=GeolocationDetector|true
     96detectorGoogleApiKeyDetector=GoogleApiKeyDetector|true
     97detectorHazelcastSymmetricEncryptionDetector=HazelcastSymmetricEncryptionDetector|true
     98detectorHttpResponseSplittingDetector=HttpResponseSplittingDetector|true
    7999detectorHugeSharedStringConstants=HugeSharedStringConstants|true
    80100detectorIDivResultCastToDouble=IDivResultCastToDouble|true
     
    91111detectorInitializeNonnullFieldsInConstructor=InitializeNonnullFieldsInConstructor|true
    92112detectorInstantiateStaticClass=InstantiateStaticClass|true
     113detectorInsufficientKeySizeBlowfishDetector=InsufficientKeySizeBlowfishDetector|true
     114detectorInsufficientKeySizeRsaDetector=InsufficientKeySizeRsaDetector|true
    93115detectorIntCast2LongAsInstant=IntCast2LongAsInstant|true
    94116detectorInvalidJUnitTest=InvalidJUnitTest|true
    95117detectorIteratorIdioms=IteratorIdioms|true
     118detectorJaxRsEndpointDetector=JaxRsEndpointDetector|true
     119detectorJaxWsEndpointDetector=JaxWsEndpointDetector|true
     120detectorJndiCredentialsDetector=JndiCredentialsDetector|true
     121detectorJspIncludeDetector=JspIncludeDetector|true
     122detectorJspSpringEvalDetector=JspSpringEvalDetector|true
     123detectorJstlOutDetector=JstlOutDetector|true
    96124detectorLazyInit=LazyInit|true
     125detectorLdapInjectionDetector=LdapInjectionDetector|true
    97126detectorLoadOfKnownNullValue=LoadOfKnownNullValue|true
    98127detectorLostLoggerDueToWeakReference=LostLoggerDueToWeakReference|true
     
    104133detectorNaming=Naming|true
    105134detectorNoteUnconditionalParamDerefs=NoteUnconditionalParamDerefs|true
     135detectorNullCipherDetector=NullCipherDetector|true
    106136detectorNumberConstructor=NumberConstructor|true
     137detectorObjectDeserializationDetector=ObjectDeserializationDetector|true
    107138detectorOptionalReturnNull=OptionalReturnNull|true
    108139detectorOverridingEqualsNotSymmetrical=OverridingEqualsNotSymmetrical|true
     140detectorPathTraversalDetector=PathTraversalDetector|true
     141detectorPlayUnvalidatedRedirectDetector=PlayUnvalidatedRedirectDetector|true
     142detectorPredictableRandomDetector=PredictableRandomDetector|true
    109143detectorPreferZeroLengthArrays=PreferZeroLengthArrays|true
    110144detectorPublicSemaphores=PublicSemaphores|true
    111145detectorQuestionableBooleanAssignment=QuestionableBooleanAssignment|true
     146detectorReDosDetector=ReDosDetector|true
    112147detectorReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass=ReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass|true
    113148detectorReadReturnShouldBeChecked=ReadReturnShouldBeChecked|true
     
    115150detectorRedundantInterfaces=RedundantInterfaces|true
    116151detectorRepeatedConditionals=RepeatedConditionals|true
     152detectorRsaNoPaddingDetector=RsaNoPaddingDetector|true
    117153detectorRuntimeExceptionCapture=RuntimeExceptionCapture|true
     154detectorScriptInjectionDetector=ScriptInjectionDetector|true
    118155detectorSerializableIdiom=SerializableIdiom|true
     156detectorServletEndpointDetector=ServletEndpointDetector|true
     157detectorSpringMvcEndpointDetector=SpringMvcEndpointDetector|true
     158detectorSqlInjectionDetector=SqlInjectionDetector|true
     159detectorSslDisablerDetector=SslDisablerDetector|true
    119160detectorStartInConstructor=StartInConstructor|true
    120161detectorStaticCalendarDetector=StaticCalendarDetector|true
     162detectorStaticIvDetector=StaticIvDetector|true
     163detectorStdXmlTransformDetector=StdXmlTransformDetector|true
    121164detectorStringConcatenation=StringConcatenation|true
     165detectorStruts1EndpointDetector=Struts1EndpointDetector|true
     166detectorStruts2EndpointDetector=Struts2EndpointDetector|true
     167detectorStrutsValidatorFormDetector=StrutsValidatorFormDetector|true
    122168detectorSuperfluousInstanceOf=SuperfluousInstanceOf|true
    123169detectorSuspiciousThreadInterrupted=SuspiciousThreadInterrupted|true
     
    127173detectorSynchronizeOnClassLiteralNotGetClass=SynchronizeOnClassLiteralNotGetClass|true
    128174detectorSynchronizingOnContentsOfFieldToProtectField=SynchronizingOnContentsOfFieldToProtectField|true
     175detectorTapestryEndpointDetector=TapestryEndpointDetector|true
     176detectorTrustBoundaryViolationDetector=TrustBoundaryViolationDetector|true
    129177detectorURLProblems=URLProblems|true
    130178detectorUncallableMethodOfAnonymousClass=UncallableMethodOfAnonymousClass|true
     179detectorUnencryptedSocketDetector=UnencryptedSocketDetector|true
    131180detectorUnnecessaryMath=UnnecessaryMath|true
    132181detectorUnreadFields=UnreadFields|true
     182detectorUnvalidatedRedirectDetector=UnvalidatedRedirectDetector|true
    133183detectorUselessSubclassMethod=UselessSubclassMethod|true
    134184detectorVarArgsProblems=VarArgsProblems|true
    135185detectorVolatileUsage=VolatileUsage|true
    136186detectorWaitInLoop=WaitInLoop|true
     187detectorWeakFilenameUtilsMethodDetector=WeakFilenameUtilsMethodDetector|true
     188detectorWeakMessageDigestDetector=WeakMessageDigestDetector|true
     189detectorWeakTrustManagerDetector=WeakTrustManagerDetector|true
     190detectorWebViewJavascriptEnabledDetector=WebViewJavascriptEnabledDetector|true
     191detectorWebViewJavascriptInterfaceDetector=WebViewJavascriptInterfaceDetector|true
     192detectorWicketEndpointDetector=WicketEndpointDetector|true
     193detectorWorldWritableDetector=WorldWritableDetector|true
    137194detectorWrongMapIterator=WrongMapIterator|true
    138195detectorXMLFactoryBypass=XMLFactoryBypass|true
     196detectorXPathInjectionDetector=XPathInjectionDetector|true
     197detectorXSSRequestWrapperDetector=XSSRequestWrapperDetector|true
     198detectorXmlDecoderDetector=XmlDecoderDetector|true
     199detectorXslTransformJspDetector=XslTransformJspDetector|true
     200detectorXssJspDetector=XssJspDetector|true
     201detectorXssServletDetector=XssServletDetector|true
     202detectorXxeDetector=XxeDetector|true
    139203detector_threshold=3
    140204effort=max
  • trunk/.settings/sf.eclipse.javacc.prefs

    r10580 r10850  
    11CLEAR_CONSOLE=true
     2FORMAT_BEFORE_SAVE=false
    23JAVACC_OPTIONS=-JDK_VERSION\=1.8 -GRAMMAR_ENCODING\=UTF-8
    34JJDOC_OPTIONS=
  • trunk/build.xml

    r10845 r10850  
    364364        <delete file="${test.dir}/jacoco.exec" />
    365365        <delete file="${test.dir}/jacocoIT.exec" />
    366         <delete file="${test.dir}/config/unit-josm.home/preferences.xml" />
    367         <delete file="${test.dir}/config/functional-josm.home/preferences.xml" />
    368         <delete file="${test.dir}/config/performance-josm.home/preferences.xml" />
    369         <delete dir="${test.dir}/config/unit-josm.home/cache" failonerror="false"/>
    370         <delete dir="${test.dir}/config/functional-josm.home/cache" failonerror="false"/>
    371         <delete dir="${test.dir}/config/performance-josm.home/cache" failonerror="false"/>
     366        <delete file="${test.dir}/config/unit-josm.home" failonerror="false"/>
     367        <delete file="${test.dir}/config/functional-josm.home" failonerror="false"/>
     368        <delete file="${test.dir}/config/performance-josm.home" failonerror="false"/>
    372369    </target>
    373370    <macrodef name="call-groovyc">
     
    738735      ** Compile build script for generating projection list.
    739736    -->
    740     <target name="epsg-compile">
     737    <target name="epsg-compile" depends="init-properties">
    741738        <property name="proj-classpath" location="${build.dir}"/>
    742739        <mkdir dir="${proj-build.dir}"/>
  • trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java

    r10510 r10850  
    101101        Main.logLevel = 3;
    102102        Main.pref.init(false);
     103        String url = Main.pref.get("osm-server.url");
     104        if (url == null || url.isEmpty() || isProductionApiUrl(url)) {
     105            Main.pref.put("osm-server.url", "http://api06.dev.openstreetmap.org/api");
     106        }
    103107        I18n.set(Main.pref.get("language", "en"));
    104108
     
    113117
    114118        // make sure we don't upload to or test against production
    115         //
    116         String url = OsmApi.getOsmApi().getBaseUrl().toLowerCase(Locale.ENGLISH).trim();
    117         if (url.startsWith("http://www.openstreetmap.org") || url.startsWith("http://api.openstreetmap.org")
    118             || url.startsWith("https://www.openstreetmap.org") || url.startsWith("https://api.openstreetmap.org")) {
     119        url = OsmApi.getOsmApi().getBaseUrl().toLowerCase(Locale.ENGLISH).trim();
     120        if (isProductionApiUrl(url)) {
    119121            fail(MessageFormat.format("configured server url ''{0}'' seems to be a productive url, aborting.", url));
    120122        }
     
    128130            });
    129131        }
     132    }
     133
     134    private static boolean isProductionApiUrl(String url) {
     135        return url.startsWith("http://www.openstreetmap.org") || url.startsWith("http://api.openstreetmap.org")
     136            || url.startsWith("https://www.openstreetmap.org") || url.startsWith("https://api.openstreetmap.org");
    130137    }
    131138
Note: See TracChangeset for help on using the changeset viewer.