Add @AwaitRule to integration test

Add @AwaitRule to integration test

Done to ensure that Arquillian waits for the application to standup
properly before executing the test method

--- src/test/java/io/openshift/booster/OpenShiftIT.java
+++ src/test/java/io/openshift/booster/OpenShiftIT.java
@@ -20,6 +20,7 @@

 import com.jayway.restassured.RestAssured;
 import io.openshift.booster.service.GreetingProperties;
+import org.arquillian.cube.openshift.impl.enricher.AwaitRoute;
 import org.arquillian.cube.openshift.impl.enricher.RouteURL;
 import org.jboss.arquillian.junit.Arquillian;
 import org.junit.Before;
@@ -28,6 +29,7 @@
 @RunWith(Arquillian.class)
 public class OpenShiftIT extends AbstractBoosterApplicationTest {

+    @AwaitRoute(path = "/health")
     @RouteURL("${app.name}")
     private URL baseURL;

<|original_code|>
/*
 * Copyright 2016-2017 Red Hat, Inc, and individual contributors.
 *
 * 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 io.openshift.booster;

import java.net.URL;

import com.jayway.restassured.RestAssured;
import io.openshift.booster.service.GreetingProperties;
import org.arquillian.cube.openshift.impl.enricher.RouteURL;
import org.jboss.arquillian.junit.Arquillian;
import org.junit.Before;
import org.junit.runner.RunWith;

@RunWith(Arquillian.class)
public class OpenShiftIT extends AbstractBoosterApplicationTest {

    @RouteURL("${app.name}")
    private URL baseURL;

    @Before
    public void setup() throws Exception {
        RestAssured.baseURI = baseURL + "api/greeting";
    }

    protected GreetingProperties getProperties() {
        return new GreetingProperties();
    }

}

<|edits_diff|>
--- src/test/java/io/openshift/booster/OpenShiftIT.java
+++ src/test/java/io/openshift/booster/OpenShiftIT.java
@@ -20,6 +20,7 @@

 import com.jayway.restassured.RestAssured;
 import io.openshift.booster.service.GreetingProperties;
+import org.arquillian.cube.openshift.impl.enricher.AwaitRoute;
 import org.arquillian.cube.openshift.impl.enricher.RouteURL;
 import org.jboss.arquillian.junit.Arquillian;
 import org.junit.Before;
<|current_version|>
/*
 * Copyright 2016-2017 Red Hat, Inc, and individual contributors.
 *
 * 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 io.openshift.booster;

import java.net.URL;

import com.jayway.restassured.RestAssured;
import io.openshift.booster.service.GreetingProperties;
import org.arquillian.cube.openshift.impl.enricher.AwaitRoute;
import org.arquillian.cube.openshift.impl.enricher.RouteURL;
import org.jboss.arquillian.junit.Arquillian;
import org.junit.Before;
import org.junit.runner.RunWith;

@RunWith(Arquillian.class)
public class OpenShiftIT extends AbstractBoosterApplicationTest {

    @RouteURL("${app.name}")
    private URL baseURL;

    @Before
    public void setup() throws Exception {
        RestAssured.baseURI = baseURL + "api/greeting";
    }

    protected GreetingProperties getProperties() {
        return new GreetingProperties();
    }

}

<|next_version|>
/*
 * Copyright 2016-2017 Red Hat, Inc, and individual contributors.
 *
 * 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 io.openshift.booster;

import java.net.URL;

import com.jayway.restassured.RestAssured;
import io.openshift.booster.service.GreetingProperties;
import org.arquillian.cube.openshift.impl.enricher.AwaitRoute;
import org.arquillian.cube.openshift.impl.enricher.RouteURL;
import org.jboss.arquillian.junit.Arquillian;
import org.junit.Before;
import org.junit.runner.RunWith;

@RunWith(Arquillian.class)
public class OpenShiftIT extends AbstractBoosterApplicationTest {

    @AwaitRoute(path = "/health")
    @RouteURL("${app.name}")
    private URL baseURL;

    @Before
    public void setup() throws Exception {
        RestAssured.baseURI = baseURL + "api/greeting";
    }

    protected GreetingProperties getProperties() {
        return new GreetingProperties();
    }

}


Add @Incubating and @since annotations

Add @Incubating and @since annotations

To MultipleBuildActionsException.

Signed-off-by: Lucas Smaira <ebde68659be3ad482cc698f6db784bb2a410fa24@google.com>

--- subprojects/tooling-api/src/main/java/org/gradle/tooling/exceptions/MultipleBuildActionsException.java
+++ subprojects/tooling-api/src/main/java/org/gradle/tooling/exceptions/MultipleBuildActionsException.java
@@ -16,10 +16,15 @@

 package org.gradle.tooling.exceptions;

+import org.gradle.api.Incubating;
+
 /**
  * Thrown when the {@link org.gradle.tooling.PhasedBuildActionExecuter.Builder} has been configured
  * with more than one {@link org.gradle.tooling.BuildAction} per phase.
+ *
+ * @since 4.7
  */
+@Incubating
 public class MultipleBuildActionsException extends RuntimeException {

     public MultipleBuildActionsException(String message) {

<|original_code|>
/*
 * Copyright 2018 the original author or authors.
 *
 * 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.gradle.tooling.exceptions;

/**
 * Thrown when the {@link org.gradle.tooling.PhasedBuildActionExecuter.Builder} has been configured
 * with more than one {@link org.gradle.tooling.BuildAction} per phase.
 */
public class MultipleBuildActionsException extends RuntimeException {

    public MultipleBuildActionsException(String message) {
        super(message);
    }
}

<|edits_diff|>
--- subprojects/tooling-api/src/main/java/org/gradle/tooling/exceptions/MultipleBuildActionsException.java
+++ subprojects/tooling-api/src/main/java/org/gradle/tooling/exceptions/MultipleBuildActionsException.java
@@ -16,9 +16,13 @@

 package org.gradle.tooling.exceptions;

+import org.gradle.api.Incubating;
+
 /**
  * Thrown when the {@link org.gradle.tooling.PhasedBuildActionExecuter.Builder} has been configured
  * with more than one {@link org.gradle.tooling.BuildAction} per phase.
+ *
+ * @since 4.7
  */
 public class MultipleBuildActionsException extends RuntimeException {

<|current_version|>
/*
 * Copyright 2018 the original author or authors.
 *
 * 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.gradle.tooling.exceptions;

import org.gradle.api.Incubating;

/**
 * Thrown when the {@link org.gradle.tooling.PhasedBuildActionExecuter.Builder} has been configured
 * with more than one {@link org.gradle.tooling.BuildAction} per phase.
 *
 * @since 4.7
 */
public class MultipleBuildActionsException extends RuntimeException {

    public MultipleBuildActionsException(String message) {
        super(message);
    }
}

<|next_version|>
/*
 * Copyright 2018 the original author or authors.
 *
 * 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.gradle.tooling.exceptions;

import org.gradle.api.Incubating;

/**
 * Thrown when the {@link org.gradle.tooling.PhasedBuildActionExecuter.Builder} has been configured
 * with more than one {@link org.gradle.tooling.BuildAction} per phase.
 *
 * @since 4.7
 */
@Incubating
public class MultipleBuildActionsException extends RuntimeException {

    public MultipleBuildActionsException(String message) {
        super(message);
    }
}


Add logout url and regirect to main page after successful login.

--- src/main/java/bj/pranie/config/WebSecurityConfig.java
+++ src/main/java/bj/pranie/config/WebSecurityConfig.java
@@ -24,6 +24,7 @@
     protected void configure(HttpSecurity http) throws Exception {
         http.authorizeRequests()
                 .antMatchers("/",
+                        "/logout",
                         "/week", "/week/*",
                         "/wm/*/*/*/*",
                         "/user/registration", "/user/restore",
@@ -37,6 +38,8 @@
                 .permitAll()
                 .and()
                 .logout()
+                .logoutUrl("/logout")
+                .logoutSuccessUrl("/")
                 .permitAll();
     }

<|original_code|>
package bj.pranie.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.ComponentScan;
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 javax.sql.DataSource;

/**
 * Created by Sebastian Sokolowski on 13.10.16.
 */
@Configuration
@EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {

    @Autowired
    CustomAuthenticationProvider customAuthenticationProvider;

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http.authorizeRequests()
                .antMatchers("/",
                        "/week", "/week/*",
                        "/wm/*/*/*/*",
                        "/user/registration", "/user/restore",
                        "/images/*",
                        "/js/*").permitAll()
                .anyRequest().authenticated()
                .and()
                .formLogin()
                .loginPage("/login")
                .defaultSuccessUrl("/week")
                .permitAll()
                .and()
                .logout()
                .permitAll();
    }

    @Autowired
    @Override
    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
        auth.authenticationProvider(customAuthenticationProvider);
    }
}
<|edits_diff|>
--- src/main/java/bj/pranie/config/WebSecurityConfig.java
+++ src/main/java/bj/pranie/config/WebSecurityConfig.java
@@ -24,6 +24,7 @@
     protected void configure(HttpSecurity http) throws Exception {
         http.authorizeRequests()
                 .antMatchers("/",
+                        "/logout",
                         "/week", "/week/*",
                         "/wm/*/*/*/*",
                         "/user/registration", "/user/restore",
<|current_version|>
package bj.pranie.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.ComponentScan;
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 javax.sql.DataSource;

/**
 * Created by Sebastian Sokolowski on 13.10.16.
 */
@Configuration
@EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {

    @Autowired
    CustomAuthenticationProvider customAuthenticationProvider;

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http.authorizeRequests()
                .antMatchers("/",
                        "/logout",
                        "/week", "/week/*",
                        "/wm/*/*/*/*",
                        "/user/registration", "/user/restore",
                        "/images/*",
                        "/js/*").permitAll()
                .anyRequest().authenticated()
                .and()
                .formLogin()
                .loginPage("/login")
                .defaultSuccessUrl("/week")
                .permitAll()
                .and()
                .logout()
                .permitAll();
    }

    @Autowired
    @Override
    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
        auth.authenticationProvider(customAuthenticationProvider);
    }
}
<|next_version|>
package bj.pranie.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.ComponentScan;
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 javax.sql.DataSource;

/**
 * Created by Sebastian Sokolowski on 13.10.16.
 */
@Configuration
@EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {

    @Autowired
    CustomAuthenticationProvider customAuthenticationProvider;

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http.authorizeRequests()
                .antMatchers("/",
                        "/logout",
                        "/week", "/week/*",
                        "/wm/*/*/*/*",
                        "/user/registration", "/user/restore",
                        "/images/*",
                        "/js/*").permitAll()
                .anyRequest().authenticated()
                .and()
                .formLogin()
                .loginPage("/login")
                .defaultSuccessUrl("/week")
                .permitAll()
                .and()
                .logout()
                .logoutUrl("/logout")
                .logoutSuccessUrl("/")
                .permitAll();
    }

    @Autowired
    @Override
    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
        auth.authenticationProvider(customAuthenticationProvider);
    }
}


Create function for moving files

Create function for moving files

--- fake-koji/src/main/java/org/fakekoji/Utils.java
+++ fake-koji/src/main/java/org/fakekoji/Utils.java
@@ -6,7 +6,10 @@
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.net.URL;
+import java.nio.file.Files;
 import java.nio.file.Path;
+
+import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;

 public class Utils {

@@ -43,4 +46,8 @@
         writer.flush();
         writer.close();
     }
+
+    public static void moveFile(File source, File target) throws IOException {
+        Files.move(source.toPath(), target.toPath(), REPLACE_EXISTING);
+    }
 }

