Fix problem with context load

Fix problem with context load

--- src/main/java/com/jmb/springfactory/service/productionschedule/ProductionScheduleServiceImpl.java
+++ src/main/java/com/jmb/springfactory/service/productionschedule/ProductionScheduleServiceImpl.java
@@ -1,6 +1,7 @@
 package com.jmb.springfactory.service.productionschedule;

 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;

 import com.jmb.springfactory.dao.GenericMySQLService;
 import com.jmb.springfactory.dao.productionschedule.ProductionScheduleMySQLService;
@@ -9,6 +10,7 @@
 import com.jmb.springfactory.model.entity.ProductionSchedule;
 import com.jmb.springfactory.service.GenericServiceImpl;

+@Service
 public class ProductionScheduleServiceImpl extends GenericServiceImpl<ProductionSchedule, ProductionScheduleDto,
   BusinessObjectBase, Integer> implements ProductionScheduleService {

<|original_code|>
package com.jmb.springfactory.service.productionschedule;

import org.springframework.beans.factory.annotation.Autowired;

import com.jmb.springfactory.dao.GenericMySQLService;
import com.jmb.springfactory.dao.productionschedule.ProductionScheduleMySQLService;
import com.jmb.springfactory.model.bo.BusinessObjectBase;
import com.jmb.springfactory.model.dto.ProductionScheduleDto;
import com.jmb.springfactory.model.entity.ProductionSchedule;
import com.jmb.springfactory.service.GenericServiceImpl;

public class ProductionScheduleServiceImpl extends GenericServiceImpl<ProductionSchedule, ProductionScheduleDto,
  BusinessObjectBase, Integer> implements ProductionScheduleService {

  @Autowired
  private ProductionScheduleMySQLService productionScheduleMySQLService;

  @Override
  public GenericMySQLService<ProductionSchedule, Integer> genericDao() {
    return productionScheduleMySQLService;
  }

  @Override
  public Class<? extends ProductionSchedule> getClazz() {
    return ProductionSchedule.class;
  }

  @Override
  public Class<? extends ProductionScheduleDto> getDtoClazz() {
    return ProductionScheduleDto.class;
  }

  @Override
  public Class<? extends BusinessObjectBase> getBoClazz() {
    return BusinessObjectBase.class;
  }

}

<|edits_diff|>
--- src/main/java/com/jmb/springfactory/service/productionschedule/ProductionScheduleServiceImpl.java
+++ src/main/java/com/jmb/springfactory/service/productionschedule/ProductionScheduleServiceImpl.java
@@ -1,6 +1,7 @@
 package com.jmb.springfactory.service.productionschedule;

 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;

 import com.jmb.springfactory.dao.GenericMySQLService;
 import com.jmb.springfactory.dao.productionschedule.ProductionScheduleMySQLService;
<|current_version|>
package com.jmb.springfactory.service.productionschedule;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jmb.springfactory.dao.GenericMySQLService;
import com.jmb.springfactory.dao.productionschedule.ProductionScheduleMySQLService;
import com.jmb.springfactory.model.bo.BusinessObjectBase;
import com.jmb.springfactory.model.dto.ProductionScheduleDto;
import com.jmb.springfactory.model.entity.ProductionSchedule;
import com.jmb.springfactory.service.GenericServiceImpl;

public class ProductionScheduleServiceImpl extends GenericServiceImpl<ProductionSchedule, ProductionScheduleDto,
  BusinessObjectBase, Integer> implements ProductionScheduleService {

  @Autowired
  private ProductionScheduleMySQLService productionScheduleMySQLService;

  @Override
  public GenericMySQLService<ProductionSchedule, Integer> genericDao() {
    return productionScheduleMySQLService;
  }

  @Override
  public Class<? extends ProductionSchedule> getClazz() {
    return ProductionSchedule.class;
  }

  @Override
  public Class<? extends ProductionScheduleDto> getDtoClazz() {
    return ProductionScheduleDto.class;
  }

  @Override
  public Class<? extends BusinessObjectBase> getBoClazz() {
    return BusinessObjectBase.class;
  }

}

<|next_version|>
package com.jmb.springfactory.service.productionschedule;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jmb.springfactory.dao.GenericMySQLService;
import com.jmb.springfactory.dao.productionschedule.ProductionScheduleMySQLService;
import com.jmb.springfactory.model.bo.BusinessObjectBase;
import com.jmb.springfactory.model.dto.ProductionScheduleDto;
import com.jmb.springfactory.model.entity.ProductionSchedule;
import com.jmb.springfactory.service.GenericServiceImpl;

@Service
public class ProductionScheduleServiceImpl extends GenericServiceImpl<ProductionSchedule, ProductionScheduleDto,
  BusinessObjectBase, Integer> implements ProductionScheduleService {

  @Autowired
  private ProductionScheduleMySQLService productionScheduleMySQLService;

  @Override
  public GenericMySQLService<ProductionSchedule, Integer> genericDao() {
    return productionScheduleMySQLService;
  }

  @Override
  public Class<? extends ProductionSchedule> getClazz() {
    return ProductionSchedule.class;
  }

  @Override
  public Class<? extends ProductionScheduleDto> getDtoClazz() {
    return ProductionScheduleDto.class;
  }

  @Override
  public Class<? extends BusinessObjectBase> getBoClazz() {
    return BusinessObjectBase.class;
  }

}


Allow conversion to Integer from constant.

--- src/main/java/mytown/protection/segment/getter/GetterConstant.java
+++ src/main/java/mytown/protection/segment/getter/GetterConstant.java
@@ -1,4 +1,6 @@
 package mytown.protection.segment.getter;
+
+import com.google.gson.internal.LazilyParsedNumber;

 public class GetterConstant extends Getter {

@@ -10,6 +12,9 @@

     @Override
     public Object invoke(Class<?> returnType, Object instance, Object... parameters) {
+        if (returnType.equals(Integer.class)) {
+            return (Object)((LazilyParsedNumber)constant).intValue();
+        }
         return constant;
     }
 }

<|original_code|>
package mytown.protection.segment.getter;

public class GetterConstant extends Getter {

    public final Object constant;

    public GetterConstant(Object constant) {
        this.constant = constant;
    }

    @Override
    public Object invoke(Class<?> returnType, Object instance, Object... parameters) {
        return constant;
    }
}

<|edits_diff|>
--- src/main/java/mytown/protection/segment/getter/GetterConstant.java
+++ src/main/java/mytown/protection/segment/getter/GetterConstant.java
@@ -1,4 +1,6 @@
 package mytown.protection.segment.getter;
+
+import com.google.gson.internal.LazilyParsedNumber;

 public class GetterConstant extends Getter {

<|current_version|>
package mytown.protection.segment.getter;

import com.google.gson.internal.LazilyParsedNumber;

public class GetterConstant extends Getter {

    public final Object constant;

    public GetterConstant(Object constant) {
        this.constant = constant;
    }

    @Override
    public Object invoke(Class<?> returnType, Object instance, Object... parameters) {
        return constant;
    }
}

<|next_version|>
package mytown.protection.segment.getter;

import com.google.gson.internal.LazilyParsedNumber;

public class GetterConstant extends Getter {

    public final Object constant;

    public GetterConstant(Object constant) {
        this.constant = constant;
    }

    @Override
    public Object invoke(Class<?> returnType, Object instance, Object... parameters) {
        if (returnType.equals(Integer.class)) {
            return (Object)((LazilyParsedNumber)constant).intValue();
        }
        return constant;
    }
}


Increase max message size for responses

Increase max message size for responses

--- metal-tools-service/src/main/java/io/parsingdata/metal/tools/service/WebSocketConfig.java
+++ metal-tools-service/src/main/java/io/parsingdata/metal/tools/service/WebSocketConfig.java
@@ -21,6 +21,7 @@
 import org.springframework.web.socket.config.annotation.AbstractWebSocketMessageBrokerConfigurer;
 import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
 import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
+import org.springframework.web.socket.config.annotation.WebSocketTransportRegistration;

 @Configuration
 @EnableWebSocketMessageBroker
@@ -36,4 +37,9 @@
 	public void registerStompEndpoints(final StompEndpointRegistry registry) {
 		registry.addEndpoint("/websocket").withSockJS();
 	}
+
+	@Override
+	public void configureWebSocketTransport(final WebSocketTransportRegistration registration) {
+		registration.setMessageSizeLimit(Integer.MAX_VALUE);
+	}
 }

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

package io.parsingdata.metal.tools.service;

import org.springframework.context.annotation.Configuration;
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
import org.springframework.web.socket.config.annotation.AbstractWebSocketMessageBrokerConfigurer;
import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;

@Configuration
@EnableWebSocketMessageBroker
public class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer {

	@Override
	public void configureMessageBroker(final MessageBrokerRegistry config) {
		config.enableSimpleBroker("/topic");
		config.setApplicationDestinationPrefixes("/metal");
	}

	@Override
	public void registerStompEndpoints(final StompEndpointRegistry registry) {
		registry.addEndpoint("/websocket").withSockJS();
	}
}
<|edits_diff|>
--- metal-tools-service/src/main/java/io/parsingdata/metal/tools/service/WebSocketConfig.java
+++ metal-tools-service/src/main/java/io/parsingdata/metal/tools/service/WebSocketConfig.java
@@ -21,6 +21,7 @@
 import org.springframework.web.socket.config.annotation.AbstractWebSocketMessageBrokerConfigurer;
 import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
 import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
+import org.springframework.web.socket.config.annotation.WebSocketTransportRegistration;

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

package io.parsingdata.metal.tools.service;

import org.springframework.context.annotation.Configuration;
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
import org.springframework.web.socket.config.annotation.AbstractWebSocketMessageBrokerConfigurer;
import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
import org.springframework.web.socket.config.annotation.WebSocketTransportRegistration;

@Configuration
@EnableWebSocketMessageBroker
public class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer {

	@Override
	public void configureMessageBroker(final MessageBrokerRegistry config) {
		config.enableSimpleBroker("/topic");
		config.setApplicationDestinationPrefixes("/metal");
	}

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

package io.parsingdata.metal.tools.service;

import org.springframework.context.annotation.Configuration;
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
import org.springframework.web.socket.config.annotation.AbstractWebSocketMessageBrokerConfigurer;
import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
import org.springframework.web.socket.config.annotation.WebSocketTransportRegistration;

@Configuration
@EnableWebSocketMessageBroker
public class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer {

	@Override
	public void configureMessageBroker(final MessageBrokerRegistry config) {
		config.enableSimpleBroker("/topic");
		config.setApplicationDestinationPrefixes("/metal");
	}

	@Override
	public void registerStompEndpoints(final StompEndpointRegistry registry) {
		registry.addEndpoint("/websocket").withSockJS();
	}

	@Override
	public void configureWebSocketTransport(final WebSocketTransportRegistration registration) {
		registration.setMessageSizeLimit(Integer.MAX_VALUE);
	}
}


Fix error when user is logged out.

Fix error when user is logged out.

--- app/src/main/java/com/pr0gramm/app/ui/fragments/WrittenCommentFragment.java
+++ app/src/main/java/com/pr0gramm/app/ui/fragments/WrittenCommentFragment.java
@@ -11,6 +11,8 @@

 import javax.inject.Inject;

+import rx.Observable;
+
 /**
  */
 public class WrittenCommentFragment extends MessageInboxFragment {
@@ -20,6 +22,9 @@
     @Override
     protected LoaderHelper<List<Message>> newLoaderHelper() {
         return LoaderHelper.of(() -> {
+            if (!userService.getName().isPresent())
+                return Observable.empty();
+
             String name = userService.getName().get();
             return getInboxService()
                     .getUserComments(name, EnumSet.allOf(ContentType.class))

<|original_code|>
package com.pr0gramm.app.ui.fragments;

import com.google.common.collect.Lists;
import com.pr0gramm.app.ActivityComponent;
import com.pr0gramm.app.api.pr0gramm.response.Message;
import com.pr0gramm.app.feed.ContentType;
import com.pr0gramm.app.services.UserService;

import java.util.EnumSet;
import java.util.List;

import javax.inject.Inject;

/**
 */
public class WrittenCommentFragment extends MessageInboxFragment {
    @Inject
    UserService userService;

    @Override
    protected LoaderHelper<List<Message>> newLoaderHelper() {
        return LoaderHelper.of(() -> {
            String name = userService.getName().get();
            return getInboxService()
                    .getUserComments(name, EnumSet.allOf(ContentType.class))
                    .map(userComments -> {
                        //noinspection CodeBlock2Expr
                        return Lists.transform(userComments.getComments(),
                                comment -> Message.of(userComments.getUser(), comment));
                    });
        });
    }

    @Override
    protected void injectComponent(ActivityComponent activityComponent) {
        activityComponent.inject(this);
    }
}

<|edits_diff|>
--- app/src/main/java/com/pr0gramm/app/ui/fragments/WrittenCommentFragment.java
+++ app/src/main/java/com/pr0gramm/app/ui/fragments/WrittenCommentFragment.java
@@ -10,6 +10,8 @@
 import java.util.List;

 import javax.inject.Inject;
+
+import rx.Observable;

 /**
  */
<|current_version|>
package com.pr0gramm.app.ui.fragments;

import com.google.common.collect.Lists;
import com.pr0gramm.app.ActivityComponent;
import com.pr0gramm.app.api.pr0gramm.response.Message;
import com.pr0gramm.app.feed.ContentType;
import com.pr0gramm.app.services.UserService;

import java.util.EnumSet;
import java.util.List;

import javax.inject.Inject;

import rx.Observable;

/**
 */
public class WrittenCommentFragment extends MessageInboxFragment {
    @Inject
    UserService userService;

    @Override
    protected LoaderHelper<List<Message>> newLoaderHelper() {
        return LoaderHelper.of(() -> {
            String name = userService.getName().get();
            return getInboxService()
                    .getUserComments(name, EnumSet.allOf(ContentType.class))
                    .map(userComments -> {
                        //noinspection CodeBlock2Expr
                        return Lists.transform(userComments.getComments(),
                                comment -> Message.of(userComments.getUser(), comment));
                    });
        });
    }

    @Override
    protected void injectComponent(ActivityComponent activityComponent) {
        activityComponent.inject(this);
    }
}

<|next_version|>
package com.pr0gramm.app.ui.fragments;

import com.google.common.collect.Lists;
import com.pr0gramm.app.ActivityComponent;
import com.pr0gramm.app.api.pr0gramm.response.Message;
import com.pr0gramm.app.feed.ContentType;
import com.pr0gramm.app.services.UserService;

import java.util.EnumSet;
import java.util.List;

import javax.inject.Inject;

import rx.Observable;

/**
 */
public class WrittenCommentFragment extends MessageInboxFragment {
    @Inject
    UserService userService;

    @Override
    protected LoaderHelper<List<Message>> newLoaderHelper() {
        return LoaderHelper.of(() -> {
            if (!userService.getName().isPresent())
                return Observable.empty();

            String name = userService.getName().get();
            return getInboxService()
                    .getUserComments(name, EnumSet.allOf(ContentType.class))
                    .map(userComments -> {
                        //noinspection CodeBlock2Expr
                        return Lists.transform(userComments.getComments(),
                                comment -> Message.of(userComments.getUser(), comment));
                    });
        });
    }

    @Override
    protected void injectComponent(ActivityComponent activityComponent) {
        activityComponent.inject(this);
    }
}


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

import org.gradle.api.Describable;
import org.gradle.api.Incubating;

/**
 * Captures user-provided information about a version control system.
 *
 * @since 4.4
 */
@Incubating
public interface VersionControlSpec extends Describable {
    /**
     * Returns a {@link String} identifier which will be unique to this version
     * control specification among other version control specifications.
     */
    String getUniqueId();

    /**
     * Returns the name of the repository.
     */
    String getRepoName();

    /**
     * Returns the relative path to the root of the build within the repository.
     */
    String getRootDir();

    /**
     * Sets the relative path to the root of the build within the repository.
     * <p>
     * Defaults to an empty relative path, meaning the root of the repository.
     */
    void setRootDir(String rootDir);
}

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

import org.gradle.api.Describable;
import org.gradle.api.Incubating;

/**
 * Captures user-provided information about a version control system.
 *
 * @since 4.4
 */
@Incubating
public interface VersionControlSpec extends Describable {
    /**
     * Returns a {@link String} identifier which will be unique to this version
     * control specification among other version control specifications.
     */
    String getUniqueId();

    /**
     * Returns the name of the repository.
     */
    String getRepoName();

    /**
     * Returns the relative path to the root of the build within the repository.
     *
     * @since 4.5
     */
    String getRootDir();

    /**
     * Sets the relative path to the root of the build within the repository.
     * <p>
     * Defaults to an empty relative path, meaning the root of the repository.
     *
     * @since 4.5
     */
    void setRootDir(String rootDir);
}

Annotate new methods with since 4.5

Annotate new methods with since 4.5

Part of gradle/gradle-native#191

--- subprojects/core-api/src/main/java/org/gradle/vcs/VersionControlSpec.java
+++ subprojects/core-api/src/main/java/org/gradle/vcs/VersionControlSpec.java
@@ -38,6 +38,8 @@

     /**
      * Returns the relative path to the root of the build within the repository.
+     *
+     * @since 4.5
      */
     String getRootDir();

@@ -45,6 +47,8 @@
      * Sets the relative path to the root of the build within the repository.
      * <p>
      * Defaults to an empty relative path, meaning the root of the repository.
+     *
+     * @since 4.5
      */
     void setRootDir(String rootDir);
 }

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

import org.gradle.api.Describable;
import org.gradle.api.Incubating;

/**
 * Captures user-provided information about a version control system.
 *
 * @since 4.4
 */
@Incubating
public interface VersionControlSpec extends Describable {
    /**
     * Returns a {@link String} identifier which will be unique to this version
     * control specification among other version control specifications.
     */
    String getUniqueId();

    /**
     * Returns the name of the repository.
     */
    String getRepoName();

    /**
     * Returns the relative path to the root of the build within the repository.
     *
     * @since 4.5
     */
    String getRootDir();

    /**
     * Sets the relative path to the root of the build within the repository.
     * <p>
     * Defaults to an empty relative path, meaning the root of the repository.
     */
    void setRootDir(String rootDir);
}

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

import org.gradle.api.Describable;
import org.gradle.api.Incubating;

/**
 * Captures user-provided information about a version control system.
 *
 * @since 4.4
 */
@Incubating
public interface VersionControlSpec extends Describable {
    /**
     * Returns a {@link String} identifier which will be unique to this version
     * control specification among other version control specifications.
     */
    String getUniqueId();

    /**
     * Returns the name of the repository.
     */
    String getRepoName();

    /**
     * Returns the relative path to the root of the build within the repository.
     */
    String getRootDir();

    /**
     * Sets the relative path to the root of the build within the repository.
     *

     * Defaults to an empty relative path, meaning the root of the repository.
     */
    void setRootDir(String rootDir);
}

<|edits_diff|>
--- subprojects/core-api/src/main/java/org/gradle/vcs/VersionControlSpec.java
+++ subprojects/core-api/src/main/java/org/gradle/vcs/VersionControlSpec.java
@@ -38,6 +38,8 @@

     /**
      * Returns the relative path to the root of the build within the repository.
+     *
+     * @since 4.5
      */
     String getRootDir();

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

import org.gradle.api.Describable;
import org.gradle.api.Incubating;

/**
 * Captures user-provided information about a version control system.
 *
 * @since 4.4
 */
@Incubating
public interface VersionControlSpec extends Describable {
    /**
     * Returns a {@link String} identifier which will be unique to this version
     * control specification among other version control specifications.
     */
    String getUniqueId();

    /**
     * Returns the name of the repository.
     */
    String getRepoName();

    /**
     * Returns the relative path to the root of the build within the repository.
     *
     * @since 4.5
     */
    String getRootDir();

    /**
     * Sets the relative path to the root of the build within the repository.
     *

     * Defaults to an empty relative path, meaning the root of the repository.
     */
    void setRootDir(String rootDir);
}

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

import org.gradle.api.Describable;
import org.gradle.api.Incubating;

/**
 * Captures user-provided information about a version control system.
 *
 * @since 4.4
 */
@Incubating
public interface VersionControlSpec extends Describable {
    /**
     * Returns a {@link String} identifier which will be unique to this version
     * control specification among other version control specifications.
     */
    String getUniqueId();

    /**
     * Returns the name of the repository.
     */
    String getRepoName();

    /**
     * Returns the relative path to the root of the build within the repository.
     *
     * @since 4.5
     */
    String getRootDir();

    /**
     * Sets the relative path to the root of the build within the repository.
     *

     * Defaults to an empty relative path, meaning the root of the repository.
     *
     * @since 4.5
     */
    void setRootDir(String rootDir);
}


Add check box validation to validations

Add check box validation to validations

--- blormlib/src/main/java/br/com/bloder/blormlib/validation/Validations.java
+++ blormlib/src/main/java/br/com/bloder/blormlib/validation/Validations.java
@@ -1,6 +1,7 @@
 package br.com.bloder.blormlib.validation;

+import br.com.bloder.blormlib.validation.validations.Checked;
 import br.com.bloder.blormlib.validation.validations.Filled;

 /**
@@ -9,4 +10,5 @@
 public class Validations {

   public static Validation filled = new Filled();
+  public static Validation checked = new Checked();
 }

<|original_code|>
package br.com.bloder.blormlib.validation;

import br.com.bloder.blormlib.validation.validations.Filled;

/**
 * Created by bloder on 05/06/16.
 */
public class Validations {

  public static Validation filled = new Filled();
}

<|edits_diff|>
--- blormlib/src/main/java/br/com/bloder/blormlib/validation/Validations.java
+++ blormlib/src/main/java/br/com/bloder/blormlib/validation/Validations.java
@@ -1,6 +1,7 @@
 package br.com.bloder.blormlib.validation;

+import br.com.bloder.blormlib.validation.validations.Checked;
 import br.com.bloder.blormlib.validation.validations.Filled;

 /**
<|current_version|>
package br.com.bloder.blormlib.validation;

import br.com.bloder.blormlib.validation.validations.Checked;
import br.com.bloder.blormlib.validation.validations.Filled;

/**
 * Created by bloder on 05/06/16.
 */
public class Validations {

  public static Validation filled = new Filled();
}

<|next_version|>
package br.com.bloder.blormlib.validation;

import br.com.bloder.blormlib.validation.validations.Checked;
import br.com.bloder.blormlib.validation.validations.Filled;

/**
 * Created by bloder on 05/06/16.
 */
public class Validations {

  public static Validation filled = new Filled();
  public static Validation checked = new Checked();
}


Add main Cell field to Neighbourhood

Add main Cell field to Neighbourhood

--- src/agent/Neighborhood.java
+++ src/agent/Neighborhood.java
@@ -1,4 +1,6 @@
 package agent;
+
+import board.Cell;

 public class Neighborhood {

@@ -6,9 +8,15 @@
 		TOP, TOPRIGHT, RIGHT, BOTTOMRIGHT, BOTTOM, BOTTOMLEFT, LEFT, TOPLEFT
 	}

+	private Cell first;
+
 	public int getTemperature() {
 		// TODO Auto-generated method stub
 		return 0;
 	}

+	public Cell getFirstCell() {
+		return first;
+	}
+
 }

<|original_code|>
package agent;

public class Neighborhood {

	public enum Direction {
		TOP, TOPRIGHT, RIGHT, BOTTOMRIGHT, BOTTOM, BOTTOMLEFT, LEFT, TOPLEFT
	}

	public int getTemperature() {
		// TODO Auto-generated method stub
		return 0;
	}

}

<|edits_diff|>
--- src/agent/Neighborhood.java
+++ src/agent/Neighborhood.java
@@ -1,4 +1,6 @@
 package agent;
+
+import board.Cell;

 public class Neighborhood {

@@ -6,6 +8,8 @@
 		TOP, TOPRIGHT, RIGHT, BOTTOMRIGHT, BOTTOM, BOTTOMLEFT, LEFT, TOPLEFT
 	}

+	private Cell first;
+
 	public int getTemperature() {
 		// TODO Auto-generated method stub
 		return 0;
<|current_version|>
package agent;

import board.Cell;

public class Neighborhood {

	public enum Direction {
		TOP, TOPRIGHT, RIGHT, BOTTOMRIGHT, BOTTOM, BOTTOMLEFT, LEFT, TOPLEFT
	}

	private Cell first;

	public int getTemperature() {
		// TODO Auto-generated method stub
		return 0;
	}

}

<|next_version|>
package agent;

import board.Cell;

public class Neighborhood {

	public enum Direction {
		TOP, TOPRIGHT, RIGHT, BOTTOMRIGHT, BOTTOM, BOTTOMLEFT, LEFT, TOPLEFT
	}

	private Cell first;

	public int getTemperature() {
		// TODO Auto-generated method stub
		return 0;
	}

	public Cell getFirstCell() {
		return first;
	}

}


Make learn more link clickable.

Make learn more link clickable.

--- SeriesGuide/src/com/battlelancer/seriesguide/ui/ConnectTraktFragment.java
+++ SeriesGuide/src/com/battlelancer/seriesguide/ui/ConnectTraktFragment.java
@@ -3,10 +3,12 @@

 import android.os.Bundle;
 import android.support.v4.app.FragmentTransaction;
+import android.text.method.LinkMovementMethod;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.view.ViewGroup;
+import android.widget.TextView;

 import com.actionbarsherlock.app.SherlockFragment;
 import com.uwetrottmann.seriesguide.R;
@@ -44,5 +46,9 @@
                 getActivity().finish();
             }
         });
+
+        // make learn more link clickable
+        ((TextView) getView().findViewById(R.id.textViewAbout))
+                .setMovementMethod(LinkMovementMethod.getInstance());
     }
 }

