Add methods to Auth endpoint

Add methods to Auth endpoint

--- WahrDiscordApi/src/main/java/co/phoenixlab/discord/api/endpoints/AuthenticationEndpoint.java
+++ WahrDiscordApi/src/main/java/co/phoenixlab/discord/api/endpoints/AuthenticationEndpoint.java
@@ -12,8 +12,16 @@

 package co.phoenixlab.discord.api.endpoints;

+import co.phoenixlab.discord.api.entities.TokenResponse;
+import co.phoenixlab.discord.api.request.EmailPasswordLoginRequest;
+import co.phoenixlab.discord.api.request.LogoutRequest;
+
 public interface AuthenticationEndpoint {

+    TokenResponse logIn(EmailPasswordLoginRequest request)
+            throws ApiException;

+    void logOut(LogoutRequest request)
+            throws ApiException;

 }

<|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.endpoints;

public interface AuthenticationEndpoint {

}

<|edits_diff|>
--- WahrDiscordApi/src/main/java/co/phoenixlab/discord/api/endpoints/AuthenticationEndpoint.java
+++ WahrDiscordApi/src/main/java/co/phoenixlab/discord/api/endpoints/AuthenticationEndpoint.java
@@ -12,8 +12,14 @@

 package co.phoenixlab.discord.api.endpoints;

+import co.phoenixlab.discord.api.entities.TokenResponse;
+import co.phoenixlab.discord.api.request.EmailPasswordLoginRequest;
+import co.phoenixlab.discord.api.request.LogoutRequest;
+
 public interface AuthenticationEndpoint {

+    TokenResponse logIn(EmailPasswordLoginRequest request)
+            throws ApiException;

 }
<|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.endpoints;

import co.phoenixlab.discord.api.entities.TokenResponse;
import co.phoenixlab.discord.api.request.EmailPasswordLoginRequest;
import co.phoenixlab.discord.api.request.LogoutRequest;

public interface AuthenticationEndpoint {

    TokenResponse logIn(EmailPasswordLoginRequest request)
            throws ApiException;

}

<|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.endpoints;

import co.phoenixlab.discord.api.entities.TokenResponse;
import co.phoenixlab.discord.api.request.EmailPasswordLoginRequest;
import co.phoenixlab.discord.api.request.LogoutRequest;

public interface AuthenticationEndpoint {

    TokenResponse logIn(EmailPasswordLoginRequest request)
            throws ApiException;

    void logOut(LogoutRequest request)
            throws ApiException;

}


Make it really obvious in the logs if AutoML is enabled.

--- h2o-automl/src/main/java/water/automl/Register.java
+++ h2o-automl/src/main/java/water/automl/Register.java
@@ -5,6 +5,7 @@
 import water.automl.api.AutoMLBuilderHandler;
 import water.automl.api.AutoMLHandler;
 import water.automl.api.AutoMLJSONSchemaHandler;
+import water.util.Log;

 public class Register extends AbstractRegister{
   @Override public void register(String relativeResourcePath) throws ClassNotFoundException {
@@ -21,6 +22,7 @@
     RequestServer.registerEndpoint("automl_schema",
             "GET /3/AutoMLJSONSchemaHandler", AutoMLJSONSchemaHandler.class, "getJSONSchema",
             "Get the json schema for the AutoML input fields.");
+    Log.info("H2O AutoML extensions enabled.");

   }
 }

<|original_code|>
package water.automl;

import water.api.AbstractRegister;
import water.api.RequestServer;
import water.automl.api.AutoMLBuilderHandler;
import water.automl.api.AutoMLHandler;
import water.automl.api.AutoMLJSONSchemaHandler;

public class Register extends AbstractRegister{
  @Override public void register(String relativeResourcePath) throws ClassNotFoundException {
    // H2O.register("POST /3/AutoMLBuilder", AutoMLBuilderHandler.class, "POST", "automl", "automatically build models");
    // H2O.register("GET /3/AutoML/{automl_id}", AutoMLHandler.class,"refresh", "GET", "refresh the model key");
    // H2O.register("GET /3/AutoMLJSONSchemaHandler", AutoMLJSONSchemaHandler.class, "GET", "getJSONSchema", "Get the json schema for the AutoML input fields.");

    RequestServer.registerEndpoint("automl_build",
            "POST /3/AutoMLBuilder", AutoMLBuilderHandler.class, "build",
            "Start an AutoML build process.");
    RequestServer.registerEndpoint("automl_refresh",
            "GET /3/AutoML/{automl_id}", AutoMLHandler.class, "refresh",
            "Refresh the model key.");
    RequestServer.registerEndpoint("automl_schema",
            "GET /3/AutoMLJSONSchemaHandler", AutoMLJSONSchemaHandler.class, "getJSONSchema",
            "Get the json schema for the AutoML input fields.");

  }
}

<|edits_diff|>
--- h2o-automl/src/main/java/water/automl/Register.java
+++ h2o-automl/src/main/java/water/automl/Register.java
@@ -5,6 +5,7 @@
 import water.automl.api.AutoMLBuilderHandler;
 import water.automl.api.AutoMLHandler;
 import water.automl.api.AutoMLJSONSchemaHandler;