<|original_code|>
package org.fakekoji;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.URL;
import java.nio.file.Path;

public class Utils {

    private static final ClassLoader classLoader = Utils.class.getClassLoader();

    public static String readResource(Path path) throws IOException {
        return readFile(classLoader.getResource(path.toString()));
    }

    public static String readFile(File file) throws IOException {
        final StringBuilder content = new StringBuilder();
        final FileReader fileReader = new FileReader(file);
        final BufferedReader bufferedReader = new BufferedReader(fileReader);
        String line;
        while ((line = bufferedReader.readLine()) != null) {
            content.append(line);
        }
        bufferedReader.close();
        fileReader.close();
        return content.toString();
    }

    public static String readFile(URL url) throws IOException {
        return readFile(new File(url.getFile()));
    }

    public static void writeToFile(Path path, String content) throws IOException {
        writeToFile(path.toFile(), content);
    }

    public static void writeToFile(File file, String content) throws IOException {
        final PrintWriter writer = new PrintWriter(file.getAbsolutePath());
        writer.write(content);
        writer.flush();
        writer.close();
    }
}

<|edits_diff|>
--- fake-koji/src/main/java/org/fakekoji/Utils.java
+++ fake-koji/src/main/java/org/fakekoji/Utils.java
@@ -6,7 +6,10 @@
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.net.URL;
+import java.nio.file.Files;
 import java.nio.file.Path;