<|original_code|>

package com.battlelancer.seriesguide.ui;

import android.os.Bundle;
import android.support.v4.app.FragmentTransaction;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;

import com.actionbarsherlock.app.SherlockFragment;
import com.uwetrottmann.seriesguide.R;

/**
 * Tells about trakt and how it integrates with SeriesGuide, allows to proceed
 * to entering credentials step.
 */
public class ConnectTraktFragment extends SherlockFragment {

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return inflater.inflate(R.layout.connect_trakt_fragment, container, false);
    }

    @Override
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);

        // connect button
        getView().findViewById(R.id.buttonConnectTrakt).setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                ConnectTraktCredentialsFragment f = ConnectTraktCredentialsFragment.newInstance();
                FragmentTransaction ft = getFragmentManager().beginTransaction();
                ft.replace(R.id.root_container, f);
                ft.commit();
            }
        });

        // discard button
        getView().findViewById(R.id.buttonDiscard).setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                getActivity().finish();
            }
        });
    }
}

<|edits_diff|>
--- SeriesGuide/src/com/battlelancer/seriesguide/ui/ConnectTraktFragment.java
+++ SeriesGuide/src/com/battlelancer/seriesguide/ui/ConnectTraktFragment.java
@@ -3,10 +3,12 @@

 import android.os.Bundle;
 import android.support.v4.app.FragmentTransaction;