+import water.util.Log;

 public class Register extends AbstractRegister{
   @Override public void register(String relativeResourcePath) throws ClassNotFoundException {
<|current_version|>
package water.automl;

import water.api.AbstractRegister;
import water.api.RequestServer;
import water.automl.api.AutoMLBuilderHandler;
import water.automl.api.AutoMLHandler;
import water.automl.api.AutoMLJSONSchemaHandler;
import water.util.Log;

public class Register extends AbstractRegister{
  @Override public void register(String relativeResourcePath) throws ClassNotFoundException {
    // H2O.register("POST /3/AutoMLBuilder", AutoMLBuilderHandler.class, "POST", "automl", "automatically build models");
    // H2O.register("GET /3/AutoML/{automl_id}", AutoMLHandler.class,"refresh", "GET", "refresh the model key");
    // H2O.register("GET /3/AutoMLJSONSchemaHandler", AutoMLJSONSchemaHandler.class, "GET", "getJSONSchema", "Get the json schema for the AutoML input fields.");

    RequestServer.registerEndpoint("automl_build",
            "POST /3/AutoMLBuilder", AutoMLBuilderHandler.class, "build",
            "Start an AutoML build process.");
    RequestServer.registerEndpoint("automl_refresh",
            "GET /3/AutoML/{automl_id}", AutoMLHandler.class, "refresh",
            "Refresh the model key.");
    RequestServer.registerEndpoint("automl_schema",
            "GET /3/AutoMLJSONSchemaHandler", AutoMLJSONSchemaHandler.class, "getJSONSchema",
            "Get the json schema for the AutoML input fields.");

  }
}

<|next_version|>
package water.automl;

import water.api.AbstractRegister;
import water.api.RequestServer;
import water.automl.api.AutoMLBuilderHandler;
import water.automl.api.AutoMLHandler;
import water.automl.api.AutoMLJSONSchemaHandler;
import water.util.Log;

public class Register extends AbstractRegister{
  @Override public void register(String relativeResourcePath) throws ClassNotFoundException {
    // H2O.register("POST /3/AutoMLBuilder", AutoMLBuilderHandler.class, "POST", "automl", "automatically build models");
    // H2O.register("GET /3/AutoML/{automl_id}", AutoMLHandler.class,"refresh", "GET", "refresh the model key");
    // H2O.register("GET /3/AutoMLJSONSchemaHandler", AutoMLJSONSchemaHandler.class, "GET", "getJSONSchema", "Get the json schema for the AutoML input fields.");

    RequestServer.registerEndpoint("automl_build",
            "POST /3/AutoMLBuilder", AutoMLBuilderHandler.class, "build",
            "Start an AutoML build process.");
    RequestServer.registerEndpoint("automl_refresh",
            "GET /3/AutoML/{automl_id}", AutoMLHandler.class, "refresh",
            "Refresh the model key.");
    RequestServer.registerEndpoint("automl_schema",
            "GET /3/AutoMLJSONSchemaHandler", AutoMLJSONSchemaHandler.class, "getJSONSchema",
            "Get the json schema for the AutoML input fields.");
    Log.info("H2O AutoML extensions enabled.");

  }
}


Switch component to solve body in body issues

--- dust-core/src/main/java/se/l4/dust/core/internal/template/components/DataContextSwitcher.java
+++ dust-core/src/main/java/se/l4/dust/core/internal/template/components/DataContextSwitcher.java
@@ -25,9 +25,11 @@
 	{
 		TemplateEmitterImpl emitterImpl = (TemplateEmitterImpl) emitter;
 		Integer old = emitterImpl.switchData(id);
+		Integer oldC = emitterImpl.switchComponent(id);

 		emitterImpl.emit(content);

+		emitterImpl.switchComponent(oldC);
 		emitterImpl.switchData(old);
 	}

<|original_code|>
package se.l4.dust.core.internal.template.components;

import java.io.IOException;

import se.l4.dust.api.template.Emittable;
import se.l4.dust.api.template.TemplateEmitter;
import se.l4.dust.api.template.TemplateOutputStream;
import se.l4.dust.core.internal.template.TemplateEmitterImpl;

public class DataContextSwitcher
	implements Emittable
{
	private final Integer id;
	private final Emittable[] content;

	public DataContextSwitcher(Integer id, Emittable[] content)
	{
		this.id = id;
		this.content = content;
	}

	@Override
	public void emit(TemplateEmitter emitter, TemplateOutputStream out)
		throws IOException
	{
		TemplateEmitterImpl emitterImpl = (TemplateEmitterImpl) emitter;
		Integer old = emitterImpl.switchData(id);

		emitterImpl.emit(content);

		emitterImpl.switchData(old);
	}

	@Override
	public String toString()
	{
		return "DataSwitch[id=" + id + "]";
	}
}

<|edits_diff|>
--- dust-core/src/main/java/se/l4/dust/core/internal/template/components/DataContextSwitcher.java
+++ dust-core/src/main/java/se/l4/dust/core/internal/template/components/DataContextSwitcher.java
@@ -25,6 +25,7 @@
 	{
 		TemplateEmitterImpl emitterImpl = (TemplateEmitterImpl) emitter;
 		Integer old = emitterImpl.switchData(id);
+		Integer oldC = emitterImpl.switchComponent(id);

 		emitterImpl.emit(content);

<|current_version|>
package se.l4.dust.core.internal.template.components;

import java.io.IOException;

import se.l4.dust.api.template.Emittable;
import se.l4.dust.api.template.TemplateEmitter;
import se.l4.dust.api.template.TemplateOutputStream;
import se.l4.dust.core.internal.template.TemplateEmitterImpl;

public class DataContextSwitcher
	implements Emittable
{
	private final Integer id;
	private final Emittable[] content;

	public DataContextSwitcher(Integer id, Emittable[] content)
	{
		this.id = id;
		this.content = content;
	}

	@Override
	public void emit(TemplateEmitter emitter, TemplateOutputStream out)
		throws IOException
	{
		TemplateEmitterImpl emitterImpl = (TemplateEmitterImpl) emitter;
		Integer old = emitterImpl.switchData(id);
		Integer oldC = emitterImpl.switchComponent(id);

		emitterImpl.emit(content);

		emitterImpl.switchData(old);
	}

	@Override
	public String toString()
	{
		return "DataSwitch[id=" + id + "]";
	}
}

<|next_version|>
package se.l4.dust.core.internal.template.components;

import java.io.IOException;

import se.l4.dust.api.template.Emittable;
import se.l4.dust.api.template.TemplateEmitter;
import se.l4.dust.api.template.TemplateOutputStream;
import se.l4.dust.core.internal.template.TemplateEmitterImpl;

public class DataContextSwitcher
	implements Emittable
{
	private final Integer id;
	private final Emittable[] content;

	public DataContextSwitcher(Integer id, Emittable[] content)
	{
		this.id = id;
		this.content = content;
	}

	@Override
	public void emit(TemplateEmitter emitter, TemplateOutputStream out)
		throws IOException
	{
		TemplateEmitterImpl emitterImpl = (TemplateEmitterImpl) emitter;
		Integer old = emitterImpl.switchData(id);
		Integer oldC = emitterImpl.switchComponent(id);

		emitterImpl.emit(content);

		emitterImpl.switchComponent(oldC);
		emitterImpl.switchData(old);
	}

	@Override
	public String toString()
	{
		return "DataSwitch[id=" + id + "]";
	}
}


Fix missing @api (see comment of Joachim Van der Auwera on GBE-247)

--- backend/api/src/main/java/org/geomajas/configuration/client/BoundsLimitOption.java
+++ backend/api/src/main/java/org/geomajas/configuration/client/BoundsLimitOption.java
@@ -11,6 +11,7 @@
 package org.geomajas.configuration.client;

 import java.io.Serializable;
+import org.geomajas.annotation.Api;

 /**
  * Enumeration class for the available options to limit (e.g. the mapview's) bounds when applying
@@ -20,6 +21,7 @@
  *
  * @since 1.10.0
  */
+@Api
 public enum BoundsLimitOption implements Serializable {

 	/**

<|original_code|>
/*
 * This is part of Geomajas, a GIS framework, http://www.geomajas.org/.
 *
 * Copyright 2008-2011 Geosparc nv, http://www.geosparc.com/, Belgium.
 *
 * The program is available in open source according to the GNU Affero
 * General Public License. All contributions in this program are covered
 * by the Geomajas Contributors License Agreement. For full licensing
 * details, see LICENSE.txt in the project root.
 */
package org.geomajas.configuration.client;

import java.io.Serializable;

/**
 * Enumeration class for the available options to limit (e.g. the mapview's) bounds when applying
 * 		the maxBounds limitation.
 *
 * @author An Buyle
 *
 * @since 1.10.0
 */
public enum BoundsLimitOption implements Serializable {

	/**
	 *  View center must be within maxBounds.
	 */
	CENTER_WITHIN_MAX_BOUNDS,
	/**
	 * The whole map view must lay completely within the maximum allowed bounds (maxBounds).
	 */
	COMPLETELY_WITHIN_MAX_BOUNDS;

	private static final long serialVersionUID = 1100L;

}

<|edits_diff|>
--- backend/api/src/main/java/org/geomajas/configuration/client/BoundsLimitOption.java
+++ backend/api/src/main/java/org/geomajas/configuration/client/BoundsLimitOption.java
@@ -11,6 +11,7 @@
 package org.geomajas.configuration.client;

 import java.io.Serializable;
+import org.geomajas.annotation.Api;

 /**
  * Enumeration class for the available options to limit (e.g. the mapview's) bounds when applying
<|current_version|>
/*
 * This is part of Geomajas, a GIS framework, http://www.geomajas.org/.
 *
 * Copyright 2008-2011 Geosparc nv, http://www.geosparc.com/, Belgium.
 *
 * The program is available in open source according to the GNU Affero
 * General Public License. All contributions in this program are covered
 * by the Geomajas Contributors License Agreement. For full licensing
 * details, see LICENSE.txt in the project root.
 */
package org.geomajas.configuration.client;

import java.io.Serializable;
import org.geomajas.annotation.Api;

/**
 * Enumeration class for the available options to limit (e.g. the mapview's) bounds when applying
 * 		the maxBounds limitation.
 *
 * @author An Buyle
 *
 * @since 1.10.0
 */
public enum BoundsLimitOption implements Serializable {

	/**
	 *  View center must be within maxBounds.
	 */
	CENTER_WITHIN_MAX_BOUNDS,
	/**
	 * The whole map view must lay completely within the maximum allowed bounds (maxBounds).
	 */
	COMPLETELY_WITHIN_MAX_BOUNDS;

	private static final long serialVersionUID = 1100L;

}

<|next_version|>
/*
 * This is part of Geomajas, a GIS framework, http://www.geomajas.org/.
 *
 * Copyright 2008-2011 Geosparc nv, http://www.geosparc.com/, Belgium.
 *
 * The program is available in open source according to the GNU Affero
 * General Public License. All contributions in this program are covered
 * by the Geomajas Contributors License Agreement. For full licensing
 * details, see LICENSE.txt in the project root.
 */
package org.geomajas.configuration.client;

import java.io.Serializable;
import org.geomajas.annotation.Api;

/**
 * Enumeration class for the available options to limit (e.g. the mapview's) bounds when applying
 * 		the maxBounds limitation.
 *
 * @author An Buyle
 *
 * @since 1.10.0
 */
@Api
public enum BoundsLimitOption implements Serializable {

	/**
	 *  View center must be within maxBounds.
	 */
	CENTER_WITHIN_MAX_BOUNDS,
	/**
	 * The whole map view must lay completely within the maximum allowed bounds (maxBounds).
	 */
	COMPLETELY_WITHIN_MAX_BOUNDS;

	private static final long serialVersionUID = 1100L;

}


Add a constructor that takes a cause Exception.

--- org/xbill/DNS/WireParseException.java
+++ org/xbill/DNS/WireParseException.java
@@ -22,4 +22,9 @@
 	super(s);
 }

+public
+WireParseException(String s, Throwable cause) {
+	super(s, cause);
 }
+
+}

<|original_code|>
// Copyright (c) 1999-2004 Brian Wellington (bwelling@xbill.org)

package org.xbill.DNS;

import java.io.*;

/**
 * An exception thrown when a DNS message is invalid.
 *
 * @author Brian Wellington
 */

public class WireParseException extends IOException {

public
WireParseException() {
	super();
}

public
WireParseException(String s) {
	super(s);
}

}

<|edits_diff|>
--- org/xbill/DNS/WireParseException.java
+++ org/xbill/DNS/WireParseException.java
@@ -22,4 +22,7 @@
 	super(s);
 }

+public
+WireParseException(String s, Throwable cause) {
+	super(s, cause);
 }
<|current_version|>
// Copyright (c) 1999-2004 Brian Wellington (bwelling@xbill.org)

package org.xbill.DNS;

import java.io.*;

/**
 * An exception thrown when a DNS message is invalid.
 *
 * @author Brian Wellington
 */

public class WireParseException extends IOException {

public
WireParseException() {
	super();
}

public
WireParseException(String s) {
	super(s);
}

public
WireParseException(String s, Throwable cause) {
	super(s, cause);
}

<|next_version|>
// Copyright (c) 1999-2004 Brian Wellington (bwelling@xbill.org)

package org.xbill.DNS;

import java.io.*;

/**
 * An exception thrown when a DNS message is invalid.
 *
 * @author Brian Wellington
 */

public class WireParseException extends IOException {

public
WireParseException() {
	super();
}

public
WireParseException(String s) {
	super(s);
}

public
WireParseException(String s, Throwable cause) {
	super(s, cause);
}

}


Add constant to the class

Add constant to the class

--- src/main/java/com/samovich/basics/concepts/objects/treehouse/PezDispenser.java
+++ src/main/java/com/samovich/basics/concepts/objects/treehouse/PezDispenser.java
@@ -9,11 +9,14 @@

 public class PezDispenser {

+    public static final int MAX_PEZ = 12;
     private String characterName;
+    private int pezCount;

     // Constructor
     public PezDispenser(String characterName){
         this.characterName = characterName;
+        this.pezCount = 0;
     }

     // Getter
@@ -21,4 +24,7 @@
         return characterName;
     }

+    public void load(){
+        this.pezCount = MAX_PEZ;
+    }
 }

<|original_code|>
/**
 * @file FileName.java
 * @author samov004
 * @version 1.0.0
 * @date 9/9/15
 */

package com.samovich.basics.concepts.objects.treehouse;

public class PezDispenser {

    private String characterName;

    // Constructor
    public PezDispenser(String characterName){
        this.characterName = characterName;
    }

    // Getter
    public String getCharacterName() {
        return characterName;
    }

}

<|edits_diff|>
--- src/main/java/com/samovich/basics/concepts/objects/treehouse/PezDispenser.java
+++ src/main/java/com/samovich/basics/concepts/objects/treehouse/PezDispenser.java
@@ -9,11 +9,14 @@

 public class PezDispenser {

+    public static final int MAX_PEZ = 12;
     private String characterName;
+    private int pezCount;

     // Constructor
     public PezDispenser(String characterName){
         this.characterName = characterName;
+        this.pezCount = 0;
     }

     // Getter
<|current_version|>
/**
 * @file FileName.java
 * @author samov004
 * @version 1.0.0
 * @date 9/9/15
 */

package com.samovich.basics.concepts.objects.treehouse;

public class PezDispenser {

    public static final int MAX_PEZ = 12;
    private String characterName;
    private int pezCount;

    // Constructor
    public PezDispenser(String characterName){
        this.characterName = characterName;
        this.pezCount = 0;
    }

    // Getter
    public String getCharacterName() {
        return characterName;
    }

}

<|next_version|>
/**
 * @file FileName.java
 * @author samov004
 * @version 1.0.0
 * @date 9/9/15
 */

package com.samovich.basics.concepts.objects.treehouse;

public class PezDispenser {

    public static final int MAX_PEZ = 12;
    private String characterName;
    private int pezCount;

    // Constructor
    public PezDispenser(String characterName){
        this.characterName = characterName;
        this.pezCount = 0;
    }

    // Getter
    public String getCharacterName() {
        return characterName;
    }

    public void load(){
        this.pezCount = MAX_PEZ;
    }
}


Include logcat in crash reports

Include logcat in crash reports

--- app/src/main/java/com/ogsdroid/MyApplication.java
+++ app/src/main/java/com/ogsdroid/MyApplication.java
@@ -4,12 +4,14 @@
 import android.content.Context;

 import org.acra.ACRA;
+import org.acra.ReportField;
 import org.acra.ReportingInteractionMode;
 import org.acra.annotation.ReportsCrashes;

 @ReportsCrashes(
         mailTo = "nathanj439@gmail.com",
         mode = ReportingInteractionMode.TOAST,
+        customReportContent = {ReportField.APP_VERSION_CODE, ReportField.APP_VERSION_NAME, ReportField.ANDROID_VERSION, ReportField.PHONE_MODEL, ReportField.STACK_TRACE, ReportField.LOGCAT },
         resToastText = R.string.crash_toast_text
 )

<|original_code|>
package com.ogsdroid;

import android.app.Application;
import android.content.Context;

import org.acra.ACRA;
import org.acra.ReportingInteractionMode;
import org.acra.annotation.ReportsCrashes;

@ReportsCrashes(
        mailTo = "nathanj439@gmail.com",
        mode = ReportingInteractionMode.TOAST,
        resToastText = R.string.crash_toast_text
)

public class MyApplication extends Application {
    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);

        // The following line triggers the initialization of ACRA
        ACRA.init(this);
    }

}

