Make tests more realistic by doing some “work” other than writing console output.

--- subprojects/build-scan-performance/src/templates/with-verbose-junit/Test.java
+++ subprojects/build-scan-performance/src/templates/with-verbose-junit/Test.java
@@ -11,6 +11,9 @@
         for (int i = 0; i < 500; i++) {
             System.out.println("Some test output from ${testClassName}.testOne - " + i);
             System.err.println("Some test error  from ${testClassName}.testOne - " + i);
+            if (i % 50 == 0) {
+                Thread.sleep(1);
+            }
         }
         assertEquals(production.getProperty(), "value");
     }
@@ -20,6 +23,9 @@
         for (int i = 0; i < 500; i++) {
             System.out.println("Some test output from ${testClassName}.testTwo - " + i);
             System.err.println("Some test error  from ${testClassName}.testTwo - " + i);
+            if (i % 50 == 0) {
+                Thread.sleep(1);
+            }
         }
         String expected = <%= binding.hasVariable("halfTestsFail") && binding.halfTestsFail ? "\"foo\"" : "\"value\"" %>;
         assertEquals(production.getProperty(), expected);

<|original_code|>
package ${packageName};

import static org.junit.Assert.*;

public class ${testClassName} {

    private final ${productionClassName} production = new ${productionClassName}("value");

    @org.junit.Test
    public void testOne() throws Exception {
        for (int i = 0; i < 500; i++) {
            System.out.println("Some test output from ${testClassName}.testOne - " + i);
            System.err.println("Some test error  from ${testClassName}.testOne - " + i);
        }
        assertEquals(production.getProperty(), "value");
    }

    @org.junit.Test
    public void testTwo() throws Exception {
        for (int i = 0; i < 500; i++) {
            System.out.println("Some test output from ${testClassName}.testTwo - " + i);
            System.err.println("Some test error  from ${testClassName}.testTwo - " + i);
        }
        String expected = <%= binding.hasVariable("halfTestsFail") && binding.halfTestsFail ? "\"foo\"" : "\"value\"" %>;
        assertEquals(production.getProperty(), expected);
    }
}

<|edits_diff|>
--- subprojects/build-scan-performance/src/templates/with-verbose-junit/Test.java
+++ subprojects/build-scan-performance/src/templates/with-verbose-junit/Test.java
@@ -11,6 +11,9 @@
         for (int i = 0; i < 500; i++) {
             System.out.println("Some test output from ${testClassName}.testOne - " + i);
             System.err.println("Some test error  from ${testClassName}.testOne - " + i);
+            if (i % 50 == 0) {
+                Thread.sleep(1);
+            }
         }
         assertEquals(production.getProperty(), "value");
     }
<|current_version|>
package ${packageName};

import static org.junit.Assert.*;

public class ${testClassName} {

    private final ${productionClassName} production = new ${productionClassName}("value");

    @org.junit.Test
    public void testOne() throws Exception {
        for (int i = 0; i < 500; i++) {
            System.out.println("Some test output from ${testClassName}.testOne - " + i);
            System.err.println("Some test error  from ${testClassName}.testOne - " + i);
            if (i % 50 == 0) {
                Thread.sleep(1);
            }
        }
        assertEquals(production.getProperty(), "value");
    }

    @org.junit.Test
    public void testTwo() throws Exception {
        for (int i = 0; i < 500; i++) {
            System.out.println("Some test output from ${testClassName}.testTwo - " + i);
            System.err.println("Some test error  from ${testClassName}.testTwo - " + i);
        }
        String expected = <%= binding.hasVariable("halfTestsFail") && binding.halfTestsFail ? "\"foo\"" : "\"value\"" %>;
        assertEquals(production.getProperty(), expected);
    }
}

<|next_version|>
package ${packageName};

import static org.junit.Assert.*;

public class ${testClassName} {

    private final ${productionClassName} production = new ${productionClassName}("value");

    @org.junit.Test
    public void testOne() throws Exception {
        for (int i = 0; i < 500; i++) {
            System.out.println("Some test output from ${testClassName}.testOne - " + i);
            System.err.println("Some test error  from ${testClassName}.testOne - " + i);
            if (i % 50 == 0) {
                Thread.sleep(1);
            }
        }
        assertEquals(production.getProperty(), "value");
    }

    @org.junit.Test
    public void testTwo() throws Exception {
        for (int i = 0; i < 500; i++) {
            System.out.println("Some test output from ${testClassName}.testTwo - " + i);
            System.err.println("Some test error  from ${testClassName}.testTwo - " + i);
            if (i % 50 == 0) {
                Thread.sleep(1);
            }
        }
        String expected = <%= binding.hasVariable("halfTestsFail") && binding.halfTestsFail ? "\"foo\"" : "\"value\"" %>;
        assertEquals(production.getProperty(), expected);
    }
}


Remove Driver after touch test

Remove Driver after touch test

--- java/client/test/org/openqa/selenium/interactions/touch/TouchTests.java
+++ java/client/test/org/openqa/selenium/interactions/touch/TouchTests.java
@@ -18,11 +18,13 @@

 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
+import org.junit.AfterClass;
 import org.openqa.selenium.interactions.touch.TouchDoubleTapTest;
 import org.openqa.selenium.interactions.touch.TouchFlickTest;
 import org.openqa.selenium.interactions.touch.TouchLongPressTest;
 import org.openqa.selenium.interactions.touch.TouchScrollTest;
 import org.openqa.selenium.interactions.touch.TouchSingleTapTest;
+import org.openqa.selenium.testing.JUnit4TestBase;

 @RunWith(Suite.class)
 @Suite.SuiteClasses({
@@ -33,4 +35,9 @@
     TouchSingleTapTest.class
 })
 public class TouchTests {
+    @AfterClass
+    public static void cleanUpDriver() {
+        JUnit4TestBase.removeDriver();
+    }
 }
+