+import android.text.method.LinkMovementMethod;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.view.ViewGroup;
+import android.widget.TextView;

 import com.actionbarsherlock.app.SherlockFragment;
 import com.uwetrottmann.seriesguide.R;
<|current_version|>

package com.battlelancer.seriesguide.ui;

import android.os.Bundle;
import android.support.v4.app.FragmentTransaction;
import android.text.method.LinkMovementMethod;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.TextView;

import com.actionbarsherlock.app.SherlockFragment;
import com.uwetrottmann.seriesguide.R;

/**
 * Tells about trakt and how it integrates with SeriesGuide, allows to proceed
 * to entering credentials step.
 */
public class ConnectTraktFragment extends SherlockFragment {

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return inflater.inflate(R.layout.connect_trakt_fragment, container, false);
    }

    @Override
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);

        // connect button
        getView().findViewById(R.id.buttonConnectTrakt).setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                ConnectTraktCredentialsFragment f = ConnectTraktCredentialsFragment.newInstance();
                FragmentTransaction ft = getFragmentManager().beginTransaction();
                ft.replace(R.id.root_container, f);
                ft.commit();
            }
        });

        // discard button
        getView().findViewById(R.id.buttonDiscard).setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                getActivity().finish();
            }
        });
    }
}

<|next_version|>

package com.battlelancer.seriesguide.ui;

import android.os.Bundle;
import android.support.v4.app.FragmentTransaction;
import android.text.method.LinkMovementMethod;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.TextView;

import com.actionbarsherlock.app.SherlockFragment;
import com.uwetrottmann.seriesguide.R;

/**
 * Tells about trakt and how it integrates with SeriesGuide, allows to proceed
 * to entering credentials step.
 */
public class ConnectTraktFragment extends SherlockFragment {

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return inflater.inflate(R.layout.connect_trakt_fragment, container, false);
    }

    @Override
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);

        // connect button
        getView().findViewById(R.id.buttonConnectTrakt).setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                ConnectTraktCredentialsFragment f = ConnectTraktCredentialsFragment.newInstance();
                FragmentTransaction ft = getFragmentManager().beginTransaction();
                ft.replace(R.id.root_container, f);
                ft.commit();
            }
        });

        // discard button
        getView().findViewById(R.id.buttonDiscard).setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                getActivity().finish();
            }
        });

        // make learn more link clickable
        ((TextView) getView().findViewById(R.id.textViewAbout))
                .setMovementMethod(LinkMovementMethod.getInstance());
    }
}


Add util method for the bus enum

Add util method for the bus enum

--- src/main/java/info/u_team/u_team_core/util/registry/BusRegistry.java
+++ src/main/java/info/u_team/u_team_core/util/registry/BusRegistry.java
@@ -4,6 +4,7 @@

 import net.minecraftforge.common.MinecraftForge;
 import net.minecraftforge.eventbus.api.IEventBus;
+import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;
 import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;

 public class BusRegistry {
@@ -16,6 +17,10 @@
 		register(MinecraftForge.EVENT_BUS, consumer);
 	}

+	public static void registerForge(Bus bus, Consumer<IEventBus> consumer) {
+		register(bus.bus().get(), consumer);
+	}
+
 	public static void register(IEventBus bus, Consumer<IEventBus> consumer) {
 		consumer.accept(bus);
 	}