<|edits_diff|>
--- app/src/main/java/com/ogsdroid/MyApplication.java
+++ app/src/main/java/com/ogsdroid/MyApplication.java
@@ -4,6 +4,7 @@
 import android.content.Context;

 import org.acra.ACRA;
+import org.acra.ReportField;
 import org.acra.ReportingInteractionMode;
 import org.acra.annotation.ReportsCrashes;

<|current_version|>
package com.ogsdroid;

import android.app.Application;
import android.content.Context;

import org.acra.ACRA;
import org.acra.ReportField;
import org.acra.ReportingInteractionMode;
import org.acra.annotation.ReportsCrashes;

@ReportsCrashes(
        mailTo = "nathanj439@gmail.com",
        mode = ReportingInteractionMode.TOAST,
        resToastText = R.string.crash_toast_text
)

public class MyApplication extends Application {
    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);

        // The following line triggers the initialization of ACRA
        ACRA.init(this);
    }

}

<|next_version|>
package com.ogsdroid;

import android.app.Application;
import android.content.Context;

import org.acra.ACRA;
import org.acra.ReportField;
import org.acra.ReportingInteractionMode;
import org.acra.annotation.ReportsCrashes;

@ReportsCrashes(
        mailTo = "nathanj439@gmail.com",
        mode = ReportingInteractionMode.TOAST,
        customReportContent = {ReportField.APP_VERSION_CODE, ReportField.APP_VERSION_NAME, ReportField.ANDROID_VERSION, ReportField.PHONE_MODEL, ReportField.STACK_TRACE, ReportField.LOGCAT },
        resToastText = R.string.crash_toast_text
)

public class MyApplication extends Application {
    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);

        // The following line triggers the initialization of ACRA
        ACRA.init(this);
    }

}


Allow decoding the status as string value

--- core/amqp-transport/src/main/java/org/iotbricks/core/amqp/transport/utils/Properties.java
+++ core/amqp-transport/src/main/java/org/iotbricks/core/amqp/transport/utils/Properties.java
@@ -42,9 +42,19 @@
         // get status value

         final Object status = value.get("status");
+
+        if (status == null) {
+            return empty();
+        }
+
         if (status instanceof Number) {
             // return value as int
             return of(((Number) status).intValue());
+        }
+
+        try {
+            return of(Integer.parseInt(status.toString()));
+        } catch (final NumberFormatException e) {
         }

         // return nothing

<|original_code|>
package org.iotbricks.core.amqp.transport.utils;

import static java.util.Optional.empty;
import static java.util.Optional.of;

import java.util.Map;
import java.util.Objects;
import java.util.Optional;

import org.apache.qpid.proton.amqp.messaging.ApplicationProperties;
import org.apache.qpid.proton.message.Message;

public final class Properties {
    private Properties() {
    }

    /**
     * Extract the {@code status} value as Integer from the message
     *
     * @param message
     *            the message to extract the value from
     * @return the status value, never {@code null}, but may be
     *         {@link Optional#empty()}
     */
    public static Optional<Integer> status(final Message message) {
        Objects.requireNonNull(message);

        // get application properties

        final ApplicationProperties properties = message.getApplicationProperties();
        if (properties == null) {
            return empty();
        }

        // get value map

        final Map<?, ?> value = properties.getValue();
        if (value == null) {
            return empty();
        }

        // get status value

        final Object status = value.get("status");
        if (status instanceof Number) {
            // return value as int
            return of(((Number) status).intValue());
        }

        // return nothing

        return empty();
    }
}

<|edits_diff|>
--- core/amqp-transport/src/main/java/org/iotbricks/core/amqp/transport/utils/Properties.java
+++ core/amqp-transport/src/main/java/org/iotbricks/core/amqp/transport/utils/Properties.java
@@ -42,6 +42,11 @@
         // get status value

         final Object status = value.get("status");