+
+import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;

 public class Utils {

<|current_version|>
package org.fakekoji;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;

import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;

public class Utils {

    private static final ClassLoader classLoader = Utils.class.getClassLoader();

    public static String readResource(Path path) throws IOException {
        return readFile(classLoader.getResource(path.toString()));
    }

    public static String readFile(File file) throws IOException {
        final StringBuilder content = new StringBuilder();
        final FileReader fileReader = new FileReader(file);
        final BufferedReader bufferedReader = new BufferedReader(fileReader);
        String line;
        while ((line = bufferedReader.readLine()) != null) {
            content.append(line);
        }
        bufferedReader.close();
        fileReader.close();
        return content.toString();
    }

    public static String readFile(URL url) throws IOException {
        return readFile(new File(url.getFile()));
    }

    public static void writeToFile(Path path, String content) throws IOException {
        writeToFile(path.toFile(), content);
    }

    public static void writeToFile(File file, String content) throws IOException {
        final PrintWriter writer = new PrintWriter(file.getAbsolutePath());
        writer.write(content);
        writer.flush();
        writer.close();
    }
}

<|next_version|>
package org.fakekoji;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;

import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;

public class Utils {

    private static final ClassLoader classLoader = Utils.class.getClassLoader();

    public static String readResource(Path path) throws IOException {
        return readFile(classLoader.getResource(path.toString()));
    }

    public static String readFile(File file) throws IOException {
        final StringBuilder content = new StringBuilder();
        final FileReader fileReader = new FileReader(file);
        final BufferedReader bufferedReader = new BufferedReader(fileReader);
        String line;
        while ((line = bufferedReader.readLine()) != null) {
            content.append(line);
        }
        bufferedReader.close();
        fileReader.close();
        return content.toString();
    }

    public static String readFile(URL url) throws IOException {
        return readFile(new File(url.getFile()));
    }

    public static void writeToFile(Path path, String content) throws IOException {
        writeToFile(path.toFile(), content);
    }

    public static void writeToFile(File file, String content) throws IOException {
        final PrintWriter writer = new PrintWriter(file.getAbsolutePath());
        writer.write(content);
        writer.flush();
        writer.close();
    }

    public static void moveFile(File source, File target) throws IOException {
        Files.move(source.toPath(), target.toPath(), REPLACE_EXISTING);
    }
}


Add registration of world + protection cmds

Signed-off-by: Ollie <caf5c3fc6dbe0c347eab97fff2fea94d86d406b9@live.co.uk>

--- src/com/volumetricpixels/vitals/main/Vitals.java
+++ src/com/volumetricpixels/vitals/main/Vitals.java
@@ -6,6 +6,8 @@

 import com.volumetricpixels.vitals.main.commands.AdminCommands;
 import com.volumetricpixels.vitals.main.commands.GeneralCommands;
+import com.volumetricpixels.vitals.main.commands.ProtectionCommands;
+import com.volumetricpixels.vitals.main.commands.WorldCommands;
 import com.volumetricpixels.vitals.main.configuration.VitalsConfiguration;

 public class Vitals extends CommonPlugin {
@@ -25,6 +27,8 @@
                 AnnotatedCommandRegistrationFactory commandRegistration = new AnnotatedCommandRegistrationFactory(new SimpleInjector(this));
                 getEngine().getRootCommand().addSubCommands(this, AdminCommands.class, commandRegistration);
                 getEngine().getRootCommand().addSubCommands(this, GeneralCommands.class, commandRegistration);
+                getEngine().getRootCommand().addSubCommands(this, ProtectionCommands.class, commandRegistration);
+                getEngine().getRootCommand().addSubCommands(this, WorldCommands.class, commandRegistration);

                 getLogger().info("[Vitals] v" + getDescription().getVersion() + " enabled!");
         }

<|original_code|>
package com.volumetricpixels.vitals.main;

import org.spout.api.command.annotated.AnnotatedCommandRegistrationFactory;
import org.spout.api.command.annotated.SimpleInjector;
import org.spout.api.plugin.CommonPlugin;

import com.volumetricpixels.vitals.main.commands.AdminCommands;
import com.volumetricpixels.vitals.main.commands.GeneralCommands;
import com.volumetricpixels.vitals.main.configuration.VitalsConfiguration;

public class Vitals extends CommonPlugin {

        private VitalsConfiguration config;

        @Override
        public void onDisable() {
                getLogger().info("[Vitals] v" + getDescription().getVersion() + " disabled!");
        }

        @Override
        public void onEnable() {
                config = new VitalsConfiguration(getDataFolder());

		// Register commands.
                AnnotatedCommandRegistrationFactory commandRegistration = new AnnotatedCommandRegistrationFactory(new SimpleInjector(this));
                getEngine().getRootCommand().addSubCommands(this, AdminCommands.class, commandRegistration);
                getEngine().getRootCommand().addSubCommands(this, GeneralCommands.class, commandRegistration);

                getLogger().info("[Vitals] v" + getDescription().getVersion() + " enabled!");
        }

        public VitalsConfiguration getConfig() {
                return config;
        }

}
<|edits_diff|>
--- src/com/volumetricpixels/vitals/main/Vitals.java
+++ src/com/volumetricpixels/vitals/main/Vitals.java
@@ -6,6 +6,8 @@

 import com.volumetricpixels.vitals.main.commands.AdminCommands;
 import com.volumetricpixels.vitals.main.commands.GeneralCommands;
+import com.volumetricpixels.vitals.main.commands.ProtectionCommands;
+import com.volumetricpixels.vitals.main.commands.WorldCommands;
 import com.volumetricpixels.vitals.main.configuration.VitalsConfiguration;

 public class Vitals extends CommonPlugin {
<|current_version|>
package com.volumetricpixels.vitals.main;

import org.spout.api.command.annotated.AnnotatedCommandRegistrationFactory;
import org.spout.api.command.annotated.SimpleInjector;
import org.spout.api.plugin.CommonPlugin;

import com.volumetricpixels.vitals.main.commands.AdminCommands;
import com.volumetricpixels.vitals.main.commands.GeneralCommands;
import com.volumetricpixels.vitals.main.commands.ProtectionCommands;
import com.volumetricpixels.vitals.main.commands.WorldCommands;
import com.volumetricpixels.vitals.main.configuration.VitalsConfiguration;

public class Vitals extends CommonPlugin {

        private VitalsConfiguration config;

        @Override
        public void onDisable() {
                getLogger().info("[Vitals] v" + getDescription().getVersion() + " disabled!");
        }

        @Override
        public void onEnable() {
                config = new VitalsConfiguration(getDataFolder());

		// Register commands.
                AnnotatedCommandRegistrationFactory commandRegistration = new AnnotatedCommandRegistrationFactory(new SimpleInjector(this));
                getEngine().getRootCommand().addSubCommands(this, AdminCommands.class, commandRegistration);
                getEngine().getRootCommand().addSubCommands(this, GeneralCommands.class, commandRegistration);

                getLogger().info("[Vitals] v" + getDescription().getVersion() + " enabled!");
        }

        public VitalsConfiguration getConfig() {
                return config;
        }

}
<|next_version|>
package com.volumetricpixels.vitals.main;

import org.spout.api.command.annotated.AnnotatedCommandRegistrationFactory;
import org.spout.api.command.annotated.SimpleInjector;
import org.spout.api.plugin.CommonPlugin;

import com.volumetricpixels.vitals.main.commands.AdminCommands;
import com.volumetricpixels.vitals.main.commands.GeneralCommands;
import com.volumetricpixels.vitals.main.commands.ProtectionCommands;
import com.volumetricpixels.vitals.main.commands.WorldCommands;
import com.volumetricpixels.vitals.main.configuration.VitalsConfiguration;

public class Vitals extends CommonPlugin {

        private VitalsConfiguration config;

        @Override
        public void onDisable() {
                getLogger().info("[Vitals] v" + getDescription().getVersion() + " disabled!");
        }

        @Override
        public void onEnable() {
                config = new VitalsConfiguration(getDataFolder());

		// Register commands.
                AnnotatedCommandRegistrationFactory commandRegistration = new AnnotatedCommandRegistrationFactory(new SimpleInjector(this));
                getEngine().getRootCommand().addSubCommands(this, AdminCommands.class, commandRegistration);
                getEngine().getRootCommand().addSubCommands(this, GeneralCommands.class, commandRegistration);
                getEngine().getRootCommand().addSubCommands(this, ProtectionCommands.class, commandRegistration);
                getEngine().getRootCommand().addSubCommands(this, WorldCommands.class, commandRegistration);

                getLogger().info("[Vitals] v" + getDescription().getVersion() + " enabled!");
        }

        public VitalsConfiguration getConfig() {
                return config;
        }

}


Add timestamp type to time property for oracle

git-svn-id: 4b387fe5ada7764508e2ca96c335714e4c1692c6@947 0d517254-b314-0410-acde-c619094fa49f

--- src/edu/northwestern/bioinformatics/studycalendar/domain/auditing/DataAuditInfo.java
+++ src/edu/northwestern/bioinformatics/studycalendar/domain/auditing/DataAuditInfo.java
@@ -1,6 +1,9 @@
 package edu.northwestern.bioinformatics.studycalendar.domain.auditing;

+import org.hibernate.annotations.Type;
+
 import java.util.Date;
+import java.sql.Timestamp;

 /**
  * Subclass of core-commons' DataAuditInfo that aliases the "on" property as "time".
@@ -25,6 +28,7 @@
         );
     }

+    @Type(type = "timestamp")
     public Date getTime() {
         return getOn();
     }

<|original_code|>
package edu.northwestern.bioinformatics.studycalendar.domain.auditing;

import java.util.Date;

/**
 * Subclass of core-commons' DataAuditInfo that aliases the "on" property as "time".
 * This is so that it can be used in HQL queries ("on" is apparently a reserved word).
 *
 * @author Rhett Sutphin
 */
public class DataAuditInfo extends edu.nwu.bioinformatics.commons.DataAuditInfo {
    public DataAuditInfo() { }

    public DataAuditInfo(String by, String ip) {
        super(by, ip);
    }

    public DataAuditInfo(String by, String ip, Date on) {
        super(by, ip, on);
    }

    public static DataAuditInfo copy(edu.nwu.bioinformatics.commons.DataAuditInfo source) {
        return new DataAuditInfo(
            source.getBy(), source.getIp(), source.getOn()
        );
    }

    public Date getTime() {
        return getOn();
    }

    public void setTime(Date on) {
        setOn(on);
    }

    /* Have to duplicate other accessors so that it will work with annotations without
       annotating the superclass. */
    public String getUsername() { return super.getBy(); }
    public void setUsername(String by) { super.setBy(by); }
    public String getIp() { return super.getIp(); }
    public void setIp(String ip) { super.setIp(ip); }
}

<|edits_diff|>
--- src/edu/northwestern/bioinformatics/studycalendar/domain/auditing/DataAuditInfo.java
+++ src/edu/northwestern/bioinformatics/studycalendar/domain/auditing/DataAuditInfo.java
@@ -1,6 +1,9 @@
 package edu.northwestern.bioinformatics.studycalendar.domain.auditing;

+import org.hibernate.annotations.Type;
+
 import java.util.Date;
+import java.sql.Timestamp;

 /**
  * Subclass of core-commons' DataAuditInfo that aliases the "on" property as "time".
<|current_version|>
package edu.northwestern.bioinformatics.studycalendar.domain.auditing;

import org.hibernate.annotations.Type;

import java.util.Date;
import java.sql.Timestamp;

/**
 * Subclass of core-commons' DataAuditInfo that aliases the "on" property as "time".
 * This is so that it can be used in HQL queries ("on" is apparently a reserved word).
 *
 * @author Rhett Sutphin
 */
public class DataAuditInfo extends edu.nwu.bioinformatics.commons.DataAuditInfo {
    public DataAuditInfo() { }

    public DataAuditInfo(String by, String ip) {
        super(by, ip);
    }

    public DataAuditInfo(String by, String ip, Date on) {
        super(by, ip, on);
    }

    public static DataAuditInfo copy(edu.nwu.bioinformatics.commons.DataAuditInfo source) {
        return new DataAuditInfo(
            source.getBy(), source.getIp(), source.getOn()
        );
    }

    public Date getTime() {
        return getOn();
    }

    public void setTime(Date on) {
        setOn(on);
    }

    /* Have to duplicate other accessors so that it will work with annotations without
       annotating the superclass. */
    public String getUsername() { return super.getBy(); }
    public void setUsername(String by) { super.setBy(by); }
    public String getIp() { return super.getIp(); }
    public void setIp(String ip) { super.setIp(ip); }
}

<|next_version|>
package edu.northwestern.bioinformatics.studycalendar.domain.auditing;

import org.hibernate.annotations.Type;

import java.util.Date;
import java.sql.Timestamp;

/**
 * Subclass of core-commons' DataAuditInfo that aliases the "on" property as "time".
 * This is so that it can be used in HQL queries ("on" is apparently a reserved word).
 *
 * @author Rhett Sutphin
 */
public class DataAuditInfo extends edu.nwu.bioinformatics.commons.DataAuditInfo {
    public DataAuditInfo() { }

    public DataAuditInfo(String by, String ip) {
        super(by, ip);
    }

    public DataAuditInfo(String by, String ip, Date on) {
        super(by, ip, on);
    }

    public static DataAuditInfo copy(edu.nwu.bioinformatics.commons.DataAuditInfo source) {
        return new DataAuditInfo(
            source.getBy(), source.getIp(), source.getOn()
        );
    }

    @Type(type = "timestamp")
    public Date getTime() {
        return getOn();
    }

    public void setTime(Date on) {
        setOn(on);
    }

    /* Have to duplicate other accessors so that it will work with annotations without
       annotating the superclass. */
    public String getUsername() { return super.getBy(); }
    public void setUsername(String by) { super.setBy(by); }
    public String getIp() { return super.getIp(); }
    public void setIp(String ip) { super.setIp(ip); }
}


Add Extension .pot for powerpoint

Add Extension .pot for powerpoint

--- src/main/java/org/dstadler/commoncrawl/Extensions.java
+++ src/main/java/org/dstadler/commoncrawl/Extensions.java
@@ -24,11 +24,13 @@

         // Powerpoint
         ".ppt",
+        ".pot",
         ".pptx",
         ".pptm",
         ".ppsm",
         ".ppsx",
         ".thmx",
+        ".potx",

         // Outlook
         ".msg",

<|original_code|>
package org.dstadler.commoncrawl;

/**
 * Which extensions we are interested in.
 *
 * @author dominik.stadler
 */
public class Extensions {

    private static final String[] EXTENSIONS = new String[] {
        // Excel
        ".xls",
        ".xlsx",
        ".xlsm",
        ".xltx",
        ".xlsb",

        // Word
        ".doc",
        ".docx",
        ".dotx",
        ".docm",
        ".ooxml",

        // Powerpoint
        ".ppt",
        ".pptx",
        ".pptm",
        ".ppsm",
        ".ppsx",
        ".thmx",

        // Outlook
        ".msg",

        // Publisher
        ".pub",

        // Visio - binary
        ".vsd",
        ".vss",
        ".vst",
        ".vsw",

        // Visio - ooxml (currently unsupported)
        ".vsdm",
        ".vsdx",
        ".vssm",
        ".vssx",
        ".vstm",
        ".vstx",

        // POIFS
        ".ole2",

        // Microsoft Admin Template?
        ".adm",

        // Microsoft TNEF
        // ".dat", new HMEFFileHandler());
    };

    public static boolean matches(String url) {
        for(String ext : EXTENSIONS) {
            if(url.endsWith(ext)) {
                return true;
            }
        }

        return false;
    }
}

<|edits_diff|>
--- src/main/java/org/dstadler/commoncrawl/Extensions.java
+++ src/main/java/org/dstadler/commoncrawl/Extensions.java
@@ -24,6 +24,7 @@

         // Powerpoint
         ".ppt",
+        ".pot",
         ".pptx",
         ".pptm",
         ".ppsm",
<|current_version|>
package org.dstadler.commoncrawl;

/**
 * Which extensions we are interested in.
 *
 * @author dominik.stadler
 */
public class Extensions {

    private static final String[] EXTENSIONS = new String[] {
        // Excel
        ".xls",
        ".xlsx",
        ".xlsm",
        ".xltx",
        ".xlsb",

        // Word
        ".doc",
        ".docx",
        ".dotx",
        ".docm",
        ".ooxml",

        // Powerpoint
        ".ppt",
        ".pot",
        ".pptx",
        ".pptm",
        ".ppsm",
        ".ppsx",
        ".thmx",

        // Outlook
        ".msg",

        // Publisher
        ".pub",

        // Visio - binary
        ".vsd",
        ".vss",
        ".vst",
        ".vsw",

        // Visio - ooxml (currently unsupported)
        ".vsdm",
        ".vsdx",
        ".vssm",
        ".vssx",
        ".vstm",
        ".vstx",

        // POIFS
        ".ole2",

        // Microsoft Admin Template?
        ".adm",

        // Microsoft TNEF
        // ".dat", new HMEFFileHandler());
    };

    public static boolean matches(String url) {
        for(String ext : EXTENSIONS) {
            if(url.endsWith(ext)) {
                return true;
            }
        }

        return false;
    }
}

<|next_version|>
package org.dstadler.commoncrawl;

/**
 * Which extensions we are interested in.
 *
 * @author dominik.stadler
 */
public class Extensions {

    private static final String[] EXTENSIONS = new String[] {
        // Excel
        ".xls",
        ".xlsx",
        ".xlsm",
        ".xltx",
        ".xlsb",

        // Word
        ".doc",
        ".docx",
        ".dotx",
        ".docm",
        ".ooxml",

        // Powerpoint
        ".ppt",
        ".pot",
        ".pptx",
        ".pptm",
        ".ppsm",
        ".ppsx",
        ".thmx",
        ".potx",

        // Outlook
        ".msg",

        // Publisher
        ".pub",

        // Visio - binary
        ".vsd",
        ".vss",
        ".vst",
        ".vsw",

        // Visio - ooxml (currently unsupported)
        ".vsdm",
        ".vsdx",
        ".vssm",
        ".vssx",
        ".vstm",
        ".vstx",

        // POIFS
        ".ole2",

        // Microsoft Admin Template?
        ".adm",

        // Microsoft TNEF
        // ".dat", new HMEFFileHandler());
    };

    public static boolean matches(String url) {
        for(String ext : EXTENSIONS) {
            if(url.endsWith(ext)) {
                return true;
            }
        }

        return false;
    }
}


Introduce format-string version for rethrow VE

We currently have the ValidationException(String, Exception)
constructor, which prevents us from overloading a format String
version. This introduces a VE(Exception, String, args) so
that VE(String, Exception) can be deprecated. Once gone,
we'll introduce VE(String, args).

PiperOrigin-RevId: 186782929
Change-Id: I851a2f84e3010db64da36b9533a629fe88a2793d

--- java/com/google/copybara/ValidationException.java
+++ java/com/google/copybara/ValidationException.java
@@ -26,8 +26,13 @@
     super(message);
   }

+  @Deprecated
   public ValidationException(String message, Throwable cause) {
     super(message, cause);
+  }
+
+  public ValidationException(Throwable cause, String message, Object... args) {
+    super(String.format(message, args), cause);
   }

   public static void checkCondition(boolean condition, String format, Object... args)

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

package com.google.copybara;

/**
 * Indicates that the configuration is wrong or some error attributable to the user happened. For
 * example wrong flag usage, errors in fields or errors that we discover during execution.
 */
public class ValidationException extends Exception {

  public ValidationException(String message) {
    super(message);
  }

  public ValidationException(String message, Throwable cause) {
    super(message, cause);
  }

  public static void checkCondition(boolean condition, String format, Object... args)
      throws ValidationException {
    if (!condition) {
      throw new ValidationException(String.format(format, args));
    }
  }
}

<|edits_diff|>
--- java/com/google/copybara/ValidationException.java
+++ java/com/google/copybara/ValidationException.java
@@ -26,6 +26,7 @@
     super(message);
   }