<|original_code|>
package info.u_team.u_team_core.util.registry;

import java.util.function.Consumer;

import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;

public class BusRegistry {

	public static void registerMod(Consumer<IEventBus> consumer) {
		register(FMLJavaModLoadingContext.get().getModEventBus(), consumer);
	}

	public static void registerForge(Consumer<IEventBus> consumer) {
		register(MinecraftForge.EVENT_BUS, consumer);
	}

	public static void register(IEventBus bus, Consumer<IEventBus> consumer) {
		consumer.accept(bus);
	}

}

<|edits_diff|>
--- src/main/java/info/u_team/u_team_core/util/registry/BusRegistry.java
+++ src/main/java/info/u_team/u_team_core/util/registry/BusRegistry.java
@@ -4,6 +4,7 @@

 import net.minecraftforge.common.MinecraftForge;
 import net.minecraftforge.eventbus.api.IEventBus;
+import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;
 import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;

 public class BusRegistry {
<|current_version|>
package info.u_team.u_team_core.util.registry;

import java.util.function.Consumer;

import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;

public class BusRegistry {

	public static void registerMod(Consumer<IEventBus> consumer) {
		register(FMLJavaModLoadingContext.get().getModEventBus(), consumer);
	}

	public static void registerForge(Consumer<IEventBus> consumer) {
		register(MinecraftForge.EVENT_BUS, consumer);
	}

	public static void register(IEventBus bus, Consumer<IEventBus> consumer) {
		consumer.accept(bus);
	}

}

<|next_version|>
package info.u_team.u_team_core.util.registry;

import java.util.function.Consumer;

import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;

public class BusRegistry {

	public static void registerMod(Consumer<IEventBus> consumer) {
		register(FMLJavaModLoadingContext.get().getModEventBus(), consumer);
	}

	public static void registerForge(Consumer<IEventBus> consumer) {
		register(MinecraftForge.EVENT_BUS, consumer);
	}

	public static void registerForge(Bus bus, Consumer<IEventBus> consumer) {
		register(bus.bus().get(), consumer);
	}

	public static void register(IEventBus bus, Consumer<IEventBus> consumer) {
		consumer.accept(bus);
	}

}


Add method for starting the process after deploying it

--- process-application/src/main/java/de/blogspot/wrongtracks/example/ExampleProcessApplication.java
+++ process-application/src/main/java/de/blogspot/wrongtracks/example/ExampleProcessApplication.java
@@ -1,6 +1,8 @@
 package de.blogspot.wrongtracks.example;

+import org.camunda.bpm.application.PostDeploy;
 import org.camunda.bpm.application.ProcessApplication;
+import org.camunda.bpm.engine.ProcessEngine;
 import org.camunda.bpm.extension.osgi.application.OSGiProcessApplication;
 import org.osgi.framework.BundleContext;
 import org.osgi.service.blueprint.container.BlueprintContainer;
@@ -11,4 +13,9 @@
   public ExampleProcessApplication(BundleContext ctx, BlueprintContainer blueprintContainer) {
     super(ctx.getBundle(), blueprintContainer);
   }
+
+  @PostDeploy
+  public void executeProcess(ProcessEngine processEngine){
+    processEngine.getRuntimeService().startProcessInstanceByKey("Process_1");
+  }
 }

<|original_code|>
package de.blogspot.wrongtracks.example;

import org.camunda.bpm.application.ProcessApplication;
import org.camunda.bpm.extension.osgi.application.OSGiProcessApplication;
import org.osgi.framework.BundleContext;
import org.osgi.service.blueprint.container.BlueprintContainer;

@ProcessApplication(name="MyProcessApplication")
public class ExampleProcessApplication extends OSGiProcessApplication {

  public ExampleProcessApplication(BundleContext ctx, BlueprintContainer blueprintContainer) {
    super(ctx.getBundle(), blueprintContainer);
  }
}

<|edits_diff|>
--- process-application/src/main/java/de/blogspot/wrongtracks/example/ExampleProcessApplication.java
+++ process-application/src/main/java/de/blogspot/wrongtracks/example/ExampleProcessApplication.java
@@ -1,6 +1,8 @@
 package de.blogspot.wrongtracks.example;

+import org.camunda.bpm.application.PostDeploy;
 import org.camunda.bpm.application.ProcessApplication;
+import org.camunda.bpm.engine.ProcessEngine;
 import org.camunda.bpm.extension.osgi.application.OSGiProcessApplication;
 import org.osgi.framework.BundleContext;
 import org.osgi.service.blueprint.container.BlueprintContainer;
<|current_version|>
package de.blogspot.wrongtracks.example;

import org.camunda.bpm.application.PostDeploy;
import org.camunda.bpm.application.ProcessApplication;
import org.camunda.bpm.engine.ProcessEngine;
import org.camunda.bpm.extension.osgi.application.OSGiProcessApplication;
import org.osgi.framework.BundleContext;
import org.osgi.service.blueprint.container.BlueprintContainer;

@ProcessApplication(name="MyProcessApplication")
public class ExampleProcessApplication extends OSGiProcessApplication {

  public ExampleProcessApplication(BundleContext ctx, BlueprintContainer blueprintContainer) {
    super(ctx.getBundle(), blueprintContainer);
  }
}

<|next_version|>
package de.blogspot.wrongtracks.example;

import org.camunda.bpm.application.PostDeploy;
import org.camunda.bpm.application.ProcessApplication;
import org.camunda.bpm.engine.ProcessEngine;
import org.camunda.bpm.extension.osgi.application.OSGiProcessApplication;
import org.osgi.framework.BundleContext;
import org.osgi.service.blueprint.container.BlueprintContainer;

@ProcessApplication(name="MyProcessApplication")
public class ExampleProcessApplication extends OSGiProcessApplication {

  public ExampleProcessApplication(BundleContext ctx, BlueprintContainer blueprintContainer) {
    super(ctx.getBundle(), blueprintContainer);
  }

  @PostDeploy
  public void executeProcess(ProcessEngine processEngine){
    processEngine.getRuntimeService().startProcessInstanceByKey("Process_1");
  }
}


:star: Add method to notify when a photo has been clicked

--- app/src/main/java/colector/co/com/collector/listeners/OnAddPhotoListener.java
+++ app/src/main/java/colector/co/com/collector/listeners/OnAddPhotoListener.java
@@ -1,5 +1,8 @@
 package colector.co.com.collector.listeners;

+import android.widget.LinearLayout;
+
+import colector.co.com.collector.views.PhotoItemView;
 import colector.co.com.collector.views.PhotoItemViewContainer;

 /**
@@ -10,4 +13,6 @@
 public interface OnAddPhotoListener {

     void onAddPhotoClicked(PhotoItemViewContainer container);
+
+    void onPhotoClicked(LinearLayout container, PhotoItemView view);
 }

<|original_code|>
package colector.co.com.collector.listeners;

import colector.co.com.collector.views.PhotoItemViewContainer;

/**
 * @author Gabriel Rodriguez
 * @version 1.0
 */

public interface OnAddPhotoListener {

    void onAddPhotoClicked(PhotoItemViewContainer container);
}

<|edits_diff|>
--- app/src/main/java/colector/co/com/collector/listeners/OnAddPhotoListener.java
+++ app/src/main/java/colector/co/com/collector/listeners/OnAddPhotoListener.java
@@ -1,5 +1,8 @@
 package colector.co.com.collector.listeners;

+import android.widget.LinearLayout;
+
+import colector.co.com.collector.views.PhotoItemView;
 import colector.co.com.collector.views.PhotoItemViewContainer;

 /**
<|current_version|>
package colector.co.com.collector.listeners;

import android.widget.LinearLayout;

import colector.co.com.collector.views.PhotoItemView;
import colector.co.com.collector.views.PhotoItemViewContainer;

/**
 * @author Gabriel Rodriguez
 * @version 1.0
 */

public interface OnAddPhotoListener {

    void onAddPhotoClicked(PhotoItemViewContainer container);
}

<|next_version|>
package colector.co.com.collector.listeners;

import android.widget.LinearLayout;

import colector.co.com.collector.views.PhotoItemView;
import colector.co.com.collector.views.PhotoItemViewContainer;

/**
 * @author Gabriel Rodriguez
 * @version 1.0
 */

public interface OnAddPhotoListener {

    void onAddPhotoClicked(PhotoItemViewContainer container);

    void onPhotoClicked(LinearLayout container, PhotoItemView view);
}


Set produced Logger as DefaultBean

Set produced Logger as DefaultBean

--- extensions/arc/runtime/src/main/java/io/quarkus/arc/runtime/LoggerProducer.java
+++ extensions/arc/runtime/src/main/java/io/quarkus/arc/runtime/LoggerProducer.java
@@ -12,6 +12,7 @@

 import org.jboss.logging.Logger;

+import io.quarkus.arc.DefaultBean;
 import io.quarkus.arc.log.LoggerName;

 @Singleton
@@ -21,6 +22,7 @@

     @Dependent
     @Produces
+    @DefaultBean
     Logger getSimpleLogger(InjectionPoint injectionPoint) {
         return loggers.computeIfAbsent(injectionPoint.getMember().getDeclaringClass().getName(), Logger::getLogger);
     }
@@ -28,6 +30,7 @@
     @LoggerName("")
     @Dependent
     @Produces