+
+        if (status == null) {
+            return empty();
+        }
+
         if (status instanceof Number) {
             // return value as int
             return of(((Number) status).intValue());
<|current_version|>
package org.iotbricks.core.amqp.transport.utils;

import static java.util.Optional.empty;
import static java.util.Optional.of;

import java.util.Map;
import java.util.Objects;
import java.util.Optional;

import org.apache.qpid.proton.amqp.messaging.ApplicationProperties;
import org.apache.qpid.proton.message.Message;

public final class Properties {
    private Properties() {
    }

    /**
     * Extract the {@code status} value as Integer from the message
     *
     * @param message
     *            the message to extract the value from
     * @return the status value, never {@code null}, but may be
     *         {@link Optional#empty()}
     */
    public static Optional<Integer> status(final Message message) {
        Objects.requireNonNull(message);

        // get application properties

        final ApplicationProperties properties = message.getApplicationProperties();
        if (properties == null) {
            return empty();
        }

        // get value map

        final Map<?, ?> value = properties.getValue();
        if (value == null) {
            return empty();
        }

        // get status value

        final Object status = value.get("status");

        if (status == null) {
            return empty();
        }

        if (status instanceof Number) {
            // return value as int
            return of(((Number) status).intValue());
        }

        // return nothing

        return empty();
    }
}

<|next_version|>
package org.iotbricks.core.amqp.transport.utils;

import static java.util.Optional.empty;
import static java.util.Optional.of;

import java.util.Map;
import java.util.Objects;
import java.util.Optional;

import org.apache.qpid.proton.amqp.messaging.ApplicationProperties;
import org.apache.qpid.proton.message.Message;

public final class Properties {
    private Properties() {
    }

    /**
     * Extract the {@code status} value as Integer from the message
     *
     * @param message
     *            the message to extract the value from
     * @return the status value, never {@code null}, but may be
     *         {@link Optional#empty()}
     */
    public static Optional<Integer> status(final Message message) {
        Objects.requireNonNull(message);

        // get application properties

        final ApplicationProperties properties = message.getApplicationProperties();
        if (properties == null) {
            return empty();
        }

        // get value map

        final Map<?, ?> value = properties.getValue();
        if (value == null) {
            return empty();
        }

        // get status value

        final Object status = value.get("status");

        if (status == null) {
            return empty();
        }

        if (status instanceof Number) {
            // return value as int
            return of(((Number) status).intValue());
        }

        try {
            return of(Integer.parseInt(status.toString()));
        } catch (final NumberFormatException e) {
        }

        // return nothing

        return empty();
    }
}


[Java] Change retention policy on DoNotStub annotation so it is source only and not included in the class as is the default.

--- src/main/java/org/agrona/generation/DoNotSub.java
+++ src/main/java/org/agrona/generation/DoNotSub.java
@@ -15,10 +15,14 @@
  */
 package org.agrona.generation;

+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
 /**
  * A marker annotation to tell the primitive expander not to substitute
  * The line in question
  */
+@Retention(RetentionPolicy.SOURCE)
 public @interface DoNotSub
 {
 }

<|original_code|>
/*
 * Copyright 2014 - 2016 Real Logic 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.agrona.generation;

/**
 * A marker annotation to tell the primitive expander not to substitute
 * The line in question
 */
public @interface DoNotSub
{
}

<|edits_diff|>
--- src/main/java/org/agrona/generation/DoNotSub.java
+++ src/main/java/org/agrona/generation/DoNotSub.java
@@ -15,6 +15,9 @@
  */
 package org.agrona.generation;

+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
 /**
  * A marker annotation to tell the primitive expander not to substitute
  * The line in question
<|current_version|>
/*
 * Copyright 2014 - 2016 Real Logic 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.agrona.generation;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 * A marker annotation to tell the primitive expander not to substitute
 * The line in question
 */
public @interface DoNotSub
{
}
<|next_version|>
/*
 * Copyright 2014 - 2016 Real Logic 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.agrona.generation;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 * A marker annotation to tell the primitive expander not to substitute
 * The line in question
 */
@Retention(RetentionPolicy.SOURCE)
public @interface DoNotSub
{
}


Add support for new jOOQ 3.15 distributions

I've just published jOOQ 3.15, see:
https://blog.jooq.org/2021/07/06/3-15-0-release-with-support-for-r2dbc-nested-row-array-and-multiset-types-5-new-sql-dialects-create-procedure-function-and-trigger-support-and-much-more/

jOOQ 3.15 includes the following changes that are relevant for your plugin:

- The commercial editions now have a new Java 11 distribution. The default distribution is a Java 17 distribution (currently supporting Java 16)
- Support for the Java 6 distribution has been dropped in jOOQ 3.15, though I guess you should keep that enum value for now, in case someone uses jOOQ 3.14 or less
- The open source edition requires Java 11 starting from jOOQ 3.15

Let me know if you need any additional info and I'll be very happy to help.

--- src/main/groovy/nu/studer/gradle/jooq/JooqEdition.java
+++ src/main/groovy/nu/studer/gradle/jooq/JooqEdition.java
@@ -24,9 +24,11 @@

     OSS("org.jooq"),
     PRO("org.jooq.pro"),
+    PRO_JAVA_11("org.jooq.pro-java-11"),
     PRO_JAVA_8("org.jooq.pro-java-8"),
     PRO_JAVA_6("org.jooq.pro-java-6"),
     TRIAL("org.jooq.trial"),
+    TRIAL_JAVA_11("org.jooq.trial-java-11"),
     TRIAL_JAVA_8("org.jooq.trial-java-8"),
     TRIAL_JAVA_6("org.jooq.trial-java-6");

<|original_code|>
/*
 Copyright 2014 Etienne Studer

 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 nu.studer.gradle.jooq;

/**
 * jOOQ comes in different editions, which are published
 * under different group ids. The artifact names and versions
 * are the same for all editions.
 */
public enum JooqEdition {

    OSS("org.jooq"),
    PRO("org.jooq.pro"),
    PRO_JAVA_8("org.jooq.pro-java-8"),
    PRO_JAVA_6("org.jooq.pro-java-6"),
    TRIAL("org.jooq.trial"),
    TRIAL_JAVA_8("org.jooq.trial-java-8"),
    TRIAL_JAVA_6("org.jooq.trial-java-6");

    private final String groupId;

    JooqEdition(String groupId) {
        this.groupId = groupId;
    }

    public String getGroupId() {
        return groupId;
    }

}

<|edits_diff|>
--- src/main/groovy/nu/studer/gradle/jooq/JooqEdition.java
+++ src/main/groovy/nu/studer/gradle/jooq/JooqEdition.java
@@ -24,6 +24,7 @@

     OSS("org.jooq"),
     PRO("org.jooq.pro"),
+    PRO_JAVA_11("org.jooq.pro-java-11"),
     PRO_JAVA_8("org.jooq.pro-java-8"),
     PRO_JAVA_6("org.jooq.pro-java-6"),
     TRIAL("org.jooq.trial"),
<|current_version|>
/*
 Copyright 2014 Etienne Studer

 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 nu.studer.gradle.jooq;

/**
 * jOOQ comes in different editions, which are published
 * under different group ids. The artifact names and versions
 * are the same for all editions.
 */
public enum JooqEdition {

    OSS("org.jooq"),
    PRO("org.jooq.pro"),
    PRO_JAVA_11("org.jooq.pro-java-11"),
    PRO_JAVA_8("org.jooq.pro-java-8"),
    PRO_JAVA_6("org.jooq.pro-java-6"),
    TRIAL("org.jooq.trial"),
    TRIAL_JAVA_8("org.jooq.trial-java-8"),
    TRIAL_JAVA_6("org.jooq.trial-java-6");

    private final String groupId;

    JooqEdition(String groupId) {
        this.groupId = groupId;
    }

    public String getGroupId() {
        return groupId;
    }

}

<|next_version|>
/*
 Copyright 2014 Etienne Studer

 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 nu.studer.gradle.jooq;

/**
 * jOOQ comes in different editions, which are published
 * under different group ids. The artifact names and versions
 * are the same for all editions.
 */
public enum JooqEdition {

    OSS("org.jooq"),
    PRO("org.jooq.pro"),
    PRO_JAVA_11("org.jooq.pro-java-11"),
    PRO_JAVA_8("org.jooq.pro-java-8"),
    PRO_JAVA_6("org.jooq.pro-java-6"),
    TRIAL("org.jooq.trial"),
    TRIAL_JAVA_11("org.jooq.trial-java-11"),
    TRIAL_JAVA_8("org.jooq.trial-java-8"),
    TRIAL_JAVA_6("org.jooq.trial-java-6");

    private final String groupId;

    JooqEdition(String groupId) {
        this.groupId = groupId;
    }

    public String getGroupId() {
        return groupId;
    }

}


Add snackbar event on server

Add snackbar event on server

--- src/main/java/xyz/openmodloader/server/OMLServerHandler.java
+++ src/main/java/xyz/openmodloader/server/OMLServerHandler.java
@@ -5,6 +5,7 @@
 import net.minecraft.util.text.ITextComponent;
 import xyz.openmodloader.OpenModLoader;
 import xyz.openmodloader.SidedHandler;
+import xyz.openmodloader.event.impl.MessageEvent;
 import xyz.openmodloader.launcher.strippable.Side;

 public class OMLServerHandler implements SidedHandler {
@@ -26,6 +27,10 @@

     @Override
     public void openSnackbar(ITextComponent component) {
+        component = MessageEvent.Snackbar.handle(component, Side.SERVER);
+        if (component == null) {
+            return;
+        }
         OpenModLoader.INSTANCE.getChannel()
                 .send("snackbar")
                 .set("component", component)

<|original_code|>
package xyz.openmodloader.server;

import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.text.ITextComponent;
import xyz.openmodloader.OpenModLoader;
import xyz.openmodloader.SidedHandler;
import xyz.openmodloader.launcher.strippable.Side;

public class OMLServerHandler implements SidedHandler {
    private final MinecraftServer server;

    public OMLServerHandler(MinecraftServer server) {
        this.server = server;
    }

    @Override
    public void onInitialize() {

    }

    @Override
    public Side getSide() {
        return Side.SERVER;
    }

    @Override
    public void openSnackbar(ITextComponent component) {
        OpenModLoader.INSTANCE.getChannel()
                .send("snackbar")
                .set("component", component)
                .toAll();
    }

    @Override
    public EntityPlayerSP getClientPlayer() {
        return null;
    }

    @Override
    public void handleOnMainThread(Runnable runnable) {
        getServer().addScheduledTask(runnable);
    }

    @Override
    public MinecraftServer getServer() {
        return server;
    }
}

<|edits_diff|>
--- src/main/java/xyz/openmodloader/server/OMLServerHandler.java
+++ src/main/java/xyz/openmodloader/server/OMLServerHandler.java
@@ -5,6 +5,7 @@
 import net.minecraft.util.text.ITextComponent;
 import xyz.openmodloader.OpenModLoader;
 import xyz.openmodloader.SidedHandler;
+import xyz.openmodloader.event.impl.MessageEvent;
 import xyz.openmodloader.launcher.strippable.Side;

 public class OMLServerHandler implements SidedHandler {
<|current_version|>
package xyz.openmodloader.server;

import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.text.ITextComponent;
import xyz.openmodloader.OpenModLoader;
import xyz.openmodloader.SidedHandler;
import xyz.openmodloader.event.impl.MessageEvent;
import xyz.openmodloader.launcher.strippable.Side;

public class OMLServerHandler implements SidedHandler {
    private final MinecraftServer server;

    public OMLServerHandler(MinecraftServer server) {
        this.server = server;
    }

    @Override
    public void onInitialize() {

    }

    @Override
    public Side getSide() {
        return Side.SERVER;
    }

    @Override
    public void openSnackbar(ITextComponent component) {
        OpenModLoader.INSTANCE.getChannel()
                .send("snackbar")
                .set("component", component)
                .toAll();
    }

    @Override
    public EntityPlayerSP getClientPlayer() {
        return null;
    }

    @Override
    public void handleOnMainThread(Runnable runnable) {
        getServer().addScheduledTask(runnable);
    }

    @Override
    public MinecraftServer getServer() {
        return server;
    }
}

<|next_version|>
package xyz.openmodloader.server;

import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.text.ITextComponent;
import xyz.openmodloader.OpenModLoader;
import xyz.openmodloader.SidedHandler;
import xyz.openmodloader.event.impl.MessageEvent;
import xyz.openmodloader.launcher.strippable.Side;

public class OMLServerHandler implements SidedHandler {
    private final MinecraftServer server;

    public OMLServerHandler(MinecraftServer server) {
        this.server = server;
    }

    @Override
    public void onInitialize() {

    }

    @Override
    public Side getSide() {
        return Side.SERVER;
    }

    @Override
    public void openSnackbar(ITextComponent component) {
        component = MessageEvent.Snackbar.handle(component, Side.SERVER);
        if (component == null) {
            return;
        }
        OpenModLoader.INSTANCE.getChannel()
                .send("snackbar")
                .set("component", component)
                .toAll();
    }

    @Override
    public EntityPlayerSP getClientPlayer() {
        return null;
    }

    @Override
    public void handleOnMainThread(Runnable runnable) {
        getServer().addScheduledTask(runnable);
    }

    @Override
    public MinecraftServer getServer() {
        return server;
    }
}


Add interface to set certificate value

Add interface to set certificate value

--- src/main/java/org/cryptonit/cloud/interfaces/IdentityStore.java
+++ src/main/java/org/cryptonit/cloud/interfaces/IdentityStore.java
@@ -1,7 +1,11 @@
 package org.cryptonit.cloud.interfaces;

+import javax.security.cert.X509Certificate;
 import org.bouncycastle.asn1.x500.X500Name;

 public interface IdentityStore {
+
     public String newIdentity(String domain, String keyId, X500Name subject) throws Exception;
+
+    public boolean setCertificate(String domain, String identityId, X509Certificate certificate) throws Exception;
 }

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

import org.bouncycastle.asn1.x500.X500Name;

public interface IdentityStore {
    public String newIdentity(String domain, String keyId, X500Name subject) throws Exception;
}

<|edits_diff|>
--- src/main/java/org/cryptonit/cloud/interfaces/IdentityStore.java
+++ src/main/java/org/cryptonit/cloud/interfaces/IdentityStore.java
@@ -1,7 +1,9 @@
 package org.cryptonit.cloud.interfaces;

+import javax.security.cert.X509Certificate;
 import org.bouncycastle.asn1.x500.X500Name;

 public interface IdentityStore {
+
     public String newIdentity(String domain, String keyId, X500Name subject) throws Exception;
 }
<|current_version|>
package org.cryptonit.cloud.interfaces;

import javax.security.cert.X509Certificate;
import org.bouncycastle.asn1.x500.X500Name;

public interface IdentityStore {

    public String newIdentity(String domain, String keyId, X500Name subject) throws Exception;
}

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

import javax.security.cert.X509Certificate;
import org.bouncycastle.asn1.x500.X500Name;

public interface IdentityStore {

    public String newIdentity(String domain, String keyId, X500Name subject) throws Exception;

    public boolean setCertificate(String domain, String identityId, X509Certificate certificate) throws Exception;
}


Add success method for custom message in data.

--- src/main/java/com/royalrangers/utils/ResponseBuilder.java
+++ src/main/java/com/royalrangers/utils/ResponseBuilder.java
@@ -3,6 +3,9 @@
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 import com.royalrangers.bean.ResponseResult;
 import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;

 public class ResponseBuilder {

@@ -16,6 +19,11 @@

     public static ResponseResult success(String message) {
         return new ResponseResult(true, new ResponseMessage(message));
+    }
+    public static ResponseResult success(String key, String value) {
+        Map<String, String> data = new HashMap<>();
+        data.put(key, value);
+        return new ResponseResult(true, data);
     }

     public static ResponseResult fail() {

<|original_code|>
package com.royalrangers.utils;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.royalrangers.bean.ResponseResult;
import lombok.Getter;

public class ResponseBuilder {

    public static ResponseResult success() {
        return new ResponseResult(true, new EmptyJsonResponse());
    }

    public static ResponseResult success(Object data) {
        return new ResponseResult(true, data);
    }

    public static ResponseResult success(String message) {
        return new ResponseResult(true, new ResponseMessage(message));
    }

    public static ResponseResult fail() {
        return new ResponseResult(false, new EmptyJsonResponse());
    }

    public static ResponseResult fail(String message) {
        return new ResponseResult(false, new ResponseMessage(message));
    }

    @JsonSerialize
    private static class EmptyJsonResponse { }

    @Getter
    @JsonSerialize
    private static class ResponseMessage{
        private String message;

        ResponseMessage (String message) {
            this.message = message;
        }
    }
}

<|edits_diff|>
--- src/main/java/com/royalrangers/utils/ResponseBuilder.java
+++ src/main/java/com/royalrangers/utils/ResponseBuilder.java
@@ -3,6 +3,9 @@
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 import com.royalrangers.bean.ResponseResult;
 import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;

 public class ResponseBuilder {

<|current_version|>
package com.royalrangers.utils;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.royalrangers.bean.ResponseResult;
import lombok.Getter;

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

public class ResponseBuilder {

    public static ResponseResult success() {
        return new ResponseResult(true, new EmptyJsonResponse());
    }

    public static ResponseResult success(Object data) {
        return new ResponseResult(true, data);
    }

    public static ResponseResult success(String message) {
        return new ResponseResult(true, new ResponseMessage(message));
    }

    public static ResponseResult fail() {
        return new ResponseResult(false, new EmptyJsonResponse());
    }

    public static ResponseResult fail(String message) {
        return new ResponseResult(false, new ResponseMessage(message));
    }

    @JsonSerialize
    private static class EmptyJsonResponse { }

    @Getter
    @JsonSerialize
    private static class ResponseMessage{
        private String message;

        ResponseMessage (String message) {
            this.message = message;
        }
    }
}

<|next_version|>
package com.royalrangers.utils;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.royalrangers.bean.ResponseResult;
import lombok.Getter;

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

public class ResponseBuilder {

    public static ResponseResult success() {
        return new ResponseResult(true, new EmptyJsonResponse());
    }

    public static ResponseResult success(Object data) {
        return new ResponseResult(true, data);
    }

    public static ResponseResult success(String message) {
        return new ResponseResult(true, new ResponseMessage(message));
    }
    public static ResponseResult success(String key, String value) {
        Map<String, String> data = new HashMap<>();
        data.put(key, value);
        return new ResponseResult(true, data);
    }

    public static ResponseResult fail() {
        return new ResponseResult(false, new EmptyJsonResponse());
    }

    public static ResponseResult fail(String message) {
        return new ResponseResult(false, new ResponseMessage(message));
    }

    @JsonSerialize
    private static class EmptyJsonResponse { }

    @Getter
    @JsonSerialize
    private static class ResponseMessage{
        private String message;

        ResponseMessage (String message) {
            this.message = message;
        }
    }
}


Enable chrome://inspect on debug builds

Enable chrome://inspect on debug builds

--- src/main/java/net/elprespufferfish/rssreader/RssReaderApplication.java
+++ src/main/java/net/elprespufferfish/rssreader/RssReaderApplication.java
@@ -1,7 +1,9 @@
 package net.elprespufferfish.rssreader;

 import android.app.Application;
+import android.os.Build;
 import android.os.StrictMode;
+import android.webkit.WebView;

 public class RssReaderApplication extends Application {

@@ -23,6 +25,9 @@
                     .penaltyDeath()
                     .build());

+            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
+                WebView.setWebContentsDebuggingEnabled(true);
+            }
         }
     }
 }

<|original_code|>
package net.elprespufferfish.rssreader;

import android.app.Application;
import android.os.StrictMode;

public class RssReaderApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();

        Feeds.initialize();

        if (BuildConfig.DEBUG) {
            StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
                    .detectAll()
                    .penaltyLog()
                    .penaltyDeath()
                    .build());
            StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
                    .detectAll()
                    .penaltyLog()
                    .penaltyDeath()
                    .build());

        }
    }
}