<|original_code|>
/*
Copyright 2012 Selenium committers
Copyright 2012 Software Freedom Conservancy

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package org.openqa.selenium.interactions.touch;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.openqa.selenium.interactions.touch.TouchDoubleTapTest;
import org.openqa.selenium.interactions.touch.TouchFlickTest;
import org.openqa.selenium.interactions.touch.TouchLongPressTest;
import org.openqa.selenium.interactions.touch.TouchScrollTest;
import org.openqa.selenium.interactions.touch.TouchSingleTapTest;

@RunWith(Suite.class)
@Suite.SuiteClasses({
    TouchDoubleTapTest.class,
    TouchFlickTest.class,
    TouchLongPressTest.class,
    TouchScrollTest.class,
    TouchSingleTapTest.class
})
public class TouchTests {
}

<|edits_diff|>
--- java/client/test/org/openqa/selenium/interactions/touch/TouchTests.java
+++ java/client/test/org/openqa/selenium/interactions/touch/TouchTests.java
@@ -18,11 +18,13 @@

 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
+import org.junit.AfterClass;
 import org.openqa.selenium.interactions.touch.TouchDoubleTapTest;
 import org.openqa.selenium.interactions.touch.TouchFlickTest;
 import org.openqa.selenium.interactions.touch.TouchLongPressTest;
 import org.openqa.selenium.interactions.touch.TouchScrollTest;
 import org.openqa.selenium.interactions.touch.TouchSingleTapTest;
+import org.openqa.selenium.testing.JUnit4TestBase;

 @RunWith(Suite.class)
 @Suite.SuiteClasses({
@@ -33,4 +35,8 @@
     TouchSingleTapTest.class
 })
 public class TouchTests {
+    @AfterClass
+    public static void cleanUpDriver() {
+        JUnit4TestBase.removeDriver();
+    }
 }
<|current_version|>
/*
Copyright 2012 Selenium committers
Copyright 2012 Software Freedom Conservancy

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package org.openqa.selenium.interactions.touch;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.AfterClass;
import org.openqa.selenium.interactions.touch.TouchDoubleTapTest;
import org.openqa.selenium.interactions.touch.TouchFlickTest;
import org.openqa.selenium.interactions.touch.TouchLongPressTest;
import org.openqa.selenium.interactions.touch.TouchScrollTest;
import org.openqa.selenium.interactions.touch.TouchSingleTapTest;
import org.openqa.selenium.testing.JUnit4TestBase;

@RunWith(Suite.class)
@Suite.SuiteClasses({
    TouchDoubleTapTest.class,
    TouchFlickTest.class,
    TouchLongPressTest.class,
    TouchScrollTest.class,
    TouchSingleTapTest.class
})
public class TouchTests {
    @AfterClass
    public static void cleanUpDriver() {
        JUnit4TestBase.removeDriver();
    }
}

<|next_version|>
/*
Copyright 2012 Selenium committers
Copyright 2012 Software Freedom Conservancy

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package org.openqa.selenium.interactions.touch;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.AfterClass;
import org.openqa.selenium.interactions.touch.TouchDoubleTapTest;
import org.openqa.selenium.interactions.touch.TouchFlickTest;
import org.openqa.selenium.interactions.touch.TouchLongPressTest;
import org.openqa.selenium.interactions.touch.TouchScrollTest;
import org.openqa.selenium.interactions.touch.TouchSingleTapTest;
import org.openqa.selenium.testing.JUnit4TestBase;

@RunWith(Suite.class)
@Suite.SuiteClasses({
    TouchDoubleTapTest.class,
    TouchFlickTest.class,
    TouchLongPressTest.class,
    TouchScrollTest.class,
    TouchSingleTapTest.class
})
public class TouchTests {
    @AfterClass
    public static void cleanUpDriver() {
        JUnit4TestBase.removeDriver();
    }
}


Add button to error view

Add button to error view

--- code/src/main/java/com/github/neunkasulle/chronocommand/view/ErrorView.java
+++ code/src/main/java/com/github/neunkasulle/chronocommand/view/ErrorView.java
@@ -2,6 +2,7 @@

 import com.vaadin.navigator.View;
 import com.vaadin.navigator.ViewChangeListener;
+import com.vaadin.ui.Button;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.themes.ValoTheme;
@@ -12,5 +13,10 @@
         Label error = new Label("Failed to find requested site: " + event.getViewName());
         error.setStyleName(ValoTheme.LABEL_H1);
         addComponent(error);
+
+        Button link = new Button("Please go to the login page");
+        link.setStyleName(ValoTheme.BUTTON_BORDERLESS_COLORED);
+        addComponent(link);
+        link.addClickListener(event1 -> getUI().getNavigator().navigateTo(MainUI.LOGINVIEW));
     }
 }

<|original_code|>
package com.github.neunkasulle.chronocommand.view;

import com.vaadin.navigator.View;
import com.vaadin.navigator.ViewChangeListener;
import com.vaadin.ui.Label;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.themes.ValoTheme;

public class ErrorView extends VerticalLayout implements View {
    @Override
    public void enter(ViewChangeListener.ViewChangeEvent event) {
        Label error = new Label("Failed to find requested site: " + event.getViewName());
        error.setStyleName(ValoTheme.LABEL_H1);
        addComponent(error);
    }
}

<|edits_diff|>
--- code/src/main/java/com/github/neunkasulle/chronocommand/view/ErrorView.java
+++ code/src/main/java/com/github/neunkasulle/chronocommand/view/ErrorView.java
@@ -2,6 +2,7 @@

 import com.vaadin.navigator.View;
 import com.vaadin.navigator.ViewChangeListener;
+import com.vaadin.ui.Button;
 import com.vaadin.ui.Label;
 import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.themes.ValoTheme;
<|current_version|>
package com.github.neunkasulle.chronocommand.view;

import com.vaadin.navigator.View;
import com.vaadin.navigator.ViewChangeListener;
import com.vaadin.ui.Button;
import com.vaadin.ui.Label;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.themes.ValoTheme;

public class ErrorView extends VerticalLayout implements View {
    @Override
    public void enter(ViewChangeListener.ViewChangeEvent event) {
        Label error = new Label("Failed to find requested site: " + event.getViewName());
        error.setStyleName(ValoTheme.LABEL_H1);
        addComponent(error);
    }
}

<|next_version|>
package com.github.neunkasulle.chronocommand.view;

import com.vaadin.navigator.View;
import com.vaadin.navigator.ViewChangeListener;
import com.vaadin.ui.Button;
import com.vaadin.ui.Label;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.themes.ValoTheme;

public class ErrorView extends VerticalLayout implements View {
    @Override
    public void enter(ViewChangeListener.ViewChangeEvent event) {
        Label error = new Label("Failed to find requested site: " + event.getViewName());
        error.setStyleName(ValoTheme.LABEL_H1);
        addComponent(error);

        Button link = new Button("Please go to the login page");
        link.setStyleName(ValoTheme.BUTTON_BORDERLESS_COLORED);
        addComponent(link);
        link.addClickListener(event1 -> getUI().getNavigator().navigateTo(MainUI.LOGINVIEW));
    }
}


Mark ignored test with @Test

Mark ignored test with @Test

--- src/test/java/com/hubspot/jinjava/NonRevertingEagerTest.java
+++ src/test/java/com/hubspot/jinjava/NonRevertingEagerTest.java
@@ -3,6 +3,7 @@
 import com.hubspot.jinjava.mode.NonRevertingEagerExecutionMode;
 import org.junit.Before;
 import org.junit.Ignore;
+import org.junit.Test;

 public class NonRevertingEagerTest extends EagerTest {

@@ -14,6 +15,7 @@

   @Ignore
   @Override
+  @Test
   public void itCorrectlyDefersWithMultipleLoops() {
     super.itCorrectlyDefersWithMultipleLoops();
   }

<|original_code|>
package com.hubspot.jinjava;

import com.hubspot.jinjava.mode.NonRevertingEagerExecutionMode;
import org.junit.Before;
import org.junit.Ignore;

public class NonRevertingEagerTest extends EagerTest {

  @Override
  @Before
  public void setup() {
    setupWithExecutionMode(NonRevertingEagerExecutionMode.instance());
  }

  @Ignore
  @Override
  public void itCorrectlyDefersWithMultipleLoops() {
    super.itCorrectlyDefersWithMultipleLoops();
  }
}

<|edits_diff|>
--- src/test/java/com/hubspot/jinjava/NonRevertingEagerTest.java
+++ src/test/java/com/hubspot/jinjava/NonRevertingEagerTest.java
@@ -3,6 +3,7 @@
 import com.hubspot.jinjava.mode.NonRevertingEagerExecutionMode;
 import org.junit.Before;
 import org.junit.Ignore;
+import org.junit.Test;

 public class NonRevertingEagerTest extends EagerTest {

<|current_version|>
package com.hubspot.jinjava;

import com.hubspot.jinjava.mode.NonRevertingEagerExecutionMode;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

public class NonRevertingEagerTest extends EagerTest {

  @Override
  @Before
  public void setup() {
    setupWithExecutionMode(NonRevertingEagerExecutionMode.instance());
  }

  @Ignore
  @Override
  public void itCorrectlyDefersWithMultipleLoops() {
    super.itCorrectlyDefersWithMultipleLoops();
  }
}

<|next_version|>
package com.hubspot.jinjava;

import com.hubspot.jinjava.mode.NonRevertingEagerExecutionMode;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

public class NonRevertingEagerTest extends EagerTest {

  @Override
  @Before
  public void setup() {
    setupWithExecutionMode(NonRevertingEagerExecutionMode.instance());
  }

  @Ignore
  @Override
  @Test
  public void itCorrectlyDefersWithMultipleLoops() {
    super.itCorrectlyDefersWithMultipleLoops();
  }
}


Fix bug with Jpa error when running all services together (DEV-99)

--- src/main/java/sg/ncl/service/App.java
+++ src/main/java/sg/ncl/service/App.java
@@ -2,11 +2,13 @@

 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import sg.ncl.common.jpa.UseJpa;

 /**
  * @author Christopher Zhong
  */
 @SpringBootApplication
