Add menu item handler to base activity to launch vocab sheet

--- app/src/main/java/com/hewgill/android/nzsldict/BaseActivity.java
+++ app/src/main/java/com/hewgill/android/nzsldict/BaseActivity.java
@@ -20,6 +20,7 @@
         }
     }

+
     @Override
     public boolean onOptionsItemSelected(MenuItem item) {
         switch (item.getItemId()) {
@@ -27,6 +28,9 @@
             case android.R.id.home:
                 finish();
                 return true;
+            case R.id.action_vocab_sheet:
+                startActivity(new Intent(this, VocabSheetActivity.class));
+                break;
         }
         return super.onOptionsItemSelected(item);
     }

<|original_code|>
package com.hewgill.android.nzsldict;

import android.content.Context;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.view.MenuItem;

import io.github.inflationx.viewpump.ViewPumpContextWrapper;

public class BaseActivity extends AppCompatActivity {

    protected void setupAppToolbar() {
        Toolbar appToolbar = (Toolbar) findViewById(R.id.app_toolbar);
        setSupportActionBar(appToolbar);
        // add back arrow to toolbar
        if (getSupportActionBar() != null) {
            getSupportActionBar().setDisplayHomeAsUpEnabled(true);
            getSupportActionBar().setDisplayShowHomeEnabled(true);
        }
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            // Respond to the toolbar's NavigationIcon as up/home button
            case android.R.id.home:
                finish();
                return true;
        }
        return super.onOptionsItemSelected(item);
    }

    @Override
    protected void attachBaseContext(Context newBase) {
        super.attachBaseContext(ViewPumpContextWrapper.wrap(newBase));
    }
}

<|edits_diff|>
--- app/src/main/java/com/hewgill/android/nzsldict/BaseActivity.java
+++ app/src/main/java/com/hewgill/android/nzsldict/BaseActivity.java
@@ -20,6 +20,7 @@
         }
     }

+
     @Override
     public boolean onOptionsItemSelected(MenuItem item) {
         switch (item.getItemId()) {
<|current_version|>
package com.hewgill.android.nzsldict;

import android.content.Context;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.view.MenuItem;

import io.github.inflationx.viewpump.ViewPumpContextWrapper;

public class BaseActivity extends AppCompatActivity {

    protected void setupAppToolbar() {
        Toolbar appToolbar = (Toolbar) findViewById(R.id.app_toolbar);
        setSupportActionBar(appToolbar);
        // add back arrow to toolbar
        if (getSupportActionBar() != null) {
            getSupportActionBar().setDisplayHomeAsUpEnabled(true);
            getSupportActionBar().setDisplayShowHomeEnabled(true);
        }
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            // Respond to the toolbar's NavigationIcon as up/home button
            case android.R.id.home:
                finish();
                return true;
        }
        return super.onOptionsItemSelected(item);
    }

    @Override
    protected void attachBaseContext(Context newBase) {
        super.attachBaseContext(ViewPumpContextWrapper.wrap(newBase));
    }
}

<|next_version|>
package com.hewgill.android.nzsldict;

import android.content.Context;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.view.MenuItem;

import io.github.inflationx.viewpump.ViewPumpContextWrapper;

public class BaseActivity extends AppCompatActivity {

    protected void setupAppToolbar() {
        Toolbar appToolbar = (Toolbar) findViewById(R.id.app_toolbar);
        setSupportActionBar(appToolbar);
        // add back arrow to toolbar
        if (getSupportActionBar() != null) {
            getSupportActionBar().setDisplayHomeAsUpEnabled(true);
            getSupportActionBar().setDisplayShowHomeEnabled(true);
        }
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            // Respond to the toolbar's NavigationIcon as up/home button
            case android.R.id.home:
                finish();
                return true;
            case R.id.action_vocab_sheet:
                startActivity(new Intent(this, VocabSheetActivity.class));
                break;
        }
        return super.onOptionsItemSelected(item);
    }

    @Override
    protected void attachBaseContext(Context newBase) {
        super.attachBaseContext(ViewPumpContextWrapper.wrap(newBase));
    }
}


Make parse method of NumberFormat always return a BigDecimal

--- modules/qi-core/src/main/java/org/jpos/util/AmountConverter.java
+++ modules/qi-core/src/main/java/org/jpos/util/AmountConverter.java
@@ -2,6 +2,7 @@

 import com.vaadin.data.converter.StringToBigDecimalConverter;

+import java.text.DecimalFormat;
 import java.text.NumberFormat;
 import java.util.Locale;

@@ -16,6 +17,9 @@
         NumberFormat amountFormat = NumberFormat.getInstance();
         amountFormat.setGroupingUsed(true);
         amountFormat.setMinimumFractionDigits(2);
+        if (amountFormat instanceof DecimalFormat) {
+            ((DecimalFormat) amountFormat).setParseBigDecimal(true);
+        }
         return amountFormat;
     }

<|original_code|>
package org.jpos.util;

import com.vaadin.data.converter.StringToBigDecimalConverter;

import java.text.NumberFormat;
import java.util.Locale;

public class AmountConverter extends StringToBigDecimalConverter {

    public AmountConverter(String errorMessage) {
        super(errorMessage);
    }

    @Override
    protected NumberFormat getFormat(Locale locale) {
        NumberFormat amountFormat = NumberFormat.getInstance();
        amountFormat.setGroupingUsed(true);
        amountFormat.setMinimumFractionDigits(2);
        return amountFormat;
    }

}

<|edits_diff|>
--- modules/qi-core/src/main/java/org/jpos/util/AmountConverter.java
+++ modules/qi-core/src/main/java/org/jpos/util/AmountConverter.java
@@ -2,6 +2,7 @@

 import com.vaadin.data.converter.StringToBigDecimalConverter;

+import java.text.DecimalFormat;
 import java.text.NumberFormat;
 import java.util.Locale;

<|current_version|>
package org.jpos.util;

import com.vaadin.data.converter.StringToBigDecimalConverter;

import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.Locale;

public class AmountConverter extends StringToBigDecimalConverter {

    public AmountConverter(String errorMessage) {
        super(errorMessage);
    }

    @Override
    protected NumberFormat getFormat(Locale locale) {
        NumberFormat amountFormat = NumberFormat.getInstance();
        amountFormat.setGroupingUsed(true);
        amountFormat.setMinimumFractionDigits(2);
        return amountFormat;
    }

}

<|next_version|>
package org.jpos.util;

import com.vaadin.data.converter.StringToBigDecimalConverter;

import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.Locale;

public class AmountConverter extends StringToBigDecimalConverter {

    public AmountConverter(String errorMessage) {
        super(errorMessage);
    }

    @Override
    protected NumberFormat getFormat(Locale locale) {
        NumberFormat amountFormat = NumberFormat.getInstance();
        amountFormat.setGroupingUsed(true);
        amountFormat.setMinimumFractionDigits(2);
        if (amountFormat instanceof DecimalFormat) {
            ((DecimalFormat) amountFormat).setParseBigDecimal(true);
        }
        return amountFormat;
    }

}


Make sure that this works as a server-side only mod (no client needed)

--- src/main/java/mods/smbarbour/strangetoolkit/StrangeToolkit.java
+++ src/main/java/mods/smbarbour/strangetoolkit/StrangeToolkit.java
@@ -3,7 +3,11 @@
 import cpw.mods.fml.common.Loader;
 import cpw.mods.fml.common.Mod;
 import cpw.mods.fml.common.event.FMLServerStartingEvent;
+import cpw.mods.fml.common.network.NetworkCheckHandler;
+import cpw.mods.fml.relauncher.Side;
 import mods.smbarbour.strangetoolkit.commands.OMTChangeOwnerCommand;
+
+import java.util.Map;

 @Mod(modid = "strangetoolkit", name="StrangeToolkit", version = "1.0")
 public class StrangeToolkit
@@ -14,4 +18,9 @@
 			e.registerServerCommand(new OMTChangeOwnerCommand());
 		}
 	}
+
+	@NetworkCheckHandler
+	public boolean isAcceptable(Map<String,String> modList, Side side) {
+		return true;
+	}
 }

<|original_code|>
package mods.smbarbour.strangetoolkit;

import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import mods.smbarbour.strangetoolkit.commands.OMTChangeOwnerCommand;

@Mod(modid = "strangetoolkit", name="StrangeToolkit", version = "1.0")
public class StrangeToolkit
{
	@Mod.EventHandler
	public void serverStarting(FMLServerStartingEvent e) {
		if (Loader.isModLoaded("openmodularturrets")) {
			e.registerServerCommand(new OMTChangeOwnerCommand());
		}
	}
}

<|edits_diff|>
--- src/main/java/mods/smbarbour/strangetoolkit/StrangeToolkit.java
+++ src/main/java/mods/smbarbour/strangetoolkit/StrangeToolkit.java
@@ -3,7 +3,11 @@
 import cpw.mods.fml.common.Loader;
 import cpw.mods.fml.common.Mod;
 import cpw.mods.fml.common.event.FMLServerStartingEvent;
+import cpw.mods.fml.common.network.NetworkCheckHandler;
+import cpw.mods.fml.relauncher.Side;
 import mods.smbarbour.strangetoolkit.commands.OMTChangeOwnerCommand;
+
+import java.util.Map;

 @Mod(modid = "strangetoolkit", name="StrangeToolkit", version = "1.0")
 public class StrangeToolkit
<|current_version|>
package mods.smbarbour.strangetoolkit;

import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.network.NetworkCheckHandler;
import cpw.mods.fml.relauncher.Side;
import mods.smbarbour.strangetoolkit.commands.OMTChangeOwnerCommand;

import java.util.Map;

@Mod(modid = "strangetoolkit", name="StrangeToolkit", version = "1.0")
public class StrangeToolkit
{
	@Mod.EventHandler
	public void serverStarting(FMLServerStartingEvent e) {
		if (Loader.isModLoaded("openmodularturrets")) {
			e.registerServerCommand(new OMTChangeOwnerCommand());
		}
	}
}

<|next_version|>
package mods.smbarbour.strangetoolkit;

import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.network.NetworkCheckHandler;
import cpw.mods.fml.relauncher.Side;
import mods.smbarbour.strangetoolkit.commands.OMTChangeOwnerCommand;

import java.util.Map;

@Mod(modid = "strangetoolkit", name="StrangeToolkit", version = "1.0")
public class StrangeToolkit
{
	@Mod.EventHandler
	public void serverStarting(FMLServerStartingEvent e) {
		if (Loader.isModLoaded("openmodularturrets")) {
			e.registerServerCommand(new OMTChangeOwnerCommand());
		}
	}

	@NetworkCheckHandler
	public boolean isAcceptable(Map<String,String> modList, Side side) {
		return true;
	}
}


Tag output directory for better input/output handling

--- src/main/java/com/commercehub/gradle/plugin/avro/OutputDirTask.java
+++ src/main/java/com/commercehub/gradle/plugin/avro/OutputDirTask.java
@@ -17,6 +17,7 @@

 import org.gradle.api.file.FileCollection;
 import org.gradle.api.specs.Spec;
+import org.gradle.api.tasks.OutputDirectory;
 import org.gradle.api.tasks.SourceTask;

 import java.io.File;