<|edits_diff|>
--- src/main/java/net/elprespufferfish/rssreader/RssReaderApplication.java
+++ src/main/java/net/elprespufferfish/rssreader/RssReaderApplication.java
@@ -1,7 +1,9 @@
 package net.elprespufferfish.rssreader;

 import android.app.Application;
+import android.os.Build;
 import android.os.StrictMode;
+import android.webkit.WebView;

 public class RssReaderApplication extends Application {

<|current_version|>
package net.elprespufferfish.rssreader;

import android.app.Application;
import android.os.Build;
import android.os.StrictMode;
import android.webkit.WebView;

public class RssReaderApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();

        Feeds.initialize();

        if (BuildConfig.DEBUG) {
            StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
                    .detectAll()
                    .penaltyLog()
                    .penaltyDeath()
                    .build());
            StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
                    .detectAll()
                    .penaltyLog()
                    .penaltyDeath()
                    .build());

        }
    }
}

<|next_version|>
package net.elprespufferfish.rssreader;

import android.app.Application;
import android.os.Build;
import android.os.StrictMode;
import android.webkit.WebView;

public class RssReaderApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();

        Feeds.initialize();

        if (BuildConfig.DEBUG) {
            StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
                    .detectAll()
                    .penaltyLog()
                    .penaltyDeath()
                    .build());
            StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
                    .detectAll()
                    .penaltyLog()
                    .penaltyDeath()
                    .build());

            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
                WebView.setWebContentsDebuggingEnabled(true);
            }
        }
    }
}


Add active locale to provider

Add active locale to provider

--- src/main/java/co/phoenixlab/common/localization/LocaleStringProvider.java
+++ src/main/java/co/phoenixlab/common/localization/LocaleStringProvider.java
@@ -1,6 +1,10 @@
 package co.phoenixlab.common.localization;

+import java.util.Locale;
+
 public interface LocaleStringProvider {
+
+    void setActiveLocale(Locale locale);

     String get(String key);

<|original_code|>
package co.phoenixlab.common.localization;

public interface LocaleStringProvider {

    String get(String key);

    boolean contains(String key);

}

<|edits_diff|>
--- src/main/java/co/phoenixlab/common/localization/LocaleStringProvider.java
+++ src/main/java/co/phoenixlab/common/localization/LocaleStringProvider.java
@@ -1,4 +1,6 @@
 package co.phoenixlab.common.localization;
+
+import java.util.Locale;

 public interface LocaleStringProvider {

<|current_version|>
package co.phoenixlab.common.localization;

import java.util.Locale;

public interface LocaleStringProvider {

    String get(String key);

    boolean contains(String key);

}

<|next_version|>
package co.phoenixlab.common.localization;

import java.util.Locale;

public interface LocaleStringProvider {

    void setActiveLocale(Locale locale);

    String get(String key);

    boolean contains(String key);

}


Make CXF serialize date type in pre-defined format.

--- core/src/main/java/com/zyeeda/framework/cxf/JacksonJsonProvider.java
+++ core/src/main/java/com/zyeeda/framework/cxf/JacksonJsonProvider.java
@@ -1,7 +1,10 @@
 package com.zyeeda.framework.cxf;
+
+import java.text.SimpleDateFormat;

 import org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider;
 import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.map.SerializationConfig;
 import org.codehaus.jackson.map.annotate.JsonSerialize;
 import org.codehaus.jackson.map.SerializationConfig.Feature;

@@ -12,8 +15,15 @@
 		if (m == null) {
 			m = this._mapperConfig.getDefaultMapper();
 		}
+		SerializationConfig sc = m.getSerializationConfig().withDateFormat(new SimpleDateFormat("yyyy-MM-dd"));
+		sc.setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);
+		sc.set(Feature.FAIL_ON_EMPTY_BEANS, false);
+		m.setSerializationConfig(sc);
+		/*
 		m.getSerializationConfig().setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);
 		m.configure(Feature.FAIL_ON_EMPTY_BEANS, false);
+		m.setSerializationConfig(m.getSerializationConfig().withDateFormat(new SimpleDateFormat("yyyy-MM-dd")));
+		*/
 	}

 }