+@UseJpa
 public class App {

     public static void main(String[] args) {

<|original_code|>
package sg.ncl.service;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * @author Christopher Zhong
 */
@SpringBootApplication
public class App {

    public static void main(String[] args) {
        SpringApplication.run(App.class, args);
    }

}

<|edits_diff|>
--- src/main/java/sg/ncl/service/App.java
+++ src/main/java/sg/ncl/service/App.java
@@ -2,6 +2,7 @@

 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import sg.ncl.common.jpa.UseJpa;

 /**
  * @author Christopher Zhong
<|current_version|>
package sg.ncl.service;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import sg.ncl.common.jpa.UseJpa;

/**
 * @author Christopher Zhong
 */
@SpringBootApplication
public class App {

    public static void main(String[] args) {
        SpringApplication.run(App.class, args);
    }

}

<|next_version|>
package sg.ncl.service;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import sg.ncl.common.jpa.UseJpa;

/**
 * @author Christopher Zhong
 */
@SpringBootApplication
@UseJpa
public class App {

    public static void main(String[] args) {
        SpringApplication.run(App.class, args);
    }

}


Create set of supported algorithms for timestamp request

--- src/main/java/org/cryptonit/cloud/timestamping/Authority.java
+++ src/main/java/org/cryptonit/cloud/timestamping/Authority.java
@@ -3,6 +3,9 @@
 import java.math.BigInteger;
 import java.security.*;
 import java.security.cert.X509Certificate;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashSet;
 import org.bouncycastle.asn1.ASN1ObjectIdentifier;
 import org.bouncycastle.tsp.*;
 import org.bouncycastle.util.Store;
@@ -13,6 +16,9 @@
  * @author Mathias Brossard
  */
 public class Authority {
+    public static final Set ALLOWED = new HashSet(Arrays.asList(new ASN1ObjectIdentifier[] {
+        TSPAlgorithms.SHA1, TSPAlgorithms.SHA256, TSPAlgorithms.SHA384, TSPAlgorithms.SHA512
+    }));
     private final BigInteger one = new BigInteger("1");
     private static Logger LOGGER;
     ASN1ObjectIdentifier policy;

<|original_code|>
package org.cryptonit.cloud.timestamping;

import java.math.BigInteger;
import java.security.*;
import java.security.cert.X509Certificate;
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import org.bouncycastle.tsp.*;
import org.bouncycastle.util.Store;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author Mathias Brossard
 */
public class Authority {
    private final BigInteger one = new BigInteger("1");
    private static Logger LOGGER;
    ASN1ObjectIdentifier policy;
    X509Certificate crt;
    KeyPair key;
    Store certs;
    BigInteger serial;

    synchronized private BigInteger getNextSerial() {
        BigInteger s = serial;
        serial.add(one);
        return s;
    }

    public TimeStampResponse timestamp(TimeStampRequest request) {
        TimeStampResponse response = null;
        return response;
    }

    public Authority(KeyPair key, X509Certificate crt, Store certs, ASN1ObjectIdentifier policy) {
        LOGGER = LoggerFactory.getLogger(Authority.class);

        this.key = key;
        this.crt = crt;
        this.certs = certs;
        this.policy = policy;
        this.serial = new BigInteger("1");
    }
}

<|edits_diff|>
--- src/main/java/org/cryptonit/cloud/timestamping/Authority.java
+++ src/main/java/org/cryptonit/cloud/timestamping/Authority.java
@@ -3,6 +3,9 @@
 import java.math.BigInteger;
 import java.security.*;
 import java.security.cert.X509Certificate;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashSet;
 import org.bouncycastle.asn1.ASN1ObjectIdentifier;
 import org.bouncycastle.tsp.*;
 import org.bouncycastle.util.Store;
<|current_version|>
package org.cryptonit.cloud.timestamping;

import java.math.BigInteger;
import java.security.*;
import java.security.cert.X509Certificate;
import java.util.Arrays;
import java.util.Date;
import java.util.HashSet;
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import org.bouncycastle.tsp.*;
import org.bouncycastle.util.Store;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author Mathias Brossard
 */
public class Authority {
    private final BigInteger one = new BigInteger("1");
    private static Logger LOGGER;
    ASN1ObjectIdentifier policy;
    X509Certificate crt;
    KeyPair key;
    Store certs;
    BigInteger serial;

    synchronized private BigInteger getNextSerial() {
        BigInteger s = serial;
        serial.add(one);
        return s;
    }

    public TimeStampResponse timestamp(TimeStampRequest request) {
        TimeStampResponse response = null;
        return response;
    }

    public Authority(KeyPair key, X509Certificate crt, Store certs, ASN1ObjectIdentifier policy) {
        LOGGER = LoggerFactory.getLogger(Authority.class);

        this.key = key;
        this.crt = crt;
        this.certs = certs;
        this.policy = policy;
        this.serial = new BigInteger("1");
    }
}

<|next_version|>
package org.cryptonit.cloud.timestamping;

import java.math.BigInteger;
import java.security.*;
import java.security.cert.X509Certificate;
import java.util.Arrays;
import java.util.Date;
import java.util.HashSet;
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import org.bouncycastle.tsp.*;
import org.bouncycastle.util.Store;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author Mathias Brossard
 */
public class Authority {
    public static final Set ALLOWED = new HashSet(Arrays.asList(new ASN1ObjectIdentifier[] {
        TSPAlgorithms.SHA1, TSPAlgorithms.SHA256, TSPAlgorithms.SHA384, TSPAlgorithms.SHA512
    }));
    private final BigInteger one = new BigInteger("1");
    private static Logger LOGGER;
    ASN1ObjectIdentifier policy;
    X509Certificate crt;
    KeyPair key;
    Store certs;
    BigInteger serial;

    synchronized private BigInteger getNextSerial() {
        BigInteger s = serial;
        serial.add(one);
        return s;
    }

    public TimeStampResponse timestamp(TimeStampRequest request) {
        TimeStampResponse response = null;
        return response;
    }

    public Authority(KeyPair key, X509Certificate crt, Store certs, ASN1ObjectIdentifier policy) {
        LOGGER = LoggerFactory.getLogger(Authority.class);

        this.key = key;
        this.crt = crt;
        this.certs = certs;
        this.policy = policy;
        this.serial = new BigInteger("1");
    }
}


Disable screensaver when playing videos

Disable screensaver when playing videos

--- app/src/main/java/com/github/mkjensen/tv/ondemand/PlaybackActivity.java
+++ app/src/main/java/com/github/mkjensen/tv/ondemand/PlaybackActivity.java
@@ -19,6 +19,7 @@
 import android.os.Bundle;
 import android.support.annotation.Nullable;
 import android.support.v4.app.FragmentActivity;
+import android.view.WindowManager;

 public class PlaybackActivity extends FragmentActivity {

@@ -27,6 +28,8 @@

     super.onCreate(savedInstanceState);

+    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
+
     if (savedInstanceState == null) {
       getSupportFragmentManager().beginTransaction()
           .add(android.R.id.content, new PlaybackFragment())

<|original_code|>
/*
 * Copyright 2017 Martin Kamp Jensen
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.github.mkjensen.tv.ondemand;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentActivity;

public class PlaybackActivity extends FragmentActivity {

  @Override
  protected void onCreate(@Nullable Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);

    if (savedInstanceState == null) {
      getSupportFragmentManager().beginTransaction()
          .add(android.R.id.content, new PlaybackFragment())
          .commit();
    }
  }
}

<|edits_diff|>
--- app/src/main/java/com/github/mkjensen/tv/ondemand/PlaybackActivity.java
+++ app/src/main/java/com/github/mkjensen/tv/ondemand/PlaybackActivity.java
@@ -19,6 +19,7 @@
 import android.os.Bundle;
 import android.support.annotation.Nullable;
 import android.support.v4.app.FragmentActivity;
+import android.view.WindowManager;

 public class PlaybackActivity extends FragmentActivity {

<|current_version|>
/*
 * Copyright 2017 Martin Kamp Jensen
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.github.mkjensen.tv.ondemand;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentActivity;
import android.view.WindowManager;

public class PlaybackActivity extends FragmentActivity {

  @Override
  protected void onCreate(@Nullable Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);

    if (savedInstanceState == null) {
      getSupportFragmentManager().beginTransaction()
          .add(android.R.id.content, new PlaybackFragment())
          .commit();
    }
  }
}

<|next_version|>
/*
 * Copyright 2017 Martin Kamp Jensen
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.github.mkjensen.tv.ondemand;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.FragmentActivity;
import android.view.WindowManager;

public class PlaybackActivity extends FragmentActivity {

  @Override
  protected void onCreate(@Nullable Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);

    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

    if (savedInstanceState == null) {
      getSupportFragmentManager().beginTransaction()
          .add(android.R.id.content, new PlaybackFragment())
          .commit();
    }
  }
}


Add tests for arrays of Comparable objects.

--- src/test/java/com/stephenramthun/algorithms/sorting/BubbleSortTest.java
+++ src/test/java/com/stephenramthun/algorithms/sorting/BubbleSortTest.java
@@ -1,6 +1,7 @@
 package com.stephenramthun.algorithms.sorting;

 import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertFalse;

 import org.junit.jupiter.api.Test;

@@ -16,6 +17,11 @@
             BubbleSort.sort(array);
             assertTrue(Utility.isSorted(array));
         }
+
+        String[] strings = {"cbc", "abc", "bbc", "ccd", "ccb", "bbc", "aab"};
+        assertFalse(Utility.isSorted(strings));
+        BubbleSort.sort(strings);
+        assertTrue(Utility.isSorted(strings));
     }

     @Test

<|original_code|>
package com.stephenramthun.algorithms.sorting;

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

import org.junit.jupiter.api.Test;

class BubbleSortTest {

    @Test
    void testSorting() {
        int n = 1000;
        int r = 10;

        for (int i = 0; i < r; i++) {
            int[] array = Utility.randomArray(n);
            BubbleSort.sort(array);
            assertTrue(Utility.isSorted(array));
        }
    }

    @Test
    void testPermutation() {
        int n = 1000;
        int r = 10;

        for (int i = 0; i < r; i++) {
            int[] a = Utility.randomArray(n);
            int[] b = Utility.copy(a);

            BubbleSort.sort(a);
            assertTrue(Utility.arePermutations(a, b));
        }
    }
}

<|edits_diff|>
--- src/test/java/com/stephenramthun/algorithms/sorting/BubbleSortTest.java
+++ src/test/java/com/stephenramthun/algorithms/sorting/BubbleSortTest.java
@@ -1,6 +1,7 @@
 package com.stephenramthun.algorithms.sorting;

 import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertFalse;

 import org.junit.jupiter.api.Test;

<|current_version|>
package com.stephenramthun.algorithms.sorting;

import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.assertFalse;

import org.junit.jupiter.api.Test;

class BubbleSortTest {

    @Test
    void testSorting() {
        int n = 1000;
        int r = 10;

        for (int i = 0; i < r; i++) {
            int[] array = Utility.randomArray(n);
            BubbleSort.sort(array);
            assertTrue(Utility.isSorted(array));
        }
    }

    @Test
    void testPermutation() {
        int n = 1000;
        int r = 10;

        for (int i = 0; i < r; i++) {
            int[] a = Utility.randomArray(n);
            int[] b = Utility.copy(a);

            BubbleSort.sort(a);
            assertTrue(Utility.arePermutations(a, b));
        }
    }
}

<|next_version|>
package com.stephenramthun.algorithms.sorting;

import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.assertFalse;

import org.junit.jupiter.api.Test;

class BubbleSortTest {

    @Test
    void testSorting() {
        int n = 1000;
        int r = 10;

        for (int i = 0; i < r; i++) {
            int[] array = Utility.randomArray(n);
            BubbleSort.sort(array);
            assertTrue(Utility.isSorted(array));
        }

        String[] strings = {"cbc", "abc", "bbc", "ccd", "ccb", "bbc", "aab"};
        assertFalse(Utility.isSorted(strings));
        BubbleSort.sort(strings);
        assertTrue(Utility.isSorted(strings));
    }

    @Test
    void testPermutation() {
        int n = 1000;
        int r = 10;

        for (int i = 0; i < r; i++) {
            int[] a = Utility.randomArray(n);
            int[] b = Utility.copy(a);

            BubbleSort.sort(a);
            assertTrue(Utility.arePermutations(a, b));
        }
    }
}


Add some missing fields (serverName, worldReadable, guestCanJoin);

--- matrix-sdk/src/main/java/org/matrix/androidsdk/rest/model/PublicRoom.java
+++ matrix-sdk/src/main/java/org/matrix/androidsdk/rest/model/PublicRoom.java
@@ -21,7 +21,16 @@
  * Class representing the objects returned by /publicRooms call.
  */
 public class PublicRoom extends RoomState implements java.io.Serializable {
+
+    // number of members which have joined the room (the members list is not provided)
     public int numJoinedMembers;

+    // the server name
+    public String serverName;

+    // true when the room history is visible (room preview)
+    public Boolean worldReadable;
+
+    // a guest can join the room
+    public Boolean guestCanJoin;
 }

<|original_code|>
/*
 * Copyright 2014 OpenMarket Ltd
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.matrix.androidsdk.rest.model;

import org.matrix.androidsdk.data.RoomState;

/**
 * Class representing the objects returned by /publicRooms call.
 */
public class PublicRoom extends RoomState implements java.io.Serializable {
    public int numJoinedMembers;

}

<|edits_diff|>
--- matrix-sdk/src/main/java/org/matrix/androidsdk/rest/model/PublicRoom.java
+++ matrix-sdk/src/main/java/org/matrix/androidsdk/rest/model/PublicRoom.java
@@ -21,7 +21,11 @@
  * Class representing the objects returned by /publicRooms call.
  */
 public class PublicRoom extends RoomState implements java.io.Serializable {
+
+    // number of members which have joined the room (the members list is not provided)
     public int numJoinedMembers;

+    // the server name
+    public String serverName;

 }
<|current_version|>
/*
 * Copyright 2014 OpenMarket Ltd
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.matrix.androidsdk.rest.model;

import org.matrix.androidsdk.data.RoomState;

/**
 * Class representing the objects returned by /publicRooms call.
 */
public class PublicRoom extends RoomState implements java.io.Serializable {

    // number of members which have joined the room (the members list is not provided)
    public int numJoinedMembers;

    // the server name
    public String serverName;

}

<|next_version|>
/*
 * Copyright 2014 OpenMarket Ltd
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.matrix.androidsdk.rest.model;

import org.matrix.androidsdk.data.RoomState;

/**
 * Class representing the objects returned by /publicRooms call.
 */
public class PublicRoom extends RoomState implements java.io.Serializable {

    // number of members which have joined the room (the members list is not provided)
    public int numJoinedMembers;

    // the server name
    public String serverName;

    // true when the room history is visible (room preview)
    public Boolean worldReadable;

    // a guest can join the room
    public Boolean guestCanJoin;
}


Add comments and validation to create msg

--- WahrDiscordApi/src/main/java/co/phoenixlab/discord/api/request/channel/CreateMessageRequest.java
+++ WahrDiscordApi/src/main/java/co/phoenixlab/discord/api/request/channel/CreateMessageRequest.java
@@ -17,14 +17,26 @@
 import lombok.NoArgsConstructor;
 import lombok.Builder;

+import javax.validation.constraints.Size;
+
 @Builder
 @Getter
 @NoArgsConstructor
 @AllArgsConstructor
 public class CreateMessageRequest {

+    /**
+     * The message contents (up to 2000 characters).
+     */
+    @Size(min = 1, max = 2000)
     private String content;
+    /**
+     * A nonce that can be used for optimistic message sending.
+     */
     private String nonce;
+    /**
+     * If this is a TTS message.
+     */
     private boolean tts;

 }

<|original_code|>
/*
 * The MIT License (MIT)
 *
 * Copyright (c) 2016 Vincent Zhang/PhoenixLAB
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

package co.phoenixlab.discord.api.request.channel;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Builder;

@Builder
@Getter
@NoArgsConstructor
@AllArgsConstructor
public class CreateMessageRequest {

    private String content;
    private String nonce;
    private boolean tts;

}

<|edits_diff|>
--- WahrDiscordApi/src/main/java/co/phoenixlab/discord/api/request/channel/CreateMessageRequest.java
+++ WahrDiscordApi/src/main/java/co/phoenixlab/discord/api/request/channel/CreateMessageRequest.java
@@ -17,13 +17,22 @@
 import lombok.NoArgsConstructor;
 import lombok.Builder;

+import javax.validation.constraints.Size;
+
 @Builder
 @Getter
 @NoArgsConstructor
 @AllArgsConstructor
 public class CreateMessageRequest {

+    /**
+     * The message contents (up to 2000 characters).
+     */
+    @Size(min = 1, max = 2000)
     private String content;
+    /**
+     * A nonce that can be used for optimistic message sending.
+     */
     private String nonce;
     private boolean tts;

<|current_version|>
/*
 * The MIT License (MIT)
 *
 * Copyright (c) 2016 Vincent Zhang/PhoenixLAB
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

package co.phoenixlab.discord.api.request.channel;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Builder;

import javax.validation.constraints.Size;

@Builder
@Getter
@NoArgsConstructor
@AllArgsConstructor
public class CreateMessageRequest {

    /**
     * The message contents (up to 2000 characters).
     */
    @Size(min = 1, max = 2000)
    private String content;
    /**
     * A nonce that can be used for optimistic message sending.
     */
    private String nonce;
    private boolean tts;

}

<|next_version|>
/*
 * The MIT License (MIT)
 *
 * Copyright (c) 2016 Vincent Zhang/PhoenixLAB
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

package co.phoenixlab.discord.api.request.channel;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Builder;

import javax.validation.constraints.Size;

@Builder
@Getter
@NoArgsConstructor
@AllArgsConstructor
public class CreateMessageRequest {

    /**
     * The message contents (up to 2000 characters).
     */
    @Size(min = 1, max = 2000)
    private String content;
    /**
     * A nonce that can be used for optimistic message sending.
     */
    private String nonce;
    /**
     * If this is a TTS message.
     */
    private boolean tts;

}


Configure this configuration before the AxonAutoConfiguration

Configure this configuration before the AxonAutoConfiguration

#236

--- spring-boot-autoconfigure/src/main/java/org/axonframework/boot/autoconfig/MetricsAutoConfiguration.java
+++ spring-boot-autoconfigure/src/main/java/org/axonframework/boot/autoconfig/MetricsAutoConfiguration.java
@@ -2,6 +2,7 @@

 import com.codahale.metrics.MetricRegistry;
 import org.axonframework.metrics.GlobalMetricRegistry;
+import org.springframework.boot.autoconfigure.AutoConfigureBefore;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
 import org.springframework.context.annotation.Bean;
@@ -14,6 +15,7 @@
  * @since 3.2
  */
 @Configuration
+@AutoConfigureBefore(AxonAutoConfiguration.class)
 public class MetricsAutoConfiguration {

     @Bean

<|original_code|>
package org.axonframework.boot.autoconfig;

import com.codahale.metrics.MetricRegistry;
import org.axonframework.metrics.GlobalMetricRegistry;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Auto configuration to set up Metrics for the infrastructure components.
 *
 * @author Steven van Beelen
 * @since 3.2
 */
@Configuration
public class MetricsAutoConfiguration {

    @Bean
    @ConditionalOnMissingBean
    @ConditionalOnBean(MetricRegistry.class)
    public GlobalMetricRegistry globalMetricRegistry(MetricRegistry metricRegistry) {
        return new GlobalMetricRegistry(metricRegistry);
    }
}

<|edits_diff|>
--- spring-boot-autoconfigure/src/main/java/org/axonframework/boot/autoconfig/MetricsAutoConfiguration.java
+++ spring-boot-autoconfigure/src/main/java/org/axonframework/boot/autoconfig/MetricsAutoConfiguration.java
@@ -2,6 +2,7 @@

 import com.codahale.metrics.MetricRegistry;
 import org.axonframework.metrics.GlobalMetricRegistry;
+import org.springframework.boot.autoconfigure.AutoConfigureBefore;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
 import org.springframework.context.annotation.Bean;
<|current_version|>
package org.axonframework.boot.autoconfig;

import com.codahale.metrics.MetricRegistry;
import org.axonframework.metrics.GlobalMetricRegistry;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Auto configuration to set up Metrics for the infrastructure components.
 *
 * @author Steven van Beelen
 * @since 3.2
 */
@Configuration
public class MetricsAutoConfiguration {

    @Bean
    @ConditionalOnMissingBean
    @ConditionalOnBean(MetricRegistry.class)
    public GlobalMetricRegistry globalMetricRegistry(MetricRegistry metricRegistry) {
        return new GlobalMetricRegistry(metricRegistry);
    }
}

<|next_version|>
package org.axonframework.boot.autoconfig;

import com.codahale.metrics.MetricRegistry;
import org.axonframework.metrics.GlobalMetricRegistry;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Auto configuration to set up Metrics for the infrastructure components.
 *
 * @author Steven van Beelen
 * @since 3.2
 */
@Configuration
@AutoConfigureBefore(AxonAutoConfiguration.class)
public class MetricsAutoConfiguration {

    @Bean
    @ConditionalOnMissingBean
    @ConditionalOnBean(MetricRegistry.class)
    public GlobalMetricRegistry globalMetricRegistry(MetricRegistry metricRegistry) {
        return new GlobalMetricRegistry(metricRegistry);
    }
}


Add hasNoJsonPath testcase for explicit null

--- json-path-assert/src/test/java/com/jayway/jsonpath/matchers/HasNoJsonPathTest.java
+++ json-path-assert/src/test/java/com/jayway/jsonpath/matchers/HasNoJsonPathTest.java
@@ -8,6 +8,7 @@

 public class HasNoJsonPathTest {
     private static final String JSON_STRING = "{" +
+            "\"none\": null," +
             "\"name\": \"Jessie\"" +
             "}";

@@ -22,6 +23,11 @@
     }

     @Test
+    public void shouldNotMatchExplicitNull() {
+        assertThat(JSON_STRING, not(hasNoJsonPath("$.none")));
+    }
+
+    @Test
     public void shouldBeDescriptive() {
         assertThat(hasNoJsonPath("$.name"),
                 hasToString(equalTo("is json without json path \"$['name']\"")));

<|original_code|>
package com.jayway.jsonpath.matchers;

import org.junit.Test;

import static com.jayway.jsonpath.matchers.JsonPathMatchers.hasNoJsonPath;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.assertThat;

public class HasNoJsonPathTest {
    private static final String JSON_STRING = "{" +
            "\"name\": \"Jessie\"" +
            "}";

    @Test
    public void shouldMatchMissingJsonPath() {
        assertThat(JSON_STRING, hasNoJsonPath("$.not_there"));
    }

    @Test
    public void shouldNotMatchExistingJsonPath() {
        assertThat(JSON_STRING, not(hasNoJsonPath("$.name")));
    }

    @Test
    public void shouldBeDescriptive() {
        assertThat(hasNoJsonPath("$.name"),
                hasToString(equalTo("is json without json path \"$['name']\"")));
    }

}

<|edits_diff|>
--- json-path-assert/src/test/java/com/jayway/jsonpath/matchers/HasNoJsonPathTest.java
+++ json-path-assert/src/test/java/com/jayway/jsonpath/matchers/HasNoJsonPathTest.java
@@ -8,6 +8,7 @@

 public class HasNoJsonPathTest {
     private static final String JSON_STRING = "{" +
+            "\"none\": null," +
             "\"name\": \"Jessie\"" +
             "}";

<|current_version|>
package com.jayway.jsonpath.matchers;

import org.junit.Test;

import static com.jayway.jsonpath.matchers.JsonPathMatchers.hasNoJsonPath;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.assertThat;

public class HasNoJsonPathTest {
    private static final String JSON_STRING = "{" +
            "\"none\": null," +
            "\"name\": \"Jessie\"" +
            "}";

    @Test
    public void shouldMatchMissingJsonPath() {
        assertThat(JSON_STRING, hasNoJsonPath("$.not_there"));
    }

    @Test
    public void shouldNotMatchExistingJsonPath() {
        assertThat(JSON_STRING, not(hasNoJsonPath("$.name")));
    }

    @Test
    public void shouldBeDescriptive() {
        assertThat(hasNoJsonPath("$.name"),
                hasToString(equalTo("is json without json path \"$['name']\"")));
    }

}

<|next_version|>
package com.jayway.jsonpath.matchers;

import org.junit.Test;

import static com.jayway.jsonpath.matchers.JsonPathMatchers.hasNoJsonPath;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.assertThat;

public class HasNoJsonPathTest {
    private static final String JSON_STRING = "{" +
            "\"none\": null," +
            "\"name\": \"Jessie\"" +
            "}";

    @Test
    public void shouldMatchMissingJsonPath() {
        assertThat(JSON_STRING, hasNoJsonPath("$.not_there"));
    }

    @Test
    public void shouldNotMatchExistingJsonPath() {
        assertThat(JSON_STRING, not(hasNoJsonPath("$.name")));
    }

    @Test
    public void shouldNotMatchExplicitNull() {
        assertThat(JSON_STRING, not(hasNoJsonPath("$.none")));
    }

    @Test
    public void shouldBeDescriptive() {
        assertThat(hasNoJsonPath("$.name"),
                hasToString(equalTo("is json without json path \"$['name']\"")));
    }

}


Add fields for holding data

Add fields for holding data

--- simulation/src/main/java/de/eightbitboy/ecorealms/simulation/production/ProducerData.java
+++ simulation/src/main/java/de/eightbitboy/ecorealms/simulation/production/ProducerData.java
@@ -1,8 +1,15 @@
 package de.eightbitboy.ecorealms.simulation.production;
+
+import java.util.HashMap;
+import java.util.Map;

 import de.eightbitboy.ecorealms.simulation.resource.Resource;

 public class ProducerData {
+
+	public Map<Resource, Integer> input = new HashMap<Resource, Integer>();
+
+	public Map<Resource, Integer> output = new HashMap<Resource, Integer>();

 	public void addInputResource(Resource resource, int amount) {

<|original_code|>
package de.eightbitboy.ecorealms.simulation.production;

import de.eightbitboy.ecorealms.simulation.resource.Resource;

public class ProducerData {

	public void addInputResource(Resource resource, int amount) {

	}

	public void addOutputResource(Resource resource, int amount) {

	}
}

<|edits_diff|>
--- simulation/src/main/java/de/eightbitboy/ecorealms/simulation/production/ProducerData.java
+++ simulation/src/main/java/de/eightbitboy/ecorealms/simulation/production/ProducerData.java
@@ -1,4 +1,7 @@
 package de.eightbitboy.ecorealms.simulation.production;
+
+import java.util.HashMap;
+import java.util.Map;

 import de.eightbitboy.ecorealms.simulation.resource.Resource;

<|current_version|>
package de.eightbitboy.ecorealms.simulation.production;

import java.util.HashMap;
import java.util.Map;

import de.eightbitboy.ecorealms.simulation.resource.Resource;

public class ProducerData {

	public void addInputResource(Resource resource, int amount) {

	}

	public void addOutputResource(Resource resource, int amount) {

	}
}

<|next_version|>
package de.eightbitboy.ecorealms.simulation.production;

import java.util.HashMap;
import java.util.Map;

import de.eightbitboy.ecorealms.simulation.resource.Resource;

public class ProducerData {

	public Map<Resource, Integer> input = new HashMap<Resource, Integer>();

	public Map<Resource, Integer> output = new HashMap<Resource, Integer>();

	public void addInputResource(Resource resource, int amount) {

	}

	public void addOutputResource(Resource resource, int amount) {

	}
}


Add method to get default file provider.

--- src/main/java/com/github/aureliano/achmed/os/IOperatingSystem.java
+++ src/main/java/com/github/aureliano/achmed/os/IOperatingSystem.java
@@ -1,6 +1,7 @@
 package com.github.aureliano.achmed.os;

 import com.github.aureliano.achmed.command.CommandResponse;
+import com.github.aureliano.achmed.os.fs.IFileProvider;
 import com.github.aureliano.achmed.os.pkg.IPackageManager;
 import com.github.aureliano.achmed.os.service.IService;
 import com.github.aureliano.achmed.types.OS;
@@ -14,6 +15,8 @@

 	public abstract IService getDefaultServiceManager();

+	public abstract IFileProvider getDefaultFileProvider();
+
 	public abstract OS getOperatingSystem();

 	public abstract OperatingSystemFamily getOperatingSystemFamily();

<|original_code|>
package com.github.aureliano.achmed.os;

import com.github.aureliano.achmed.command.CommandResponse;
import com.github.aureliano.achmed.os.pkg.IPackageManager;
import com.github.aureliano.achmed.os.service.IService;
import com.github.aureliano.achmed.types.OS;
import com.github.aureliano.achmed.types.OperatingSystemFamily;

public interface IOperatingSystem {

	public abstract Linux prototype();

	public abstract IPackageManager getDefaultPackageManager();

	public abstract IService getDefaultServiceManager();

	public abstract OS getOperatingSystem();

	public abstract OperatingSystemFamily getOperatingSystemFamily();

	public abstract String getPsCommand();

	public abstract Integer getPid(String pattern);

	public abstract CommandResponse kill(Integer pid);
}
<|edits_diff|>
--- src/main/java/com/github/aureliano/achmed/os/IOperatingSystem.java
+++ src/main/java/com/github/aureliano/achmed/os/IOperatingSystem.java
@@ -1,6 +1,7 @@
 package com.github.aureliano.achmed.os;

 import com.github.aureliano.achmed.command.CommandResponse;
+import com.github.aureliano.achmed.os.fs.IFileProvider;
 import com.github.aureliano.achmed.os.pkg.IPackageManager;
 import com.github.aureliano.achmed.os.service.IService;
 import com.github.aureliano.achmed.types.OS;
<|current_version|>
package com.github.aureliano.achmed.os;

import com.github.aureliano.achmed.command.CommandResponse;
import com.github.aureliano.achmed.os.fs.IFileProvider;
import com.github.aureliano.achmed.os.pkg.IPackageManager;
import com.github.aureliano.achmed.os.service.IService;
import com.github.aureliano.achmed.types.OS;
import com.github.aureliano.achmed.types.OperatingSystemFamily;

public interface IOperatingSystem {

	public abstract Linux prototype();

	public abstract IPackageManager getDefaultPackageManager();

	public abstract IService getDefaultServiceManager();

	public abstract OS getOperatingSystem();

	public abstract OperatingSystemFamily getOperatingSystemFamily();

	public abstract String getPsCommand();

	public abstract Integer getPid(String pattern);

	public abstract CommandResponse kill(Integer pid);
}
<|next_version|>
package com.github.aureliano.achmed.os;

import com.github.aureliano.achmed.command.CommandResponse;
import com.github.aureliano.achmed.os.fs.IFileProvider;
import com.github.aureliano.achmed.os.pkg.IPackageManager;
import com.github.aureliano.achmed.os.service.IService;
import com.github.aureliano.achmed.types.OS;
import com.github.aureliano.achmed.types.OperatingSystemFamily;

public interface IOperatingSystem {

	public abstract Linux prototype();

	public abstract IPackageManager getDefaultPackageManager();

	public abstract IService getDefaultServiceManager();

	public abstract IFileProvider getDefaultFileProvider();

	public abstract OS getOperatingSystem();

	public abstract OperatingSystemFamily getOperatingSystemFamily();

	public abstract String getPsCommand();

	public abstract Integer getPid(String pattern);

	public abstract CommandResponse kill(Integer pid);
}


Set anti-aliasing ON for rounded corner boxes.

--- olca-app/src/org/openlca/app/editors/graphical/model/RoundBorder.java
+++ olca-app/src/org/openlca/app/editors/graphical/model/RoundBorder.java
@@ -4,6 +4,7 @@
 import org.eclipse.draw2d.IFigure;
 import org.eclipse.draw2d.LineBorder;
 import org.eclipse.draw2d.geometry.Insets;
+import org.eclipse.swt.SWT;

 public class RoundBorder extends LineBorder {

@@ -13,6 +14,7 @@

 	@Override
 	public void paint(IFigure figure, Graphics graphics, Insets insets) {
+		graphics.setAntialias(SWT.ON);
 		tempRect.setBounds(getPaintRectangle(figure, insets));
 		if (getWidth() % 2 == 1) {
 			tempRect.width--;

<|original_code|>
package org.openlca.app.editors.graphical.model;

import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.LineBorder;
import org.eclipse.draw2d.geometry.Insets;

public class RoundBorder extends LineBorder {

	public RoundBorder(int value) {
		super(value);
	}

	@Override
	public void paint(IFigure figure, Graphics graphics, Insets insets) {
		tempRect.setBounds(getPaintRectangle(figure, insets));
		if (getWidth() % 2 == 1) {
			tempRect.width--;
			tempRect.height--;
		}
		tempRect.shrink(getWidth() / 2, getWidth() / 2);
		graphics.setLineWidth(getWidth());
		graphics.setLineStyle(getStyle());
		if (getColor() != null)
			graphics.setForegroundColor(getColor());
		graphics.drawRoundRectangle(tempRect, 15, 15);
	}
}

<|edits_diff|>
--- olca-app/src/org/openlca/app/editors/graphical/model/RoundBorder.java
+++ olca-app/src/org/openlca/app/editors/graphical/model/RoundBorder.java
@@ -4,6 +4,7 @@
 import org.eclipse.draw2d.IFigure;
 import org.eclipse.draw2d.LineBorder;
 import org.eclipse.draw2d.geometry.Insets;
+import org.eclipse.swt.SWT;

 public class RoundBorder extends LineBorder {

<|current_version|>
package org.openlca.app.editors.graphical.model;

import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.LineBorder;
import org.eclipse.draw2d.geometry.Insets;
import org.eclipse.swt.SWT;

public class RoundBorder extends LineBorder {

	public RoundBorder(int value) {
		super(value);
	}

	@Override
	public void paint(IFigure figure, Graphics graphics, Insets insets) {
		tempRect.setBounds(getPaintRectangle(figure, insets));
		if (getWidth() % 2 == 1) {
			tempRect.width--;
			tempRect.height--;
		}
		tempRect.shrink(getWidth() / 2, getWidth() / 2);
		graphics.setLineWidth(getWidth());
		graphics.setLineStyle(getStyle());
		if (getColor() != null)
			graphics.setForegroundColor(getColor());
		graphics.drawRoundRectangle(tempRect, 15, 15);
	}
}

<|next_version|>
package org.openlca.app.editors.graphical.model;

import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.LineBorder;
import org.eclipse.draw2d.geometry.Insets;
import org.eclipse.swt.SWT;

public class RoundBorder extends LineBorder {

	public RoundBorder(int value) {
		super(value);
	}

	@Override
	public void paint(IFigure figure, Graphics graphics, Insets insets) {
		graphics.setAntialias(SWT.ON);
		tempRect.setBounds(getPaintRectangle(figure, insets));
		if (getWidth() % 2 == 1) {
			tempRect.width--;
			tempRect.height--;
		}
		tempRect.shrink(getWidth() / 2, getWidth() / 2);
		graphics.setLineWidth(getWidth());
		graphics.setLineStyle(getStyle());
		if (getColor() != null)
			graphics.setForegroundColor(getColor());
		graphics.drawRoundRectangle(tempRect, 15, 15);
	}
}


Add some more startup logging

Add some more startup logging

--- src/main/java/pl/mkrystek/mkbot/Main.java
+++ src/main/java/pl/mkrystek/mkbot/Main.java
@@ -14,6 +14,7 @@
     public static void main(String[] args) throws Exception {
         ConfigurableApplicationContext ctx = new SpringApplicationBuilder().bannerMode(OFF).web(false).logStartupInfo(false)
             .sources(BotApplicationConfiguration.class).headless(false).run(args);
+        LOGGER.debug("Application started!");
         BotApplication application = ctx.getBean(BotApplication.class);

         try {
@@ -22,6 +23,7 @@
         } catch (Exception e) {
             LOGGER.error("Error : ", e);
         } finally {
+            LOGGER.debug("Shutting down application");
             if (application != null) application.shutdown();
         }
     }

<|original_code|>
package pl.mkrystek.mkbot;

import static org.springframework.boot.Banner.Mode.OFF;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;

public class Main {

    private static final Logger LOGGER = LoggerFactory.getLogger(Main.class);

    public static void main(String[] args) throws Exception {
        ConfigurableApplicationContext ctx = new SpringApplicationBuilder().bannerMode(OFF).web(false).logStartupInfo(false)
            .sources(BotApplicationConfiguration.class).headless(false).run(args);
        BotApplication application = ctx.getBean(BotApplication.class);

        try {
            application.init();
            application.startApplication();
        } catch (Exception e) {
            LOGGER.error("Error : ", e);
        } finally {
            if (application != null) application.shutdown();
        }
    }
}

<|edits_diff|>
--- src/main/java/pl/mkrystek/mkbot/Main.java
+++ src/main/java/pl/mkrystek/mkbot/Main.java
@@ -14,6 +14,7 @@
     public static void main(String[] args) throws Exception {
         ConfigurableApplicationContext ctx = new SpringApplicationBuilder().bannerMode(OFF).web(false).logStartupInfo(false)
             .sources(BotApplicationConfiguration.class).headless(false).run(args);
+        LOGGER.debug("Application started!");
         BotApplication application = ctx.getBean(BotApplication.class);

         try {
<|current_version|>
package pl.mkrystek.mkbot;

import static org.springframework.boot.Banner.Mode.OFF;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;

public class Main {

    private static final Logger LOGGER = LoggerFactory.getLogger(Main.class);

    public static void main(String[] args) throws Exception {
        ConfigurableApplicationContext ctx = new SpringApplicationBuilder().bannerMode(OFF).web(false).logStartupInfo(false)
            .sources(BotApplicationConfiguration.class).headless(false).run(args);
        LOGGER.debug("Application started!");
        BotApplication application = ctx.getBean(BotApplication.class);

        try {
            application.init();
            application.startApplication();
        } catch (Exception e) {
            LOGGER.error("Error : ", e);
        } finally {
            if (application != null) application.shutdown();
        }
    }
}

<|next_version|>
package pl.mkrystek.mkbot;

import static org.springframework.boot.Banner.Mode.OFF;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;

public class Main {

    private static final Logger LOGGER = LoggerFactory.getLogger(Main.class);

    public static void main(String[] args) throws Exception {
        ConfigurableApplicationContext ctx = new SpringApplicationBuilder().bannerMode(OFF).web(false).logStartupInfo(false)
            .sources(BotApplicationConfiguration.class).headless(false).run(args);
        LOGGER.debug("Application started!");
        BotApplication application = ctx.getBean(BotApplication.class);

        try {
            application.init();
            application.startApplication();
        } catch (Exception e) {
            LOGGER.error("Error : ", e);
        } finally {
            LOGGER.debug("Shutting down application");
            if (application != null) application.shutdown();
        }
    }
}


Make NameTag available to modules

Make NameTag available to modules

--- engine/src/main/java/org/terasology/logic/nameTags/NameTagComponent.java
+++ engine/src/main/java/org/terasology/logic/nameTags/NameTagComponent.java
@@ -16,6 +16,7 @@
 package org.terasology.logic.nameTags;

 import org.terasology.entitySystem.Component;
+import org.terasology.module.sandbox.API;
 import org.terasology.rendering.nui.Color;

 /**
@@ -25,6 +26,7 @@
  *
  * The color of the name tag is based on the {@link org.terasology.network.ColorComponent} of this entity
  */
+@API
 public class NameTagComponent implements Component {

     public float yOffset = 0.3f;

<|original_code|>
/*
 * Copyright 2014 MovingBlocks
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.terasology.logic.nameTags;

import org.terasology.entitySystem.Component;
import org.terasology.rendering.nui.Color;

/**
 * Will make the entity have a name tag overhead in the 3D view.
 *
 * The text on name tag is based on the {@link org.terasology.logic.common.DisplayNameComponent} this entity.
 *
 * The color of the name tag is based on the {@link org.terasology.network.ColorComponent} of this entity
 */
public class NameTagComponent implements Component {

    public float yOffset = 0.3f;

    public String text;

    public Color textColor = Color.WHITE;

}

<|edits_diff|>
--- engine/src/main/java/org/terasology/logic/nameTags/NameTagComponent.java
+++ engine/src/main/java/org/terasology/logic/nameTags/NameTagComponent.java
@@ -16,6 +16,7 @@
 package org.terasology.logic.nameTags;

 import org.terasology.entitySystem.Component;
+import org.terasology.module.sandbox.API;
 import org.terasology.rendering.nui.Color;

 /**
<|current_version|>
/*
 * Copyright 2014 MovingBlocks
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.terasology.logic.nameTags;

import org.terasology.entitySystem.Component;
import org.terasology.module.sandbox.API;
import org.terasology.rendering.nui.Color;

/**
 * Will make the entity have a name tag overhead in the 3D view.
 *
 * The text on name tag is based on the {@link org.terasology.logic.common.DisplayNameComponent} this entity.
 *
 * The color of the name tag is based on the {@link org.terasology.network.ColorComponent} of this entity
 */
public class NameTagComponent implements Component {

    public float yOffset = 0.3f;

    public String text;

    public Color textColor = Color.WHITE;

}

<|next_version|>
/*
 * Copyright 2014 MovingBlocks
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.terasology.logic.nameTags;

import org.terasology.entitySystem.Component;
import org.terasology.module.sandbox.API;
import org.terasology.rendering.nui.Color;

/**
 * Will make the entity have a name tag overhead in the 3D view.
 *
 * The text on name tag is based on the {@link org.terasology.logic.common.DisplayNameComponent} this entity.
 *
 * The color of the name tag is based on the {@link org.terasology.network.ColorComponent} of this entity
 */
@API
public class NameTagComponent implements Component {

    public float yOffset = 0.3f;

    public String text;

    public Color textColor = Color.WHITE;

}


Put back ClearCredential in Guice loading process

--- priam/src/main/java/com/netflix/priam/defaultimpl/PriamGuiceModule.java
+++ priam/src/main/java/com/netflix/priam/defaultimpl/PriamGuiceModule.java
@@ -23,6 +23,9 @@
 import com.netflix.priam.aws.S3FileSystem;
 import com.netflix.priam.backup.IBackupFileSystem;

+import com.netflix.priam.ICredential;
+
+
 public class PriamGuiceModule extends AbstractModule
 {
     @Override
@@ -33,5 +36,6 @@
         bind(IBackupFileSystem.class).annotatedWith(Names.named("backup")).to(S3FileSystem.class);
         bind(IBackupFileSystem.class).annotatedWith(Names.named("incr_restore")).to(S3FileSystem.class);
         bind(IBackupFileSystem.class).annotatedWith(Names.named("backup_status")).to(S3FileSystem.class);
+        bind(ICredential.class).to(ClearCredential.class);
     }
 }

<|original_code|>
/**
 * Copyright 2013 Netflix, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.netflix.priam.defaultimpl;

import org.quartz.SchedulerFactory;
import org.quartz.impl.StdSchedulerFactory;

import com.google.inject.AbstractModule;
import com.google.inject.name.Names;
import com.netflix.priam.aws.S3FileSystem;
import com.netflix.priam.backup.IBackupFileSystem;

public class PriamGuiceModule extends AbstractModule
{
    @Override
    protected void configure()
    {
        bind(SchedulerFactory.class).to(StdSchedulerFactory.class).asEagerSingleton();

        bind(IBackupFileSystem.class).annotatedWith(Names.named("backup")).to(S3FileSystem.class);
        bind(IBackupFileSystem.class).annotatedWith(Names.named("incr_restore")).to(S3FileSystem.class);
        bind(IBackupFileSystem.class).annotatedWith(Names.named("backup_status")).to(S3FileSystem.class);
    }
}

<|edits_diff|>
--- priam/src/main/java/com/netflix/priam/defaultimpl/PriamGuiceModule.java
+++ priam/src/main/java/com/netflix/priam/defaultimpl/PriamGuiceModule.java
@@ -23,6 +23,9 @@
 import com.netflix.priam.aws.S3FileSystem;
 import com.netflix.priam.backup.IBackupFileSystem;

+import com.netflix.priam.ICredential;
+
+
 public class PriamGuiceModule extends AbstractModule
 {
     @Override
<|current_version|>
/**
 * Copyright 2013 Netflix, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.netflix.priam.defaultimpl;

import org.quartz.SchedulerFactory;
import org.quartz.impl.StdSchedulerFactory;

import com.google.inject.AbstractModule;
import com.google.inject.name.Names;
import com.netflix.priam.aws.S3FileSystem;
import com.netflix.priam.backup.IBackupFileSystem;

import com.netflix.priam.ICredential;

public class PriamGuiceModule extends AbstractModule
{
    @Override
    protected void configure()
    {
        bind(SchedulerFactory.class).to(StdSchedulerFactory.class).asEagerSingleton();

        bind(IBackupFileSystem.class).annotatedWith(Names.named("backup")).to(S3FileSystem.class);
        bind(IBackupFileSystem.class).annotatedWith(Names.named("incr_restore")).to(S3FileSystem.class);
        bind(IBackupFileSystem.class).annotatedWith(Names.named("backup_status")).to(S3FileSystem.class);
    }
}

<|next_version|>
/**
 * Copyright 2013 Netflix, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.netflix.priam.defaultimpl;

import org.quartz.SchedulerFactory;
import org.quartz.impl.StdSchedulerFactory;

import com.google.inject.AbstractModule;
import com.google.inject.name.Names;
import com.netflix.priam.aws.S3FileSystem;
import com.netflix.priam.backup.IBackupFileSystem;

import com.netflix.priam.ICredential;

public class PriamGuiceModule extends AbstractModule
{
    @Override
    protected void configure()
    {
        bind(SchedulerFactory.class).to(StdSchedulerFactory.class).asEagerSingleton();

        bind(IBackupFileSystem.class).annotatedWith(Names.named("backup")).to(S3FileSystem.class);
        bind(IBackupFileSystem.class).annotatedWith(Names.named("incr_restore")).to(S3FileSystem.class);
        bind(IBackupFileSystem.class).annotatedWith(Names.named("backup_status")).to(S3FileSystem.class);
        bind(ICredential.class).to(ClearCredential.class);
    }
}


Add missing creation and deletion SQLite invocations

--- app/src/main/java/com/satsumasoftware/timetable/db/TimetableDbHelper.java
+++ app/src/main/java/com/satsumasoftware/timetable/db/TimetableDbHelper.java
@@ -24,13 +24,21 @@

     @Override
     public void onCreate(SQLiteDatabase db) {
+        db.execSQL(ClassDetailsMapSchema.SQL_CREATE);
+        db.execSQL(ClassDetailsSchema.SQL_CREATE);
+        db.execSQL(ClassDetailTimesMapSchema.SQL_CREATE);
         db.execSQL(ClassesSchema.SQL_CREATE);
+        db.execSQL(ClassTimesSchema.SQL_CREATE);
         db.execSQL(SubjectsSchema.SQL_CREATE);
     }

     @Override
     public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
+        db.execSQL(ClassDetailsMapSchema.SQL_DELETE);
+        db.execSQL(ClassDetailsSchema.SQL_DELETE);
+        db.execSQL(ClassDetailTimesMapSchema.SQL_DELETE);
         db.execSQL(ClassesSchema.SQL_DELETE);
+        db.execSQL(ClassTimesSchema.SQL_DELETE);
         db.execSQL(SubjectsSchema.SQL_DELETE);
         onCreate(db);
     }

<|original_code|>
package com.satsumasoftware.timetable.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public final class TimetableDbHelper extends SQLiteOpenHelper {

    private static TimetableDbHelper sInstance;

    private static final int DATABASE_VERSION = 1;
    private static final String DATABASE_NAME = "Timetable.db";

    public static synchronized TimetableDbHelper getInstance(Context context) {
        if (sInstance == null) {
            sInstance = new TimetableDbHelper(context.getApplicationContext());
        }
        return sInstance;
    }

    private TimetableDbHelper(Context context) {
        super(context, DATABASE_NAME, null, DATABASE_VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL(ClassesSchema.SQL_CREATE);
        db.execSQL(SubjectsSchema.SQL_CREATE);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        db.execSQL(ClassesSchema.SQL_DELETE);
        db.execSQL(SubjectsSchema.SQL_DELETE);
        onCreate(db);
    }

}

<|edits_diff|>
--- app/src/main/java/com/satsumasoftware/timetable/db/TimetableDbHelper.java
+++ app/src/main/java/com/satsumasoftware/timetable/db/TimetableDbHelper.java
@@ -24,12 +24,19 @@

     @Override
     public void onCreate(SQLiteDatabase db) {
+        db.execSQL(ClassDetailsMapSchema.SQL_CREATE);
+        db.execSQL(ClassDetailsSchema.SQL_CREATE);
+        db.execSQL(ClassDetailTimesMapSchema.SQL_CREATE);
         db.execSQL(ClassesSchema.SQL_CREATE);
+        db.execSQL(ClassTimesSchema.SQL_CREATE);
         db.execSQL(SubjectsSchema.SQL_CREATE);
     }

     @Override
     public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
+        db.execSQL(ClassDetailsMapSchema.SQL_DELETE);
+        db.execSQL(ClassDetailsSchema.SQL_DELETE);
+        db.execSQL(ClassDetailTimesMapSchema.SQL_DELETE);
         db.execSQL(ClassesSchema.SQL_DELETE);
         db.execSQL(SubjectsSchema.SQL_DELETE);
         onCreate(db);
<|current_version|>
package com.satsumasoftware.timetable.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public final class TimetableDbHelper extends SQLiteOpenHelper {

    private static TimetableDbHelper sInstance;

    private static final int DATABASE_VERSION = 1;
    private static final String DATABASE_NAME = "Timetable.db";

    public static synchronized TimetableDbHelper getInstance(Context context) {
        if (sInstance == null) {
            sInstance = new TimetableDbHelper(context.getApplicationContext());
        }
        return sInstance;
    }

    private TimetableDbHelper(Context context) {
        super(context, DATABASE_NAME, null, DATABASE_VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL(ClassDetailsMapSchema.SQL_CREATE);
        db.execSQL(ClassDetailsSchema.SQL_CREATE);
        db.execSQL(ClassDetailTimesMapSchema.SQL_CREATE);
        db.execSQL(ClassesSchema.SQL_CREATE);
        db.execSQL(ClassTimesSchema.SQL_CREATE);
        db.execSQL(SubjectsSchema.SQL_CREATE);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        db.execSQL(ClassDetailsMapSchema.SQL_DELETE);
        db.execSQL(ClassDetailsSchema.SQL_DELETE);
        db.execSQL(ClassDetailTimesMapSchema.SQL_DELETE);
        db.execSQL(ClassesSchema.SQL_DELETE);
        db.execSQL(SubjectsSchema.SQL_DELETE);
        onCreate(db);
    }

}

<|next_version|>
package com.satsumasoftware.timetable.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public final class TimetableDbHelper extends SQLiteOpenHelper {

    private static TimetableDbHelper sInstance;

    private static final int DATABASE_VERSION = 1;
    private static final String DATABASE_NAME = "Timetable.db";

    public static synchronized TimetableDbHelper getInstance(Context context) {
        if (sInstance == null) {
            sInstance = new TimetableDbHelper(context.getApplicationContext());
        }
        return sInstance;
    }

    private TimetableDbHelper(Context context) {
        super(context, DATABASE_NAME, null, DATABASE_VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL(ClassDetailsMapSchema.SQL_CREATE);
        db.execSQL(ClassDetailsSchema.SQL_CREATE);
        db.execSQL(ClassDetailTimesMapSchema.SQL_CREATE);
        db.execSQL(ClassesSchema.SQL_CREATE);
        db.execSQL(ClassTimesSchema.SQL_CREATE);
        db.execSQL(SubjectsSchema.SQL_CREATE);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        db.execSQL(ClassDetailsMapSchema.SQL_DELETE);
        db.execSQL(ClassDetailsSchema.SQL_DELETE);
        db.execSQL(ClassDetailTimesMapSchema.SQL_DELETE);
        db.execSQL(ClassesSchema.SQL_DELETE);
        db.execSQL(ClassTimesSchema.SQL_DELETE);
        db.execSQL(SubjectsSchema.SQL_DELETE);
        onCreate(db);
    }

}


Add a missing SDK suppression for migration test on platform backend.

Test: Presubmit

Change-Id: I743e5f77a088e7f260d6cc18541b7d9a204dc1f5

--- appsearch/appsearch/src/androidTest/java/androidx/appsearch/app/cts/AppSearchSchemaMigrationPlatformCtsTest.java
+++ appsearch/appsearch/src/androidTest/java/androidx/appsearch/app/cts/AppSearchSchemaMigrationPlatformCtsTest.java
@@ -17,14 +17,17 @@
 package androidx.appsearch.app.cts;

 import android.content.Context;
+import android.os.Build;

 import androidx.annotation.NonNull;
 import androidx.appsearch.app.AppSearchSession;
 import androidx.appsearch.platformstorage.PlatformStorage;
 import androidx.test.core.app.ApplicationProvider;
+import androidx.test.filters.SdkSuppress;

 import com.google.common.util.concurrent.ListenableFuture;

+@SdkSuppress(minSdkVersion = Build.VERSION_CODES.S)
 public class AppSearchSchemaMigrationPlatformCtsTest extends AppSearchSchemaMigrationCtsTestBase{
     @Override
     protected ListenableFuture<AppSearchSession> createSearchSession(@NonNull String dbName) {

<|original_code|>
/*
 * Copyright 2021 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// @exportToFramework:skipFile()
package androidx.appsearch.app.cts;

import android.content.Context;

import androidx.annotation.NonNull;
import androidx.appsearch.app.AppSearchSession;
import androidx.appsearch.platformstorage.PlatformStorage;
import androidx.test.core.app.ApplicationProvider;

import com.google.common.util.concurrent.ListenableFuture;

public class AppSearchSchemaMigrationPlatformCtsTest extends AppSearchSchemaMigrationCtsTestBase{
    @Override
    protected ListenableFuture<AppSearchSession> createSearchSession(@NonNull String dbName) {
        Context context = ApplicationProvider.getApplicationContext();
        return PlatformStorage.createSearchSession(
                new PlatformStorage.SearchContext.Builder(context, dbName).build());
    }
}

<|edits_diff|>
--- appsearch/appsearch/src/androidTest/java/androidx/appsearch/app/cts/AppSearchSchemaMigrationPlatformCtsTest.java
+++ appsearch/appsearch/src/androidTest/java/androidx/appsearch/app/cts/AppSearchSchemaMigrationPlatformCtsTest.java
@@ -17,11 +17,13 @@
 package androidx.appsearch.app.cts;

 import android.content.Context;
+import android.os.Build;

 import androidx.annotation.NonNull;
 import androidx.appsearch.app.AppSearchSession;
 import androidx.appsearch.platformstorage.PlatformStorage;
 import androidx.test.core.app.ApplicationProvider;
+import androidx.test.filters.SdkSuppress;

 import com.google.common.util.concurrent.ListenableFuture;

<|current_version|>
/*
 * Copyright 2021 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// @exportToFramework:skipFile()
package androidx.appsearch.app.cts;

import android.content.Context;
import android.os.Build;

import androidx.annotation.NonNull;
import androidx.appsearch.app.AppSearchSession;
import androidx.appsearch.platformstorage.PlatformStorage;
import androidx.test.core.app.ApplicationProvider;
import androidx.test.filters.SdkSuppress;

import com.google.common.util.concurrent.ListenableFuture;

public class AppSearchSchemaMigrationPlatformCtsTest extends AppSearchSchemaMigrationCtsTestBase{
    @Override
    protected ListenableFuture<AppSearchSession> createSearchSession(@NonNull String dbName) {
        Context context = ApplicationProvider.getApplicationContext();
        return PlatformStorage.createSearchSession(
                new PlatformStorage.SearchContext.Builder(context, dbName).build());
    }
}

<|next_version|>
/*
 * Copyright 2021 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// @exportToFramework:skipFile()
package androidx.appsearch.app.cts;

import android.content.Context;
import android.os.Build;

import androidx.annotation.NonNull;
import androidx.appsearch.app.AppSearchSession;
import androidx.appsearch.platformstorage.PlatformStorage;
import androidx.test.core.app.ApplicationProvider;
import androidx.test.filters.SdkSuppress;

import com.google.common.util.concurrent.ListenableFuture;

@SdkSuppress(minSdkVersion = Build.VERSION_CODES.S)
public class AppSearchSchemaMigrationPlatformCtsTest extends AppSearchSchemaMigrationCtsTestBase{
    @Override
    protected ListenableFuture<AppSearchSession> createSearchSession(@NonNull String dbName) {
        Context context = ApplicationProvider.getApplicationContext();
        return PlatformStorage.createSearchSession(
                new PlatformStorage.SearchContext.Builder(context, dbName).build());
    }
}


Add generic types for an optional

Add generic types for an optional

--- plugins/stream-debugger/src/main/java/com/intellij/debugger/streams/trace/impl/handler/type/GenericType.java
+++ plugins/stream-debugger/src/main/java/com/intellij/debugger/streams/trace/impl/handler/type/GenericType.java
@@ -15,6 +15,7 @@
  */
 package com.intellij.debugger.streams.trace.impl.handler.type;

+import com.intellij.psi.CommonClassNames;
 import org.jetbrains.annotations.NotNull;

 /**
@@ -33,4 +34,9 @@
   GenericType LONG = new GenericTypeImpl("long", "java.lang.Long");
   GenericType OBJECT = new ClassTypeImpl("java.lang.Object");
   GenericType VOID = new GenericTypeImpl("void", "java.lang.Void");
+
+  GenericType OPTIONAL = new ClassTypeImpl(CommonClassNames.JAVA_UTIL_OPTIONAL);
+  GenericType OPTIONAL_INT = new ClassTypeImpl("java.lang.OptionalInt");
+  GenericType OPTIONAL_LONG = new ClassTypeImpl("java.lang.OptionalLong");
+  GenericType OPTIONAL_DOUBLE = new ClassTypeImpl("java.lang.OptionalDouble");
 }

<|original_code|>
/*
 * Copyright 2000-2017 JetBrains s.r.o.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.intellij.debugger.streams.trace.impl.handler.type;

import org.jetbrains.annotations.NotNull;

/**
 * @author Vitaliy.Bibaev
 */
public interface GenericType {
  @NotNull
  String getVariableTypeName();

  @NotNull
  String getGenericTypeName();

  GenericType BOOLEAN = new GenericTypeImpl("boolean", "java.lang.Boolean");
  GenericType INT = new GenericTypeImpl("int", "java.lang.Integer");
  GenericType DOUBLE = new GenericTypeImpl("double", "java.lang.Double");
  GenericType LONG = new GenericTypeImpl("long", "java.lang.Long");
  GenericType OBJECT = new ClassTypeImpl("java.lang.Object");
  GenericType VOID = new GenericTypeImpl("void", "java.lang.Void");
}

<|edits_diff|>
--- plugins/stream-debugger/src/main/java/com/intellij/debugger/streams/trace/impl/handler/type/GenericType.java
+++ plugins/stream-debugger/src/main/java/com/intellij/debugger/streams/trace/impl/handler/type/GenericType.java
@@ -15,6 +15,7 @@
  */
 package com.intellij.debugger.streams.trace.impl.handler.type;

+import com.intellij.psi.CommonClassNames;
 import org.jetbrains.annotations.NotNull;

 /**
<|current_version|>
/*
 * Copyright 2000-2017 JetBrains s.r.o.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.intellij.debugger.streams.trace.impl.handler.type;

import com.intellij.psi.CommonClassNames;
import org.jetbrains.annotations.NotNull;

/**
 * @author Vitaliy.Bibaev
 */
public interface GenericType {
  @NotNull
  String getVariableTypeName();

  @NotNull
  String getGenericTypeName();

  GenericType BOOLEAN = new GenericTypeImpl("boolean", "java.lang.Boolean");
  GenericType INT = new GenericTypeImpl("int", "java.lang.Integer");
  GenericType DOUBLE = new GenericTypeImpl("double", "java.lang.Double");
  GenericType LONG = new GenericTypeImpl("long", "java.lang.Long");
  GenericType OBJECT = new ClassTypeImpl("java.lang.Object");
  GenericType VOID = new GenericTypeImpl("void", "java.lang.Void");
}

<|next_version|>
/*
 * Copyright 2000-2017 JetBrains s.r.o.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.intellij.debugger.streams.trace.impl.handler.type;

import com.intellij.psi.CommonClassNames;
import org.jetbrains.annotations.NotNull;

/**
 * @author Vitaliy.Bibaev
 */
public interface GenericType {
  @NotNull
  String getVariableTypeName();

  @NotNull
  String getGenericTypeName();

  GenericType BOOLEAN = new GenericTypeImpl("boolean", "java.lang.Boolean");
  GenericType INT = new GenericTypeImpl("int", "java.lang.Integer");
  GenericType DOUBLE = new GenericTypeImpl("double", "java.lang.Double");
  GenericType LONG = new GenericTypeImpl("long", "java.lang.Long");
  GenericType OBJECT = new ClassTypeImpl("java.lang.Object");
  GenericType VOID = new GenericTypeImpl("void", "java.lang.Void");

  GenericType OPTIONAL = new ClassTypeImpl(CommonClassNames.JAVA_UTIL_OPTIONAL);
  GenericType OPTIONAL_INT = new ClassTypeImpl("java.lang.OptionalInt");
  GenericType OPTIONAL_LONG = new ClassTypeImpl("java.lang.OptionalLong");
  GenericType OPTIONAL_DOUBLE = new ClassTypeImpl("java.lang.OptionalDouble");
}


Exclude non-null properties in response.

--- services/src/api/src/main/java/org/openkilda/northbound/dto/switches/PortDto.java
+++ services/src/api/src/main/java/org/openkilda/northbound/dto/switches/PortDto.java
@@ -15,10 +15,12 @@

 package org.openkilda.northbound.dto.switches;

+import com.fasterxml.jackson.annotation.JsonInclude;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import lombok.Value;

 @Value
+@JsonInclude(JsonInclude.Include.NON_NULL)
 public class PortDto {

     @JsonProperty("switch_id")

<|original_code|>
/* Copyright 2018 Telstra Open Source
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 */

package org.openkilda.northbound.dto.switches;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Value;

@Value
public class PortDto {

    @JsonProperty("switch_id")
    private String switchId;

    @JsonProperty("port_no")
    private int portNo;

    @JsonProperty("success")
    private Boolean success;

    @JsonProperty("message")
    private String message;

    public PortDto(@JsonProperty("switch_id") String switchId, @JsonProperty("port_id") int portNo,
                     @JsonProperty("success") Boolean success, @JsonProperty("message") String message) {
        this.switchId = switchId;
        this.portNo = portNo;
        this.success = success;
        this.message = message;
    }
}

<|edits_diff|>
--- services/src/api/src/main/java/org/openkilda/northbound/dto/switches/PortDto.java
+++ services/src/api/src/main/java/org/openkilda/northbound/dto/switches/PortDto.java
@@ -15,6 +15,7 @@

 package org.openkilda.northbound.dto.switches;

+import com.fasterxml.jackson.annotation.JsonInclude;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import lombok.Value;

<|current_version|>
/* Copyright 2018 Telstra Open Source
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 */

package org.openkilda.northbound.dto.switches;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Value;

@Value
public class PortDto {

    @JsonProperty("switch_id")
    private String switchId;

    @JsonProperty("port_no")
    private int portNo;

    @JsonProperty("success")
    private Boolean success;

    @JsonProperty("message")
    private String message;

    public PortDto(@JsonProperty("switch_id") String switchId, @JsonProperty("port_id") int portNo,
                     @JsonProperty("success") Boolean success, @JsonProperty("message") String message) {
        this.switchId = switchId;
        this.portNo = portNo;
        this.success = success;
        this.message = message;
    }
}

<|next_version|>
/* Copyright 2018 Telstra Open Source
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 */

package org.openkilda.northbound.dto.switches;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Value;

@Value
@JsonInclude(JsonInclude.Include.NON_NULL)
public class PortDto {

    @JsonProperty("switch_id")
    private String switchId;

    @JsonProperty("port_no")
    private int portNo;

    @JsonProperty("success")
    private Boolean success;

    @JsonProperty("message")
    private String message;

    public PortDto(@JsonProperty("switch_id") String switchId, @JsonProperty("port_id") int portNo,
                     @JsonProperty("success") Boolean success, @JsonProperty("message") String message) {
        this.switchId = switchId;
        this.portNo = portNo;
        this.success = success;
        this.message = message;
    }
}