@@ -29,6 +30,7 @@
         getOutputs().dir(outputDir);
     }

+    @OutputDirectory
     protected File getOutputDir() {
         return outputDir;
     }

<|original_code|>
/**
 * Copyright © 2013 Commerce Technologies, LLC.
 *
 * 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.commercehub.gradle.plugin.avro;

import org.gradle.api.file.FileCollection;
import org.gradle.api.specs.Spec;
import org.gradle.api.tasks.SourceTask;

import java.io.File;

class OutputDirTask extends SourceTask {
    private File outputDir;

    public void setOutputDir(File outputDir) {
        this.outputDir = outputDir;
        getOutputs().dir(outputDir);
    }

    protected File getOutputDir() {
        return outputDir;
    }

    protected FileCollection filterSources(Spec<? super File> spec) {
        return getInputs().getSourceFiles().filter(spec);
    }
}

<|edits_diff|>
--- src/main/java/com/commercehub/gradle/plugin/avro/OutputDirTask.java
+++ src/main/java/com/commercehub/gradle/plugin/avro/OutputDirTask.java
@@ -17,6 +17,7 @@

 import org.gradle.api.file.FileCollection;
 import org.gradle.api.specs.Spec;
+import org.gradle.api.tasks.OutputDirectory;
 import org.gradle.api.tasks.SourceTask;

 import java.io.File;
<|current_version|>
/**
 * Copyright © 2013 Commerce Technologies, LLC.
 *
 * 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.commercehub.gradle.plugin.avro;

import org.gradle.api.file.FileCollection;
import org.gradle.api.specs.Spec;
import org.gradle.api.tasks.OutputDirectory;
import org.gradle.api.tasks.SourceTask;

import java.io.File;

class OutputDirTask extends SourceTask {
    private File outputDir;

    public void setOutputDir(File outputDir) {
        this.outputDir = outputDir;
        getOutputs().dir(outputDir);
    }

    protected File getOutputDir() {
        return outputDir;
    }

    protected FileCollection filterSources(Spec<? super File> spec) {
        return getInputs().getSourceFiles().filter(spec);
    }
}

<|next_version|>
/**
 * Copyright © 2013 Commerce Technologies, LLC.
 *
 * 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.commercehub.gradle.plugin.avro;

import org.gradle.api.file.FileCollection;
import org.gradle.api.specs.Spec;
import org.gradle.api.tasks.OutputDirectory;
import org.gradle.api.tasks.SourceTask;

import java.io.File;

class OutputDirTask extends SourceTask {
    private File outputDir;

    public void setOutputDir(File outputDir) {
        this.outputDir = outputDir;
        getOutputs().dir(outputDir);
    }

    @OutputDirectory
    protected File getOutputDir() {
        return outputDir;
    }

    protected FileCollection filterSources(Spec<? super File> spec) {
        return getInputs().getSourceFiles().filter(spec);
    }
}


Fix Android tests affected by changes in stubs

--- java/ql/test/library-tests/dataflow/taintsources/IntentSources.java
+++ java/ql/test/library-tests/dataflow/taintsources/IntentSources.java
@@ -1,10 +1,15 @@
 package com.example.myapp;

 import android.app.Activity;
+import android.content.Context;

 public class IntentSources extends Activity {

 	private static void sink(Object o) {}
+
+	public IntentSources(Context base) {
+		super(base);
+	}

 	public void test() throws java.io.IOException {

<|original_code|>
package com.example.myapp;

import android.app.Activity;

public class IntentSources extends Activity {

	private static void sink(Object o) {}

	public void test() throws java.io.IOException {

		String trouble = this.getIntent().getStringExtra("key");
		sink(trouble); // $hasRemoteTaintFlow

	}

	public void test2() throws java.io.IOException {

		String trouble = getIntent().getStringExtra("key");
		sink(trouble); // $hasRemoteTaintFlow

	}

	public void test3() throws java.io.IOException {

		String trouble = getIntent().getExtras().getString("key");
		sink(trouble); // $hasRemoteTaintFlow

	}

}

class OtherClass {

	private static void sink(Object o) {}

	public void test(IntentSources is) throws java.io.IOException {
		String trouble = is.getIntent().getStringExtra("key");
		sink(trouble); // $hasRemoteTaintFlow
	}

}

<|edits_diff|>
--- java/ql/test/library-tests/dataflow/taintsources/IntentSources.java
+++ java/ql/test/library-tests/dataflow/taintsources/IntentSources.java
@@ -1,6 +1,7 @@
 package com.example.myapp;

 import android.app.Activity;
+import android.content.Context;

 public class IntentSources extends Activity {

<|current_version|>
package com.example.myapp;

import android.app.Activity;
import android.content.Context;

public class IntentSources extends Activity {

	private static void sink(Object o) {}

	public void test() throws java.io.IOException {

		String trouble = this.getIntent().getStringExtra("key");
		sink(trouble); // $hasRemoteTaintFlow

	}

	public void test2() throws java.io.IOException {

		String trouble = getIntent().getStringExtra("key");
		sink(trouble); // $hasRemoteTaintFlow

	}

	public void test3() throws java.io.IOException {

		String trouble = getIntent().getExtras().getString("key");
		sink(trouble); // $hasRemoteTaintFlow

	}

}

class OtherClass {

	private static void sink(Object o) {}

	public void test(IntentSources is) throws java.io.IOException {
		String trouble = is.getIntent().getStringExtra("key");
		sink(trouble); // $hasRemoteTaintFlow
	}

}

<|next_version|>
package com.example.myapp;

import android.app.Activity;
import android.content.Context;

public class IntentSources extends Activity {

	private static void sink(Object o) {}

	public IntentSources(Context base) {
		super(base);
	}

	public void test() throws java.io.IOException {

		String trouble = this.getIntent().getStringExtra("key");
		sink(trouble); // $hasRemoteTaintFlow

	}

	public void test2() throws java.io.IOException {

		String trouble = getIntent().getStringExtra("key");
		sink(trouble); // $hasRemoteTaintFlow

	}

	public void test3() throws java.io.IOException {

		String trouble = getIntent().getExtras().getString("key");
		sink(trouble); // $hasRemoteTaintFlow

	}

}

class OtherClass {

	private static void sink(Object o) {}

	public void test(IntentSources is) throws java.io.IOException {
		String trouble = is.getIntent().getStringExtra("key");
		sink(trouble); // $hasRemoteTaintFlow
	}

}


Sort photos by title by default

Sort photos by title by default

--- app/src/main/java/com/castelijns/mmdemo/photos/PhotosPresenter.java
+++ app/src/main/java/com/castelijns/mmdemo/photos/PhotosPresenter.java
@@ -2,6 +2,8 @@

 import com.castelijns.mmdemo.models.Photo;

+import java.util.Collection;
+import java.util.Collections;
 import java.util.List;

 import io.reactivex.Observer;
@@ -32,6 +34,7 @@

                     @Override
                     public void onNext(List<Photo> photos) {
+                        Collections.sort(photos);
                         view.showPhotos(photos);
                     }

<|original_code|>
package com.castelijns.mmdemo.photos;

import com.castelijns.mmdemo.models.Photo;

import java.util.List;

import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;

public class PhotosPresenter implements PhotosContract.Presenter {

    private PhotosContract.View view;
    private PhotosRepo repo;

    PhotosPresenter(PhotosContract.View view) {
        this.view = view;
        repo = PhotosRepo.getInstance();
    }

    @Override
    public void start() {
        repo.getAllPhotos()
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(new Observer<List<Photo>>() {
                    @Override
                    public void onSubscribe(Disposable d) {

                    }

                    @Override
                    public void onNext(List<Photo> photos) {
                        view.showPhotos(photos);
                    }

                    @Override
                    public void onError(Throwable e) {

                    }

                    @Override
                    public void onComplete() {

                    }
                });
    }

    @Override
    public void stop() {

    }
}

<|edits_diff|>
--- app/src/main/java/com/castelijns/mmdemo/photos/PhotosPresenter.java
+++ app/src/main/java/com/castelijns/mmdemo/photos/PhotosPresenter.java
@@ -2,6 +2,8 @@

 import com.castelijns.mmdemo.models.Photo;

+import java.util.Collection;
+import java.util.Collections;
 import java.util.List;

 import io.reactivex.Observer;
<|current_version|>
package com.castelijns.mmdemo.photos;

import com.castelijns.mmdemo.models.Photo;

import java.util.Collection;
import java.util.Collections;
import java.util.List;

import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;

public class PhotosPresenter implements PhotosContract.Presenter {

    private PhotosContract.View view;
    private PhotosRepo repo;

    PhotosPresenter(PhotosContract.View view) {
        this.view = view;
        repo = PhotosRepo.getInstance();
    }

    @Override
    public void start() {
        repo.getAllPhotos()
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(new Observer<List<Photo>>() {
                    @Override
                    public void onSubscribe(Disposable d) {

                    }

                    @Override
                    public void onNext(List<Photo> photos) {
                        view.showPhotos(photos);
                    }

                    @Override
                    public void onError(Throwable e) {

                    }

                    @Override
                    public void onComplete() {

                    }
                });
    }

    @Override
    public void stop() {

    }
}

<|next_version|>
package com.castelijns.mmdemo.photos;

import com.castelijns.mmdemo.models.Photo;

import java.util.Collection;
import java.util.Collections;
import java.util.List;

import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.schedulers.Schedulers;

public class PhotosPresenter implements PhotosContract.Presenter {

    private PhotosContract.View view;
    private PhotosRepo repo;

    PhotosPresenter(PhotosContract.View view) {
        this.view = view;
        repo = PhotosRepo.getInstance();
    }

    @Override
    public void start() {
        repo.getAllPhotos()
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(new Observer<List<Photo>>() {
                    @Override
                    public void onSubscribe(Disposable d) {

                    }

                    @Override
                    public void onNext(List<Photo> photos) {
                        Collections.sort(photos);
                        view.showPhotos(photos);
                    }

                    @Override
                    public void onError(Throwable e) {

                    }

                    @Override
                    public void onComplete() {

                    }
                });
    }

    @Override
    public void stop() {

    }
}


Configure MustacheViewResolver as default view resolver

--- src/main/java/au/gov/dto/dibp/appointments/config/WebMvcConfig.java
+++ src/main/java/au/gov/dto/dibp/appointments/config/WebMvcConfig.java
@@ -1,7 +1,9 @@
 package au.gov.dto.dibp.appointments.config;

+import org.springframework.boot.autoconfigure.mustache.web.MustacheViewResolver;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
+import org.springframework.web.servlet.config.annotation.ViewResolverRegistry;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

 @Configuration
@@ -11,4 +13,9 @@
     public void addViewControllers(ViewControllerRegistry registry) {
         registry.addViewController("/").setViewName("redirect:/login");
     }
+
+    @Override
+    public void configureViewResolvers(ViewResolverRegistry registry) {
+        registry.viewResolver(new MustacheViewResolver());
+    }
 }

<|original_code|>
package au.gov.dto.dibp.appointments.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
public class WebMvcConfig extends WebMvcConfigurerAdapter {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/").setViewName("redirect:/login");
    }
}

<|edits_diff|>
--- src/main/java/au/gov/dto/dibp/appointments/config/WebMvcConfig.java
+++ src/main/java/au/gov/dto/dibp/appointments/config/WebMvcConfig.java
@@ -1,7 +1,9 @@
 package au.gov.dto.dibp.appointments.config;

+import org.springframework.boot.autoconfigure.mustache.web.MustacheViewResolver;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
+import org.springframework.web.servlet.config.annotation.ViewResolverRegistry;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

 @Configuration
<|current_version|>
package au.gov.dto.dibp.appointments.config;

import org.springframework.boot.autoconfigure.mustache.web.MustacheViewResolver;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.ViewResolverRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
public class WebMvcConfig extends WebMvcConfigurerAdapter {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/").setViewName("redirect:/login");
    }
}

<|next_version|>
package au.gov.dto.dibp.appointments.config;

import org.springframework.boot.autoconfigure.mustache.web.MustacheViewResolver;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.ViewResolverRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@Configuration
public class WebMvcConfig extends WebMvcConfigurerAdapter {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/").setViewName("redirect:/login");
    }

    @Override
    public void configureViewResolvers(ViewResolverRegistry registry) {
        registry.viewResolver(new MustacheViewResolver());
    }
}


Add new constructor for logic manager

Add new constructor for logic manager

--- src/main/java/seedu/jobs/logic/LogicManager.java
+++ src/main/java/seedu/jobs/logic/LogicManager.java
@@ -14,6 +14,7 @@
 import seedu.jobs.model.Model;
 import seedu.jobs.model.task.ReadOnlyTask;
 import seedu.jobs.storage.Storage;
+import seedu.jobs.storage.StorageManager;

 /**
  * The main LogicManager of the app.
@@ -31,6 +32,11 @@
         this.calendar = calendar;
     }

+    public LogicManager(Model model, StorageManager storageManager) {
+        this.model = model;
+        this.parser = new Parser();
+    }
+
     @Override
     public CommandResult execute(String commandText) throws CommandException, IOException {
         logger.info("----------------[USER COMMAND][" + commandText + "]");

<|original_code|>
package seedu.jobs.logic;

import java.io.IOException;
import java.util.logging.Logger;

import javafx.collections.ObservableList;
import seedu.jobs.commons.core.ComponentManager;
import seedu.jobs.commons.core.LogsCenter;
import seedu.jobs.logic.calendar.CalendarManager;
import seedu.jobs.logic.commands.Command;
import seedu.jobs.logic.commands.CommandResult;
import seedu.jobs.logic.commands.exceptions.CommandException;
import seedu.jobs.logic.parser.Parser;
import seedu.jobs.model.Model;
import seedu.jobs.model.task.ReadOnlyTask;
import seedu.jobs.storage.Storage;

/**
 * The main LogicManager of the app.
 */