<|original_code|>
package com.zyeeda.framework.cxf;

import org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.map.SerializationConfig.Feature;

public class JacksonJsonProvider extends JacksonJaxbJsonProvider {

	public JacksonJsonProvider() {
		ObjectMapper m = this._mapperConfig.getConfiguredMapper();
		if (m == null) {
			m = this._mapperConfig.getDefaultMapper();
		}
		m.getSerializationConfig().setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);
		m.configure(Feature.FAIL_ON_EMPTY_BEANS, false);
	}

}

<|edits_diff|>
--- core/src/main/java/com/zyeeda/framework/cxf/JacksonJsonProvider.java
+++ core/src/main/java/com/zyeeda/framework/cxf/JacksonJsonProvider.java
@@ -1,7 +1,10 @@
 package com.zyeeda.framework.cxf;
+
+import java.text.SimpleDateFormat;

 import org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider;
 import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.map.SerializationConfig;
 import org.codehaus.jackson.map.annotate.JsonSerialize;
 import org.codehaus.jackson.map.SerializationConfig.Feature;

@@ -12,6 +15,11 @@
 		if (m == null) {
 			m = this._mapperConfig.getDefaultMapper();
 		}
+		SerializationConfig sc = m.getSerializationConfig().withDateFormat(new SimpleDateFormat("yyyy-MM-dd"));
+		sc.setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);
+		sc.set(Feature.FAIL_ON_EMPTY_BEANS, false);
+		m.setSerializationConfig(sc);
+		/*
 		m.getSerializationConfig().setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);
 		m.configure(Feature.FAIL_ON_EMPTY_BEANS, false);
 	}
<|current_version|>
package com.zyeeda.framework.cxf;

import java.text.SimpleDateFormat;

import org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.SerializationConfig;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.map.SerializationConfig.Feature;

public class JacksonJsonProvider extends JacksonJaxbJsonProvider {

	public JacksonJsonProvider() {
		ObjectMapper m = this._mapperConfig.getConfiguredMapper();
		if (m == null) {
			m = this._mapperConfig.getDefaultMapper();
		}
		SerializationConfig sc = m.getSerializationConfig().withDateFormat(new SimpleDateFormat("yyyy-MM-dd"));
		sc.setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);
		sc.set(Feature.FAIL_ON_EMPTY_BEANS, false);
		m.setSerializationConfig(sc);
		/*
		m.getSerializationConfig().setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);
		m.configure(Feature.FAIL_ON_EMPTY_BEANS, false);
	}

}

<|next_version|>
package com.zyeeda.framework.cxf;

import java.text.SimpleDateFormat;

import org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.SerializationConfig;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.map.SerializationConfig.Feature;

public class JacksonJsonProvider extends JacksonJaxbJsonProvider {

	public JacksonJsonProvider() {
		ObjectMapper m = this._mapperConfig.getConfiguredMapper();
		if (m == null) {
			m = this._mapperConfig.getDefaultMapper();
		}
		SerializationConfig sc = m.getSerializationConfig().withDateFormat(new SimpleDateFormat("yyyy-MM-dd"));
		sc.setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);
		sc.set(Feature.FAIL_ON_EMPTY_BEANS, false);
		m.setSerializationConfig(sc);
		/*
		m.getSerializationConfig().setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);
		m.configure(Feature.FAIL_ON_EMPTY_BEANS, false);
		m.setSerializationConfig(m.getSerializationConfig().withDateFormat(new SimpleDateFormat("yyyy-MM-dd")));
		*/
	}

}


Add guard against production deletions

Add guard against production deletions

--- vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/DeleteMojo.java
+++ vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/DeleteMojo.java
@@ -1,5 +1,7 @@
 package ai.vespa.hosted.plugin;

+import com.yahoo.config.provision.Environment;
+import com.yahoo.config.provision.zone.ZoneId;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;

@@ -19,6 +21,9 @@

     @Override
     protected void doExecute() {
+        if (environment != null && ! Environment.from(environment).isManuallyDeployed())
+            throw new IllegalArgumentException("Manual deletion is not permitted in " + environment);
+
         getLog().info(controller.deactivate(id, zoneOf(environment, region)));
     }

<|original_code|>
package ai.vespa.hosted.plugin;

import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;

/**
 * Deploys a Vespa application package to the hosted Vespa API.
 *
 * @author jonmv
 */
@Mojo(name = "delete")
public class DeleteMojo extends AbstractVespaMojo {

    @Parameter(property = "environment")
    private String environment;

    @Parameter(property = "region")
    private String region;

    @Override
    protected void doExecute() {
        getLog().info(controller.deactivate(id, zoneOf(environment, region)));
    }

}

<|edits_diff|>
--- vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/DeleteMojo.java
+++ vespa-maven-plugin/src/main/java/ai/vespa/hosted/plugin/DeleteMojo.java
@@ -1,5 +1,7 @@
 package ai.vespa.hosted.plugin;

+import com.yahoo.config.provision.Environment;
+import com.yahoo.config.provision.zone.ZoneId;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;

<|current_version|>
package ai.vespa.hosted.plugin;

import com.yahoo.config.provision.Environment;
import com.yahoo.config.provision.zone.ZoneId;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;

/**
 * Deploys a Vespa application package to the hosted Vespa API.
 *
 * @author jonmv
 */
@Mojo(name = "delete")
public class DeleteMojo extends AbstractVespaMojo {

    @Parameter(property = "environment")
    private String environment;

    @Parameter(property = "region")
    private String region;

    @Override
    protected void doExecute() {
        getLog().info(controller.deactivate(id, zoneOf(environment, region)));
    }

}

<|next_version|>
package ai.vespa.hosted.plugin;

import com.yahoo.config.provision.Environment;
import com.yahoo.config.provision.zone.ZoneId;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;

/**
 * Deploys a Vespa application package to the hosted Vespa API.
 *
 * @author jonmv
 */
@Mojo(name = "delete")
public class DeleteMojo extends AbstractVespaMojo {

    @Parameter(property = "environment")
    private String environment;

    @Parameter(property = "region")
    private String region;

    @Override
    protected void doExecute() {
        if (environment != null && ! Environment.from(environment).isManuallyDeployed())
            throw new IllegalArgumentException("Manual deletion is not permitted in " + environment);

        getLog().info(controller.deactivate(id, zoneOf(environment, region)));
    }

}


Add fade in animation to underlabel validator.

--- library/src/main/java/com/strohwitwer/awesomevalidation/validators/UnderlabelValidator.java
+++ library/src/main/java/com/strohwitwer/awesomevalidation/validators/UnderlabelValidator.java
@@ -2,6 +2,7 @@

 import android.content.Context;
 import android.view.ViewGroup;
+import android.view.animation.AnimationUtils;
 import android.widget.EditText;
 import android.widget.TextView;

@@ -32,6 +33,7 @@
                 TextView textView = new TextView(mContext);
                 textView.setText(validationHolder.getErrMsg());
                 textView.setTextColor(mContext.getResources().getColor(android.R.color.holo_red_light));
+                textView.startAnimation(AnimationUtils.loadAnimation(mContext, android.R.anim.fade_in));
                 mTextViews.add(textView);
                 parent.addView(textView, index + 1);
             }

<|original_code|>
package com.strohwitwer.awesomevalidation.validators;

import android.content.Context;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.TextView;

import com.strohwitwer.awesomevalidation.ValidationHolder;
import com.strohwitwer.awesomevalidation.utility.ValidationCallback;

import java.util.ArrayList;
import java.util.regex.Matcher;

public class UnderlabelValidator extends Validator {

    private Context mContext;
    private ArrayList<TextView> mTextViews = new ArrayList<>();

    public void setContext(Context context) {
        mContext = context;
    }

    @Override
    public boolean trigger() {
        halt();
        return checkFields(new ValidationCallback() {
            @Override
            public void execute(ValidationHolder validationHolder, Matcher matcher) {
                EditText editText = validationHolder.getEditText();
                ViewGroup parent = (ViewGroup) editText.getParent();
                int index = parent.indexOfChild(editText);
                TextView textView = new TextView(mContext);
                textView.setText(validationHolder.getErrMsg());
                textView.setTextColor(mContext.getResources().getColor(android.R.color.holo_red_light));
                mTextViews.add(textView);
                parent.addView(textView, index + 1);
            }
        });
    }

    @Override
    public void halt() {
        for (TextView textView : mTextViews) {
            ViewGroup parent = (ViewGroup) textView.getParent();
            parent.removeView(textView);
        }
        mTextViews.clear();
    }

}
<|edits_diff|>
--- library/src/main/java/com/strohwitwer/awesomevalidation/validators/UnderlabelValidator.java
+++ library/src/main/java/com/strohwitwer/awesomevalidation/validators/UnderlabelValidator.java
@@ -2,6 +2,7 @@

 import android.content.Context;
 import android.view.ViewGroup;
+import android.view.animation.AnimationUtils;
 import android.widget.EditText;
 import android.widget.TextView;

<|current_version|>
package com.strohwitwer.awesomevalidation.validators;

import android.content.Context;
import android.view.ViewGroup;
import android.view.animation.AnimationUtils;
import android.widget.EditText;
import android.widget.TextView;

import com.strohwitwer.awesomevalidation.ValidationHolder;
import com.strohwitwer.awesomevalidation.utility.ValidationCallback;