+  @Deprecated
   public ValidationException(String message, Throwable cause) {
     super(message, cause);
   }
<|current_version|>
/*
 * Copyright (C) 2016 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.copybara;

/**
 * Indicates that the configuration is wrong or some error attributable to the user happened. For
 * example wrong flag usage, errors in fields or errors that we discover during execution.
 */
public class ValidationException extends Exception {

  public ValidationException(String message) {
    super(message);
  }

  @Deprecated
  public ValidationException(String message, Throwable cause) {
    super(message, cause);
  }

  public static void checkCondition(boolean condition, String format, Object... args)
      throws ValidationException {
    if (!condition) {
      throw new ValidationException(String.format(format, args));
    }
  }
}

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

package com.google.copybara;

/**
 * Indicates that the configuration is wrong or some error attributable to the user happened. For
 * example wrong flag usage, errors in fields or errors that we discover during execution.
 */
public class ValidationException extends Exception {

  public ValidationException(String message) {
    super(message);
  }

  @Deprecated
  public ValidationException(String message, Throwable cause) {
    super(message, cause);
  }

  public ValidationException(Throwable cause, String message, Object... args) {
    super(String.format(message, args), cause);
  }

  public static void checkCondition(boolean condition, String format, Object... args)
      throws ValidationException {
    if (!condition) {
      throw new ValidationException(String.format(format, args));
    }
  }
}


Update (PUT) a resource API call is added.

--- src/main/java/com/bigcommerce/api/resources/Resource.java
+++ src/main/java/com/bigcommerce/api/resources/Resource.java
@@ -3,10 +3,12 @@
 import java.util.List;

 import com.bigcommerce.api.Filter;
+import com.bigcommerce.api.Form;
 import com.bigcommerce.api.Response;

 public interface Resource {
 	public List<? extends Response> listAll();
 	public List<? extends Response> listAll(Filter filter);
 	public Response getOne(Integer Id);
+	public Boolean update(Integer Id, Form data);
 }

<|original_code|>
package com.bigcommerce.api.resources;

import java.util.List;

import com.bigcommerce.api.Filter;
import com.bigcommerce.api.Response;

public interface Resource {
	public List<? extends Response> listAll();
	public List<? extends Response> listAll(Filter filter);
	public Response getOne(Integer Id);
}

<|edits_diff|>
--- src/main/java/com/bigcommerce/api/resources/Resource.java
+++ src/main/java/com/bigcommerce/api/resources/Resource.java
@@ -3,6 +3,7 @@
 import java.util.List;

 import com.bigcommerce.api.Filter;