public class LogicManager extends ComponentManager implements Logic {
    private final Logger logger = LogsCenter.getLogger(LogicManager.class);

    private final Model model;
    private final Parser parser;
    private final CalendarManager calendar;

    public LogicManager(Model model, Storage storage, CalendarManager calendar) {
        this.model = model;
        this.parser = new Parser();
        this.calendar = calendar;
    }

    @Override
    public CommandResult execute(String commandText) throws CommandException, IOException {
        logger.info("----------------[USER COMMAND][" + commandText + "]");
        Command command = parser.parseCommand(commandText);
        command.setData(model);
        command.setCalendar(calendar);
        return command.execute();
    }

    @Override
    public ObservableList<ReadOnlyTask> getFilteredTaskList() {
        return model.getFilteredTaskList();
    }
}

<|edits_diff|>
--- src/main/java/seedu/jobs/logic/LogicManager.java
+++ src/main/java/seedu/jobs/logic/LogicManager.java
@@ -14,6 +14,7 @@
 import seedu.jobs.model.Model;
 import seedu.jobs.model.task.ReadOnlyTask;
 import seedu.jobs.storage.Storage;
+import seedu.jobs.storage.StorageManager;

 /**
  * The main LogicManager of the app.
<|current_version|>
package seedu.jobs.logic;

import java.io.IOException;
import java.util.logging.Logger;

import javafx.collections.ObservableList;
import seedu.jobs.commons.core.ComponentManager;
import seedu.jobs.commons.core.LogsCenter;
import seedu.jobs.logic.calendar.CalendarManager;
import seedu.jobs.logic.commands.Command;
import seedu.jobs.logic.commands.CommandResult;
import seedu.jobs.logic.commands.exceptions.CommandException;
import seedu.jobs.logic.parser.Parser;
import seedu.jobs.model.Model;
import seedu.jobs.model.task.ReadOnlyTask;
import seedu.jobs.storage.Storage;
import seedu.jobs.storage.StorageManager;

/**
 * The main LogicManager of the app.
 */
public class LogicManager extends ComponentManager implements Logic {
    private final Logger logger = LogsCenter.getLogger(LogicManager.class);

    private final Model model;
    private final Parser parser;
    private final CalendarManager calendar;

    public LogicManager(Model model, Storage storage, CalendarManager calendar) {
        this.model = model;
        this.parser = new Parser();
        this.calendar = calendar;
    }

    @Override
    public CommandResult execute(String commandText) throws CommandException, IOException {
        logger.info("----------------[USER COMMAND][" + commandText + "]");
        Command command = parser.parseCommand(commandText);
        command.setData(model);
        command.setCalendar(calendar);
        return command.execute();
    }

    @Override
    public ObservableList<ReadOnlyTask> getFilteredTaskList() {
        return model.getFilteredTaskList();
    }
}

<|next_version|>
package seedu.jobs.logic;

import java.io.IOException;
import java.util.logging.Logger;

import javafx.collections.ObservableList;
import seedu.jobs.commons.core.ComponentManager;
import seedu.jobs.commons.core.LogsCenter;
import seedu.jobs.logic.calendar.CalendarManager;
import seedu.jobs.logic.commands.Command;
import seedu.jobs.logic.commands.CommandResult;
import seedu.jobs.logic.commands.exceptions.CommandException;
import seedu.jobs.logic.parser.Parser;
import seedu.jobs.model.Model;
import seedu.jobs.model.task.ReadOnlyTask;
import seedu.jobs.storage.Storage;
import seedu.jobs.storage.StorageManager;

/**
 * The main LogicManager of the app.
 */
public class LogicManager extends ComponentManager implements Logic {
    private final Logger logger = LogsCenter.getLogger(LogicManager.class);

    private final Model model;
    private final Parser parser;
    private final CalendarManager calendar;

    public LogicManager(Model model, Storage storage, CalendarManager calendar) {
        this.model = model;
        this.parser = new Parser();
        this.calendar = calendar;
    }

    public LogicManager(Model model, StorageManager storageManager) {
        this.model = model;
        this.parser = new Parser();
    }

    @Override
    public CommandResult execute(String commandText) throws CommandException, IOException {
        logger.info("----------------[USER COMMAND][" + commandText + "]");
        Command command = parser.parseCommand(commandText);
        command.setData(model);
        command.setCalendar(calendar);
        return command.execute();
    }

    @Override
    public ObservableList<ReadOnlyTask> getFilteredTaskList() {
        return model.getFilteredTaskList();
    }
}


Enable Spring Boot for this app

Enable Spring Boot for this app

--- src/main/java/co/uk/jiveelection/campaign/App.java
+++ src/main/java/co/uk/jiveelection/campaign/App.java
@@ -2,6 +2,7 @@

 import java.io.IOException;

+import org.springframework.boot.autoconfigure.SpringBootApplication;
 import twitter4j.TwitterException;
 import co.uk.jiveelection.campaign.twit.TwitHelper;

@@ -11,6 +12,7 @@
  * jivebot.
  *
  */
+@SpringBootApplication
 public class App {

 	public static void main(String[] args) throws TwitterException, IOException,

<|original_code|>
package co.uk.jiveelection.campaign;

import java.io.IOException;

import twitter4j.TwitterException;
import co.uk.jiveelection.campaign.twit.TwitHelper;

/**
 * Main entry point for the Jive Campaign application. Sets up a continuously running loop that
 * checks the latest tweet from the named candidate, translates it to jive, then tweets it as a
 * jivebot.
 *
 */
public class App {

	public static void main(String[] args) throws TwitterException, IOException,
			InterruptedException {

		TwitHelper jivebotDavidCameron = new TwitHelper("David_Cameron", "davidjiveron");
		TwitHelper jivebotEdMiliband = new TwitHelper("Ed_Miliband", "edjiveaband");
		TwitHelper jivebotNickClegg = new TwitHelper("nick_clegg", "nickjivegg");

	}

}

<|edits_diff|>
--- src/main/java/co/uk/jiveelection/campaign/App.java
+++ src/main/java/co/uk/jiveelection/campaign/App.java
@@ -2,6 +2,7 @@

 import java.io.IOException;

+import org.springframework.boot.autoconfigure.SpringBootApplication;
 import twitter4j.TwitterException;
 import co.uk.jiveelection.campaign.twit.TwitHelper;

<|current_version|>
package co.uk.jiveelection.campaign;

import java.io.IOException;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import twitter4j.TwitterException;
import co.uk.jiveelection.campaign.twit.TwitHelper;

/**
 * Main entry point for the Jive Campaign application. Sets up a continuously running loop that
 * checks the latest tweet from the named candidate, translates it to jive, then tweets it as a
 * jivebot.
 *
 */
public class App {

	public static void main(String[] args) throws TwitterException, IOException,
			InterruptedException {

		TwitHelper jivebotDavidCameron = new TwitHelper("David_Cameron", "davidjiveron");
		TwitHelper jivebotEdMiliband = new TwitHelper("Ed_Miliband", "edjiveaband");
		TwitHelper jivebotNickClegg = new TwitHelper("nick_clegg", "nickjivegg");

	}

}

<|next_version|>
package co.uk.jiveelection.campaign;

import java.io.IOException;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import twitter4j.TwitterException;
import co.uk.jiveelection.campaign.twit.TwitHelper;

/**
 * Main entry point for the Jive Campaign application. Sets up a continuously running loop that
 * checks the latest tweet from the named candidate, translates it to jive, then tweets it as a
 * jivebot.
 *
 */
@SpringBootApplication
public class App {

	public static void main(String[] args) throws TwitterException, IOException,
			InterruptedException {

		TwitHelper jivebotDavidCameron = new TwitHelper("David_Cameron", "davidjiveron");
		TwitHelper jivebotEdMiliband = new TwitHelper("Ed_Miliband", "edjiveaband");
		TwitHelper jivebotNickClegg = new TwitHelper("nick_clegg", "nickjivegg");

	}

}


Add delay to Baykok spawn and play sound

--- src/main/java/totemic_commons/pokefenn/ceremony/CeremonyBaykok.java
+++ src/main/java/totemic_commons/pokefenn/ceremony/CeremonyBaykok.java
@@ -18,8 +18,17 @@
     @Override
     public void effect(World world, BlockPos pos, int time)
     {
+        if(world.isRemote || time != getEffectTime() - 1)
+            return;
+
+        world.playBroadcastSound(1013, pos, 0); //Wither spawn sound
         BlockPos spos = pos.offset(EnumFacing.getHorizontal(world.rand.nextInt(4)));
         EntityUtil.spawnEntity(world, spos.getX() + 0.5, spos.getY(), spos.getZ() + 0.5, new EntityBaykok(world));
     }

+    @Override
+    public int getEffectTime()
+    {
+        return 3 * 20;
+    }
 }

