Ticket #16010: v2-0013-JOSMTestRules-don-t-use-setProperty-to-unreliably.patch

File v2-0013-JOSMTestRules-don-t-use-setProperty-to-unreliably.patch, 1.3 KB (added by ris, 3 years ago)
  • test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java

    From 3f2dd895ad5a8b6d7733dcd8a717a3b20badae64 Mon Sep 17 00:00:00 2001
    From: Robert Scott <code@humanleg.org.uk>
    Date: Sun, 25 Feb 2018 19:42:56 +0000
    Subject: [PATCH v2 13/28] JOSMTestRules: don't use setProperty to (unreliably)
     trick awt into thinking it's in headless mode
    
    ...when in fact it's not. Thinking it's in headless mode causes JOSM's tests
    to skip whole swathes of code which should be tested.
    ---
     test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java | 3 ---
     1 file changed, 3 deletions(-)
    
    diff --git a/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java b/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java
    index c56aad0aa..d455e8e19 100644
    a b public class JOSMTestRules implements TestRule { 
    390390     * @throws ReflectiveOperationException if a reflective access error occurs
    391391     */
    392392    protected void before() throws InitializationError, ReflectiveOperationException {
    393         // Tests are running headless by default.
    394         System.setProperty("java.awt.headless", "true");
    395 
    396393        cleanUpFromJosmFixture();
    397394
    398395        if (this.assumeRevisionString != null) {