+import com.bigcommerce.api.Form;
 import com.bigcommerce.api.Response;

 public interface Resource {
<|current_version|>
package com.bigcommerce.api.resources;

import java.util.List;

import com.bigcommerce.api.Filter;
import com.bigcommerce.api.Form;
import com.bigcommerce.api.Response;

public interface Resource {
	public List<? extends Response> listAll();
	public List<? extends Response> listAll(Filter filter);
	public Response getOne(Integer Id);
}

<|next_version|>
package com.bigcommerce.api.resources;

import java.util.List;

import com.bigcommerce.api.Filter;
import com.bigcommerce.api.Form;
import com.bigcommerce.api.Response;

public interface Resource {
	public List<? extends Response> listAll();
	public List<? extends Response> listAll(Filter filter);
	public Response getOne(Integer Id);
	public Boolean update(Integer Id, Form data);
}


Upgrade to Jacoco 0.8.8 for Java 18 compatibility.

--- build-logic/src/main/java/org/ehcache/build/conventions/JacocoConvention.java
+++ build-logic/src/main/java/org/ehcache/build/conventions/JacocoConvention.java
@@ -4,6 +4,7 @@
 import org.gradle.api.Project;
 import org.gradle.api.tasks.testing.Test;
 import org.gradle.testing.jacoco.plugins.JacocoPlugin;
+import org.gradle.testing.jacoco.plugins.JacocoPluginExtension;
 import org.gradle.testing.jacoco.plugins.JacocoTaskExtension;
 import org.gradle.testing.jacoco.tasks.JacocoReport;

@@ -12,6 +13,10 @@
   @Override
   public void apply(Project project) {
     project.getPlugins().apply(JacocoPlugin.class);
+
+    project.getExtensions().configure(JacocoPluginExtension.class, jacoco -> {
+      jacoco.setToolVersion("0.8.8");
+    });

     project.getTasks().withType(JacocoReport.class).configureEach(jacocoReport -> {
       jacocoReport.getReports().configureEach(report -> {

<|original_code|>
package org.ehcache.build.conventions;

import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.tasks.testing.Test;
import org.gradle.testing.jacoco.plugins.JacocoPlugin;
import org.gradle.testing.jacoco.plugins.JacocoTaskExtension;
import org.gradle.testing.jacoco.tasks.JacocoReport;

public class JacocoConvention implements Plugin<Project> {

  @Override
  public void apply(Project project) {
    project.getPlugins().apply(JacocoPlugin.class);

    project.getTasks().withType(JacocoReport.class).configureEach(jacocoReport -> {
      jacocoReport.getReports().configureEach(report -> {
        report.getRequired().set(false);
      });
    });

    project.getTasks().withType(Test.class).configureEach(test -> {
      test.getExtensions().configure(JacocoTaskExtension.class, jacoco -> {
        jacoco.getExcludes().add("org.terracotta.tripwire.*");
      });
    });
  }
}

<|edits_diff|>
--- build-logic/src/main/java/org/ehcache/build/conventions/JacocoConvention.java
+++ build-logic/src/main/java/org/ehcache/build/conventions/JacocoConvention.java
@@ -4,6 +4,7 @@
 import org.gradle.api.Project;
 import org.gradle.api.tasks.testing.Test;
 import org.gradle.testing.jacoco.plugins.JacocoPlugin;
+import org.gradle.testing.jacoco.plugins.JacocoPluginExtension;
 import org.gradle.testing.jacoco.plugins.JacocoTaskExtension;
 import org.gradle.testing.jacoco.tasks.JacocoReport;

<|current_version|>
package org.ehcache.build.conventions;

import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.tasks.testing.Test;
import org.gradle.testing.jacoco.plugins.JacocoPlugin;
import org.gradle.testing.jacoco.plugins.JacocoPluginExtension;
import org.gradle.testing.jacoco.plugins.JacocoTaskExtension;
import org.gradle.testing.jacoco.tasks.JacocoReport;

public class JacocoConvention implements Plugin<Project> {

  @Override
  public void apply(Project project) {
    project.getPlugins().apply(JacocoPlugin.class);

    project.getTasks().withType(JacocoReport.class).configureEach(jacocoReport -> {
      jacocoReport.getReports().configureEach(report -> {
        report.getRequired().set(false);
      });
    });

    project.getTasks().withType(Test.class).configureEach(test -> {
      test.getExtensions().configure(JacocoTaskExtension.class, jacoco -> {
        jacoco.getExcludes().add("org.terracotta.tripwire.*");
      });
    });
  }
}

<|next_version|>
package org.ehcache.build.conventions;

import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.tasks.testing.Test;
import org.gradle.testing.jacoco.plugins.JacocoPlugin;
import org.gradle.testing.jacoco.plugins.JacocoPluginExtension;
import org.gradle.testing.jacoco.plugins.JacocoTaskExtension;
import org.gradle.testing.jacoco.tasks.JacocoReport;

public class JacocoConvention implements Plugin<Project> {

  @Override
  public void apply(Project project) {
    project.getPlugins().apply(JacocoPlugin.class);

    project.getExtensions().configure(JacocoPluginExtension.class, jacoco -> {
      jacoco.setToolVersion("0.8.8");
    });

    project.getTasks().withType(JacocoReport.class).configureEach(jacocoReport -> {
      jacocoReport.getReports().configureEach(report -> {
        report.getRequired().set(false);
      });
    });

    project.getTasks().withType(Test.class).configureEach(test -> {
      test.getExtensions().configure(JacocoTaskExtension.class, jacoco -> {
        jacoco.getExcludes().add("org.terracotta.tripwire.*");
      });
    });
  }
}


Clean up HttpClient after tests.

Clean up HttpClient after tests.

--- src/test/java/io/induct/yle/YleApiTestingBase.java
+++ src/test/java/io/induct/yle/YleApiTestingBase.java
@@ -4,7 +4,9 @@
 import com.google.inject.Injector;
 import io.induct.daniel.DanielModule;
 import io.induct.yle.ioc.YleApiModule;
+import org.junit.AfterClass;
 import org.junit.BeforeClass;
+import sun.net.www.http.HttpClient;

 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
@@ -23,6 +25,11 @@
                 new YleApiModule());
     }

+    @AfterClass
+    public static void postTestingSetup() throws Exception {
+        ((AutoCloseable) injector.getInstance(HttpClient.class)).close();
+    }
+
     protected InputStream asStream(String s) {
         return new ByteArrayInputStream(s.getBytes());
     }

<|original_code|>
package io.induct.yle;

import com.google.inject.Guice;
import com.google.inject.Injector;
import io.induct.daniel.DanielModule;
import io.induct.yle.ioc.YleApiModule;
import org.junit.BeforeClass;

import java.io.ByteArrayInputStream;
import java.io.InputStream;

/**
 * @since 2015-05-09
 */
public abstract class YleApiTestingBase {

    protected static Injector injector;

    @BeforeClass
    public static void preTestingSetUp() throws Exception {
        injector = Guice.createInjector(
                new DanielModule(),
                new YleApiModule());
    }

    protected InputStream asStream(String s) {
        return new ByteArrayInputStream(s.getBytes());
    }
}

<|edits_diff|>
--- src/test/java/io/induct/yle/YleApiTestingBase.java
+++ src/test/java/io/induct/yle/YleApiTestingBase.java
@@ -4,7 +4,9 @@
 import com.google.inject.Injector;
 import io.induct.daniel.DanielModule;
 import io.induct.yle.ioc.YleApiModule;
+import org.junit.AfterClass;
 import org.junit.BeforeClass;
+import sun.net.www.http.HttpClient;

 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
<|current_version|>
package io.induct.yle;

import com.google.inject.Guice;
import com.google.inject.Injector;
import io.induct.daniel.DanielModule;
import io.induct.yle.ioc.YleApiModule;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import sun.net.www.http.HttpClient;

import java.io.ByteArrayInputStream;
import java.io.InputStream;

/**
 * @since 2015-05-09
 */
public abstract class YleApiTestingBase {

    protected static Injector injector;

    @BeforeClass
    public static void preTestingSetUp() throws Exception {
        injector = Guice.createInjector(
                new DanielModule(),
                new YleApiModule());
    }

    protected InputStream asStream(String s) {
        return new ByteArrayInputStream(s.getBytes());
    }
}

<|next_version|>
package io.induct.yle;

import com.google.inject.Guice;
import com.google.inject.Injector;
import io.induct.daniel.DanielModule;
import io.induct.yle.ioc.YleApiModule;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import sun.net.www.http.HttpClient;

import java.io.ByteArrayInputStream;
import java.io.InputStream;

/**
 * @since 2015-05-09
 */
public abstract class YleApiTestingBase {

    protected static Injector injector;

    @BeforeClass
    public static void preTestingSetUp() throws Exception {
        injector = Guice.createInjector(
                new DanielModule(),
                new YleApiModule());
    }

    @AfterClass
    public static void postTestingSetup() throws Exception {
        ((AutoCloseable) injector.getInstance(HttpClient.class)).close();
    }

    protected InputStream asStream(String s) {
        return new ByteArrayInputStream(s.getBytes());
    }
}


Enable auditing of entities (DEV-15)

Enable auditing of entities (DEV-15)

--- src/main/java/sg/ncl/testbed_interface/JpaConfig.java
+++ src/main/java/sg/ncl/testbed_interface/JpaConfig.java
@@ -1,6 +1,7 @@
 package sg.ncl.testbed_interface;

 import org.springframework.context.annotation.Configuration;
+import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
 import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
 import org.springframework.transaction.annotation.EnableTransactionManagement;

@@ -9,6 +10,7 @@
  */
 @Configuration
 @EnableJpaRepositories
+@EnableJpaAuditing
 @EnableTransactionManagement
 public class JpaConfig {
 }

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

import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author Christopher Zhong
 */
@Configuration
@EnableJpaRepositories
@EnableTransactionManagement
public class JpaConfig {
}

<|edits_diff|>
--- src/main/java/sg/ncl/testbed_interface/JpaConfig.java
+++ src/main/java/sg/ncl/testbed_interface/JpaConfig.java
@@ -1,6 +1,7 @@
 package sg.ncl.testbed_interface;

 import org.springframework.context.annotation.Configuration;
+import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
 import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
 import org.springframework.transaction.annotation.EnableTransactionManagement;

<|current_version|>
package sg.ncl.testbed_interface;

import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author Christopher Zhong
 */
@Configuration
@EnableJpaRepositories
@EnableTransactionManagement
public class JpaConfig {
}

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

import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author Christopher Zhong
 */
@Configuration
@EnableJpaRepositories
@EnableJpaAuditing
@EnableTransactionManagement
public class JpaConfig {
}


Add name and constructor to class type

Add name and constructor to class type

--- src/main/java/org/hummingbirdlang/types/ClassType.java
+++ src/main/java/org/hummingbirdlang/types/ClassType.java
@@ -1,5 +1,11 @@
 package org.hummingbirdlang.types;

 public class ClassType extends CompositeType {
+  private String name;
   private Type superClass;
+
+  public ClassType(String name, Type superClass) {
+    this.name = name;
+    this.superClass = superClass;
+  }
 }

<|original_code|>
package org.hummingbirdlang.types;

public class ClassType extends CompositeType {
  private Type superClass;
}

<|edits_diff|>
--- src/main/java/org/hummingbirdlang/types/ClassType.java
+++ src/main/java/org/hummingbirdlang/types/ClassType.java
@@ -1,5 +1,6 @@
 package org.hummingbirdlang.types;

 public class ClassType extends CompositeType {
+  private String name;
   private Type superClass;
 }
<|current_version|>
package org.hummingbirdlang.types;

public class ClassType extends CompositeType {
  private String name;
  private Type superClass;
}

<|next_version|>
package org.hummingbirdlang.types;

public class ClassType extends CompositeType {
  private String name;
  private Type superClass;

  public ClassType(String name, Type superClass) {
    this.name = name;
    this.superClass = superClass;
  }
}


Fix problems on Android 6.0

Fix problems on Android 6.0

--- app/src/main/java/com/blstream/studybox/api/RestClient.java
+++ app/src/main/java/com/blstream/studybox/api/RestClient.java
@@ -1,7 +1,12 @@
 package com.blstream.studybox.api;
+
+import com.google.gson.GsonBuilder;
+
+import java.lang.reflect.Modifier;

 import retrofit.RequestInterceptor;
 import retrofit.RestAdapter;
+import retrofit.converter.GsonConverter;

 public class RestClient {

@@ -11,6 +16,10 @@

     public RestClient(){
         RestAdapter restAdapter = new RestAdapter.Builder()
+                .setConverter(new GsonConverter(new GsonBuilder()
+                        .excludeFieldsWithModifiers(Modifier.FINAL, Modifier.TRANSIENT, Modifier.STATIC)
+                        .serializeNulls()
+                        .create()))
                 .setEndpoint(BASE_URL)
                 .build();

@@ -19,6 +28,10 @@

     public RestClient(RequestInterceptor interceptor){
         RestAdapter restAdapter = new RestAdapter.Builder()
+                .setConverter(new GsonConverter(new GsonBuilder()
+                        .excludeFieldsWithModifiers(Modifier.FINAL, Modifier.TRANSIENT, Modifier.STATIC)
+                        .serializeNulls()
+                        .create()))
                 .setEndpoint(URL)
                 .setRequestInterceptor(interceptor)
                 .build();

<|original_code|>
package com.blstream.studybox.api;

import retrofit.RequestInterceptor;
import retrofit.RestAdapter;

public class RestClient {

    private static final String URL = "http://78.133.154.70:2000/";
    private static final String BASE_URL = "http://private-5f2e4b-studybox2.apiary-mock.com/";
    private RestInterface restInterface;

    public RestClient(){
        RestAdapter restAdapter = new RestAdapter.Builder()
                .setEndpoint(BASE_URL)
                .build();

        restInterface = restAdapter.create(RestInterface.class);
    }

    public RestClient(RequestInterceptor interceptor){
        RestAdapter restAdapter = new RestAdapter.Builder()
                .setEndpoint(URL)
                .setRequestInterceptor(interceptor)
                .build();

        restInterface = restAdapter.create(RestInterface.class);
    }

    public RestInterface getService(){
        return restInterface;
    }
}

<|edits_diff|>
--- app/src/main/java/com/blstream/studybox/api/RestClient.java
+++ app/src/main/java/com/blstream/studybox/api/RestClient.java
@@ -1,7 +1,12 @@
 package com.blstream.studybox.api;
+
+import com.google.gson.GsonBuilder;
+
+import java.lang.reflect.Modifier;

 import retrofit.RequestInterceptor;
 import retrofit.RestAdapter;
+import retrofit.converter.GsonConverter;

 public class RestClient {

@@ -11,6 +16,10 @@

     public RestClient(){
         RestAdapter restAdapter = new RestAdapter.Builder()
+                .setConverter(new GsonConverter(new GsonBuilder()
+                        .excludeFieldsWithModifiers(Modifier.FINAL, Modifier.TRANSIENT, Modifier.STATIC)
+                        .serializeNulls()
+                        .create()))
                 .setEndpoint(BASE_URL)
                 .build();

<|current_version|>
package com.blstream.studybox.api;

import com.google.gson.GsonBuilder;

import java.lang.reflect.Modifier;

import retrofit.RequestInterceptor;
import retrofit.RestAdapter;
import retrofit.converter.GsonConverter;

public class RestClient {

    private static final String URL = "http://78.133.154.70:2000/";
    private static final String BASE_URL = "http://private-5f2e4b-studybox2.apiary-mock.com/";
    private RestInterface restInterface;

    public RestClient(){
        RestAdapter restAdapter = new RestAdapter.Builder()
                .setConverter(new GsonConverter(new GsonBuilder()
                        .excludeFieldsWithModifiers(Modifier.FINAL, Modifier.TRANSIENT, Modifier.STATIC)
                        .serializeNulls()
                        .create()))
                .setEndpoint(BASE_URL)
                .build();

        restInterface = restAdapter.create(RestInterface.class);
    }

    public RestClient(RequestInterceptor interceptor){
        RestAdapter restAdapter = new RestAdapter.Builder()
                .setEndpoint(URL)
                .setRequestInterceptor(interceptor)
                .build();

        restInterface = restAdapter.create(RestInterface.class);
    }

    public RestInterface getService(){
        return restInterface;
    }
}

<|next_version|>
package com.blstream.studybox.api;

import com.google.gson.GsonBuilder;

import java.lang.reflect.Modifier;

import retrofit.RequestInterceptor;
import retrofit.RestAdapter;
import retrofit.converter.GsonConverter;

public class RestClient {

    private static final String URL = "http://78.133.154.70:2000/";
    private static final String BASE_URL = "http://private-5f2e4b-studybox2.apiary-mock.com/";
    private RestInterface restInterface;

    public RestClient(){
        RestAdapter restAdapter = new RestAdapter.Builder()
                .setConverter(new GsonConverter(new GsonBuilder()
                        .excludeFieldsWithModifiers(Modifier.FINAL, Modifier.TRANSIENT, Modifier.STATIC)
                        .serializeNulls()
                        .create()))
                .setEndpoint(BASE_URL)
                .build();

        restInterface = restAdapter.create(RestInterface.class);
    }

    public RestClient(RequestInterceptor interceptor){
        RestAdapter restAdapter = new RestAdapter.Builder()
                .setConverter(new GsonConverter(new GsonBuilder()
                        .excludeFieldsWithModifiers(Modifier.FINAL, Modifier.TRANSIENT, Modifier.STATIC)
                        .serializeNulls()
                        .create()))
                .setEndpoint(URL)
                .setRequestInterceptor(interceptor)
                .build();

        restInterface = restAdapter.create(RestInterface.class);
    }

    public RestInterface getService(){
        return restInterface;
    }
}


Validate logging works through slf4j

Validate logging works through slf4j

--- src/main/java/org/conjugates/analyzer/endpoints/info/InfoController.java
+++ src/main/java/org/conjugates/analyzer/endpoints/info/InfoController.java
@@ -1,6 +1,8 @@
 package org.conjugates.analyzer.endpoints.info;

 import org.conjugates.analyzer.services.properties.AnalyzerProperties;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
@@ -8,6 +10,8 @@
 @RequestMapping("/v1/info")
 @RestController
 public class InfoController {
+
+  private static final Logger LOG = LoggerFactory.getLogger(InfoController.class);

   private final AnalyzerProperties properties;

@@ -18,6 +22,7 @@

   @RequestMapping("/")
   public String name() {
+    LOG.debug("Call to info made");
     return properties.getName();
   }

<|original_code|>
package org.conjugates.analyzer.endpoints.info;

import org.conjugates.analyzer.services.properties.AnalyzerProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/v1/info")
@RestController
public class InfoController {

  private final AnalyzerProperties properties;

  @Autowired
  public InfoController(AnalyzerProperties properties) {
    this.properties = properties;
  }

  @RequestMapping("/")
  public String name() {
    return properties.getName();
  }

}

<|edits_diff|>
--- src/main/java/org/conjugates/analyzer/endpoints/info/InfoController.java
+++ src/main/java/org/conjugates/analyzer/endpoints/info/InfoController.java
@@ -1,6 +1,8 @@
 package org.conjugates.analyzer.endpoints.info;

 import org.conjugates.analyzer.services.properties.AnalyzerProperties;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
@@ -8,6 +10,8 @@
 @RequestMapping("/v1/info")
 @RestController
 public class InfoController {
+
+  private static final Logger LOG = LoggerFactory.getLogger(InfoController.class);

   private final AnalyzerProperties properties;

<|current_version|>
package org.conjugates.analyzer.endpoints.info;

import org.conjugates.analyzer.services.properties.AnalyzerProperties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/v1/info")
@RestController
public class InfoController {

  private static final Logger LOG = LoggerFactory.getLogger(InfoController.class);

  private final AnalyzerProperties properties;

  @Autowired
  public InfoController(AnalyzerProperties properties) {
    this.properties = properties;
  }

  @RequestMapping("/")
  public String name() {
    return properties.getName();
  }

}

<|next_version|>
package org.conjugates.analyzer.endpoints.info;

import org.conjugates.analyzer.services.properties.AnalyzerProperties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/v1/info")
@RestController
public class InfoController {

  private static final Logger LOG = LoggerFactory.getLogger(InfoController.class);

  private final AnalyzerProperties properties;

  @Autowired
  public InfoController(AnalyzerProperties properties) {
    this.properties = properties;
  }

  @RequestMapping("/")
  public String name() {
    LOG.debug("Call to info made");
    return properties.getName();
  }

}


Call CraftRecipe Register Func on preInit

--- src/main/java/jp/crafterkina/pipes/common/PipesCore.java
+++ src/main/java/jp/crafterkina/pipes/common/PipesCore.java
@@ -1,9 +1,12 @@
 package jp.crafterkina.pipes.common;

+import jp.crafterkina.pipes.common.recipe.vanilla.CraftManager;
 import lombok.Getter;
 import net.minecraftforge.fml.common.Mod;
+import net.minecraftforge.fml.common.Mod.EventHandler;
 import net.minecraftforge.fml.common.Mod.InstanceFactory;
 import net.minecraftforge.fml.common.SidedProxy;
+import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

 import static jp.crafterkina.pipes.common.PipesCore.MOD_ID;

@@ -22,4 +25,9 @@
     public static PipesCore getInstance(){
         return INSTANCE;
     }
+
+    @EventHandler
+    private void preInit(FMLPreInitializationEvent event){
+        CraftManager.INSTANCE.register();
+    }
 }

<|original_code|>
package jp.crafterkina.pipes.common;

import lombok.Getter;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.InstanceFactory;
import net.minecraftforge.fml.common.SidedProxy;

import static jp.crafterkina.pipes.common.PipesCore.MOD_ID;

@Mod(modid = MOD_ID)
public enum PipesCore {
    INSTANCE;

    public static final String MOD_ID = "jp.crafterkina.pipes";

    @SuppressWarnings("NullableProblems")
    @SidedProxy(clientSide = "jp.crafterkina.pipes.client.ClientProxy", serverSide = "jp.crafterkina.pipes.server.ServerProxy")
    @Getter
    private static CommonProxy proxy;

    @InstanceFactory
    public static PipesCore getInstance(){
        return INSTANCE;
    }
}

<|edits_diff|>
--- src/main/java/jp/crafterkina/pipes/common/PipesCore.java
+++ src/main/java/jp/crafterkina/pipes/common/PipesCore.java
@@ -1,9 +1,12 @@
 package jp.crafterkina.pipes.common;

+import jp.crafterkina.pipes.common.recipe.vanilla.CraftManager;
 import lombok.Getter;
 import net.minecraftforge.fml.common.Mod;
+import net.minecraftforge.fml.common.Mod.EventHandler;
 import net.minecraftforge.fml.common.Mod.InstanceFactory;
 import net.minecraftforge.fml.common.SidedProxy;
+import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

 import static jp.crafterkina.pipes.common.PipesCore.MOD_ID;

<|current_version|>
package jp.crafterkina.pipes.common;

import jp.crafterkina.pipes.common.recipe.vanilla.CraftManager;
import lombok.Getter;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.Mod.InstanceFactory;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

import static jp.crafterkina.pipes.common.PipesCore.MOD_ID;

@Mod(modid = MOD_ID)
public enum PipesCore {
    INSTANCE;

    public static final String MOD_ID = "jp.crafterkina.pipes";

    @SuppressWarnings("NullableProblems")
    @SidedProxy(clientSide = "jp.crafterkina.pipes.client.ClientProxy", serverSide = "jp.crafterkina.pipes.server.ServerProxy")
    @Getter
    private static CommonProxy proxy;

    @InstanceFactory
    public static PipesCore getInstance(){
        return INSTANCE;
    }
}

<|next_version|>
package jp.crafterkina.pipes.common;

import jp.crafterkina.pipes.common.recipe.vanilla.CraftManager;
import lombok.Getter;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.Mod.InstanceFactory;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

import static jp.crafterkina.pipes.common.PipesCore.MOD_ID;

@Mod(modid = MOD_ID)
public enum PipesCore {
    INSTANCE;

    public static final String MOD_ID = "jp.crafterkina.pipes";

    @SuppressWarnings("NullableProblems")
    @SidedProxy(clientSide = "jp.crafterkina.pipes.client.ClientProxy", serverSide = "jp.crafterkina.pipes.server.ServerProxy")
    @Getter
    private static CommonProxy proxy;

    @InstanceFactory
    public static PipesCore getInstance(){
        return INSTANCE;
    }

    @EventHandler
    private void preInit(FMLPreInitializationEvent event){
        CraftManager.INSTANCE.register();
    }
}


Set order to a low-priority but uncommon value

Without the order, it takes the default value (100), which can
easily collide with another WebConfigurerAdapter in the application
using the library

--- 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
@@ -4,6 +4,8 @@
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Import;
+import org.springframework.core.Ordered;
+import org.springframework.core.annotation.Order;
 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;
@@ -14,6 +16,7 @@
 @Configuration
 @ConditionalOnClass(WebSecurityConfigurerAdapter.class) //only when spring-security is in classpath
 @Import(SecurityProblemSupport.class)
+@Order(Ordered.LOWEST_PRECEDENCE - 21)
 public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
     @Autowired
     private SecurityProblemSupport problemSupport;

<|original_code|>
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);
    }
}

<|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
@@ -4,6 +4,8 @@
 import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Import;
+import org.springframework.core.Ordered;
+import org.springframework.core.annotation.Order;
 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;
<|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.core.Ordered;
import org.springframework.core.annotation.Order;
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);
    }
}

<|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.core.Ordered;
import org.springframework.core.annotation.Order;
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)
@Order(Ordered.LOWEST_PRECEDENCE - 21)
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
    @Autowired
    private SecurityProblemSupport problemSupport;

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


Add JsonView to name and description

Add JsonView to name and description

--- src/main/java/com/royalrangers/model/achievement/Task.java
+++ src/main/java/com/royalrangers/model/achievement/Task.java
@@ -1,7 +1,9 @@
 package com.royalrangers.model.achievement;

 import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonView;
 import com.royalrangers.model.BaseModel;
+import com.royalrangers.model.Views;
 import lombok.Getter;
 import lombok.Setter;

@@ -12,8 +14,10 @@
 @Entity
 public class Task extends BaseModel {

+    @JsonView(Views.Achievement.class)
     private String name;

+    @JsonView(Views.Achievement.class)
     private String description;

     @JsonIgnore

<|original_code|>
package com.royalrangers.model.achievement;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.royalrangers.model.BaseModel;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;

@Getter
@Setter
@Entity
public class Task extends BaseModel {

    private String name;

    private String description;

    @JsonIgnore
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "test_id", nullable = true)
    private Test test;

}
<|edits_diff|>
--- src/main/java/com/royalrangers/model/achievement/Task.java
+++ src/main/java/com/royalrangers/model/achievement/Task.java
@@ -1,7 +1,9 @@
 package com.royalrangers.model.achievement;

 import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonView;
 import com.royalrangers.model.BaseModel;
+import com.royalrangers.model.Views;
 import lombok.Getter;
 import lombok.Setter;

@@ -12,6 +14,7 @@
 @Entity
 public class Task extends BaseModel {

+    @JsonView(Views.Achievement.class)
     private String name;

     private String description;
<|current_version|>
package com.royalrangers.model.achievement;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonView;
import com.royalrangers.model.BaseModel;
import com.royalrangers.model.Views;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;

@Getter
@Setter
@Entity
public class Task extends BaseModel {

    @JsonView(Views.Achievement.class)
    private String name;

    private String description;

    @JsonIgnore
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "test_id", nullable = true)
    private Test test;

}
<|next_version|>
package com.royalrangers.model.achievement;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonView;
import com.royalrangers.model.BaseModel;
import com.royalrangers.model.Views;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;

@Getter
@Setter
@Entity
public class Task extends BaseModel {

    @JsonView(Views.Achievement.class)
    private String name;

    @JsonView(Views.Achievement.class)
    private String description;

    @JsonIgnore
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "test_id", nullable = true)
    private Test test;

}


Add dummy test so Maven 2 does not fail on empty test.

--- rest/src/test/java/game/geography/rest/LandEndpointTest.java
+++ rest/src/test/java/game/geography/rest/LandEndpointTest.java
@@ -1,4 +1,8 @@
 package game.geography.rest;
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;

 public class LandEndpointTest {

@@ -6,4 +10,9 @@

     // @Mock
     // Map map;
+
+    @Test
+    public void shouldNotFailInMaven() {
+        assertTrue(true);
+    }
 }

<|original_code|>
package game.geography.rest;

public class LandEndpointTest {

    // TODO test: add unit test for the LandEndpoint

    // @Mock
    // Map map;
}

<|edits_diff|>
--- rest/src/test/java/game/geography/rest/LandEndpointTest.java
+++ rest/src/test/java/game/geography/rest/LandEndpointTest.java
@@ -1,4 +1,8 @@
 package game.geography.rest;
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;

 public class LandEndpointTest {

<|current_version|>
package game.geography.rest;

import static org.junit.Assert.assertTrue;

import org.junit.Test;

public class LandEndpointTest {

    // TODO test: add unit test for the LandEndpoint

    // @Mock
    // Map map;
}

<|next_version|>
package game.geography.rest;

import static org.junit.Assert.assertTrue;

import org.junit.Test;

public class LandEndpointTest {

    // TODO test: add unit test for the LandEndpoint

    // @Mock
    // Map map;

    @Test
    public void shouldNotFailInMaven() {
        assertTrue(true);
    }
}


Add @JsonIgnore to NVR getter

Add @JsonIgnore to NVR getter

--- rest/src/main/java/org/jboss/pnc/causeway/rest/BrewNVR.java
+++ rest/src/main/java/org/jboss/pnc/causeway/rest/BrewNVR.java
@@ -1,4 +1,6 @@
 package org.jboss.pnc.causeway.rest;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;

 public class BrewNVR {

@@ -24,6 +26,7 @@
         return release;
     }

+    @JsonIgnore
     public String getNVR(){
         return name + "-" + version + "-" + release;
     }

<|original_code|>
package org.jboss.pnc.causeway.rest;

public class BrewNVR {

    private final String name;
    private final String version;
    private final String release;

    public BrewNVR(String name, String version, String release) {
        this.name = name;
        this.version = version;
        this.release = release;
    }

    public String getName() {
        return name;
    }

    public String getVersion() {
        return version;
    }

    public String getRelease() {
        return release;
    }

    public String getNVR(){
        return name + "-" + version + "-" + release;
    }
}

<|edits_diff|>
--- rest/src/main/java/org/jboss/pnc/causeway/rest/BrewNVR.java
+++ rest/src/main/java/org/jboss/pnc/causeway/rest/BrewNVR.java
@@ -1,4 +1,6 @@
 package org.jboss.pnc.causeway.rest;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;

 public class BrewNVR {

<|current_version|>
package org.jboss.pnc.causeway.rest;

import com.fasterxml.jackson.annotation.JsonIgnore;

public class BrewNVR {

    private final String name;
    private final String version;
    private final String release;

    public BrewNVR(String name, String version, String release) {
        this.name = name;
        this.version = version;
        this.release = release;
    }

    public String getName() {
        return name;
    }

    public String getVersion() {
        return version;
    }

    public String getRelease() {
        return release;
    }

    public String getNVR(){
        return name + "-" + version + "-" + release;
    }
}

<|next_version|>
package org.jboss.pnc.causeway.rest;

import com.fasterxml.jackson.annotation.JsonIgnore;

public class BrewNVR {

    private final String name;
    private final String version;
    private final String release;

    public BrewNVR(String name, String version, String release) {
        this.name = name;
        this.version = version;
        this.release = release;
    }

    public String getName() {
        return name;
    }

    public String getVersion() {
        return version;
    }

    public String getRelease() {
        return release;
    }

    @JsonIgnore
    public String getNVR(){
        return name + "-" + version + "-" + release;
    }
}


Define scope to ECBQuery configuration

Define scope to ECBQuery configuration

--- src/main/java/org/soujava/exchange/ecb/SQLQuery.java
+++ src/main/java/org/soujava/exchange/ecb/SQLQuery.java
@@ -2,8 +2,10 @@

 import org.tomitribe.sabot.Config;

+import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Inject;

+@ApplicationScoped
 class SQLQuery {

     @Inject

<|original_code|>
package org.soujava.exchange.ecb;

import org.tomitribe.sabot.Config;

import javax.inject.Inject;

class SQLQuery {

    @Inject
    @Config(value = "query-rate")
    private String queryRate;

    @Inject
    @Config(value = "query-historic")
    private String queryHistoric;

    public String getQueryRate() {
        return queryRate;
    }

    public String getQueryHistoric() {
        return queryHistoric;
    }
}

<|edits_diff|>
--- src/main/java/org/soujava/exchange/ecb/SQLQuery.java
+++ src/main/java/org/soujava/exchange/ecb/SQLQuery.java
@@ -2,6 +2,7 @@

 import org.tomitribe.sabot.Config;

+import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Inject;

 class SQLQuery {
<|current_version|>
package org.soujava.exchange.ecb;

import org.tomitribe.sabot.Config;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;

class SQLQuery {

    @Inject
    @Config(value = "query-rate")
    private String queryRate;

    @Inject
    @Config(value = "query-historic")
    private String queryHistoric;

    public String getQueryRate() {
        return queryRate;
    }

    public String getQueryHistoric() {
        return queryHistoric;
    }
}

<|next_version|>
package org.soujava.exchange.ecb;

import org.tomitribe.sabot.Config;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;

@ApplicationScoped
class SQLQuery {

    @Inject
    @Config(value = "query-rate")
    private String queryRate;

    @Inject
    @Config(value = "query-historic")
    private String queryHistoric;

    public String getQueryRate() {
        return queryRate;
    }

    public String getQueryHistoric() {
        return queryHistoric;
    }
}


Disable the output stream on decryotion

Disable the output stream on decryotion

Since the output is put in Gradles test output buffer which is stored in
the heap and is found by SearchInHeap.

--- src/test/java/Decrypt.java
+++ src/test/java/Decrypt.java
@@ -2,10 +2,17 @@
 import static org.junit.Assert.*;
 import java.io.File;
 import se.soy.gpg.GPG;
+import java.io.PrintStream;
+import java.io.OutputStream;

 public class Decrypt extends SearchInHeap {
   @Test public void decrypt() {
+    // FIXME Disable stdout temporarily since Gradles test output makes the
+    // secret stored on the heap.
+    PrintStream old_out = System.out;
+    System.setOut(new PrintStream(new OutputStream() { public void write(int b) {}}));
     GPG.decrypt(new File(System.getProperty("test.resources") + "/test.asc")).localUser("0xF870C097").output(System.out, "println");
+    System.setOut(old_out);
   }

   void theAssert(int found) {

<|original_code|>
import org.junit.*;
import static org.junit.Assert.*;
import java.io.File;
import se.soy.gpg.GPG;

public class Decrypt extends SearchInHeap {
  @Test public void decrypt() {
    GPG.decrypt(new File(System.getProperty("test.resources") + "/test.asc")).localUser("0xF870C097").output(System.out, "println");
  }

  void theAssert(int found) {
      assertEquals("Secret not found!", 0, found);
  }
}

<|edits_diff|>
--- src/test/java/Decrypt.java
+++ src/test/java/Decrypt.java
@@ -2,9 +2,15 @@
 import static org.junit.Assert.*;
 import java.io.File;
 import se.soy.gpg.GPG;
+import java.io.PrintStream;
+import java.io.OutputStream;

 public class Decrypt extends SearchInHeap {
   @Test public void decrypt() {
+    // FIXME Disable stdout temporarily since Gradles test output makes the
+    // secret stored on the heap.
+    PrintStream old_out = System.out;
+    System.setOut(new PrintStream(new OutputStream() { public void write(int b) {}}));
     GPG.decrypt(new File(System.getProperty("test.resources") + "/test.asc")).localUser("0xF870C097").output(System.out, "println");
   }

<|current_version|>
import org.junit.*;
import static org.junit.Assert.*;
import java.io.File;
import se.soy.gpg.GPG;
import java.io.PrintStream;
import java.io.OutputStream;

public class Decrypt extends SearchInHeap {
  @Test public void decrypt() {
    // FIXME Disable stdout temporarily since Gradles test output makes the
    // secret stored on the heap.
    PrintStream old_out = System.out;
    System.setOut(new PrintStream(new OutputStream() { public void write(int b) {}}));
    GPG.decrypt(new File(System.getProperty("test.resources") + "/test.asc")).localUser("0xF870C097").output(System.out, "println");
  }

  void theAssert(int found) {
      assertEquals("Secret not found!", 0, found);
  }
}

<|next_version|>
import org.junit.*;
import static org.junit.Assert.*;
import java.io.File;
import se.soy.gpg.GPG;
import java.io.PrintStream;
import java.io.OutputStream;

public class Decrypt extends SearchInHeap {
  @Test public void decrypt() {
    // FIXME Disable stdout temporarily since Gradles test output makes the
    // secret stored on the heap.
    PrintStream old_out = System.out;
    System.setOut(new PrintStream(new OutputStream() { public void write(int b) {}}));
    GPG.decrypt(new File(System.getProperty("test.resources") + "/test.asc")).localUser("0xF870C097").output(System.out, "println");
    System.setOut(old_out);
  }

  void theAssert(int found) {
      assertEquals("Secret not found!", 0, found);
  }
}


Save and restore the matrix so scaling only affects this item render.

--- src/main/java/aeronicamc/mods/mxtune/gui/ModGuiHelper.java
+++ src/main/java/aeronicamc/mods/mxtune/gui/ModGuiHelper.java
@@ -8,9 +8,11 @@
 {
     public static void RenderGuiItemScaled(ItemRenderer itemRenderer, ItemStack pStack, int posX, int posY, int scale, boolean onCenter)
     {
+        RenderSystem.pushMatrix();
         int xRel = (onCenter ? posX - 16*scale/2 : posX)/scale;
         int yRel = (onCenter ? posY - 16*scale/2 : posY)/scale;
         RenderSystem.scalef(scale, scale, 1F);
         itemRenderer.renderAndDecorateItem(pStack, xRel, yRel);
+        RenderSystem.popMatrix();
     }
 }

<|original_code|>
package aeronicamc.mods.mxtune.gui;

import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.item.ItemStack;

public class ModGuiHelper
{
    public static void RenderGuiItemScaled(ItemRenderer itemRenderer, ItemStack pStack, int posX, int posY, int scale, boolean onCenter)
    {
        int xRel = (onCenter ? posX - 16*scale/2 : posX)/scale;
        int yRel = (onCenter ? posY - 16*scale/2 : posY)/scale;
        RenderSystem.scalef(scale, scale, 1F);
        itemRenderer.renderAndDecorateItem(pStack, xRel, yRel);
    }
}

<|edits_diff|>
--- src/main/java/aeronicamc/mods/mxtune/gui/ModGuiHelper.java
+++ src/main/java/aeronicamc/mods/mxtune/gui/ModGuiHelper.java
@@ -8,6 +8,7 @@
 {
     public static void RenderGuiItemScaled(ItemRenderer itemRenderer, ItemStack pStack, int posX, int posY, int scale, boolean onCenter)
     {
+        RenderSystem.pushMatrix();
         int xRel = (onCenter ? posX - 16*scale/2 : posX)/scale;
         int yRel = (onCenter ? posY - 16*scale/2 : posY)/scale;
         RenderSystem.scalef(scale, scale, 1F);
<|current_version|>
package aeronicamc.mods.mxtune.gui;

import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.item.ItemStack;

public class ModGuiHelper
{
    public static void RenderGuiItemScaled(ItemRenderer itemRenderer, ItemStack pStack, int posX, int posY, int scale, boolean onCenter)
    {
        RenderSystem.pushMatrix();
        int xRel = (onCenter ? posX - 16*scale/2 : posX)/scale;
        int yRel = (onCenter ? posY - 16*scale/2 : posY)/scale;
        RenderSystem.scalef(scale, scale, 1F);
        itemRenderer.renderAndDecorateItem(pStack, xRel, yRel);
    }
}

<|next_version|>
package aeronicamc.mods.mxtune.gui;

import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.item.ItemStack;

public class ModGuiHelper
{
    public static void RenderGuiItemScaled(ItemRenderer itemRenderer, ItemStack pStack, int posX, int posY, int scale, boolean onCenter)
    {
        RenderSystem.pushMatrix();
        int xRel = (onCenter ? posX - 16*scale/2 : posX)/scale;
        int yRel = (onCenter ? posY - 16*scale/2 : posY)/scale;
        RenderSystem.scalef(scale, scale, 1F);
        itemRenderer.renderAndDecorateItem(pStack, xRel, yRel);
        RenderSystem.popMatrix();
    }
}