import java.util.ArrayList;
import java.util.regex.Matcher;

public class UnderlabelValidator extends Validator {

    private Context mContext;
    private ArrayList<TextView> mTextViews = new ArrayList<>();

    public void setContext(Context context) {
        mContext = context;
    }

    @Override
    public boolean trigger() {
        halt();
        return checkFields(new ValidationCallback() {
            @Override
            public void execute(ValidationHolder validationHolder, Matcher matcher) {
                EditText editText = validationHolder.getEditText();
                ViewGroup parent = (ViewGroup) editText.getParent();
                int index = parent.indexOfChild(editText);
                TextView textView = new TextView(mContext);
                textView.setText(validationHolder.getErrMsg());
                textView.setTextColor(mContext.getResources().getColor(android.R.color.holo_red_light));
                mTextViews.add(textView);
                parent.addView(textView, index + 1);
            }
        });
    }

    @Override
    public void halt() {
        for (TextView textView : mTextViews) {
            ViewGroup parent = (ViewGroup) textView.getParent();
            parent.removeView(textView);
        }
        mTextViews.clear();
    }

}
<|next_version|>
package com.strohwitwer.awesomevalidation.validators;

import android.content.Context;
import android.view.ViewGroup;
import android.view.animation.AnimationUtils;
import android.widget.EditText;
import android.widget.TextView;

import com.strohwitwer.awesomevalidation.ValidationHolder;
import com.strohwitwer.awesomevalidation.utility.ValidationCallback;

import java.util.ArrayList;
import java.util.regex.Matcher;

public class UnderlabelValidator extends Validator {

    private Context mContext;
    private ArrayList<TextView> mTextViews = new ArrayList<>();

    public void setContext(Context context) {
        mContext = context;
    }

    @Override
    public boolean trigger() {
        halt();
        return checkFields(new ValidationCallback() {
            @Override
            public void execute(ValidationHolder validationHolder, Matcher matcher) {
                EditText editText = validationHolder.getEditText();
                ViewGroup parent = (ViewGroup) editText.getParent();
                int index = parent.indexOfChild(editText);
                TextView textView = new TextView(mContext);
                textView.setText(validationHolder.getErrMsg());
                textView.setTextColor(mContext.getResources().getColor(android.R.color.holo_red_light));
                textView.startAnimation(AnimationUtils.loadAnimation(mContext, android.R.anim.fade_in));
                mTextViews.add(textView);
                parent.addView(textView, index + 1);
            }
        });
    }

    @Override
    public void halt() {
        for (TextView textView : mTextViews) {
            ViewGroup parent = (ViewGroup) textView.getParent();
            parent.removeView(textView);
        }
        mTextViews.clear();
    }

}


Add missing conditional for spring-security

Without it, if spring security is not present, it creates a runtime exception
due to AuthenticationEntryPointr not being in the classpath

--- problem-spring-web-autoconfigure/src/main/java/org/zalando/problem/spring/web/autoconfigure/security/SecurityConfiguration.java
+++ problem-spring-web-autoconfigure/src/main/java/org/zalando/problem/spring/web/autoconfigure/security/SecurityConfiguration.java
@@ -1,6 +1,7 @@
 package org.zalando.problem.spring.web.autoconfigure.security;

 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Import;
 import org.springframework.security.config.annotation.web.builders.HttpSecurity;
@@ -11,6 +12,7 @@
  * Registers exception handling in spring-security
  */
 @Configuration
+@ConditionalOnClass(WebSecurityConfigurerAdapter.class) //only when spring-security is in classpath
 @Import(SecurityProblemSupport.class)
 public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
     @Autowired

<|original_code|>
package org.zalando.problem.spring.web.autoconfigure.security;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.zalando.problem.spring.web.advice.security.SecurityProblemSupport;

/**
 * Registers exception handling in spring-security
 */
@Configuration
@Import(SecurityProblemSupport.class)
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
    @Autowired
    private SecurityProblemSupport problemSupport;

    @Override
    public void configure(final HttpSecurity http) throws Exception {
        http.exceptionHandling()
                .authenticationEntryPoint(problemSupport)
                .accessDeniedHandler(problemSupport);
    }
}

<|edits_diff|>
--- problem-spring-web-autoconfigure/src/main/java/org/zalando/problem/spring/web/autoconfigure/security/SecurityConfiguration.java
+++ problem-spring-web-autoconfigure/src/main/java/org/zalando/problem/spring/web/autoconfigure/security/SecurityConfiguration.java
@@ -1,6 +1,7 @@
 package org.zalando.problem.spring.web.autoconfigure.security;

 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Import;
 import org.springframework.security.config.annotation.web.builders.HttpSecurity;
<|current_version|>
package org.zalando.problem.spring.web.autoconfigure.security;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.zalando.problem.spring.web.advice.security.SecurityProblemSupport;

/**
 * Registers exception handling in spring-security
 */
@Configuration
@Import(SecurityProblemSupport.class)
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
    @Autowired
    private SecurityProblemSupport problemSupport;

    @Override
    public void configure(final HttpSecurity http) throws Exception {
        http.exceptionHandling()
                .authenticationEntryPoint(problemSupport)
                .accessDeniedHandler(problemSupport);
    }
}

<|next_version|>
package org.zalando.problem.spring.web.autoconfigure.security;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.zalando.problem.spring.web.advice.security.SecurityProblemSupport;

/**
 * Registers exception handling in spring-security
 */
@Configuration
@ConditionalOnClass(WebSecurityConfigurerAdapter.class) //only when spring-security is in classpath
@Import(SecurityProblemSupport.class)
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
    @Autowired
    private SecurityProblemSupport problemSupport;

    @Override
    public void configure(final HttpSecurity http) throws Exception {
        http.exceptionHandling()
                .authenticationEntryPoint(problemSupport)
                .accessDeniedHandler(problemSupport);
    }
}


Check UnixSocketSupport os specific variants only on the relevant os'

--- src/test/java/de/gesellix/docker/client/filesocket/UnixSocketFactorySupportTest.java
+++ src/test/java/de/gesellix/docker/client/filesocket/UnixSocketFactorySupportTest.java
@@ -2,6 +2,8 @@

 import org.junit.jupiter.api.DisplayName;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledOnOs;
+import org.junit.jupiter.api.condition.OS;

 import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -9,18 +11,21 @@
 class UnixSocketFactorySupportTest {

     @Test
+    @EnabledOnOs(OS.MAC)
     @DisplayName("Supports Mac OS X")
     void supportsMacOsX() {
         assertTrue(new UnixSocketFactorySupport().isSupported("Mac OS X"));
     }

     @Test
+    @EnabledOnOs(OS.LINUX)
     @DisplayName("Supports Linux")
     void supportsLinux() {
         assertTrue(new UnixSocketFactorySupport().isSupported("Linux"));
     }

     @Test
+    @EnabledOnOs(OS.WINDOWS)
     @DisplayName("Doesn't support Windows 10")
     void doesNotSupportWindows10() {
         assertFalse(new UnixSocketFactorySupport().isSupported("Windows 10"));

<|original_code|>
package de.gesellix.docker.client.filesocket;

import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

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

class UnixSocketFactorySupportTest {

    @Test
    @DisplayName("Supports Mac OS X")
    void supportsMacOsX() {
        assertTrue(new UnixSocketFactorySupport().isSupported("Mac OS X"));
    }

    @Test
    @DisplayName("Supports Linux")
    void supportsLinux() {
        assertTrue(new UnixSocketFactorySupport().isSupported("Linux"));
    }

    @Test
    @DisplayName("Doesn't support Windows 10")
    void doesNotSupportWindows10() {
        assertFalse(new UnixSocketFactorySupport().isSupported("Windows 10"));
    }
}

<|edits_diff|>
--- src/test/java/de/gesellix/docker/client/filesocket/UnixSocketFactorySupportTest.java
+++ src/test/java/de/gesellix/docker/client/filesocket/UnixSocketFactorySupportTest.java
@@ -2,6 +2,8 @@

 import org.junit.jupiter.api.DisplayName;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledOnOs;
+import org.junit.jupiter.api.condition.OS;

 import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -9,12 +11,14 @@
 class UnixSocketFactorySupportTest {

     @Test
+    @EnabledOnOs(OS.MAC)
     @DisplayName("Supports Mac OS X")
     void supportsMacOsX() {
         assertTrue(new UnixSocketFactorySupport().isSupported("Mac OS X"));
     }

     @Test
+    @EnabledOnOs(OS.LINUX)
     @DisplayName("Supports Linux")
     void supportsLinux() {
         assertTrue(new UnixSocketFactorySupport().isSupported("Linux"));
<|current_version|>
package de.gesellix.docker.client.filesocket;

import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;

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

class UnixSocketFactorySupportTest {

    @Test
    @EnabledOnOs(OS.MAC)
    @DisplayName("Supports Mac OS X")
    void supportsMacOsX() {
        assertTrue(new UnixSocketFactorySupport().isSupported("Mac OS X"));
    }

    @Test
    @EnabledOnOs(OS.LINUX)
    @DisplayName("Supports Linux")
    void supportsLinux() {
        assertTrue(new UnixSocketFactorySupport().isSupported("Linux"));
    }

    @Test
    @DisplayName("Doesn't support Windows 10")
    void doesNotSupportWindows10() {
        assertFalse(new UnixSocketFactorySupport().isSupported("Windows 10"));
    }
}

<|next_version|>
package de.gesellix.docker.client.filesocket;

import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;

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

class UnixSocketFactorySupportTest {

    @Test
    @EnabledOnOs(OS.MAC)
    @DisplayName("Supports Mac OS X")
    void supportsMacOsX() {
        assertTrue(new UnixSocketFactorySupport().isSupported("Mac OS X"));
    }

    @Test
    @EnabledOnOs(OS.LINUX)
    @DisplayName("Supports Linux")
    void supportsLinux() {
        assertTrue(new UnixSocketFactorySupport().isSupported("Linux"));
    }

    @Test
    @EnabledOnOs(OS.WINDOWS)
    @DisplayName("Doesn't support Windows 10")
    void doesNotSupportWindows10() {
        assertFalse(new UnixSocketFactorySupport().isSupported("Windows 10"));
    }
}


Disable security for OPTIONS requests.

Disable security for OPTIONS requests.

--- src/main/java/info/agrueneberg/fhir/configurations/SecurityConfig.java
+++ src/main/java/info/agrueneberg/fhir/configurations/SecurityConfig.java
@@ -3,6 +3,7 @@
 import info.agrueneberg.fhir.services.UserService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.http.HttpMethod;
 import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
 import org.springframework.security.config.annotation.web.builders.HttpSecurity;
 import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
@@ -25,6 +26,7 @@
     protected void configure(HttpSecurity http) throws Exception {
         http
             .authorizeRequests()
+                .antMatchers(HttpMethod.OPTIONS, "/**").permitAll()
                 .anyRequest().authenticated()
                 .and()
             .httpBasic();

<|original_code|>
package info.agrueneberg.fhir.configurations;

import info.agrueneberg.fhir.services.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

@Configuration
@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter {

    @Autowired
    private UserService userService;

    @Override
    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
        auth.userDetailsService(userService).passwordEncoder(new BCryptPasswordEncoder());
    }

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http
            .authorizeRequests()
                .anyRequest().authenticated()
                .and()
            .httpBasic();
    }

}
<|edits_diff|>
--- src/main/java/info/agrueneberg/fhir/configurations/SecurityConfig.java
+++ src/main/java/info/agrueneberg/fhir/configurations/SecurityConfig.java
@@ -3,6 +3,7 @@
 import info.agrueneberg.fhir.services.UserService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.http.HttpMethod;
 import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
 import org.springframework.security.config.annotation.web.builders.HttpSecurity;
 import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
<|current_version|>
package info.agrueneberg.fhir.configurations;

import info.agrueneberg.fhir.services.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

@Configuration
@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter {

    @Autowired
    private UserService userService;

    @Override
    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
        auth.userDetailsService(userService).passwordEncoder(new BCryptPasswordEncoder());
    }

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http
            .authorizeRequests()
                .anyRequest().authenticated()
                .and()
            .httpBasic();
    }

}
<|next_version|>
package info.agrueneberg.fhir.configurations;

import info.agrueneberg.fhir.services.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

@Configuration
@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter {

    @Autowired
    private UserService userService;

    @Override
    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
        auth.userDetailsService(userService).passwordEncoder(new BCryptPasswordEncoder());
    }

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http
            .authorizeRequests()
                .antMatchers(HttpMethod.OPTIONS, "/**").permitAll()
                .anyRequest().authenticated()
                .and()
            .httpBasic();
    }

}