+    @DefaultBean
     Logger getLoggerWithCustomName(InjectionPoint injectionPoint) {
         String name = null;
         for (Annotation qualifier : injectionPoint.getQualifiers()) {

<|original_code|>
package io.quarkus.arc.runtime;

import java.lang.annotation.Annotation;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

import javax.annotation.PreDestroy;
import javax.enterprise.context.Dependent;
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.InjectionPoint;
import javax.inject.Singleton;

import org.jboss.logging.Logger;

import io.quarkus.arc.log.LoggerName;

@Singleton
public class LoggerProducer {

    private final ConcurrentMap<String, Logger> loggers = new ConcurrentHashMap<>();

    @Dependent
    @Produces
    Logger getSimpleLogger(InjectionPoint injectionPoint) {
        return loggers.computeIfAbsent(injectionPoint.getMember().getDeclaringClass().getName(), Logger::getLogger);
    }

    @LoggerName("")
    @Dependent
    @Produces
    Logger getLoggerWithCustomName(InjectionPoint injectionPoint) {
        String name = null;
        for (Annotation qualifier : injectionPoint.getQualifiers()) {
            if (qualifier.annotationType().equals(LoggerName.class)) {
                name = ((LoggerName) qualifier).value();
            }
        }
        if (name == null || name.isEmpty()) {
            throw new IllegalStateException("Unable to derive the logger name at " + injectionPoint);
        }
        return loggers.computeIfAbsent(name, Logger::getLogger);
    }

    @PreDestroy
    void destroy() {
        loggers.clear();
    }

}

<|edits_diff|>
--- extensions/arc/runtime/src/main/java/io/quarkus/arc/runtime/LoggerProducer.java
+++ extensions/arc/runtime/src/main/java/io/quarkus/arc/runtime/LoggerProducer.java
@@ -12,6 +12,7 @@

 import org.jboss.logging.Logger;

+import io.quarkus.arc.DefaultBean;
 import io.quarkus.arc.log.LoggerName;

 @Singleton
@@ -21,6 +22,7 @@

     @Dependent
     @Produces
+    @DefaultBean
     Logger getSimpleLogger(InjectionPoint injectionPoint) {
         return loggers.computeIfAbsent(injectionPoint.getMember().getDeclaringClass().getName(), Logger::getLogger);
     }
<|current_version|>
package io.quarkus.arc.runtime;

import java.lang.annotation.Annotation;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

import javax.annotation.PreDestroy;
import javax.enterprise.context.Dependent;
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.InjectionPoint;
import javax.inject.Singleton;

import org.jboss.logging.Logger;

import io.quarkus.arc.DefaultBean;
import io.quarkus.arc.log.LoggerName;

@Singleton
public class LoggerProducer {

    private final ConcurrentMap<String, Logger> loggers = new ConcurrentHashMap<>();

    @Dependent
    @Produces
    @DefaultBean
    Logger getSimpleLogger(InjectionPoint injectionPoint) {
        return loggers.computeIfAbsent(injectionPoint.getMember().getDeclaringClass().getName(), Logger::getLogger);
    }

    @LoggerName("")
    @Dependent
    @Produces
    Logger getLoggerWithCustomName(InjectionPoint injectionPoint) {
        String name = null;
        for (Annotation qualifier : injectionPoint.getQualifiers()) {
            if (qualifier.annotationType().equals(LoggerName.class)) {
                name = ((LoggerName) qualifier).value();
            }
        }
        if (name == null || name.isEmpty()) {
            throw new IllegalStateException("Unable to derive the logger name at " + injectionPoint);
        }
        return loggers.computeIfAbsent(name, Logger::getLogger);
    }

    @PreDestroy
    void destroy() {
        loggers.clear();
    }

}

<|next_version|>
package io.quarkus.arc.runtime;

import java.lang.annotation.Annotation;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

import javax.annotation.PreDestroy;
import javax.enterprise.context.Dependent;
import javax.enterprise.inject.Produces;
import javax.enterprise.inject.spi.InjectionPoint;
import javax.inject.Singleton;

import org.jboss.logging.Logger;

import io.quarkus.arc.DefaultBean;
import io.quarkus.arc.log.LoggerName;

@Singleton
public class LoggerProducer {

    private final ConcurrentMap<String, Logger> loggers = new ConcurrentHashMap<>();

    @Dependent
    @Produces
    @DefaultBean
    Logger getSimpleLogger(InjectionPoint injectionPoint) {
        return loggers.computeIfAbsent(injectionPoint.getMember().getDeclaringClass().getName(), Logger::getLogger);
    }

    @LoggerName("")
    @Dependent
    @Produces
    @DefaultBean
    Logger getLoggerWithCustomName(InjectionPoint injectionPoint) {
        String name = null;
        for (Annotation qualifier : injectionPoint.getQualifiers()) {
            if (qualifier.annotationType().equals(LoggerName.class)) {
                name = ((LoggerName) qualifier).value();
            }
        }
        if (name == null || name.isEmpty()) {
            throw new IllegalStateException("Unable to derive the logger name at " + injectionPoint);
        }
        return loggers.computeIfAbsent(name, Logger::getLogger);
    }

    @PreDestroy
    void destroy() {
        loggers.clear();
    }

}


Fix node to set sentAuth whenever the object was generated

--- thunder-core/src/main/java/network/thunder/core/communication/Node.java
+++ thunder-core/src/main/java/network/thunder/core/communication/Node.java
@@ -13,12 +13,17 @@
 	public boolean processAuthentication (AuthenticationObject authentication) {
 		//TODO: Check authentication based on the supplied pubkey

+		isAuth = true;
+		if (sentAuth) {
+			authFinished = true;
+		}
 		return true;
 	}

 	public AuthenticationObject getAuthenticationObject () {
 		//TODO: Produce a proper authentication object..

+		sentAuth = true;
 		return new AuthenticationObject();
 	}

<|original_code|>
package network.thunder.core.communication;

import network.thunder.core.communication.objects.subobjects.AuthenticationObject;

public class Node {
	private byte[] pubkey;
	private boolean isAuth;
	private boolean sentAuth;
	private boolean authFinished;
	private boolean isReady;
	private boolean hasOpenChannel;

	public boolean processAuthentication (AuthenticationObject authentication) {
		//TODO: Check authentication based on the supplied pubkey

		return true;
	}

	public AuthenticationObject getAuthenticationObject () {
		//TODO: Produce a proper authentication object..

		return new AuthenticationObject();
	}

	public boolean hasSentAuth () {
		return sentAuth;
	}

	public boolean isAuth () {
		return isAuth;
	}

	public boolean allowsAuth () {
		return !isAuth;
	}

	public void finishAuth () {
		authFinished = true;
	}

	public boolean isAuthFinished () {
		return authFinished;
	}
}

<|edits_diff|>
--- thunder-core/src/main/java/network/thunder/core/communication/Node.java
+++ thunder-core/src/main/java/network/thunder/core/communication/Node.java
@@ -13,6 +13,10 @@
 	public boolean processAuthentication (AuthenticationObject authentication) {
 		//TODO: Check authentication based on the supplied pubkey

+		isAuth = true;
+		if (sentAuth) {
+			authFinished = true;
+		}
 		return true;
 	}

<|current_version|>
package network.thunder.core.communication;

import network.thunder.core.communication.objects.subobjects.AuthenticationObject;

public class Node {
	private byte[] pubkey;
	private boolean isAuth;
	private boolean sentAuth;
	private boolean authFinished;
	private boolean isReady;
	private boolean hasOpenChannel;

	public boolean processAuthentication (AuthenticationObject authentication) {
		//TODO: Check authentication based on the supplied pubkey

		isAuth = true;
		if (sentAuth) {
			authFinished = true;
		}
		return true;
	}

	public AuthenticationObject getAuthenticationObject () {
		//TODO: Produce a proper authentication object..

		return new AuthenticationObject();
	}

	public boolean hasSentAuth () {
		return sentAuth;
	}

	public boolean isAuth () {
		return isAuth;
	}

	public boolean allowsAuth () {
		return !isAuth;
	}

	public void finishAuth () {
		authFinished = true;
	}

	public boolean isAuthFinished () {
		return authFinished;
	}
}

<|next_version|>
package network.thunder.core.communication;

import network.thunder.core.communication.objects.subobjects.AuthenticationObject;

public class Node {
	private byte[] pubkey;
	private boolean isAuth;
	private boolean sentAuth;
	private boolean authFinished;
	private boolean isReady;
	private boolean hasOpenChannel;

	public boolean processAuthentication (AuthenticationObject authentication) {
		//TODO: Check authentication based on the supplied pubkey

		isAuth = true;
		if (sentAuth) {
			authFinished = true;
		}
		return true;
	}

	public AuthenticationObject getAuthenticationObject () {
		//TODO: Produce a proper authentication object..

		sentAuth = true;
		return new AuthenticationObject();
	}

	public boolean hasSentAuth () {
		return sentAuth;
	}

	public boolean isAuth () {
		return isAuth;
	}

	public boolean allowsAuth () {
		return !isAuth;
	}

	public void finishAuth () {
		authFinished = true;
	}

	public boolean isAuthFinished () {
		return authFinished;
	}
}


Add log message to library syncer

Add log message to library syncer

--- app/src/main/java/de/philipphager/disclosure/feature/sync/api/usecases/SyncLibraries.java
+++ app/src/main/java/de/philipphager/disclosure/feature/sync/api/usecases/SyncLibraries.java
@@ -6,6 +6,7 @@
 import java.util.List;
 import javax.inject.Inject;
 import rx.Observable;
+import timber.log.Timber;

 public class SyncLibraries {
   private final DisclosureApi disclosureApi;
@@ -22,6 +23,7 @@
         .first()
         .flatMap(lastUpdated -> new Paginator<Library>() {
           @Override protected Observable<List<Library>> queryPage(int page, int limit) {
+            Timber.d("fetch libraries from api, page: %d, limit: %d", page, limit);
             return disclosureApi.allLibraries(lastUpdated, page, limit);
           }
         }.join())

<|original_code|>
package de.philipphager.disclosure.feature.sync.api.usecases;

import de.philipphager.disclosure.api.DisclosureApi;
import de.philipphager.disclosure.database.library.model.Library;
import de.philipphager.disclosure.service.LibraryService;
import java.util.List;
import javax.inject.Inject;
import rx.Observable;

public class SyncLibraries {
  private final DisclosureApi disclosureApi;
  private final LibraryService libraryService;

  @Inject public SyncLibraries(DisclosureApi disclosureApi,
      LibraryService libraryService) {
    this.disclosureApi = disclosureApi;
    this.libraryService = libraryService;
  }

  public Observable<List<Library>> run() {
    return libraryService.lastUpdated()
        .first()
        .flatMap(lastUpdated -> new Paginator<Library>() {
          @Override protected Observable<List<Library>> queryPage(int page, int limit) {
            return disclosureApi.allLibraries(lastUpdated, page, limit);
          }
        }.join())
        .doOnNext(libraryService::insertOrUpdate);
  }
}

<|edits_diff|>
--- app/src/main/java/de/philipphager/disclosure/feature/sync/api/usecases/SyncLibraries.java
+++ app/src/main/java/de/philipphager/disclosure/feature/sync/api/usecases/SyncLibraries.java
@@ -6,6 +6,7 @@
 import java.util.List;
 import javax.inject.Inject;
 import rx.Observable;
+import timber.log.Timber;

 public class SyncLibraries {
   private final DisclosureApi disclosureApi;
<|current_version|>
package de.philipphager.disclosure.feature.sync.api.usecases;

import de.philipphager.disclosure.api.DisclosureApi;
import de.philipphager.disclosure.database.library.model.Library;
import de.philipphager.disclosure.service.LibraryService;
import java.util.List;
import javax.inject.Inject;
import rx.Observable;
import timber.log.Timber;

public class SyncLibraries {
  private final DisclosureApi disclosureApi;
  private final LibraryService libraryService;

  @Inject public SyncLibraries(DisclosureApi disclosureApi,
      LibraryService libraryService) {
    this.disclosureApi = disclosureApi;
    this.libraryService = libraryService;
  }

  public Observable<List<Library>> run() {
    return libraryService.lastUpdated()
        .first()
        .flatMap(lastUpdated -> new Paginator<Library>() {
          @Override protected Observable<List<Library>> queryPage(int page, int limit) {
            return disclosureApi.allLibraries(lastUpdated, page, limit);
          }
        }.join())
        .doOnNext(libraryService::insertOrUpdate);
  }
}

<|next_version|>
package de.philipphager.disclosure.feature.sync.api.usecases;

import de.philipphager.disclosure.api.DisclosureApi;
import de.philipphager.disclosure.database.library.model.Library;
import de.philipphager.disclosure.service.LibraryService;
import java.util.List;
import javax.inject.Inject;
import rx.Observable;
import timber.log.Timber;

public class SyncLibraries {
  private final DisclosureApi disclosureApi;
  private final LibraryService libraryService;

  @Inject public SyncLibraries(DisclosureApi disclosureApi,
      LibraryService libraryService) {
    this.disclosureApi = disclosureApi;
    this.libraryService = libraryService;
  }

  public Observable<List<Library>> run() {
    return libraryService.lastUpdated()
        .first()
        .flatMap(lastUpdated -> new Paginator<Library>() {
          @Override protected Observable<List<Library>> queryPage(int page, int limit) {
            Timber.d("fetch libraries from api, page: %d, limit: %d", page, limit);
            return disclosureApi.allLibraries(lastUpdated, page, limit);
          }
        }.join())
        .doOnNext(libraryService::insertOrUpdate);
  }
}


Add number validation in validations class

--- blormlib/src/main/java/br/com/bloder/blormlib/validation/Validations.java
+++ blormlib/src/main/java/br/com/bloder/blormlib/validation/Validations.java
@@ -4,6 +4,7 @@
 import br.com.bloder.blormlib.validation.validations.Checked;
 import br.com.bloder.blormlib.validation.validations.Email;
 import br.com.bloder.blormlib.validation.validations.Filled;
+import br.com.bloder.blormlib.validation.validations.Number;

 /**
  * Created by bloder on 05/06/16.
@@ -13,4 +14,5 @@
   public static Validation filled = new Filled();
   public static Validation checked = new Checked();
   public static Validation email = new Email();
+  public static Validation number = new Number();
 }

<|original_code|>
package br.com.bloder.blormlib.validation;

import br.com.bloder.blormlib.validation.validations.Checked;
import br.com.bloder.blormlib.validation.validations.Email;
import br.com.bloder.blormlib.validation.validations.Filled;

/**
 * Created by bloder on 05/06/16.
 */
public class Validations {

  public static Validation filled = new Filled();
  public static Validation checked = new Checked();
  public static Validation email = new Email();
}

<|edits_diff|>
--- blormlib/src/main/java/br/com/bloder/blormlib/validation/Validations.java
+++ blormlib/src/main/java/br/com/bloder/blormlib/validation/Validations.java
@@ -4,6 +4,7 @@
 import br.com.bloder.blormlib.validation.validations.Checked;
 import br.com.bloder.blormlib.validation.validations.Email;
 import br.com.bloder.blormlib.validation.validations.Filled;
+import br.com.bloder.blormlib.validation.validations.Number;

 /**
  * Created by bloder on 05/06/16.
<|current_version|>
package br.com.bloder.blormlib.validation;

import br.com.bloder.blormlib.validation.validations.Checked;
import br.com.bloder.blormlib.validation.validations.Email;
import br.com.bloder.blormlib.validation.validations.Filled;
import br.com.bloder.blormlib.validation.validations.Number;

/**
 * Created by bloder on 05/06/16.
 */
public class Validations {

  public static Validation filled = new Filled();
  public static Validation checked = new Checked();
  public static Validation email = new Email();
}

<|next_version|>
package br.com.bloder.blormlib.validation;

import br.com.bloder.blormlib.validation.validations.Checked;
import br.com.bloder.blormlib.validation.validations.Email;
import br.com.bloder.blormlib.validation.validations.Filled;
import br.com.bloder.blormlib.validation.validations.Number;

/**
 * Created by bloder on 05/06/16.
 */
public class Validations {

  public static Validation filled = new Filled();
  public static Validation checked = new Checked();
  public static Validation email = new Email();
  public static Validation number = new Number();
}


Add Group description and size to excerpt projection

Change-Id: Ie5cebac22f4caff7324d01a0dd3fe5cd7b5a4bc7

--- f-tep-api/src/main/java/com/cgi/eoss/ftep/api/projections/ShortGroup.java
+++ f-tep-api/src/main/java/com/cgi/eoss/ftep/api/projections/ShortGroup.java
@@ -1,6 +1,7 @@
 package com.cgi.eoss.ftep.api.projections;

 import com.cgi.eoss.ftep.model.Group;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.data.rest.core.config.Projection;

 /**
@@ -9,5 +10,8 @@
 @Projection(name = "shortGroup", types = {Group.class})
 public interface ShortGroup extends EmbeddedId {
     String getName();
+    String getDescription();
     ShortUser getOwner();
+    @Value("#{target.members.size()}")
+    Integer getSize();
 }

<|original_code|>
package com.cgi.eoss.ftep.api.projections;

import com.cgi.eoss.ftep.model.Group;
import org.springframework.data.rest.core.config.Projection;

/**
 *
Abbreviated representation of a User entity, for embedding in REST responses.

 */
@Projection(name = "shortGroup", types = {Group.class})
public interface ShortGroup extends EmbeddedId {
    String getName();
    ShortUser getOwner();
}

<|edits_diff|>
--- f-tep-api/src/main/java/com/cgi/eoss/ftep/api/projections/ShortGroup.java
+++ f-tep-api/src/main/java/com/cgi/eoss/ftep/api/projections/ShortGroup.java
@@ -1,6 +1,7 @@
 package com.cgi.eoss.ftep.api.projections;

 import com.cgi.eoss.ftep.model.Group;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.data.rest.core.config.Projection;

 /**
@@ -9,5 +10,6 @@
 @Projection(name = "shortGroup", types = {Group.class})
 public interface ShortGroup extends EmbeddedId {
     String getName();
+    String getDescription();
     ShortUser getOwner();
 }
<|current_version|>
package com.cgi.eoss.ftep.api.projections;

import com.cgi.eoss.ftep.model.Group;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.rest.core.config.Projection;

/**
 *
Abbreviated representation of a User entity, for embedding in REST responses.

 */
@Projection(name = "shortGroup", types = {Group.class})
public interface ShortGroup extends EmbeddedId {
    String getName();
    String getDescription();
    ShortUser getOwner();
}

<|next_version|>
package com.cgi.eoss.ftep.api.projections;

import com.cgi.eoss.ftep.model.Group;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.rest.core.config.Projection;

/**
 *
Abbreviated representation of a User entity, for embedding in REST responses.

 */
@Projection(name = "shortGroup", types = {Group.class})
public interface ShortGroup extends EmbeddedId {
    String getName();
    String getDescription();
    ShortUser getOwner();
    @Value("#{target.members.size()}")
    Integer getSize();
}


Fix unpredictable number of stars in rating question type bug

--- src/org/adaptlab/chpir/android/survey/QuestionFragments/RatingQuestionFragment.java
+++ src/org/adaptlab/chpir/android/survey/QuestionFragments/RatingQuestionFragment.java
@@ -3,6 +3,7 @@
 import org.adaptlab.chpir.android.survey.QuestionFragment;

 import android.view.ViewGroup;
+import android.widget.LinearLayout;
 import android.widget.RatingBar;

 public class RatingQuestionFragment extends QuestionFragment  {
@@ -14,6 +15,9 @@
     protected void createQuestionComponent(ViewGroup questionComponent) {
         mRatingBar = new RatingBar(getActivity());
         mRatingBar.setNumStars(NUM_STARS);
+        mRatingBar.setLayoutParams(new ViewGroup.LayoutParams(
+                LinearLayout.LayoutParams.WRAP_CONTENT,
+                LinearLayout.LayoutParams.WRAP_CONTENT));
         mRatingBar.setOnRatingBarChangeListener(new RatingBar.OnRatingBarChangeListener() {
             @Override
             public void onRatingChanged(RatingBar ratingBar, float rating,

<|original_code|>
package org.adaptlab.chpir.android.survey.QuestionFragments;

import org.adaptlab.chpir.android.survey.QuestionFragment;

import android.view.ViewGroup;
import android.widget.RatingBar;

public class RatingQuestionFragment extends QuestionFragment  {
    private final static int NUM_STARS = 5;
    private float mRating;
    private RatingBar mRatingBar;

    @Override
    protected void createQuestionComponent(ViewGroup questionComponent) {
        mRatingBar = new RatingBar(getActivity());
        mRatingBar.setNumStars(NUM_STARS);
        mRatingBar.setOnRatingBarChangeListener(new RatingBar.OnRatingBarChangeListener() {
            @Override
            public void onRatingChanged(RatingBar ratingBar, float rating,
                    boolean fromUser) {
                mRating = rating;
                saveResponse();
            }
        });
        questionComponent.addView(mRatingBar);
    }

    @Override
    protected String serialize() {
        return String.valueOf(mRating);
    }

    @Override
    protected void deserialize(String responseText) {
        if (!responseText.equals("")) {
            mRating = Float.parseFloat(responseText);
            mRatingBar.setRating(mRating);
        }
    }
}

<|edits_diff|>
--- src/org/adaptlab/chpir/android/survey/QuestionFragments/RatingQuestionFragment.java
+++ src/org/adaptlab/chpir/android/survey/QuestionFragments/RatingQuestionFragment.java
@@ -3,6 +3,7 @@
 import org.adaptlab.chpir.android.survey.QuestionFragment;

 import android.view.ViewGroup;
+import android.widget.LinearLayout;
 import android.widget.RatingBar;

 public class RatingQuestionFragment extends QuestionFragment  {
<|current_version|>
package org.adaptlab.chpir.android.survey.QuestionFragments;

import org.adaptlab.chpir.android.survey.QuestionFragment;

import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.RatingBar;

public class RatingQuestionFragment extends QuestionFragment  {
    private final static int NUM_STARS = 5;
    private float mRating;
    private RatingBar mRatingBar;

    @Override
    protected void createQuestionComponent(ViewGroup questionComponent) {
        mRatingBar = new RatingBar(getActivity());
        mRatingBar.setNumStars(NUM_STARS);
        mRatingBar.setOnRatingBarChangeListener(new RatingBar.OnRatingBarChangeListener() {
            @Override
            public void onRatingChanged(RatingBar ratingBar, float rating,
                    boolean fromUser) {
                mRating = rating;
                saveResponse();
            }
        });
        questionComponent.addView(mRatingBar);
    }

    @Override
    protected String serialize() {
        return String.valueOf(mRating);
    }

    @Override
    protected void deserialize(String responseText) {
        if (!responseText.equals("")) {
            mRating = Float.parseFloat(responseText);
            mRatingBar.setRating(mRating);
        }
    }
}

<|next_version|>
package org.adaptlab.chpir.android.survey.QuestionFragments;

import org.adaptlab.chpir.android.survey.QuestionFragment;

import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.RatingBar;

public class RatingQuestionFragment extends QuestionFragment  {
    private final static int NUM_STARS = 5;
    private float mRating;
    private RatingBar mRatingBar;

    @Override
    protected void createQuestionComponent(ViewGroup questionComponent) {
        mRatingBar = new RatingBar(getActivity());
        mRatingBar.setNumStars(NUM_STARS);
        mRatingBar.setLayoutParams(new ViewGroup.LayoutParams(
                LinearLayout.LayoutParams.WRAP_CONTENT,
                LinearLayout.LayoutParams.WRAP_CONTENT));
        mRatingBar.setOnRatingBarChangeListener(new RatingBar.OnRatingBarChangeListener() {
            @Override
            public void onRatingChanged(RatingBar ratingBar, float rating,
                    boolean fromUser) {
                mRating = rating;
                saveResponse();
            }
        });
        questionComponent.addView(mRatingBar);
    }

    @Override
    protected String serialize() {
        return String.valueOf(mRating);
    }

    @Override
    protected void deserialize(String responseText) {
        if (!responseText.equals("")) {
            mRating = Float.parseFloat(responseText);
            mRatingBar.setRating(mRating);
        }
    }
}


Add extension mappings to server.

Add extension mappings to server.

--- services/orbweaver-cc/src/test/java/org/example/activemq/orbweaver/cc/ControlCenterServer.java
+++ services/orbweaver-cc/src/test/java/org/example/activemq/orbweaver/cc/ControlCenterServer.java
@@ -1,6 +1,9 @@
 /**
  */
 package org.example.activemq.orbweaver.cc;
+
+import java.util.HashMap;
+import java.util.Map;

 import javax.ws.rs.ext.RuntimeDelegate;

@@ -18,8 +21,13 @@
         ControlCenterApp application = new ControlCenterApp();
         RuntimeDelegate delegate = RuntimeDelegate.getInstance();

+        Map<Object, Object> mappings = new HashMap<Object, Object>();
+        mappings.put("json", "application/json");
+        mappings.put("xml", "application/xml");
+
         JAXRSServerFactoryBean bean = delegate.createEndpoint(application, JAXRSServerFactoryBean.class);
         bean.setAddress("http://localhost:9000/services" + bean.getAddress());
+        bean.setExtensionMappings(mappings);
         server = bean.create();
         server.start();
     }

<|original_code|>
/**
 */
package org.example.activemq.orbweaver.cc;

import javax.ws.rs.ext.RuntimeDelegate;

import org.apache.cxf.endpoint.Server;
import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;

/**
 * JAX-RS ControlCenter root resource
 */
public class ControlCenterServer {
    private static Server server;

    protected ControlCenterServer() throws Exception {
        ControlCenterApp application = new ControlCenterApp();
        RuntimeDelegate delegate = RuntimeDelegate.getInstance();

        JAXRSServerFactoryBean bean = delegate.createEndpoint(application, JAXRSServerFactoryBean.class);
        bean.setAddress("http://localhost:9000/services" + bean.getAddress());
        server = bean.create();
        server.start();
    }

    public static void main(String args[]) throws Exception {
        new ControlCenterServer();
        System.out.println("Server ready...");

        Thread.sleep(125 * 60 * 1000);
        System.out.println("Server exiting");
        server.stop();
        server.destroy();
        System.exit(0);
    }
}

<|edits_diff|>
--- services/orbweaver-cc/src/test/java/org/example/activemq/orbweaver/cc/ControlCenterServer.java
+++ services/orbweaver-cc/src/test/java/org/example/activemq/orbweaver/cc/ControlCenterServer.java
@@ -1,6 +1,9 @@
 /**
  */
 package org.example.activemq.orbweaver.cc;
+
+import java.util.HashMap;
+import java.util.Map;

 import javax.ws.rs.ext.RuntimeDelegate;

@@ -18,6 +21,10 @@
         ControlCenterApp application = new ControlCenterApp();
         RuntimeDelegate delegate = RuntimeDelegate.getInstance();

+        Map<Object, Object> mappings = new HashMap<Object, Object>();
+        mappings.put("json", "application/json");
+        mappings.put("xml", "application/xml");
+
         JAXRSServerFactoryBean bean = delegate.createEndpoint(application, JAXRSServerFactoryBean.class);
         bean.setAddress("http://localhost:9000/services" + bean.getAddress());
         server = bean.create();
<|current_version|>
/**
 */
package org.example.activemq.orbweaver.cc;

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

import javax.ws.rs.ext.RuntimeDelegate;

import org.apache.cxf.endpoint.Server;
import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;

/**
 * JAX-RS ControlCenter root resource
 */
public class ControlCenterServer {
    private static Server server;

    protected ControlCenterServer() throws Exception {
        ControlCenterApp application = new ControlCenterApp();
        RuntimeDelegate delegate = RuntimeDelegate.getInstance();

        Map<Object, Object> mappings = new HashMap<Object, Object>();
        mappings.put("json", "application/json");
        mappings.put("xml", "application/xml");

        JAXRSServerFactoryBean bean = delegate.createEndpoint(application, JAXRSServerFactoryBean.class);
        bean.setAddress("http://localhost:9000/services" + bean.getAddress());
        server = bean.create();
        server.start();
    }

    public static void main(String args[]) throws Exception {
        new ControlCenterServer();
        System.out.println("Server ready...");

        Thread.sleep(125 * 60 * 1000);
        System.out.println("Server exiting");
        server.stop();
        server.destroy();
        System.exit(0);
    }
}

<|next_version|>
/**
 */
package org.example.activemq.orbweaver.cc;

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

import javax.ws.rs.ext.RuntimeDelegate;

import org.apache.cxf.endpoint.Server;
import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;

/**
 * JAX-RS ControlCenter root resource
 */
public class ControlCenterServer {
    private static Server server;

    protected ControlCenterServer() throws Exception {
        ControlCenterApp application = new ControlCenterApp();
        RuntimeDelegate delegate = RuntimeDelegate.getInstance();

        Map<Object, Object> mappings = new HashMap<Object, Object>();
        mappings.put("json", "application/json");
        mappings.put("xml", "application/xml");

        JAXRSServerFactoryBean bean = delegate.createEndpoint(application, JAXRSServerFactoryBean.class);
        bean.setAddress("http://localhost:9000/services" + bean.getAddress());
        bean.setExtensionMappings(mappings);
        server = bean.create();
        server.start();
    }

    public static void main(String args[]) throws Exception {
        new ControlCenterServer();
        System.out.println("Server ready...");

        Thread.sleep(125 * 60 * 1000);
        System.out.println("Server exiting");
        server.stop();
        server.destroy();
        System.exit(0);
    }
}


XWIKI-10405: Implement a new Platform Mail Sender API
* Add missing @Unstable annotation

--- xwiki-platform-core/xwiki-platform-mail/xwiki-platform-mail-send/xwiki-platform-mail-send-api/src/main/java/org/xwiki/mail/MailResultListener.java
+++ xwiki-platform-core/xwiki-platform-mail/xwiki-platform-mail-send/xwiki-platform-mail-send-api/src/main/java/org/xwiki/mail/MailResultListener.java
@@ -21,12 +21,15 @@

 import javax.mail.internet.MimeMessage;

+import org.xwiki.stability.Unstable;
+
 /**
  * Allows listening to Mail sending results.
  *
  * @version $Id$
  * @since 6.1M2
  */
+@Unstable
 public interface MailResultListener
 {
     /**

<|original_code|>
/*
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
package org.xwiki.mail;

import javax.mail.internet.MimeMessage;

/**
 * Allows listening to Mail sending results.
 *
 * @version $Id$
 * @since 6.1M2
 */
public interface MailResultListener
{
    /**
     * Called when the mail is sent successfully.
     *
     * @param message the message sent
     */
    void onSuccess(MimeMessage message);

    /**
     * Called when the mail has failed to be sent.
     *
     * @param message the message that was tried to be sent
     * @param t the exception explaining why the message couldn't be sent
     */
    void onError(MimeMessage message, Throwable t);
}

<|edits_diff|>
--- xwiki-platform-core/xwiki-platform-mail/xwiki-platform-mail-send/xwiki-platform-mail-send-api/src/main/java/org/xwiki/mail/MailResultListener.java
+++ xwiki-platform-core/xwiki-platform-mail/xwiki-platform-mail-send/xwiki-platform-mail-send-api/src/main/java/org/xwiki/mail/MailResultListener.java
@@ -20,6 +20,8 @@
 package org.xwiki.mail;

 import javax.mail.internet.MimeMessage;
+
+import org.xwiki.stability.Unstable;

 /**
  * Allows listening to Mail sending results.
<|current_version|>
/*
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
package org.xwiki.mail;

import javax.mail.internet.MimeMessage;

import org.xwiki.stability.Unstable;

/**
 * Allows listening to Mail sending results.
 *
 * @version $Id$
 * @since 6.1M2
 */
public interface MailResultListener
{
    /**
     * Called when the mail is sent successfully.
     *
     * @param message the message sent
     */
    void onSuccess(MimeMessage message);

    /**
     * Called when the mail has failed to be sent.
     *
     * @param message the message that was tried to be sent
     * @param t the exception explaining why the message couldn't be sent
     */
    void onError(MimeMessage message, Throwable t);
}

<|next_version|>
/*
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
package org.xwiki.mail;

import javax.mail.internet.MimeMessage;

import org.xwiki.stability.Unstable;

/**
 * Allows listening to Mail sending results.
 *
 * @version $Id$
 * @since 6.1M2
 */
@Unstable
public interface MailResultListener
{
    /**
     * Called when the mail is sent successfully.
     *
     * @param message the message sent
     */
    void onSuccess(MimeMessage message);

    /**
     * Called when the mail has failed to be sent.
     *
     * @param message the message that was tried to be sent
     * @param t the exception explaining why the message couldn't be sent
     */
    void onError(MimeMessage message, Throwable t);
}


Set default conversation time to 30 minutes

--- oxJsfUtil/src/main/java/org/gluu/jsf2/service/ConversationService.java
+++ oxJsfUtil/src/main/java/org/gluu/jsf2/service/ConversationService.java
@@ -13,6 +13,8 @@
 public class ConversationService implements Serializable {

 	private static final long serialVersionUID = -7432197667275722872L;
+
+	private static final long CONVERSATION_TIMEOUT = 30 * 60 * 60 * 1000L;

 	@Inject
 	private Conversation conversation;
@@ -20,6 +22,7 @@
 	public void initConversation() {
 		if (!FacesContext.getCurrentInstance().isPostback() && conversation.isTransient()) {
 			conversation.begin();
+			conversation.setTimeout(CONVERSATION_TIMEOUT);
 		}
 	}

<|original_code|>
package org.gluu.jsf2.service;

import java.io.Serializable;

import javax.enterprise.context.Conversation;
import javax.enterprise.context.ConversationScoped;
import javax.faces.context.FacesContext;
import javax.inject.Inject;
import javax.inject.Named;

@Named
@ConversationScoped
public class ConversationService implements Serializable {

	private static final long serialVersionUID = -7432197667275722872L;

	@Inject
	private Conversation conversation;

	public void initConversation() {
		if (!FacesContext.getCurrentInstance().isPostback() && conversation.isTransient()) {
			conversation.begin();
		}
	}

	public void endConversation() {
		if (!conversation.isTransient()) {
			conversation.end();
		}
	}

}
<|edits_diff|>
--- oxJsfUtil/src/main/java/org/gluu/jsf2/service/ConversationService.java
+++ oxJsfUtil/src/main/java/org/gluu/jsf2/service/ConversationService.java
@@ -13,6 +13,8 @@
 public class ConversationService implements Serializable {

 	private static final long serialVersionUID = -7432197667275722872L;
+
+	private static final long CONVERSATION_TIMEOUT = 30 * 60 * 60 * 1000L;

 	@Inject
 	private Conversation conversation;
<|current_version|>
package org.gluu.jsf2.service;

import java.io.Serializable;

import javax.enterprise.context.Conversation;
import javax.enterprise.context.ConversationScoped;
import javax.faces.context.FacesContext;
import javax.inject.Inject;
import javax.inject.Named;

@Named
@ConversationScoped
public class ConversationService implements Serializable {

	private static final long serialVersionUID = -7432197667275722872L;

	private static final long CONVERSATION_TIMEOUT = 30 * 60 * 60 * 1000L;

	@Inject
	private Conversation conversation;

	public void initConversation() {
		if (!FacesContext.getCurrentInstance().isPostback() && conversation.isTransient()) {
			conversation.begin();
		}
	}

	public void endConversation() {
		if (!conversation.isTransient()) {
			conversation.end();
		}
	}

}
<|next_version|>
package org.gluu.jsf2.service;

import java.io.Serializable;

import javax.enterprise.context.Conversation;
import javax.enterprise.context.ConversationScoped;
import javax.faces.context.FacesContext;
import javax.inject.Inject;
import javax.inject.Named;

@Named
@ConversationScoped
public class ConversationService implements Serializable {

	private static final long serialVersionUID = -7432197667275722872L;

	private static final long CONVERSATION_TIMEOUT = 30 * 60 * 60 * 1000L;

	@Inject
	private Conversation conversation;

	public void initConversation() {
		if (!FacesContext.getCurrentInstance().isPostback() && conversation.isTransient()) {
			conversation.begin();
			conversation.setTimeout(CONVERSATION_TIMEOUT);
		}
	}

	public void endConversation() {
		if (!conversation.isTransient()) {
			conversation.end();
		}
	}

}


Add javadoc to period dao.

Add javadoc to period dao.

--- src/main/java/edu/northwestern/bioinformatics/studycalendar/dao/PeriodDao.java
+++ src/main/java/edu/northwestern/bioinformatics/studycalendar/dao/PeriodDao.java
@@ -13,10 +13,20 @@
         return Period.class;
     }

+    /**
+    * To manage caching of a period, this method will remove the period specified from hibernate's first level cache
+    *
+    * @param  period the period to remove from the cache
+    */
     public void evict(Period period) {
         getHibernateTemplate().evict(period);
     }

+    /**
+    * Deletes a period
+    *
+    * @param  period the period to delete
+    */
     public void delete(Period period) {
         getHibernateTemplate().delete(period);
     }

<|original_code|>
package edu.northwestern.bioinformatics.studycalendar.dao;

import edu.northwestern.bioinformatics.studycalendar.domain.Period;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author Rhett Sutphin
 */
@Transactional(readOnly = true)
public class PeriodDao extends StudyCalendarMutableDomainObjectDao<Period> {
    @Override
    public Class<Period> domainClass() {
        return Period.class;
    }

    public void evict(Period period) {
        getHibernateTemplate().evict(period);
    }

    public void delete(Period period) {
        getHibernateTemplate().delete(period);
    }
}

<|edits_diff|>
--- src/main/java/edu/northwestern/bioinformatics/studycalendar/dao/PeriodDao.java
+++ src/main/java/edu/northwestern/bioinformatics/studycalendar/dao/PeriodDao.java
@@ -13,6 +13,11 @@
         return Period.class;
     }

+    /**
+    * To manage caching of a period, this method will remove the period specified from hibernate's first level cache
+    *
+    * @param  period the period to remove from the cache
+    */
     public void evict(Period period) {
         getHibernateTemplate().evict(period);
     }
<|current_version|>
package edu.northwestern.bioinformatics.studycalendar.dao;

import edu.northwestern.bioinformatics.studycalendar.domain.Period;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author Rhett Sutphin
 */
@Transactional(readOnly = true)
public class PeriodDao extends StudyCalendarMutableDomainObjectDao<Period> {
    @Override
    public Class<Period> domainClass() {
        return Period.class;
    }

    /**
    * To manage caching of a period, this method will remove the period specified from hibernate's first level cache
    *
    * @param  period the period to remove from the cache
    */
    public void evict(Period period) {
        getHibernateTemplate().evict(period);
    }

    public void delete(Period period) {
        getHibernateTemplate().delete(period);
    }
}

<|next_version|>
package edu.northwestern.bioinformatics.studycalendar.dao;

import edu.northwestern.bioinformatics.studycalendar.domain.Period;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author Rhett Sutphin
 */
@Transactional(readOnly = true)
public class PeriodDao extends StudyCalendarMutableDomainObjectDao<Period> {
    @Override
    public Class<Period> domainClass() {
        return Period.class;
    }

    /**
    * To manage caching of a period, this method will remove the period specified from hibernate's first level cache
    *
    * @param  period the period to remove from the cache
    */
    public void evict(Period period) {
        getHibernateTemplate().evict(period);
    }

    /**
    * Deletes a period
    *
    * @param  period the period to delete
    */
    public void delete(Period period) {
        getHibernateTemplate().delete(period);
    }
}


Add missing @EnableDiscoveryClient in standalone server sample

--- cereebro-sample-server-eureka-client/src/main/java/io/cereebro/sample/server/CereebroSampleServerEurekaClientApplication.java
+++ cereebro-sample-server-eureka-client/src/main/java/io/cereebro/sample/server/CereebroSampleServerEurekaClientApplication.java
@@ -17,11 +17,13 @@

 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

 import io.cereebro.server.EnableCereebroServer;

 @SpringBootApplication
 @EnableCereebroServer
+@EnableDiscoveryClient
 public class CereebroSampleServerEurekaClientApplication {

     public static void main(String[] args) {

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

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

import io.cereebro.server.EnableCereebroServer;

@SpringBootApplication
@EnableCereebroServer
public class CereebroSampleServerEurekaClientApplication {

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

}

<|edits_diff|>
--- cereebro-sample-server-eureka-client/src/main/java/io/cereebro/sample/server/CereebroSampleServerEurekaClientApplication.java
+++ cereebro-sample-server-eureka-client/src/main/java/io/cereebro/sample/server/CereebroSampleServerEurekaClientApplication.java
@@ -17,6 +17,7 @@

 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

 import io.cereebro.server.EnableCereebroServer;

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

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

import io.cereebro.server.EnableCereebroServer;

@SpringBootApplication
@EnableCereebroServer
public class CereebroSampleServerEurekaClientApplication {

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

}

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

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

import io.cereebro.server.EnableCereebroServer;

@SpringBootApplication
@EnableCereebroServer
@EnableDiscoveryClient
public class CereebroSampleServerEurekaClientApplication {

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

}