<|original_code|>
package totemic_commons.pokefenn.ceremony;

import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import totemic_commons.pokefenn.api.ceremony.Ceremony;
import totemic_commons.pokefenn.api.music.MusicInstrument;
import totemic_commons.pokefenn.entity.boss.EntityBaykok;
import totemic_commons.pokefenn.util.EntityUtil;

public class CeremonyBaykok extends Ceremony
{
    public CeremonyBaykok(String name, int musicNeeded, int maxStartupTime, MusicInstrument... instruments)
    {
        super(name, musicNeeded, maxStartupTime, instruments);
    }

    @Override
    public void effect(World world, BlockPos pos, int time)
    {
        BlockPos spos = pos.offset(EnumFacing.getHorizontal(world.rand.nextInt(4)));
        EntityUtil.spawnEntity(world, spos.getX() + 0.5, spos.getY(), spos.getZ() + 0.5, new EntityBaykok(world));
    }

}

<|edits_diff|>
--- src/main/java/totemic_commons/pokefenn/ceremony/CeremonyBaykok.java
+++ src/main/java/totemic_commons/pokefenn/ceremony/CeremonyBaykok.java
@@ -18,6 +18,10 @@
     @Override
     public void effect(World world, BlockPos pos, int time)
     {
+        if(world.isRemote || time != getEffectTime() - 1)
+            return;
+
+        world.playBroadcastSound(1013, pos, 0); //Wither spawn sound
         BlockPos spos = pos.offset(EnumFacing.getHorizontal(world.rand.nextInt(4)));
         EntityUtil.spawnEntity(world, spos.getX() + 0.5, spos.getY(), spos.getZ() + 0.5, new EntityBaykok(world));
     }
<|current_version|>
package totemic_commons.pokefenn.ceremony;

import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import totemic_commons.pokefenn.api.ceremony.Ceremony;
import totemic_commons.pokefenn.api.music.MusicInstrument;
import totemic_commons.pokefenn.entity.boss.EntityBaykok;
import totemic_commons.pokefenn.util.EntityUtil;

public class CeremonyBaykok extends Ceremony
{
    public CeremonyBaykok(String name, int musicNeeded, int maxStartupTime, MusicInstrument... instruments)
    {
        super(name, musicNeeded, maxStartupTime, instruments);
    }

    @Override
    public void effect(World world, BlockPos pos, int time)
    {
        if(world.isRemote || time != getEffectTime() - 1)
            return;

        world.playBroadcastSound(1013, pos, 0); //Wither spawn sound
        BlockPos spos = pos.offset(EnumFacing.getHorizontal(world.rand.nextInt(4)));
        EntityUtil.spawnEntity(world, spos.getX() + 0.5, spos.getY(), spos.getZ() + 0.5, new EntityBaykok(world));
    }

}

<|next_version|>
package totemic_commons.pokefenn.ceremony;

import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import totemic_commons.pokefenn.api.ceremony.Ceremony;
import totemic_commons.pokefenn.api.music.MusicInstrument;
import totemic_commons.pokefenn.entity.boss.EntityBaykok;
import totemic_commons.pokefenn.util.EntityUtil;

public class CeremonyBaykok extends Ceremony
{
    public CeremonyBaykok(String name, int musicNeeded, int maxStartupTime, MusicInstrument... instruments)
    {
        super(name, musicNeeded, maxStartupTime, instruments);
    }

    @Override
    public void effect(World world, BlockPos pos, int time)
    {
        if(world.isRemote || time != getEffectTime() - 1)
            return;

        world.playBroadcastSound(1013, pos, 0); //Wither spawn sound
        BlockPos spos = pos.offset(EnumFacing.getHorizontal(world.rand.nextInt(4)));
        EntityUtil.spawnEntity(world, spos.getX() + 0.5, spos.getY(), spos.getZ() + 0.5, new EntityBaykok(world));
    }

    @Override
    public int getEffectTime()
    {
        return 3 * 20;
    }
}


Test for process name consisting of several words

--- test/org/bitbucket/mlopatkin/android/liblogcat/ProcessListParserTest.java
+++ test/org/bitbucket/mlopatkin/android/liblogcat/ProcessListParserTest.java
@@ -22,10 +22,15 @@
 public class ProcessListParserTest {

     private static final String PS_LINE_1 = "root      1     0     244    228   fg  ffffffff 00000000 S /init";
+    private static final String PS_LINE_TWO_WORDS_PNAME = "root      279   2     0      0     fg  ffffffff 00000000 S Two words";

     @Test
     public void testParseProcessListLine() {
         assertTrue(ProcessListParser.parseProcessListLine(PS_LINE_1).matches());
     }

+    @Test
+    public void testParseProcessNameWithSpaces() {
+        assertTrue(ProcessListParser.parseProcessListLine(PS_LINE_TWO_WORDS_PNAME).matches());
+    }
 }

<|original_code|>
/*
 * Copyright 2011 Mikhail Lopatkin
 *
 * 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.bitbucket.mlopatkin.android.liblogcat;

import static org.junit.Assert.assertTrue;

import org.junit.Test;

public class ProcessListParserTest {

    private static final String PS_LINE_1 = "root      1     0     244    228   fg  ffffffff 00000000 S /init";

    @Test
    public void testParseProcessListLine() {
        assertTrue(ProcessListParser.parseProcessListLine(PS_LINE_1).matches());
    }

}

<|edits_diff|>
--- test/org/bitbucket/mlopatkin/android/liblogcat/ProcessListParserTest.java
+++ test/org/bitbucket/mlopatkin/android/liblogcat/ProcessListParserTest.java
@@ -22,6 +22,7 @@
 public class ProcessListParserTest {

     private static final String PS_LINE_1 = "root      1     0     244    228   fg  ffffffff 00000000 S /init";
+    private static final String PS_LINE_TWO_WORDS_PNAME = "root      279   2     0      0     fg  ffffffff 00000000 S Two words";

     @Test
     public void testParseProcessListLine() {
<|current_version|>
/*
 * Copyright 2011 Mikhail Lopatkin
 *
 * 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.bitbucket.mlopatkin.android.liblogcat;

import static org.junit.Assert.assertTrue;

import org.junit.Test;

public class ProcessListParserTest {

    private static final String PS_LINE_1 = "root      1     0     244    228   fg  ffffffff 00000000 S /init";
    private static final String PS_LINE_TWO_WORDS_PNAME = "root      279   2     0      0     fg  ffffffff 00000000 S Two words";

    @Test
    public void testParseProcessListLine() {
        assertTrue(ProcessListParser.parseProcessListLine(PS_LINE_1).matches());
    }

}

<|next_version|>
/*
 * Copyright 2011 Mikhail Lopatkin
 *
 * 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.bitbucket.mlopatkin.android.liblogcat;

import static org.junit.Assert.assertTrue;

import org.junit.Test;

public class ProcessListParserTest {

    private static final String PS_LINE_1 = "root      1     0     244    228   fg  ffffffff 00000000 S /init";
    private static final String PS_LINE_TWO_WORDS_PNAME = "root      279   2     0      0     fg  ffffffff 00000000 S Two words";

    @Test
    public void testParseProcessListLine() {
        assertTrue(ProcessListParser.parseProcessListLine(PS_LINE_1).matches());
    }

    @Test
    public void testParseProcessNameWithSpaces() {
        assertTrue(ProcessListParser.parseProcessListLine(PS_LINE_TWO_WORDS_PNAME).matches());
    }
}


Add assertions to ensure only valid s3content ids can be created

--- spring-content-s3/src/main/java/org/springframework/content/s3/S3ContentId.java
+++ spring-content-s3/src/main/java/org/springframework/content/s3/S3ContentId.java
@@ -1,4 +1,6 @@
 package org.springframework.content.s3;
+
+import org.springframework.util.Assert;

 import java.io.Serializable;

@@ -7,6 +9,8 @@
     private String objectId;

     public S3ContentId(String bucket, String objectId) {
+        Assert.hasText(bucket, "bucket must be specified");
+        Assert.hasText(objectId, "objectId must be specified");
         this.bucket = bucket;
         this.objectId = objectId;
     }

<|original_code|>
package org.springframework.content.s3;

import java.io.Serializable;

public final class S3ContentId implements Serializable {
    private String bucket;
    private String objectId;

    public S3ContentId(String bucket, String objectId) {
        this.bucket = bucket;
        this.objectId = objectId;
    }

    public String getBucket() {
        return bucket;
    }

    public void setBucket(String bucket) {
        this.bucket = bucket;
    }

    public String getObjectId() {
        return objectId;
    }

    public void setObjectId(String objectId) {
        this.objectId = objectId;
    }

    @Override
    public String toString() {
        return "S3ContentId{" +
                "bucket='" + bucket + '\'' +
                ", objectId='" + objectId + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        S3ContentId that = (S3ContentId) o;

        if (bucket != null ? !bucket.equals(that.bucket) : that.bucket != null) return false;
        return objectId != null ? objectId.equals(that.objectId) : that.objectId == null;
    }

    @Override
    public int hashCode() {
        int result = bucket != null ? bucket.hashCode() : 0;
        result = 31 * result + (objectId != null ? objectId.hashCode() : 0);
        return result;
    }
}

<|edits_diff|>
--- spring-content-s3/src/main/java/org/springframework/content/s3/S3ContentId.java
+++ spring-content-s3/src/main/java/org/springframework/content/s3/S3ContentId.java
@@ -1,4 +1,6 @@
 package org.springframework.content.s3;
+
+import org.springframework.util.Assert;

 import java.io.Serializable;

<|current_version|>
package org.springframework.content.s3;

import org.springframework.util.Assert;

import java.io.Serializable;

public final class S3ContentId implements Serializable {
    private String bucket;
    private String objectId;

    public S3ContentId(String bucket, String objectId) {
        this.bucket = bucket;
        this.objectId = objectId;
    }

    public String getBucket() {
        return bucket;
    }

    public void setBucket(String bucket) {
        this.bucket = bucket;
    }

    public String getObjectId() {
        return objectId;
    }

    public void setObjectId(String objectId) {
        this.objectId = objectId;
    }

    @Override
    public String toString() {
        return "S3ContentId{" +
                "bucket='" + bucket + '\'' +
                ", objectId='" + objectId + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        S3ContentId that = (S3ContentId) o;

        if (bucket != null ? !bucket.equals(that.bucket) : that.bucket != null) return false;
        return objectId != null ? objectId.equals(that.objectId) : that.objectId == null;
    }

    @Override
    public int hashCode() {
        int result = bucket != null ? bucket.hashCode() : 0;
        result = 31 * result + (objectId != null ? objectId.hashCode() : 0);
        return result;
    }
}

<|next_version|>
package org.springframework.content.s3;

import org.springframework.util.Assert;

import java.io.Serializable;

public final class S3ContentId implements Serializable {
    private String bucket;
    private String objectId;

    public S3ContentId(String bucket, String objectId) {
        Assert.hasText(bucket, "bucket must be specified");
        Assert.hasText(objectId, "objectId must be specified");
        this.bucket = bucket;
        this.objectId = objectId;
    }

    public String getBucket() {
        return bucket;
    }

    public void setBucket(String bucket) {
        this.bucket = bucket;
    }

    public String getObjectId() {
        return objectId;
    }

    public void setObjectId(String objectId) {
        this.objectId = objectId;
    }

    @Override
    public String toString() {
        return "S3ContentId{" +
                "bucket='" + bucket + '\'' +
                ", objectId='" + objectId + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        S3ContentId that = (S3ContentId) o;

        if (bucket != null ? !bucket.equals(that.bucket) : that.bucket != null) return false;
        return objectId != null ? objectId.equals(that.objectId) : that.objectId == null;
    }

    @Override
    public int hashCode() {
        int result = bucket != null ? bucket.hashCode() : 0;
        result = 31 * result + (objectId != null ? objectId.hashCode() : 0);
        return result;
    }
}


Change retry limit from 20 down to 3, to fail fast.

--- buffer/src/main/java/org/nguyenhuy/buffer/job/Job.java
+++ buffer/src/main/java/org/nguyenhuy/buffer/job/Job.java
@@ -10,6 +10,8 @@
  * Created by nguyenthanhhuy on 1/14/14.
  */
 public abstract class Job extends com.path.android.jobqueue.Job {
+    private static final int DEFAULT_RETRY_LIMIT =  3;
+
     @Inject
     transient Bus bus;
     @Inject
@@ -18,4 +20,9 @@
     protected Job(Params params) {
         super(params);
     }
+
+    @Override
+    protected int getRetryLimit() {
+        return DEFAULT_RETRY_LIMIT;
+    }
 }