Add Java 8 Time serialization feature for Jackson

--- plume-web-jersey/src/main/java/com/coreoz/plume/jersey/jackson/ObjectMapperProvider.java
+++ plume-web-jersey/src/main/java/com/coreoz/plume/jersey/jackson/ObjectMapperProvider.java
@@ -6,12 +6,15 @@
 import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.SerializationFeature;
+import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;

 // check https://github.com/FasterXML/jackson-databind/issues/779 to see when we can have the SafeObjectMapper
 @Singleton
 public class ObjectMapperProvider implements Provider<ObjectMapper> {

 	private final ObjectMapper objectMapper = new ObjectMapper()
+		.registerModule(new JavaTimeModule())
+		.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
 		.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS)
 		.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);

<|original_code|>
package com.coreoz.plume.jersey.jackson;

import javax.inject.Provider;
import javax.inject.Singleton;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;

// check https://github.com/FasterXML/jackson-databind/issues/779 to see when we can have the SafeObjectMapper
@Singleton
public class ObjectMapperProvider implements Provider<ObjectMapper> {

	private final ObjectMapper objectMapper = new ObjectMapper()
		.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS)
		.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);

	@Override
	public ObjectMapper get() {
		return objectMapper;
	}

}

<|edits_diff|>
--- plume-web-jersey/src/main/java/com/coreoz/plume/jersey/jackson/ObjectMapperProvider.java
+++ plume-web-jersey/src/main/java/com/coreoz/plume/jersey/jackson/ObjectMapperProvider.java
@@ -6,6 +6,7 @@
 import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.SerializationFeature;
+import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;

 // check https://github.com/FasterXML/jackson-databind/issues/779 to see when we can have the SafeObjectMapper
 @Singleton
<|current_version|>
package com.coreoz.plume.jersey.jackson;

import javax.inject.Provider;
import javax.inject.Singleton;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;

// check https://github.com/FasterXML/jackson-databind/issues/779 to see when we can have the SafeObjectMapper
@Singleton
public class ObjectMapperProvider implements Provider<ObjectMapper> {

	private final ObjectMapper objectMapper = new ObjectMapper()
		.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS)
		.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);

	@Override
	public ObjectMapper get() {
		return objectMapper;
	}

}

<|next_version|>
package com.coreoz.plume.jersey.jackson;

import javax.inject.Provider;
import javax.inject.Singleton;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;

// check https://github.com/FasterXML/jackson-databind/issues/779 to see when we can have the SafeObjectMapper
@Singleton
public class ObjectMapperProvider implements Provider<ObjectMapper> {

	private final ObjectMapper objectMapper = new ObjectMapper()
		.registerModule(new JavaTimeModule())
		.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
		.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS)
		.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);

	@Override
	public ObjectMapper get() {
		return objectMapper;
	}

}


Add @Keep annotation on unsubscribed field

Since it's accessed via reflection, this needs to be kept un-obfuscated.

--- rxbinding/src/main/java/com/jakewharton/rxbinding/internal/MainThreadSubscription.java
+++ rxbinding/src/main/java/com/jakewharton/rxbinding/internal/MainThreadSubscription.java
@@ -2,12 +2,15 @@

 import android.os.Handler;
 import android.os.Looper;
+import android.support.annotation.Keep;
+
 import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
 import rx.Subscription;

 public abstract class MainThreadSubscription implements Subscription, Runnable {
   private static final Handler mainThread = new Handler(Looper.getMainLooper());

+  @Keep
   @SuppressWarnings("unused") // Updated by 'unsubscribedUpdater' object.
   private volatile int unsubscribed;
   private static final AtomicIntegerFieldUpdater<MainThreadSubscription> unsubscribedUpdater =

<|original_code|>
package com.jakewharton.rxbinding.internal;

import android.os.Handler;
import android.os.Looper;
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
import rx.Subscription;

public abstract class MainThreadSubscription implements Subscription, Runnable {
  private static final Handler mainThread = new Handler(Looper.getMainLooper());

  @SuppressWarnings("unused") // Updated by 'unsubscribedUpdater' object.
  private volatile int unsubscribed;
  private static final AtomicIntegerFieldUpdater<MainThreadSubscription> unsubscribedUpdater =
      AtomicIntegerFieldUpdater.newUpdater(MainThreadSubscription.class, "unsubscribed");

  @Override public final boolean isUnsubscribed() {
    return unsubscribed != 0;
  }

  @Override public final void unsubscribe() {
    if (unsubscribedUpdater.compareAndSet(this, 0, 1)) {
      if (Looper.getMainLooper() == Looper.myLooper()) {
        onUnsubscribe();
      } else {
        mainThread.post(this);
      }
    }
  }

  @Override public final void run() {
    onUnsubscribe();
  }

  protected abstract void onUnsubscribe();
}

<|edits_diff|>
--- rxbinding/src/main/java/com/jakewharton/rxbinding/internal/MainThreadSubscription.java
+++ rxbinding/src/main/java/com/jakewharton/rxbinding/internal/MainThreadSubscription.java
@@ -2,6 +2,8 @@

 import android.os.Handler;
 import android.os.Looper;
+import android.support.annotation.Keep;
+
 import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
 import rx.Subscription;

<|current_version|>
package com.jakewharton.rxbinding.internal;

import android.os.Handler;
import android.os.Looper;
import android.support.annotation.Keep;

import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
import rx.Subscription;

public abstract class MainThreadSubscription implements Subscription, Runnable {
  private static final Handler mainThread = new Handler(Looper.getMainLooper());

  @SuppressWarnings("unused") // Updated by 'unsubscribedUpdater' object.
  private volatile int unsubscribed;
  private static final AtomicIntegerFieldUpdater<MainThreadSubscription> unsubscribedUpdater =
      AtomicIntegerFieldUpdater.newUpdater(MainThreadSubscription.class, "unsubscribed");

  @Override public final boolean isUnsubscribed() {
    return unsubscribed != 0;
  }

  @Override public final void unsubscribe() {
    if (unsubscribedUpdater.compareAndSet(this, 0, 1)) {
      if (Looper.getMainLooper() == Looper.myLooper()) {
        onUnsubscribe();
      } else {
        mainThread.post(this);
      }
    }
  }

  @Override public final void run() {
    onUnsubscribe();
  }

  protected abstract void onUnsubscribe();
}

<|next_version|>
package com.jakewharton.rxbinding.internal;

import android.os.Handler;
import android.os.Looper;
import android.support.annotation.Keep;

import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
import rx.Subscription;

public abstract class MainThreadSubscription implements Subscription, Runnable {
  private static final Handler mainThread = new Handler(Looper.getMainLooper());

  @Keep
  @SuppressWarnings("unused") // Updated by 'unsubscribedUpdater' object.
  private volatile int unsubscribed;
  private static final AtomicIntegerFieldUpdater<MainThreadSubscription> unsubscribedUpdater =
      AtomicIntegerFieldUpdater.newUpdater(MainThreadSubscription.class, "unsubscribed");

  @Override public final boolean isUnsubscribed() {
    return unsubscribed != 0;
  }

  @Override public final void unsubscribe() {
    if (unsubscribedUpdater.compareAndSet(this, 0, 1)) {
      if (Looper.getMainLooper() == Looper.myLooper()) {
        onUnsubscribe();
      } else {
        mainThread.post(this);
      }
    }
  }

  @Override public final void run() {
    onUnsubscribe();
  }

  protected abstract void onUnsubscribe();
}