<|original_code|>
package org.nguyenhuy.buffer.job;

import android.os.Handler;
import com.path.android.jobqueue.Params;
import com.squareup.otto.Bus;

import javax.inject.Inject;

/**
 * Created by nguyenthanhhuy on 1/14/14.
 */
public abstract class Job extends com.path.android.jobqueue.Job {
    @Inject
    transient Bus bus;
    @Inject
    transient Handler mainHandler;

    protected Job(Params params) {
        super(params);
    }
}

<|edits_diff|>
--- buffer/src/main/java/org/nguyenhuy/buffer/job/Job.java
+++ buffer/src/main/java/org/nguyenhuy/buffer/job/Job.java
@@ -10,6 +10,8 @@
  * Created by nguyenthanhhuy on 1/14/14.
  */
 public abstract class Job extends com.path.android.jobqueue.Job {
+    private static final int DEFAULT_RETRY_LIMIT =  3;
+
     @Inject
     transient Bus bus;
     @Inject
<|current_version|>
package org.nguyenhuy.buffer.job;

import android.os.Handler;
import com.path.android.jobqueue.Params;
import com.squareup.otto.Bus;

import javax.inject.Inject;

/**
 * Created by nguyenthanhhuy on 1/14/14.
 */
public abstract class Job extends com.path.android.jobqueue.Job {
    private static final int DEFAULT_RETRY_LIMIT =  3;

    @Inject
    transient Bus bus;
    @Inject
    transient Handler mainHandler;

    protected Job(Params params) {
        super(params);
    }
}

<|next_version|>
package org.nguyenhuy.buffer.job;

import android.os.Handler;
import com.path.android.jobqueue.Params;
import com.squareup.otto.Bus;

import javax.inject.Inject;

/**
 * Created by nguyenthanhhuy on 1/14/14.
 */
public abstract class Job extends com.path.android.jobqueue.Job {
    private static final int DEFAULT_RETRY_LIMIT =  3;

    @Inject
    transient Bus bus;
    @Inject
    transient Handler mainHandler;

    protected Job(Params params) {
        super(params);
    }

    @Override
    protected int getRetryLimit() {
        return DEFAULT_RETRY_LIMIT;
    }
}


Disable JPEG decoder test for now.

Disable JPEG decoder test for now.

--- src/test/java/us/ihmc/codecs/JPEGTest.java
+++ src/test/java/us/ihmc/codecs/JPEGTest.java
@@ -6,6 +6,7 @@
 import java.nio.ByteBuffer;
 import java.util.Random;

+import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;

 import us.ihmc.codecs.generated.FilterModeEnum;
@@ -15,6 +16,7 @@

 public class JPEGTest
 {
+   @Disabled("Initialization error, need to fix")
    @Test
    public void testEncodeDecode() throws IOException
    {

<|original_code|>
package us.ihmc.codecs;

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

import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.Random;

import org.junit.jupiter.api.Test;

import us.ihmc.codecs.generated.FilterModeEnum;
import us.ihmc.codecs.generated.YUVPicture;
import us.ihmc.codecs.yuv.JPEGDecoder;
import us.ihmc.codecs.yuv.JPEGEncoder;

public class JPEGTest
{
   @Test
   public void testEncodeDecode() throws IOException
   {
      JPEGDecoder decoder = new JPEGDecoder();
      JPEGEncoder encoder = new JPEGEncoder();

      Random random = new Random(9872412L);
      for (int i = 0; i < 1000; i++)
      {
         YUVPicture jpeg = decoder.readJPEG(JPEGExample.class.getClassLoader().getResource("testImage.jpg"));
         int w = random.nextInt(3000);
         int h = random.nextInt(3000);
         jpeg.scale(w + 1, h + 1, FilterModeEnum.kFilterLinear);
         ByteBuffer buffer = encoder.encode(jpeg, 90);

         YUVPicture res = decoder.decode(buffer);
         assertEquals(jpeg.getWidth(), res.getWidth());
         assertEquals(jpeg.getHeight(), res.getHeight());

         jpeg.delete();
         res.delete();
      }
   }
}

<|edits_diff|>
--- src/test/java/us/ihmc/codecs/JPEGTest.java
+++ src/test/java/us/ihmc/codecs/JPEGTest.java
@@ -6,6 +6,7 @@
 import java.nio.ByteBuffer;
 import java.util.Random;

+import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;

 import us.ihmc.codecs.generated.FilterModeEnum;
<|current_version|>
package us.ihmc.codecs;

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

import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.Random;

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

import us.ihmc.codecs.generated.FilterModeEnum;
import us.ihmc.codecs.generated.YUVPicture;
import us.ihmc.codecs.yuv.JPEGDecoder;
import us.ihmc.codecs.yuv.JPEGEncoder;

public class JPEGTest
{
   @Test
   public void testEncodeDecode() throws IOException
   {
      JPEGDecoder decoder = new JPEGDecoder();
      JPEGEncoder encoder = new JPEGEncoder();

      Random random = new Random(9872412L);
      for (int i = 0; i < 1000; i++)
      {
         YUVPicture jpeg = decoder.readJPEG(JPEGExample.class.getClassLoader().getResource("testImage.jpg"));
         int w = random.nextInt(3000);
         int h = random.nextInt(3000);
         jpeg.scale(w + 1, h + 1, FilterModeEnum.kFilterLinear);
         ByteBuffer buffer = encoder.encode(jpeg, 90);

         YUVPicture res = decoder.decode(buffer);
         assertEquals(jpeg.getWidth(), res.getWidth());
         assertEquals(jpeg.getHeight(), res.getHeight());

         jpeg.delete();
         res.delete();
      }
   }
}

<|next_version|>
package us.ihmc.codecs;

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

import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.Random;

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

import us.ihmc.codecs.generated.FilterModeEnum;
import us.ihmc.codecs.generated.YUVPicture;
import us.ihmc.codecs.yuv.JPEGDecoder;
import us.ihmc.codecs.yuv.JPEGEncoder;

public class JPEGTest
{
   @Disabled("Initialization error, need to fix")
   @Test
   public void testEncodeDecode() throws IOException
   {
      JPEGDecoder decoder = new JPEGDecoder();
      JPEGEncoder encoder = new JPEGEncoder();

      Random random = new Random(9872412L);
      for (int i = 0; i < 1000; i++)
      {
         YUVPicture jpeg = decoder.readJPEG(JPEGExample.class.getClassLoader().getResource("testImage.jpg"));
         int w = random.nextInt(3000);
         int h = random.nextInt(3000);
         jpeg.scale(w + 1, h + 1, FilterModeEnum.kFilterLinear);
         ByteBuffer buffer = encoder.encode(jpeg, 90);

         YUVPicture res = decoder.decode(buffer);
         assertEquals(jpeg.getWidth(), res.getWidth());
         assertEquals(jpeg.getHeight(), res.getHeight());

         jpeg.delete();
         res.delete();
      }
   }
}


Add some logging to alerts

Add some logging to alerts

--- platform/android/Rhodes/src/com/rhomobile/rhodes/alert/Alert.java
+++ platform/android/Rhodes/src/com/rhomobile/rhodes/alert/Alert.java
@@ -1,17 +1,24 @@
 package com.rhomobile.rhodes.alert;

+import com.rhomobile.rhodes.Logger;
+
 public class Alert {
+
+	private static final String TAG = "Alert";

 	public static void showPopup(String message) {
 		// TODO: implement
+		Logger.E(TAG, "showPopup: not implemented");
 	}

 	public static void vibrate(int duration) {
 		// TODO: implement
+		Logger.E(TAG, "vibrate: not implemented");
 	}

 	public static void playFile(String fileName, String mediaType) {
 		// TODO: implement
+		Logger.E(TAG, "playFile: not implemented");
 	}

 }

<|original_code|>
package com.rhomobile.rhodes.alert;

public class Alert {

	public static void showPopup(String message) {
		// TODO: implement
	}

	public static void vibrate(int duration) {
		// TODO: implement
	}

	public static void playFile(String fileName, String mediaType) {
		// TODO: implement
	}

}

<|edits_diff|>
--- platform/android/Rhodes/src/com/rhomobile/rhodes/alert/Alert.java
+++ platform/android/Rhodes/src/com/rhomobile/rhodes/alert/Alert.java
@@ -1,13 +1,19 @@
 package com.rhomobile.rhodes.alert;

+import com.rhomobile.rhodes.Logger;
+
 public class Alert {
+
+	private static final String TAG = "Alert";

 	public static void showPopup(String message) {
 		// TODO: implement
+		Logger.E(TAG, "showPopup: not implemented");
 	}

 	public static void vibrate(int duration) {
 		// TODO: implement
+		Logger.E(TAG, "vibrate: not implemented");
 	}

 	public static void playFile(String fileName, String mediaType) {
<|current_version|>
package com.rhomobile.rhodes.alert;

import com.rhomobile.rhodes.Logger;

public class Alert {

	private static final String TAG = "Alert";

	public static void showPopup(String message) {
		// TODO: implement
		Logger.E(TAG, "showPopup: not implemented");
	}

	public static void vibrate(int duration) {
		// TODO: implement
		Logger.E(TAG, "vibrate: not implemented");
	}

	public static void playFile(String fileName, String mediaType) {
		// TODO: implement
	}

}

<|next_version|>
package com.rhomobile.rhodes.alert;

import com.rhomobile.rhodes.Logger;

public class Alert {

	private static final String TAG = "Alert";

	public static void showPopup(String message) {
		// TODO: implement
		Logger.E(TAG, "showPopup: not implemented");
	}

	public static void vibrate(int duration) {
		// TODO: implement
		Logger.E(TAG, "vibrate: not implemented");
	}

	public static void playFile(String fileName, String mediaType) {
		// TODO: implement
		Logger.E(TAG, "playFile: not implemented");
	}

}


package nl.tudelft.dnainator.ui;

import java.io.IOException;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;

/**
 * DNAinator's main window, from which all interaction will occur.
 * <p>
 * The {@link #start(Stage) start} method will automatically load
 * the required fxml files, which in turn instantiates all controllers.
 * </p>
 */
public class DNAinator extends Application {
	private static final String DNAINATOR = "DNAinator";
	private static final String FXML = "/ui/fxml/dnainator.fxml";
	private static final String ICON = "/ui/icons/dnainator.png";

	@Override
	public void start(Stage primaryStage) throws Exception {
		primaryStage.setTitle(DNAINATOR);
		primaryStage.getIcons().add(new Image(getClass().getResourceAsStream(ICON)));
		primaryStage.setMaximized(true);
		try {
			BorderPane rootLayout = FXMLLoader.load(getClass().getResource(FXML));
			Scene scene = new Scene(rootLayout);
			primaryStage.setScene(scene);
		} catch (IOException e) {
			e.printStackTrace();
		}
		primaryStage.show();
	}
}

package nl.tudelft.dnainator.ui;

import java.io.IOException;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;

/**
 * DNAinator's main window, from which all interaction will occur.
 * <p>
 * The {@link #start(Stage) start} method will automatically load
 * the required fxml files, which in turn instantiates all controllers.
 * </p>
 */
public class DNAinator extends Application {
	private static final String DNAINATOR = "DNAinator";
	private static final String FXML = "/ui/fxml/dnainator.fxml";
	private static final String ICON = "/ui/icons/dnainator.png";

	private static final int MIN_WIDTH = 300;
	private static final int MIN_HEIGHT = 150;

	@Override
	public void start(Stage primaryStage) throws Exception {
		primaryStage.setMinHeight(MIN_HEIGHT);
		primaryStage.setMinWidth(MIN_WIDTH);
		primaryStage.setTitle(DNAINATOR);
		primaryStage.getIcons().add(new Image(getClass().getResourceAsStream(ICON)));
		primaryStage.setMaximized(true);
		try {
			BorderPane rootLayout = FXMLLoader.load(getClass().getResource(FXML));
			Scene scene = new Scene(rootLayout);
			primaryStage.setScene(scene);
		} catch (IOException e) {
			e.printStackTrace();
		}
		primaryStage.show();
	}
}

Add minimum size to the Application window

--- src/main/java/nl/tudelft/dnainator/ui/DNAinator.java
+++ src/main/java/nl/tudelft/dnainator/ui/DNAinator.java
@@ -21,8 +21,13 @@
 	private static final String FXML = "/ui/fxml/dnainator.fxml";
 	private static final String ICON = "/ui/icons/dnainator.png";

+	private static final int MIN_WIDTH = 300;
+	private static final int MIN_HEIGHT = 150;
+
 	@Override
 	public void start(Stage primaryStage) throws Exception {
+		primaryStage.setMinHeight(MIN_HEIGHT);
+		primaryStage.setMinWidth(MIN_WIDTH);
 		primaryStage.setTitle(DNAINATOR);
 		primaryStage.getIcons().add(new Image(getClass().getResourceAsStream(ICON)));
 		primaryStage.setMaximized(true);

package nl.tudelft.dnainator.ui;

import java.io.IOException;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;

/**
 * DNAinator's main window, from which all interaction will occur.
 * <p>
 * The {@link #start(Stage) start} method will automatically load
 * the required fxml files, which in turn instantiates all controllers.
 * </p>
 */
public class DNAinator extends Application {
	private static final String DNAINATOR = "DNAinator";
	private static final String FXML = "/ui/fxml/dnainator.fxml";
	private static final String ICON = "/ui/icons/dnainator.png";

	private static final int MIN_WIDTH = 300;
	private static final int MIN_HEIGHT = 150;

	@Override
	public void start(Stage primaryStage) throws Exception {
		primaryStage.setTitle(DNAINATOR);
		primaryStage.getIcons().add(new Image(getClass().getResourceAsStream(ICON)));
		primaryStage.setMaximized(true);
		try {
			BorderPane rootLayout = FXMLLoader.load(getClass().getResource(FXML));
			Scene scene = new Scene(rootLayout);
			primaryStage.setScene(scene);
		} catch (IOException e) {
			e.printStackTrace();
		}
		primaryStage.show();
	}
}

<|original_code|>
package nl.tudelft.dnainator.ui;

import java.io.IOException;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;

/**
 * DNAinator's main window, from which all interaction will occur.
 *

 * The {@link #start(Stage) start} method will automatically load
 * the required fxml files, which in turn instantiates all controllers.
 *

 */
public class DNAinator extends Application {
	private static final String DNAINATOR = "DNAinator";
	private static final String FXML = "/ui/fxml/dnainator.fxml";
	private static final String ICON = "/ui/icons/dnainator.png";

	@Override
	public void start(Stage primaryStage) throws Exception {
		primaryStage.setTitle(DNAINATOR);
		primaryStage.getIcons().add(new Image(getClass().getResourceAsStream(ICON)));
		primaryStage.setMaximized(true);
		try {
			BorderPane rootLayout = FXMLLoader.load(getClass().getResource(FXML));
			Scene scene = new Scene(rootLayout);
			primaryStage.setScene(scene);
		} catch (IOException e) {
			e.printStackTrace();
		}
		primaryStage.show();
	}
}

<|edits_diff|>
--- src/main/java/nl/tudelft/dnainator/ui/DNAinator.java
+++ src/main/java/nl/tudelft/dnainator/ui/DNAinator.java
@@ -21,6 +21,9 @@
 	private static final String FXML = "/ui/fxml/dnainator.fxml";
 	private static final String ICON = "/ui/icons/dnainator.png";

+	private static final int MIN_WIDTH = 300;
+	private static final int MIN_HEIGHT = 150;
+
 	@Override
 	public void start(Stage primaryStage) throws Exception {
 		primaryStage.setTitle(DNAINATOR);
<|current_version|>
package nl.tudelft.dnainator.ui;

import java.io.IOException;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;

/**
 * DNAinator's main window, from which all interaction will occur.
 *

 * The {@link #start(Stage) start} method will automatically load
 * the required fxml files, which in turn instantiates all controllers.
 *

 */
public class DNAinator extends Application {
	private static final String DNAINATOR = "DNAinator";
	private static final String FXML = "/ui/fxml/dnainator.fxml";
	private static final String ICON = "/ui/icons/dnainator.png";

	private static final int MIN_WIDTH = 300;
	private static final int MIN_HEIGHT = 150;

	@Override
	public void start(Stage primaryStage) throws Exception {
		primaryStage.setTitle(DNAINATOR);
		primaryStage.getIcons().add(new Image(getClass().getResourceAsStream(ICON)));
		primaryStage.setMaximized(true);
		try {
			BorderPane rootLayout = FXMLLoader.load(getClass().getResource(FXML));
			Scene scene = new Scene(rootLayout);
			primaryStage.setScene(scene);
		} catch (IOException e) {
			e.printStackTrace();
		}
		primaryStage.show();
	}
}

<|next_version|>
package nl.tudelft.dnainator.ui;

import java.io.IOException;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;

/**
 * DNAinator's main window, from which all interaction will occur.
 *

 * The {@link #start(Stage) start} method will automatically load
 * the required fxml files, which in turn instantiates all controllers.
 *

 */
public class DNAinator extends Application {
	private static final String DNAINATOR = "DNAinator";
	private static final String FXML = "/ui/fxml/dnainator.fxml";
	private static final String ICON = "/ui/icons/dnainator.png";

	private static final int MIN_WIDTH = 300;
	private static final int MIN_HEIGHT = 150;

	@Override
	public void start(Stage primaryStage) throws Exception {
		primaryStage.setMinHeight(MIN_HEIGHT);
		primaryStage.setMinWidth(MIN_WIDTH);
		primaryStage.setTitle(DNAINATOR);
		primaryStage.getIcons().add(new Image(getClass().getResourceAsStream(ICON)));
		primaryStage.setMaximized(true);
		try {
			BorderPane rootLayout = FXMLLoader.load(getClass().getResource(FXML));
			Scene scene = new Scene(rootLayout);
			primaryStage.setScene(scene);
		} catch (IOException e) {
			e.printStackTrace();
		}
		primaryStage.show();
	}
}


Allow eyetype of 'center' (yes, cyclops?)

--- JRift/src/de/fruitfly/ovr/enums/EyeType.java
+++ JRift/src/de/fruitfly/ovr/enums/EyeType.java
@@ -2,6 +2,7 @@

 public enum EyeType
 {
+    ovrEye_Center(-1),
     ovrEye_Left(0),
     ovrEye_Right(1),
     ovrEye_Count(2);
@@ -20,6 +21,8 @@

     public static EyeType fromInteger(int x) {
         switch(x) {
+            case -1:
+                return ovrEye_Center;
             case 0:
                 return ovrEye_Left;
             case 1:
@@ -32,6 +35,8 @@
     {
         switch(type)
         {
+            case ovrEye_Center:
+                return "ovrEye_Center";
             case ovrEye_Left:
                 return "ovrEye_Left";
             case ovrEye_Right:

<|original_code|>
package de.fruitfly.ovr.enums;

public enum EyeType
{
    ovrEye_Left(0),
    ovrEye_Right(1),
    ovrEye_Count(2);

    private final int eyeTypeEnum;

    private EyeType(int value)
    {
        this.eyeTypeEnum = value;
    }

    public int value()
    {
        return this.eyeTypeEnum;
    }

    public static EyeType fromInteger(int x) {
        switch(x) {
            case 0:
                return ovrEye_Left;
            case 1:
                return ovrEye_Right;
        }
        return ovrEye_Count;
    }

    public static String toString(EyeType type)
    {
        switch(type)
        {
            case ovrEye_Left:
                return "ovrEye_Left";
            case ovrEye_Right:
                return "ovrEye_Right";
        }

        return "ovrEye_Count";
    }
}

<|edits_diff|>
--- JRift/src/de/fruitfly/ovr/enums/EyeType.java
+++ JRift/src/de/fruitfly/ovr/enums/EyeType.java
@@ -2,6 +2,7 @@

 public enum EyeType
 {
+    ovrEye_Center(-1),
     ovrEye_Left(0),
     ovrEye_Right(1),
     ovrEye_Count(2);
@@ -20,6 +21,8 @@

     public static EyeType fromInteger(int x) {
         switch(x) {
+            case -1:
+                return ovrEye_Center;
             case 0:
                 return ovrEye_Left;
             case 1:
<|current_version|>
package de.fruitfly.ovr.enums;

public enum EyeType
{
    ovrEye_Center(-1),
    ovrEye_Left(0),
    ovrEye_Right(1),
    ovrEye_Count(2);

    private final int eyeTypeEnum;

    private EyeType(int value)
    {
        this.eyeTypeEnum = value;
    }

    public int value()
    {
        return this.eyeTypeEnum;
    }

    public static EyeType fromInteger(int x) {
        switch(x) {
            case -1:
                return ovrEye_Center;
            case 0:
                return ovrEye_Left;
            case 1:
                return ovrEye_Right;
        }
        return ovrEye_Count;
    }

    public static String toString(EyeType type)
    {
        switch(type)
        {
            case ovrEye_Left:
                return "ovrEye_Left";
            case ovrEye_Right:
                return "ovrEye_Right";
        }

        return "ovrEye_Count";
    }
}

<|next_version|>
package de.fruitfly.ovr.enums;

public enum EyeType
{
    ovrEye_Center(-1),
    ovrEye_Left(0),
    ovrEye_Right(1),
    ovrEye_Count(2);

    private final int eyeTypeEnum;

    private EyeType(int value)
    {
        this.eyeTypeEnum = value;
    }

    public int value()
    {
        return this.eyeTypeEnum;
    }

    public static EyeType fromInteger(int x) {
        switch(x) {
            case -1:
                return ovrEye_Center;
            case 0:
                return ovrEye_Left;
            case 1:
                return ovrEye_Right;
        }
        return ovrEye_Count;
    }

    public static String toString(EyeType type)
    {
        switch(type)
        {
            case ovrEye_Center:
                return "ovrEye_Center";
            case ovrEye_Left:
                return "ovrEye_Left";
            case ovrEye_Right:
                return "ovrEye_Right";
        }

        return "ovrEye_Count";
    }
}


Add missing enable scheduling annotation

--- src/main/java/com/github/_1element/SurveillanceCenterApplication.java
+++ src/main/java/com/github/_1element/SurveillanceCenterApplication.java
@@ -5,10 +5,12 @@
 import org.springframework.boot.orm.jpa.EntityScan;
 import org.springframework.context.annotation.Bean;
 import org.springframework.data.jpa.convert.threeten.Jsr310JpaConverters;
+import org.springframework.scheduling.annotation.EnableScheduling;
 import org.thymeleaf.extras.java8time.dialect.Java8TimeDialect;

 @EntityScan(basePackageClasses = {SurveillanceCenterApplication.class, Jsr310JpaConverters.class})
 @SpringBootApplication
+@EnableScheduling
 public class SurveillanceCenterApplication {

   @Bean

<|original_code|>
package com.github._1element;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.orm.jpa.EntityScan;
import org.springframework.context.annotation.Bean;
import org.springframework.data.jpa.convert.threeten.Jsr310JpaConverters;
import org.thymeleaf.extras.java8time.dialect.Java8TimeDialect;

@EntityScan(basePackageClasses = {SurveillanceCenterApplication.class, Jsr310JpaConverters.class})
@SpringBootApplication
public class SurveillanceCenterApplication {

  @Bean
  public Java8TimeDialect java8TimeDialect() {
    return new Java8TimeDialect();
  }

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

}

<|edits_diff|>
--- src/main/java/com/github/_1element/SurveillanceCenterApplication.java
+++ src/main/java/com/github/_1element/SurveillanceCenterApplication.java
@@ -5,6 +5,7 @@
 import org.springframework.boot.orm.jpa.EntityScan;
 import org.springframework.context.annotation.Bean;
 import org.springframework.data.jpa.convert.threeten.Jsr310JpaConverters;
+import org.springframework.scheduling.annotation.EnableScheduling;
 import org.thymeleaf.extras.java8time.dialect.Java8TimeDialect;

 @EntityScan(basePackageClasses = {SurveillanceCenterApplication.class, Jsr310JpaConverters.class})
<|current_version|>
package com.github._1element;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.orm.jpa.EntityScan;
import org.springframework.context.annotation.Bean;
import org.springframework.data.jpa.convert.threeten.Jsr310JpaConverters;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.thymeleaf.extras.java8time.dialect.Java8TimeDialect;

@EntityScan(basePackageClasses = {SurveillanceCenterApplication.class, Jsr310JpaConverters.class})
@SpringBootApplication
public class SurveillanceCenterApplication {

  @Bean
  public Java8TimeDialect java8TimeDialect() {
    return new Java8TimeDialect();
  }

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

}

<|next_version|>
package com.github._1element;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.orm.jpa.EntityScan;
import org.springframework.context.annotation.Bean;
import org.springframework.data.jpa.convert.threeten.Jsr310JpaConverters;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.thymeleaf.extras.java8time.dialect.Java8TimeDialect;

@EntityScan(basePackageClasses = {SurveillanceCenterApplication.class, Jsr310JpaConverters.class})
@SpringBootApplication
@EnableScheduling
public class SurveillanceCenterApplication {

  @Bean
  public Java8TimeDialect java8TimeDialect() {
    return new Java8TimeDialect();
  }

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

}


Add logging before storing to datastore.

--- pnc-core/src/main/java/org/jboss/pnc/core/builder/DatastoreAdapter.java
+++ pnc-core/src/main/java/org/jboss/pnc/core/builder/DatastoreAdapter.java
@@ -1,5 +1,6 @@
 package org.jboss.pnc.core.builder;

+import org.jboss.logging.Logger;
 import org.jboss.pnc.model.ProjectBuildResult;
 import org.jboss.pnc.spi.builddriver.BuildJobConfiguration;
 import org.jboss.pnc.spi.builddriver.BuildJobDetails;
@@ -14,6 +15,8 @@

     private Datastore datastore;

+    private static final Logger log = Logger.getLogger(DatastoreAdapter.class);
+
     @Inject
     public DatastoreAdapter(Datastore datastore) {
         this.datastore = datastore;
@@ -24,6 +27,7 @@
         buildResult.setBuildLog(buildDetails.getBuildLog());
         buildResult.setStatus(buildDetails.getBuildStatus());
         buildResult.setProjectBuildConfiguration(buildJobConfiguration.getProjectBuildConfiguration());
+        log.tracef("Storing results of %s to datastore.", buildDetails.getJobName());
         datastore.storeCompletedBuild(buildResult);
     }

<|original_code|>
package org.jboss.pnc.core.builder;

import org.jboss.pnc.model.ProjectBuildResult;
import org.jboss.pnc.spi.builddriver.BuildJobConfiguration;
import org.jboss.pnc.spi.builddriver.BuildJobDetails;
import org.jboss.pnc.spi.datastore.Datastore;

import javax.inject.Inject;

/**
 * Created by Matej Lazar on 2014-12-15.
 */
public class DatastoreAdapter {

    private Datastore datastore;

    @Inject
    public DatastoreAdapter(Datastore datastore) {
        this.datastore = datastore;
    }

    public void storeResult(BuildJobDetails buildDetails, BuildJobConfiguration buildJobConfiguration) {
        ProjectBuildResult buildResult = new ProjectBuildResult();
        buildResult.setBuildLog(buildDetails.getBuildLog());
        buildResult.setStatus(buildDetails.getBuildStatus());
        buildResult.setProjectBuildConfiguration(buildJobConfiguration.getProjectBuildConfiguration());
        datastore.storeCompletedBuild(buildResult);
    }

}

<|edits_diff|>
--- pnc-core/src/main/java/org/jboss/pnc/core/builder/DatastoreAdapter.java
+++ pnc-core/src/main/java/org/jboss/pnc/core/builder/DatastoreAdapter.java
@@ -1,5 +1,6 @@
 package org.jboss.pnc.core.builder;

+import org.jboss.logging.Logger;
 import org.jboss.pnc.model.ProjectBuildResult;
 import org.jboss.pnc.spi.builddriver.BuildJobConfiguration;
 import org.jboss.pnc.spi.builddriver.BuildJobDetails;
@@ -13,6 +14,8 @@
 public class DatastoreAdapter {

     private Datastore datastore;
+
+    private static final Logger log = Logger.getLogger(DatastoreAdapter.class);

     @Inject
     public DatastoreAdapter(Datastore datastore) {
<|current_version|>
package org.jboss.pnc.core.builder;

import org.jboss.logging.Logger;
import org.jboss.pnc.model.ProjectBuildResult;
import org.jboss.pnc.spi.builddriver.BuildJobConfiguration;
import org.jboss.pnc.spi.builddriver.BuildJobDetails;
import org.jboss.pnc.spi.datastore.Datastore;

import javax.inject.Inject;

/**
 * Created by Matej Lazar on 2014-12-15.
 */
public class DatastoreAdapter {

    private Datastore datastore;

    private static final Logger log = Logger.getLogger(DatastoreAdapter.class);

    @Inject
    public DatastoreAdapter(Datastore datastore) {
        this.datastore = datastore;
    }

    public void storeResult(BuildJobDetails buildDetails, BuildJobConfiguration buildJobConfiguration) {
        ProjectBuildResult buildResult = new ProjectBuildResult();
        buildResult.setBuildLog(buildDetails.getBuildLog());
        buildResult.setStatus(buildDetails.getBuildStatus());
        buildResult.setProjectBuildConfiguration(buildJobConfiguration.getProjectBuildConfiguration());
        datastore.storeCompletedBuild(buildResult);
    }

}

<|next_version|>
package org.jboss.pnc.core.builder;

import org.jboss.logging.Logger;
import org.jboss.pnc.model.ProjectBuildResult;
import org.jboss.pnc.spi.builddriver.BuildJobConfiguration;
import org.jboss.pnc.spi.builddriver.BuildJobDetails;
import org.jboss.pnc.spi.datastore.Datastore;

import javax.inject.Inject;

/**
 * Created by Matej Lazar on 2014-12-15.
 */
public class DatastoreAdapter {

    private Datastore datastore;

    private static final Logger log = Logger.getLogger(DatastoreAdapter.class);

    @Inject
    public DatastoreAdapter(Datastore datastore) {
        this.datastore = datastore;
    }

    public void storeResult(BuildJobDetails buildDetails, BuildJobConfiguration buildJobConfiguration) {
        ProjectBuildResult buildResult = new ProjectBuildResult();
        buildResult.setBuildLog(buildDetails.getBuildLog());
        buildResult.setStatus(buildDetails.getBuildStatus());
        buildResult.setProjectBuildConfiguration(buildJobConfiguration.getProjectBuildConfiguration());
        log.tracef("Storing results of %s to datastore.", buildDetails.getJobName());
        datastore.storeCompletedBuild(buildResult);
    }

}


Add a message on banlist reload

Add a message on banlist reload

--- src/main/java/com/craftminecraft/bungee/bungeeban/command/ReloadBansCommand.java
+++ src/main/java/com/craftminecraft/bungee/bungeeban/command/ReloadBansCommand.java
@@ -2,6 +2,7 @@

 import com.craftminecraft.bungee.bungeeban.BanManager;

+import net.md_5.bungee.api.ChatColor;
 import net.md_5.bungee.api.CommandSender;
 import net.md_5.bungee.api.plugin.Command;

@@ -14,5 +15,6 @@
 	@Override
 	public void execute(CommandSender sender, String[] args) {
 		BanManager.reload();
+		sender.sendMessage(ChatColor.RED + "Reloaded banlist.");
 	}
 }

<|original_code|>
package com.craftminecraft.bungee.bungeeban.command;

import com.craftminecraft.bungee.bungeeban.BanManager;

import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.plugin.Command;

public class ReloadBansCommand extends Command {

	public ReloadBansCommand() {
		super("reloadbans", "bungeeban.command.reloadbans");
	}

	@Override
	public void execute(CommandSender sender, String[] args) {
		BanManager.reload();
	}
}

<|edits_diff|>
--- src/main/java/com/craftminecraft/bungee/bungeeban/command/ReloadBansCommand.java
+++ src/main/java/com/craftminecraft/bungee/bungeeban/command/ReloadBansCommand.java
@@ -2,6 +2,7 @@

 import com.craftminecraft.bungee.bungeeban.BanManager;

+import net.md_5.bungee.api.ChatColor;
 import net.md_5.bungee.api.CommandSender;
 import net.md_5.bungee.api.plugin.Command;

<|current_version|>
package com.craftminecraft.bungee.bungeeban.command;

import com.craftminecraft.bungee.bungeeban.BanManager;

import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.plugin.Command;

public class ReloadBansCommand extends Command {

	public ReloadBansCommand() {
		super("reloadbans", "bungeeban.command.reloadbans");
	}

	@Override
	public void execute(CommandSender sender, String[] args) {
		BanManager.reload();
	}
}

<|next_version|>
package com.craftminecraft.bungee.bungeeban.command;

import com.craftminecraft.bungee.bungeeban.BanManager;

import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.plugin.Command;

public class ReloadBansCommand extends Command {

	public ReloadBansCommand() {
		super("reloadbans", "bungeeban.command.reloadbans");
	}

	@Override
	public void execute(CommandSender sender, String[] args) {
		BanManager.reload();
		sender.sendMessage(ChatColor.RED + "Reloaded banlist.");
	}
}


Fix status bar translucency in description editing tutorial

Somewhere along the line, the status bar in the description editing
tutorial lost its translucency.  This puts it back.

Change-Id: Id3b1134416afd19e6f397f4a5fa84cc9b57eb89f

--- app/src/main/java/org/wikipedia/descriptions/DescriptionEditTutorialActivity.java
+++ app/src/main/java/org/wikipedia/descriptions/DescriptionEditTutorialActivity.java
@@ -7,6 +7,7 @@
 import android.os.Build;
 import android.os.Bundle;
 import android.support.annotation.NonNull;
+import android.view.WindowManager;

 import org.wikipedia.activity.SingleFragmentActivity;

@@ -26,6 +27,11 @@
         setRequestedOrientation(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2
                 ? ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT
                 : ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
+
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
+            getWindow().setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS,
+                    WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
+        }
     }

     @Override protected DescriptionEditTutorialFragment createFragment() {

<|original_code|>
package org.wikipedia.descriptions;

import android.annotation.TargetApi;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.NonNull;

import org.wikipedia.activity.SingleFragmentActivity;

public class DescriptionEditTutorialActivity
        extends SingleFragmentActivity<DescriptionEditTutorialFragment>
        implements DescriptionEditTutorialFragment.Callback {

    public static Intent newIntent(@NonNull Context context) {
        return new Intent(context, DescriptionEditTutorialActivity.class);
    }

    @TargetApi(18) @Override public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // Setting this in the manifest will not suffice since any manifest screenOrientation
        // setting is overridden by the call to ActivityUtil.requestFullUserOrientation() in the
        // base ActionBarActivity's onCreate().
        setRequestedOrientation(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2
                ? ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT
                : ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
    }

    @Override protected DescriptionEditTutorialFragment createFragment() {
        return DescriptionEditTutorialFragment.newInstance();
    }

    @Override public void onStartEditingClick() {
        setResult(RESULT_OK);
        finish();
    }
}

<|edits_diff|>
--- app/src/main/java/org/wikipedia/descriptions/DescriptionEditTutorialActivity.java
+++ app/src/main/java/org/wikipedia/descriptions/DescriptionEditTutorialActivity.java
@@ -7,6 +7,7 @@
 import android.os.Build;
 import android.os.Bundle;
 import android.support.annotation.NonNull;
+import android.view.WindowManager;

 import org.wikipedia.activity.SingleFragmentActivity;

<|current_version|>
package org.wikipedia.descriptions;

import android.annotation.TargetApi;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.view.WindowManager;

import org.wikipedia.activity.SingleFragmentActivity;

public class DescriptionEditTutorialActivity
        extends SingleFragmentActivity<DescriptionEditTutorialFragment>
        implements DescriptionEditTutorialFragment.Callback {

    public static Intent newIntent(@NonNull Context context) {
        return new Intent(context, DescriptionEditTutorialActivity.class);
    }

    @TargetApi(18) @Override public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // Setting this in the manifest will not suffice since any manifest screenOrientation
        // setting is overridden by the call to ActivityUtil.requestFullUserOrientation() in the
        // base ActionBarActivity's onCreate().
        setRequestedOrientation(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2
                ? ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT
                : ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
    }

    @Override protected DescriptionEditTutorialFragment createFragment() {
        return DescriptionEditTutorialFragment.newInstance();
    }

    @Override public void onStartEditingClick() {
        setResult(RESULT_OK);
        finish();
    }
}

<|next_version|>
package org.wikipedia.descriptions;

import android.annotation.TargetApi;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.view.WindowManager;

import org.wikipedia.activity.SingleFragmentActivity;

public class DescriptionEditTutorialActivity
        extends SingleFragmentActivity<DescriptionEditTutorialFragment>
        implements DescriptionEditTutorialFragment.Callback {

    public static Intent newIntent(@NonNull Context context) {
        return new Intent(context, DescriptionEditTutorialActivity.class);
    }

    @TargetApi(18) @Override public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // Setting this in the manifest will not suffice since any manifest screenOrientation
        // setting is overridden by the call to ActivityUtil.requestFullUserOrientation() in the
        // base ActionBarActivity's onCreate().
        setRequestedOrientation(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2
                ? ActivityInfo.SCREEN_ORIENTATION_USER_PORTRAIT
                : ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            getWindow().setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS,
                    WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
        }
    }

    @Override protected DescriptionEditTutorialFragment createFragment() {
        return DescriptionEditTutorialFragment.newInstance();
    }

    @Override public void onStartEditingClick() {
        setResult(RESULT_OK);
        finish();
    }
}


Add custom serializer. Add getter for description

--- src/main/java/org/udg/pds/simpleapp_javaee/model/Tag.java
+++ src/main/java/org/udg/pds/simpleapp_javaee/model/Tag.java
@@ -1,4 +1,8 @@
 package org.udg.pds.simpleapp_javaee.model;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import org.udg.pds.simpleapp_javaee.rest.serializer.JsonDateSerializer;
+import org.udg.pds.simpleapp_javaee.rest.serializer.JsonTagSerializer;

 import javax.persistence.Entity;
 import javax.persistence.GeneratedValue;
@@ -7,6 +11,7 @@
 import javax.validation.constraints.NotNull;
 import java.io.Serializable;

+@JsonSerialize(using = JsonTagSerializer.class)
 @Entity
 // This tells JAXB that it has to ignore getters and setters and only use fields for JSON marshaling/unmarshaling
 public class Tag implements Serializable {
@@ -47,4 +52,8 @@
   public Long getId() {
     return id;
   }
+
+    public String getDescription() {
+        return description;
+    }
 }

<|original_code|>
package org.udg.pds.simpleapp_javaee.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Entity
// This tells JAXB that it has to ignore getters and setters and only use fields for JSON marshaling/unmarshaling
public class Tag implements Serializable {
  /**
   * Default value included to remove warning. Remove or modify at will.
   **/
  private static final long serialVersionUID = 1L;

  public Tag() {
  }

  public Tag(String name, String description) {
    this.name = name;
    this.description = description;
  }

  // This tells JAXB that this field can be used as ID
  // Since XmlID can only be used on Strings, we need to use LongAdapter to transform Long <-> String
  @Id
  // Don't forget to use the extra argument "strategy = GenerationType.IDENTITY" to get AUTO_INCREMENT
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private Long id;

  @NotNull
  private String name;

  @NotNull
  private String description;

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public Long getId() {
    return id;
  }
}

<|edits_diff|>
--- src/main/java/org/udg/pds/simpleapp_javaee/model/Tag.java
+++ src/main/java/org/udg/pds/simpleapp_javaee/model/Tag.java
@@ -1,4 +1,8 @@
 package org.udg.pds.simpleapp_javaee.model;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import org.udg.pds.simpleapp_javaee.rest.serializer.JsonDateSerializer;
+import org.udg.pds.simpleapp_javaee.rest.serializer.JsonTagSerializer;

 import javax.persistence.Entity;
 import javax.persistence.GeneratedValue;
@@ -7,6 +11,7 @@
 import javax.validation.constraints.NotNull;
 import java.io.Serializable;

+@JsonSerialize(using = JsonTagSerializer.class)
 @Entity
 // This tells JAXB that it has to ignore getters and setters and only use fields for JSON marshaling/unmarshaling
 public class Tag implements Serializable {
<|current_version|>
package org.udg.pds.simpleapp_javaee.model;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.udg.pds.simpleapp_javaee.rest.serializer.JsonDateSerializer;
import org.udg.pds.simpleapp_javaee.rest.serializer.JsonTagSerializer;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@JsonSerialize(using = JsonTagSerializer.class)
@Entity
// This tells JAXB that it has to ignore getters and setters and only use fields for JSON marshaling/unmarshaling
public class Tag implements Serializable {
  /**
   * Default value included to remove warning. Remove or modify at will.
   **/
  private static final long serialVersionUID = 1L;

  public Tag() {
  }

  public Tag(String name, String description) {
    this.name = name;
    this.description = description;
  }

  // This tells JAXB that this field can be used as ID
  // Since XmlID can only be used on Strings, we need to use LongAdapter to transform Long <-> String
  @Id
  // Don't forget to use the extra argument "strategy = GenerationType.IDENTITY" to get AUTO_INCREMENT
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private Long id;

  @NotNull
  private String name;

  @NotNull
  private String description;

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public Long getId() {
    return id;
  }
}

<|next_version|>
package org.udg.pds.simpleapp_javaee.model;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.udg.pds.simpleapp_javaee.rest.serializer.JsonDateSerializer;
import org.udg.pds.simpleapp_javaee.rest.serializer.JsonTagSerializer;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@JsonSerialize(using = JsonTagSerializer.class)
@Entity
// This tells JAXB that it has to ignore getters and setters and only use fields for JSON marshaling/unmarshaling
public class Tag implements Serializable {
  /**
   * Default value included to remove warning. Remove or modify at will.
   **/
  private static final long serialVersionUID = 1L;

  public Tag() {
  }

  public Tag(String name, String description) {
    this.name = name;
    this.description = description;
  }

  // This tells JAXB that this field can be used as ID
  // Since XmlID can only be used on Strings, we need to use LongAdapter to transform Long <-> String
  @Id
  // Don't forget to use the extra argument "strategy = GenerationType.IDENTITY" to get AUTO_INCREMENT
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private Long id;

  @NotNull
  private String name;

  @NotNull
  private String description;

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public Long getId() {
    return id;
  }

    public String getDescription() {
        return description;
    }
}