package com.akamai.edgegrid.signer.apachehttpclient;

import com.akamai.edgegrid.signer.ClientCredential;
import com.akamai.edgegrid.signer.ClientCredentialProvider;
import com.akamai.edgegrid.signer.exceptions.NoMatchingCredentialException;

import org.apache.http.HttpException;
import org.apache.http.HttpHost;
import org.apache.http.HttpRequest;
import org.apache.http.conn.routing.HttpRoute;
import org.apache.http.impl.conn.DefaultRoutePlanner;
import org.apache.http.impl.conn.DefaultSchemePortResolver;
import org.apache.http.protocol.HttpContext;

public class ApacheHttpClientEdgeGridRoutePlanner extends DefaultRoutePlanner {

    private final ApacheHttpClientEdgeGridRequestSigner binding;

    public ApacheHttpClientEdgeGridRoutePlanner(ClientCredential clientCredential) {
        super(DefaultSchemePortResolver.INSTANCE);
        this.binding = new ApacheHttpClientEdgeGridRequestSigner(clientCredential);
    }

    public ApacheHttpClientEdgeGridRoutePlanner(ClientCredentialProvider clientCredentialProvider) {
        super(DefaultSchemePortResolver.INSTANCE);
        this.binding = new ApacheHttpClientEdgeGridRequestSigner(clientCredentialProvider);
    }

    @Override
    public HttpRoute determineRoute(HttpHost host, HttpRequest request, HttpContext context) throws HttpException {
        try {
            ClientCredential clientCredential = binding.getClientCredentialProvider().getClientCredential(binding.map(request));
            HttpHost target = HttpHost.create("https://" + clientCredential.getHost());
            return super.determineRoute(target, request, context);
        } catch (NoMatchingCredentialException e) {
            throw new RuntimeException(e);
        }
    }
}

package com.akamai.edgegrid.signer.apachehttpclient;

import com.akamai.edgegrid.signer.ClientCredential;
import com.akamai.edgegrid.signer.ClientCredentialProvider;
import com.akamai.edgegrid.signer.exceptions.NoMatchingCredentialException;

import org.apache.http.HttpException;
import org.apache.http.HttpHost;
import org.apache.http.HttpRequest;
import org.apache.http.conn.routing.HttpRoute;
import org.apache.http.impl.conn.DefaultRoutePlanner;
import org.apache.http.impl.conn.DefaultSchemePortResolver;
import org.apache.http.protocol.HttpContext;

public class ApacheHttpClientEdgeGridRoutePlanner extends DefaultRoutePlanner {

    private final ApacheHttpClientEdgeGridRequestSigner binding;

    public ApacheHttpClientEdgeGridRoutePlanner(ClientCredential clientCredential) {
        super(DefaultSchemePortResolver.INSTANCE);
        this.binding = new ApacheHttpClientEdgeGridRequestSigner(clientCredential);
    }

    public ApacheHttpClientEdgeGridRoutePlanner(ClientCredentialProvider clientCredentialProvider) {
        super(DefaultSchemePortResolver.INSTANCE);
        this.binding = new ApacheHttpClientEdgeGridRequestSigner(clientCredentialProvider);
    }

    @Override
    public HttpRoute determineRoute(HttpHost host, HttpRequest request, HttpContext context) throws HttpException {
        try {
            ClientCredential clientCredential = binding.getClientCredentialProvider().getClientCredential(binding.map(request));
            HttpHost target = new HttpHost(clientCredential.getHost(), -1, "https");
            return super.determineRoute(target, request, context);
        } catch (NoMatchingCredentialException e) {
            throw new RuntimeException(e);
        }
    }
}

Support older apache httpclient libs


package org.tigris.subversion.subclipse.tools.usage.tracker.internal;

import org.eclipse.osgi.util.NLS;

public class TrackerMessages extends NLS {
	private static final String BUNDLE_NAME = "org.tigris.subversion.subclipse.tools.usage.tracker.messages"; //$NON-NLS-1$
	public static String Tracker_Synchronous;
	public static String Tracker_Asynchronous;
	public static String Tracker_Error;

	static {
		// initialize resource bundle
		NLS.initializeMessages(BUNDLE_NAME, TrackerMessages.class);
	}

	private TrackerMessages() {
	}
}

package org.tigris.subversion.subclipse.tools.usage.tracker.internal;

import org.eclipse.osgi.util.NLS;

public class TrackerMessages extends NLS {
	private static final String BUNDLE_NAME = "org.tigris.subversion.subclipse.tools.usage.tracker.internal.messages"; //$NON-NLS-1$
	public static String Tracker_Synchronous;
	public static String Tracker_Asynchronous;
	public static String Tracker_Error;

	static {
		// initialize resource bundle
		NLS.initializeMessages(BUNDLE_NAME, TrackerMessages.class);
	}

	private TrackerMessages() {
	}
}

Fix incorrect bundle name in messages class.


package net.minecraftforge.event.entity.player;

import net.minecraft.src.Block;
import net.minecraft.src.Entity;
import net.minecraft.src.EntityPlayer;
import net.minecraftforge.event.Cancelable;
import net.minecraftforge.event.entity.living.LivingEvent;

public class PlayerEvent extends LivingEvent
{
    public final EntityPlayer entityPlayer;
    public PlayerEvent(EntityPlayer player)
    {
        super(player);
        entityPlayer = player;
    }

    public static class HarvestCheck extends PlayerEvent
    {
        public final Block block;
        public boolean success;

        public HarvestCheck(EntityPlayer player, Block block, boolean success)
        {
            super(player);
            this.block = block;
            this.success = success;
        }
    }

    @Cancelable
    public static class BreakSpeed extends PlayerEvent
    {
        public final Block block;
        public final int metadata;
        public final float originalSpeed;
        public float newSpeed = 0.0f;

        public BreakSpeed(EntityPlayer player, Block block, int metadata, float original)
        {
            super(player);
            this.block = block;
            this.metadata = metadata;
            this.originalSpeed = original;
        }
    }
}

package net.minecraftforge.event.entity.player;

import net.minecraft.src.Block;
import net.minecraft.src.Entity;
import net.minecraft.src.EntityPlayer;
import net.minecraftforge.event.Cancelable;
import net.minecraftforge.event.entity.living.LivingEvent;

public class PlayerEvent extends LivingEvent
{
    public final EntityPlayer entityPlayer;
    public PlayerEvent(EntityPlayer player)
    {
        super(player);
        entityPlayer = player;
    }

    public static class HarvestCheck extends PlayerEvent
    {
        public final Block block;
        public boolean success;

        public HarvestCheck(EntityPlayer player, Block block, boolean success)
        {
            super(player);
            this.block = block;
            this.success = success;
        }
    }

    @Cancelable
    public static class BreakSpeed extends PlayerEvent
    {
        public final Block block;
        public final int metadata;
        public final float originalSpeed;
        public float newSpeed = 0.0f;

        public BreakSpeed(EntityPlayer player, Block block, int metadata, float original)
        {
            super(player);
            this.block = block;
            this.metadata = metadata;
            this.originalSpeed = original;
            this.newSpeed = original;
        }
    }
}

Fix bug in last commit that caused block to not break.


package com.gentics.mesh.util;

import com.gentics.mesh.core.rest.MeshEvent;
import com.gentics.mesh.etc.config.MeshOptions;
import com.gentics.mesh.event.MeshEventSender;
import com.gentics.mesh.parameter.ParameterProviderContext;
import io.reactivex.Completable;

import javax.inject.Inject;
import javax.inject.Singleton;

@Singleton
public class SearchWaitUtil {

	@Inject
	public MeshEventSender meshEventSender;

	@Inject
	public MeshOptions options;

	@Inject
	public SearchWaitUtil() {
	}

	public boolean delayRequested(ParameterProviderContext ppc) {
		return ppc.getSearchParameters().isWait()
				.orElseGet(options.getSearchOptions()::isWaitForIdle);
	}

	public Completable awaitSync(ParameterProviderContext ppc) {
		if (!delayRequested(ppc)) {
			return Completable.complete();
		}

		return meshEventSender.isSearchIdle().flatMapCompletable(isIdle -> {
			if (isIdle) {
				return Completable.complete();
			}
			meshEventSender.flushSearch();
			return meshEventSender.waitForEvent(MeshEvent.SEARCH_IDLE);
		}).andThen(meshEventSender.refreshSearch());
	}
}

package com.gentics.mesh.util;

import com.gentics.mesh.core.rest.MeshEvent;
import com.gentics.mesh.etc.config.MeshOptions;
import com.gentics.mesh.etc.config.search.ElasticSearchOptions;
import com.gentics.mesh.event.MeshEventSender;
import com.gentics.mesh.parameter.ParameterProviderContext;
import io.reactivex.Completable;

import javax.inject.Inject;
import javax.inject.Singleton;

@Singleton
public class SearchWaitUtil {

	@Inject
	public MeshEventSender meshEventSender;

	@Inject
	public MeshOptions options;

	@Inject
	public SearchWaitUtil() {
	}

	public boolean delayRequested(ParameterProviderContext ppc) {
		return ppc.getSearchParameters().isWait()
				.orElseGet(options.getSearchOptions()::isWaitForIdle);
	}

	public Completable awaitSync(ParameterProviderContext ppc) {
		if (!delayRequested(ppc)) {
			return Completable.complete();
		}

		// We don't have to wait if no search is configured
		ElasticSearchOptions searchOptions = options.getSearchOptions();
		if (searchOptions == null || searchOptions.getUrl() == null) {
			return Completable.complete();
		}

		return meshEventSender.isSearchIdle().flatMapCompletable(isIdle -> {
			if (isIdle) {
				return Completable.complete();
			}
			meshEventSender.flushSearch();
			return meshEventSender.waitForEvent(MeshEvent.SEARCH_IDLE);
		}).andThen(meshEventSender.refreshSearch());
	}
}

Fix GraphQl if search is not configured


/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.wpi.first.wpilibj.templates.commands;

import edu.wpi.first.wpilibj.buttons.JoystickButton;
import edu.wpi.first.wpilibj.camera.AxisCamera;

/**
 *
 * @author profplump
 */
public class ReadSetCamera extends CommandBase {

    public ReadSetCamera() {
        requires(mainCamera);
    }

    // Called just before this Command runs the first time
    protected void initialize() {
    }

    // Called repeatedly when this Command is scheduled to run
    protected void execute() {
        AxisCamera camera = mainCamera.getCamera();
        System.err.println("Brightness: " + camera.getBrightness());
        System.err.println("ColorLevel: " + camera.getColorLevel());
        System.err.println("Compression: " + camera.getCompression());
        System.err.println("ExposureControl: " + camera.getExposureControl());
        System.err.println("ExposurePriority: " + camera.getExposurePriority());
        System.err.println("MaxFPS: " + camera.getMaxFPS());
        System.err.println("Resolution: " + camera.getResolution());
        System.err.println("Rotation: " + camera.getRotation());
        System.err.println("WhiteBalance: " + camera.getWhiteBalance());
    }

    // Make this return true when this Command no longer needs to run execute()
    protected boolean isFinished() {
        return false;
    }

    // Called once after isFinished returns true
    protected void end() {
    }
}

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.wpi.first.wpilibj.templates.commands;

import edu.wpi.first.wpilibj.buttons.JoystickButton;
import edu.wpi.first.wpilibj.camera.AxisCamera;

/**
 *
 * @author profplump
 */
public class ReadSetCamera extends CommandBase {

    public ReadSetCamera() {
        requires(mainCamera);
    }

    // Called just before this Command runs the first time
    protected void initialize() {
    }

    // Called repeatedly when this Command is scheduled to run
    protected void execute() {
        AxisCamera camera = mainCamera.getCamera();
        System.err.println("Brightness: " + camera.getBrightness());
        System.err.println("ColorLevel: " + camera.getColorLevel());
        System.err.println("Compression: " + camera.getCompression());
        System.err.println("ExposureControl: " + camera.getExposureControl());
        System.err.println("ExposurePriority: " + camera.getExposurePriority());
        System.err.println("MaxFPS: " + camera.getMaxFPS());
        System.err.println("Resolution: " + camera.getResolution());
        System.err.println("Rotation: " + camera.getRotation());
        System.err.println("WhiteBalance: " + camera.getWhiteBalance());
    }

    // Make this return true when this Command no longer needs to run execute()
    protected boolean isFinished() {
        this.execute();
        return true;
    }

    // Called once after isFinished returns true
    protected void end() {
    }
}

Exit quickly to avoid side effects


package org.innovateuk.ifs.application.overview.viewmodel;

import org.innovateuk.ifs.application.viewmodel.AssignButtonsViewModel;

import java.util.Optional;

/**
 * View model for each row with a link in the application overview page.
 */
public class ApplicationOverviewRowViewModel {

    private final String title;
    private final String url;
    private final boolean complete;
    private final AssignButtonsViewModel assignButtonsViewModel;
    private final boolean showStatus;

    public ApplicationOverviewRowViewModel(String title, String url, boolean complete, AssignButtonsViewModel assignButtonsViewModel, boolean showStatus) {
        this.title = title;
        this.url = url;
        this.complete = complete;
        this.assignButtonsViewModel = assignButtonsViewModel;
        this.showStatus = showStatus;
    }

    public ApplicationOverviewRowViewModel(String title, String url, boolean complete, boolean showStatus) {
        this.title = title;
        this.url = url;
        this.complete = complete;
        this.assignButtonsViewModel = null;
        this.showStatus = showStatus;
    }

    public String getTitle() {
        return title;
    }

    public String getUrl() {
        return url;
    }

    public boolean isComplete() {
        return complete;
    }

    public Optional<AssignButtonsViewModel> getAssignButtonsViewModel() {
        return Optional.ofNullable(assignButtonsViewModel);
    }

    public boolean isAssignable() {
        return getAssignButtonsViewModel().isPresent();
    }

    public boolean isShowStatus() {
        return showStatus;
    }
}

package org.innovateuk.ifs.application.overview.viewmodel;

import org.innovateuk.ifs.application.viewmodel.AssignButtonsViewModel;

import java.util.Optional;

/**
 * View model for each row with a link in the application overview page.
 */
public class ApplicationOverviewRowViewModel {

    private final String title;
    private final String url;
    private final boolean complete;
    private final AssignButtonsViewModel assignButtonsViewModel;
    private final boolean showStatus;

    public ApplicationOverviewRowViewModel(String title, String url, boolean complete, AssignButtonsViewModel assignButtonsViewModel, boolean showStatus) {
        this.title = title;
        this.url = url;
        this.complete = complete;
        this.assignButtonsViewModel = assignButtonsViewModel;
        this.showStatus = showStatus;
    }

    public ApplicationOverviewRowViewModel(String title, String url, boolean complete, boolean showStatus) {
        this.title = title;
        this.url = url;
        this.complete = complete;
        this.assignButtonsViewModel = null;
        this.showStatus = showStatus;
    }

    public String getTitle() {
        return title;
    }

    public String getUrl() {
        return url;
    }

    public boolean isComplete() {
        return complete;
    }

    public Optional<AssignButtonsViewModel> getAssignButtonsViewModel() {
        return Optional.ofNullable(assignButtonsViewModel);
    }

    public boolean isAssignable() {

        return getAssignButtonsViewModel().isPresent() &&
                getAssignButtonsViewModel().get().getAssignableApplicants().size() > 1;
    }

    public boolean isShowStatus() {
        return showStatus;
    }
}

Hide button for single applicant


package p;

import java.util.function.*;
import java.util.Iterator;
import java.util.stream.Collector;

public class Stream<T> {

    public Iterator<T> iterator() {
        return null;
    }

    // public boolean allMatch(Predicate<? super T> predicate) {
    // throw null;
    // }

    // public <R> R collect(Supplier<R> supplier, BiConsumer<R, ? super T>
    // accumulator, BiConsumer<R, R> combiner) {
    // throw null;
    // }

    // public <R, A> R collect(Collector<? super T, A, R> collector) {
    // throw null;
    // }

    // public static <T> Stream<T> concat(Stream<? extends T> a, Stream<? extends T>
    // b) {
    // throw null;
    // }

    public Stream<T> distinct() {
        throw null;
    }
}

package p;

import java.util.function.*;
import java.util.Iterator;
import java.util.stream.Collector;

public class Stream<T> {

    public Iterator<T> iterator() {
        return null;
    }

    public boolean allMatch(Predicate<? super T> predicate) {
        throw null;
    }

    public <R> R collect(Supplier<R> supplier, BiConsumer<R, ? super T> accumulator, BiConsumer<R, R> combiner) {
        throw null;
    }

    // Collector is not a functional interface, so this is not supported
    // public <R, A> R collect(Collector<? super T, A, R> collector) {
    // throw null;
    // }

    // public static <T> Stream<T> concat(Stream<? extends T> a, Stream<? extends T>
    // b) {
    // throw null;
    // }

    public Stream<T> distinct() {
        throw null;
    }
}

Add stream example methods using wildcards.


package com.fenixinfotech.grizzly.framework.playpen;

import com.fenixinfotech.web.common.FrameworkServerBase;
import org.glassfish.grizzly.http.server.HttpHandler;
import org.glassfish.grizzly.http.server.HttpServer;
import org.glassfish.grizzly.http.server.Request;
import org.glassfish.grizzly.http.server.Response;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

public class GrizzlyFrameworkServer extends FrameworkServerBase
{
    private static final Logger logger = LoggerFactory.getLogger(GrizzlyFrameworkServer.class);

    public void runServer() throws IOException {
        HttpServer httpServer = HttpServer.createSimpleServer();
        httpServer.getServerConfiguration().addHttpHandler(new HttpHandler() {
                                                               public void service(Request requestm, Response response) throws Exception {
                                                                   final SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.UK);
                                                                   final String date = format.format(new Date(System.currentTimeMillis()));
                                                                   response.setContentType("text/plain");
                                                                   response.setContentLength(date.length());
                                                                   response.getWriter().write(date);
                                                               }
                                                           },
                "/hello"
        );

        httpServer.start();
    }
}

package com.fenixinfotech.grizzly.framework.playpen;

import com.fenixinfotech.web.common.FrameworkServerBase;
import org.glassfish.grizzly.http.server.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

public class GrizzlyFrameworkServer extends FrameworkServerBase
{
    private static final Logger logger = LoggerFactory.getLogger(GrizzlyFrameworkServer.class);

    public void runServer() throws IOException
    {
        runServer(defaultPort);
    }

    public void runServer(int port) throws IOException
    {
        logger.info("starting grizzly framework server on port {}", port);

        final NetworkListener listener = new NetworkListener("Grizzly", "localhost", port);
        listener.setSecure(false);

        HttpServer httpServer = new HttpServer();
        httpServer.addListener(listener);

        final ServerConfiguration serverConfiguration = httpServer.getServerConfiguration();
        serverConfiguration.addHttpHandler(new HttpHandler()
                                           {
                                               public void service(Request requestm, Response response) throws Exception
                                               {
                                                   final SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.UK);
                                                   final String date = format.format(new Date(System.currentTimeMillis()));
                                                   response.setContentType("text/plain");
                                                   response.setContentLength(date.length());
                                                   response.getWriter().write(date);
                                               }
                                           }
        );

        httpServer.start();

        logger.info("bootstrap of grizzly framework server complete, running on http://localhost:{}", port);
    }
}

Add ability to override the port grizzly server starts on.


package com.satispay.protocore.dh;

import com.satispay.protocore.dh.beans.*;
import retrofit2.http.*;
import rx.Observable;

/**
 * This interface describes the API exposed for the DH network requests.
 */
public interface DH {
    /**
     * This method performs the first step of the DH process
     *
     * @param exchangeRequestBean the bean containing all the information needed to complete the first dh step {@link ExchangeRequestBean}
     * @return an Observable that emit the network response
     */
    @POST("v2/dh/exchange")
    Observable<ExchangeResponseBean> exchange(@Body ExchangeRequestBean exchangeRequestBean);

    @POST("v2/dh/challenge")
    Observable<DHEncryptedResponseBean> challenge(@Body DHEncryptedRequestBean DHEncryptedRequestBean);

    @POST("v2/dh/verify")
    Observable<DHEncryptedResponseBean> tokenVerification(@Body DHEncryptedRequestBean tokenVerificationRequestBean);

    /********************
     * token generation *
     ********************/

    @GET("v2/device_token_recoveries/shops")
    Observable<TokenRecoveryResponseBean> tokenRecoveryShopList(@Query("code") String code, @Query("starting_after") String startingAfter);

    @POST("v2/device_token_recoveries/shops/{id}/device_tokens")
    Observable<Void> tokenRecoverySend(@Path("id") String id, @Body SendTokenRequestBean sendTokenRequestBean);
}

package com.satispay.protocore.dh;

import com.satispay.protocore.dh.beans.*;
import retrofit2.http.*;
import rx.Observable;

/**
 * This interface describes the API exposed for the DH network requests.
 */
public interface DH {
    /**
     * This method performs the first step of the DH process
     *
     * @param exchangeRequestBean the bean containing all the information needed to complete the first dh step {@link ExchangeRequestBean}
     * @return an Observable that emit the network response
     */
    @POST("v2/dh/exchange")
    Observable<ExchangeResponseBean> exchange(@Body ExchangeRequestBean exchangeRequestBean);

    @POST("v2/dh/challenge")
    Observable<DHEncryptedResponseBean> challenge(@Body DHEncryptedRequestBean DHEncryptedRequestBean);

    @POST("v2/dh/verify")
    Observable<DHEncryptedResponseBean> tokenVerification(@Body DHEncryptedRequestBean tokenVerificationRequestBean);

    /********************
     * token generation *
     ********************/

    @GET("v2/device_token_recoveries/shops")
    Observable<TokenRecoveryResponseBean> tokenRecoveryShopList(@Query("code") String code, @Query("name") String name, @Query("starting_after") String startingAfter);

    @POST("v2/device_token_recoveries/shops/{id}/device_tokens")
    Observable<Void> tokenRecoverySend(@Path("id") String id, @Body SendTokenRequestBean sendTokenRequestBean);
}

Add "name" for filter shop tokens


package io.quarkus.container.image.openshift.deployment;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Path;

import io.dekorate.kubernetes.decorator.NamedResourceDecorator;
import io.fabric8.kubernetes.api.model.ObjectMeta;
import io.fabric8.openshift.api.model.BuildConfigSpecFluent;
import io.quarkus.deployment.util.FileUtil;

public class ApplyDockerfileToBuildConfigDecorator extends NamedResourceDecorator<BuildConfigSpecFluent<?>> {

    private final Path pathToDockerfile;

    public ApplyDockerfileToBuildConfigDecorator(String name, Path pathToDockerfile) {
        super(name);
        this.pathToDockerfile = pathToDockerfile;
    }

    @Override
    public void andThenVisit(final BuildConfigSpecFluent<?> spec, ObjectMeta meta) {
        try (InputStream is = new FileInputStream(pathToDockerfile.toFile())) {
            spec.withNewSource()
                    .withDockerfile(new String(FileUtil.readFileContents(is)))
                    .endSource()
                    .withNewStrategy()
                    .withNewDockerStrategy()
                    .endDockerStrategy()
                    .endStrategy();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}

package io.quarkus.container.image.openshift.deployment;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Path;

import io.dekorate.kubernetes.decorator.NamedResourceDecorator;
import io.fabric8.kubernetes.api.model.ObjectMeta;
import io.fabric8.openshift.api.model.BuildConfigSpecFluent;
import io.quarkus.deployment.util.FileUtil;

public class ApplyDockerfileToBuildConfigDecorator extends NamedResourceDecorator<BuildConfigSpecFluent<?>> {

    private final Path pathToDockerfile;

    public ApplyDockerfileToBuildConfigDecorator(String name, Path pathToDockerfile) {
        super(name);
        if (!pathToDockerfile.toFile().exists()) {
            throw new IllegalArgumentException(
                    "Specified Dockerfile: '" + pathToDockerfile.toAbsolutePath().toString() + "' does not exist.");
        }
        if (!pathToDockerfile.toFile().isFile()) {
            throw new IllegalArgumentException(
                    "Specified Dockerfile: '" + pathToDockerfile.toAbsolutePath().toString() + "' is not a normal file.");
        }
        this.pathToDockerfile = pathToDockerfile;
    }

    @Override
    public void andThenVisit(final BuildConfigSpecFluent<?> spec, ObjectMeta meta) {
        try (InputStream is = new FileInputStream(pathToDockerfile.toFile())) {
            spec.withNewSource()
                    .withDockerfile(new String(FileUtil.readFileContents(is)))
                    .endSource()
                    .withNewStrategy()
                    .withNewDockerStrategy()
                    .endDockerStrategy()
                    .endStrategy();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}

Add a more informative error message when Dockerfile is unavailable during s2i


/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You 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.
 */
/**
 * This package contains implementations of the {@link org.apache.commons.collections4.MultiValuedMap} interfaces.
 * A MultiValuedMap holds a collection of values against each key.
 *

 * The following implementations are provided in the package:
 *

 *
MultiValuedHashMap - implementation that uses a HashMap to store the data
 *

 *

 * The following decorators are provided in the package:
 *

 *
Transformed - transforms elements added to the MultiValuedMap
 *
Unmodifiable - ensures the collection cannot be altered
 *

 *
 * @version $Id$
 */
package org.apache.commons.collections4.multimap;

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You 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.
 */
/**
 * This package contains implementations of the {@link org.apache.commons.collections4.MultiValuedMap} interfaces.
 * A MultiValuedMap holds a collection of values against each key.
 *

 * The following implementations are provided in the package:
 *

 *
MultiValuedHashMap - implementation that uses a HashMap to store the data
 *
MultiValuedLinkedHashMap - implementation that uses a LinkedHashMap as backing map
 *

 *

 * The following decorators are provided in the package:
 *

 *
Transformed - transforms elements added to the MultiValuedMap
 *
Unmodifiable - ensures the collection cannot be altered
 *

 *
 * @version $Id$
 */
package org.apache.commons.collections4.multimap;

Add new concrete MultiValuedMap implementation.


// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.security;

/**
 * @author bjorncs
 */
public enum SignatureAlgorithm {
    SHA256_WITH_RSA("SHA256withRSA"),
    SHA512_WITH_RSA("SHA512withRSA"),
    SHA512_WITH_ECDSA("SHA512withECDSA");

    private final String algorithmName;

    SignatureAlgorithm(String algorithmName) {
        this.algorithmName = algorithmName;
    }

    public String getAlgorithmName() {
        return algorithmName;
    }
}

// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.security;

/**
 * @author bjorncs
 */
public enum SignatureAlgorithm {
    SHA256_WITH_RSA("SHA256withRSA"),
    SHA512_WITH_RSA("SHA512withRSA"),
    SHA256_WITH_ECDSA("SHA256withECDSA"),
    SHA512_WITH_ECDSA("SHA512withECDSA");

    private final String algorithmName;

    SignatureAlgorithm(String algorithmName) {
        this.algorithmName = algorithmName;
    }

    public String getAlgorithmName() {
        return algorithmName;
    }
}

Add 'SHA256withECDSA' as signature algorithm


/*
 * Mutability Detector
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 *
 * Further licensing information for this project can be found in
 * 		license/LICENSE.txt
 */

package org.mutabilitydetector.benchmarks.settermethod;

@SuppressWarnings("unused")
public class ImmutableButSetsPrivateFieldOfInstanceOfSelf {

	private int myField = 0;
	private ImmutableButSetsPrivateFieldOfInstanceOfSelf fieldOfSelfType = null;

	public ImmutableButSetsPrivateFieldOfInstanceOfSelf setPrivateFieldOnInstanceOfSelf() {
		ImmutableButSetsPrivateFieldOfInstanceOfSelf i = new ImmutableButSetsPrivateFieldOfInstanceOfSelf();
		this.hashCode();
		i.myField = 10;
		this.hashCode();
		i.myField = 11;
		return i;
	}

}

class MutableBySettingFieldOnThisInstance {
	@SuppressWarnings("unused")
	private int myField = 0;

	public void setMyField(int newMyField) {
		this.myField = newMyField;

	}
}

/*
 * Mutability Detector
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 *
 * Further licensing information for this project can be found in
 * 		license/LICENSE.txt
 */

package org.mutabilitydetector.benchmarks.settermethod;

@SuppressWarnings("unused")
public class ImmutableButSetsPrivateFieldOfInstanceOfSelf {

	private int myField = 0;
	private ImmutableButSetsPrivateFieldOfInstanceOfSelf fieldOfSelfType = null;

	public ImmutableButSetsPrivateFieldOfInstanceOfSelf setPrivateFieldOnInstanceOfSelf() {
		ImmutableButSetsPrivateFieldOfInstanceOfSelf i = new ImmutableButSetsPrivateFieldOfInstanceOfSelf();
		this.hashCode();
		i.myField = 10;
		this.hashCode();
		i.myField = 11;
		return i;
	}

}

class MutableBySettingFieldOnThisInstanceAndOtherInstance {
	@SuppressWarnings("unused")
	private int myField = 0;

	public void setMyField(int newMyField, MutableBySettingFieldOnThisInstanceAndOtherInstance otherInstance) {
		this.myField = newMyField;
		otherInstance.myField = 42;

	}
}

Update benchmark for setting fields of this type.


package de.linkvt.bachelor.config;

import de.linkvt.bachelor.web.GeneratorController;

import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;

/**
 * Extracts the ontology IRI from the URL.
 */
@Component
public class OntologyIriExtractor {

  public String extractGeneratorIri(String url) {
    String urlWithoutIdAndFilename = trimFilenameAndId(url);

    return trimOntologyPath(urlWithoutIdAndFilename);
  }

  public String extractOntologyIri(String url, Long generationId) {
    String urlWithoutFilename = trimFilenameAndId(url);

    return urlWithoutFilename + generationId + "/";
  }

  private String trimFilenameAndId(String url) {
    return url.replaceAll("(\\d+/)?[^/]*$", "");
  }

  private String trimOntologyPath(String url) {
    return StringUtils.stripEnd(url, GeneratorController.ONTOLOGY_PATH);
  }

}

package de.linkvt.bachelor.config;

import de.linkvt.bachelor.web.GeneratorController;

import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;

/**
 * Extracts the ontology IRI from the URL.
 */
@Component
public class OntologyIriExtractor {

  public String extractGeneratorIri(String url) {
    String urlWithoutIdAndFilename = trimFilenameAndId(url);

    return removeOntologyPath(urlWithoutIdAndFilename);
  }

  public String extractOntologyIri(String url, Long generationId) {
    String urlWithoutFilename = trimFilenameAndId(url);

    return urlWithoutFilename + generationId + "/";
  }

  private String trimFilenameAndId(String url) {
    return url.replaceAll("(\\d+/)?[^/]*$", "");
  }

  private String removeOntologyPath(String url) {
    return StringUtils.removeEndIgnoreCase(url, GeneratorController.ONTOLOGY_PATH);
  }

}

Remove ontology path from request IRI correctly


package net.sf.openrocket.example;

import net.sf.openrocket.simulation.SimulationConditions;
import net.sf.openrocket.simulation.exception.SimulationException;
import net.sf.openrocket.simulation.extension.AbstractSimulationExtension;

/**
 * The actual simulation extension.  A new instance is created for
 * each simulation it is attached to.
 *
 * This class contains the configuration and is called before the
 * simulation is run.  It can do changes to the simulation, such
 * as add simulation listeners.
 *
 * All configuration should be stored in the config variable, so that
 * file storage will work automatically.
 */
public class ThrustScaler extends AbstractSimulationExtension {

	@Override
	public String getName() {
		return "Thrust scaling \u00D7" + getMultiplier();
	}

	@Override
	public void initialize(SimulationConditions conditions) throws SimulationException {
		conditions.getSimulationListenerList().add(new ThrustScalerSimulationListener(getMultiplier()));
	}

	public double getMultiplier() {
		return config.getDouble("multiplier", 1.0);
	}

	public void setMultiplier(double multiplier) {
		config.put("multiplier", multiplier);
		fireChangeEvent();
	}

}

package net.sf.openrocket.example;

import net.sf.openrocket.simulation.SimulationConditions;
import net.sf.openrocket.simulation.exception.SimulationException;
import net.sf.openrocket.simulation.extension.AbstractSimulationExtension;

/**
 * The actual simulation extension.  A new instance is created for
 * each simulation it is attached to.
 *
 * This class contains the configuration and is called before the
 * simulation is run.  It can do changes to the simulation, such
 * as add simulation listeners.
 *
 * All configuration should be stored in the config variable, so that
 * file storage will work automatically.
 */
public class ThrustScaler extends AbstractSimulationExtension {

	@Override
	public String getName() {
		return "Thrust scaling \u00D7" + getMultiplier();
	}

	@Override
	public String getDescription() {
		// This description is shown when the user clicks the info-button on the extension
		return "This extension multiplies the thrust of motors by a user-defined multiplier.";
	}

	@Override
	public void initialize(SimulationConditions conditions) throws SimulationException {
		conditions.getSimulationListenerList().add(new ThrustScalerSimulationListener(getMultiplier()));
	}

	public double getMultiplier() {
		return config.getDouble("multiplier", 1.0);
	}

	public void setMultiplier(double multiplier) {
		config.put("multiplier", multiplier);
		fireChangeEvent();
	}

}

Add a description to the extension


package org.mcphoton.impl.block;

import com.electronwill.utils.IndexMap;
import java.util.HashMap;
import java.util.Map;
import org.mcphoton.block.BlockRegistry;
import org.mcphoton.block.BlockType;

/**
 *
 * @author TheElectronWill
 */
public class PhotonBlockRegistry implements BlockRegistry {

	private final IndexMap<BlockType> idMap = new IndexMap<>();
	private final Map<String, BlockType> nameMap = new HashMap<>();

	@Override
	public synchronized void register(BlockType type) {
		int id = idMap.size();
		type.initializeId(id);
		idMap.put(id, type);
		nameMap.put(type.getUniqueName(), type);
	}

	@Override
	public synchronized void register(BlockType type, int id) {
		type.initializeId(id);
		idMap.put(id, type);
		nameMap.put(type.getUniqueName(), type);
	}

	@Override
	public synchronized BlockType getRegistered(int id) {
		return idMap.get(id);
	}

	@Override
	public synchronized BlockType getRegistered(String name) {
		return nameMap.get(name);
	}

	@Override
	public synchronized boolean isRegistered(int id) {
		return idMap.containsKey(id);
	}

	@Override
	public synchronized boolean isRegistered(String name) {
		return nameMap.containsKey(name);
	}

}

package org.mcphoton.impl.block;

import com.electronwill.utils.IndexMap;
import java.util.HashMap;
import java.util.Map;
import org.mcphoton.block.BlockRegistry;
import org.mcphoton.block.BlockType;

/**
 *
 * @author TheElectronWill
 */
public class PhotonBlockRegistry implements BlockRegistry {

	private final IndexMap<BlockType> idMap = new IndexMap<>();
	private final Map<String, BlockType> nameMap = new HashMap<>();

	@Override
	public synchronized void register(BlockType type) {
		int id = idMap.size();
		type.initializeId(id);
		idMap.put(id, type);
		nameMap.put(type.getUniqueName(), type);
	}

	@Override
	public synchronized void register(BlockType type, int id) {
		type.initializeId(id);
		idMap.put(id, type);
		nameMap.put(type.getUniqueName(), type);
	}

	@Override
	public synchronized BlockType getRegistered(int id) {
		return idMap.get(id);
	}

	@Override
	public synchronized BlockType getRegistered(String name) {
		return nameMap.get(name);
	}

	@Override
	public synchronized boolean isRegistered(int id) {
		return idMap.containsKey(id);
	}

	@Override
	public synchronized boolean isRegistered(String name) {
		return nameMap.containsKey(name);
	}

	public int getBiggestBlockId() {
		return Math.max(0, idMap.array().length - 1);
	}

}

Add a method to get the biggest block id


package com.googlecode.totallylazy.xml;

import com.googlecode.totallylazy.Callable1;
import com.googlecode.totallylazy.Mapper;
import com.googlecode.totallylazy.Xml;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.Text;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class XPathLookups {
    private static final Map<String, Callable1<String, String>> lookups = new ConcurrentHashMap<String, Callable1<String, String>>();

    @XPathFunction("lookup")
    public static NodeArrayList lookup(String name, NodeList types) {
        return new NodeArrayList<Text>(Xml.sequence(types).map(lookup(lookups.get(name))));
    }

    private static Mapper<Node, Text> lookup(final Callable1<String, String> data) {
        return new Mapper<Node, Text>() {
            @Override
            public Text call(Node node) throws Exception {
                return XPathFunctions.createText(node, data.call(node.getTextContent()));
            }
        };
    }

    public static void setLookup(String name, Callable1<String, String> lookup){
        lookups.put(name, lookup);
    }

}

package com.googlecode.totallylazy.xml;

import com.googlecode.totallylazy.Callable1;
import com.googlecode.totallylazy.Callers;
import com.googlecode.totallylazy.Mapper;
import com.googlecode.totallylazy.Xml;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.Text;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class XPathLookups {
    private static final Map<String, Callable1<String, String>> lookups = new ConcurrentHashMap<String, Callable1<String, String>>();

    @XPathFunction("lookup")
    public static NodeArrayList lookup(String name, NodeList nodes) {
        return new NodeArrayList<Text>(Xml.sequence(nodes).map(lookup(lookups.get(name))));
    }

    public static String lookup(String name, String text){
        return Callers.call(lookups.get(name), text);
    }

    private static Mapper<Node, Text> lookup(final Callable1<String, String> data) {
        return new Mapper<Node, Text>() {
            @Override
            public Text call(Node node) throws Exception {
                return XPathFunctions.createText(node, data.call(node.getTextContent()));
            }
        };
    }

    public static void setLookup(String name, Callable1<String, String> lookup){
        lookups.put(name, lookup);
    }

}

Add an accessor for easy access to lookups


package sizebay.catalog.client.model;

import java.util.*;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.*;

@Getter
@Setter
public class Modeling   {

  private Long id;
  private String name;

  private Gender gender;
  private String gMerchantBrandName;
  private String gMerchantAgeGroup;
  private String gMerchantSizeType;

  private TypeEnum type;
  private Long brandId;
  private Long categoryId;
  private List<ModelingSizeMeasures> measures = new ArrayList<>();

  private Integer strongCategoryTypeId;
  private String strongCategoryTypeName;

  private int isShoe;

  @Getter
  @RequiredArgsConstructor
  public enum TypeEnum {
    PRODUCT("product"),
    BODY("body");

    final private String value;

    @Override
    @JsonValue
    public String toString() {
      return value;
    }
  }

  @Getter
  @RequiredArgsConstructor
  public enum Gender {
    M("M"), F("F"), U("U");

    final private String value;

    @Override
    @JsonValue
    public String toString() {
      return value;
    }
  }
}

package sizebay.catalog.client.model;

import java.util.*;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.*;

@Getter
@Setter
public class Modeling   {

  private Long id;
  private String name;

  private Gender gender;
  private String gMerchantBrandName;
  private String gMerchantAgeGroup;
  private String gMerchantSizeType;
	private String observation;

  private TypeEnum type;
  private Long brandId;
  private Long categoryId;
  private List<ModelingSizeMeasures> measures = new ArrayList<>();

  private Integer strongCategoryTypeId;
  private String strongCategoryTypeName;

  private int isShoe;

  @Getter
  @RequiredArgsConstructor
  public enum TypeEnum {
    PRODUCT("product"),
    BODY("body");

    final private String value;

    @Override
    @JsonValue
    public String toString() {
      return value;
    }
  }

  @Getter
  @RequiredArgsConstructor
  public enum Gender {
    M("M"), F("F"), U("U");

    final private String value;

    @Override
    @JsonValue
    public String toString() {
      return value;
    }
  }
}

Add attribute observation in measures table


package org.robockets.buttonmanager.buttons;

import org.robockets.buttonmanager.Button;

import edu.wpi.first.wpilibj.command.Command;

/**
 * The basic press-to-run button
 */
public class ActionButton extends Button {
	private boolean killOnRelease = true;

	/**
	 * Class constructor
	 * @param joystickNumber The joystick port that the button will be bound to
	 * @param buttonNumber The button number that the button will be bound to
	 * @param command The command that the button will run when pressed
	 * @param killOnRelease true if the button should stop command execution when released
	 */
	public ActionButton(int joystickNumber, int buttonNumber, Command command, boolean killOnRelease) {
		super(joystickNumber, buttonNumber, command);
		this.killOnRelease = killOnRelease;
	}

	/**
	 * Ran when the button is notPressed
	 */
	protected void notPressed() {
		if (killOnRelease) {
			stop();
		}
	}
}

package org.robockets.buttonmanager.buttons;

import org.robockets.buttonmanager.Button;

import edu.wpi.first.wpilibj.command.Command;

/**
 * The basic press-to-run button
 */
public class ActionButton extends Button {
	private boolean killOnRelease = true;

	/**
	 * Class constructor
	 * @param joystickNumber The joystick port that the button will be bound to
	 * @param buttonNumber The button number that the button will be bound to
	 * @param command The command that the button will run when pressed
	 * @param killOnRelease true if the button should stop command execution when released
	 */
	public ActionButton(int joystickNumber, int buttonNumber, Command command, boolean killOnRelease) {
		super(joystickNumber, buttonNumber, command);
		this.killOnRelease = killOnRelease;
	}

	/**
	 * Ran when the button is not pressed
	 */
	protected void notPressed() {
		if (killOnRelease) {
			stop();
		}

		super.notPressed();
	}
}

Fix problem with action buttons without killOnRelease not starting again


/*
Copyright 2012 Selenium committers
Copyright 2012 Software Freedom Conservancy

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

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

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

package com.thoughtworks.selenium.thirdparty;

import com.thoughtworks.selenium.InternalSelenseTestBase;

import org.testng.annotations.Test;

public class YahooHttpsTest extends InternalSelenseTestBase {

  @Test(dataProvider = "system-properties")
  public void testYahoo() throws Exception {
    // this site has **two** HTTPS hosts (akamai and yahoo), so it's a good test of the new
    // multi-domain keystore support we just added
    selenium
        .open("https://login11.marketingsolutions.yahoo.com/adui/signin/loadSignin.do?d=U2FsdGVkX1_evOPYuoCCKbeDENMTzoQ6O.oTzifl7TwsO8IqXh6duToE2tI2&p=11&s=21");
  }

}

/*
Copyright 2012 Selenium committers
Copyright 2012 Software Freedom Conservancy

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

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

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

package com.thoughtworks.selenium.thirdparty;

import com.thoughtworks.selenium.InternalSelenseTestBase;

import org.junit.After;
import org.junit.Test;

public class YahooHttpsTest extends InternalSelenseTestBase {

  @After
  public void resetTimeout() {
    selenium.setTimeout("30000");
  }

  @Test
  public void testYahoo() throws Exception {
    selenium.setTimeout("120000");

    // this site has **two** HTTPS hosts (akamai and yahoo), so it's a good test of the new
    // multi-domain keystore support we just added
    selenium
        .open(
            "https://login11.marketingsolutions.yahoo.com/adui/signin/loadSignin.do?d=U2FsdGVkX1_evOPYuoCCKbeDENMTzoQ6O.oTzifl7TwsO8IqXh6duToE2tI2&p=11&s=21");
  }

}

Convert the https test that we never run to use junit.


class ArrayLengthExpressionTest {
    public static void main(String[] args) {
        int i;
        int[] ia;
        long l;
        long[] la;
        boolean b;
        A cA;
        B cB;

        i = i.length;  // LENGTH_ON_NON_ARRAY
        i = l.length;  // LENGTH_ON_NON_ARRAY
        i = b.length;  // LENGTH_ON_NON_ARRAY
        i = cA.length; // LENGTH_ON_NON_ARRAY
    }
}
class A {}
class B {}

class ArrayLengthExpressionTest {
    public static void main(String[] args) {
        int i;
        int[] ia;
        long l;
        long[] la;
        boolean b;
        A cA;
        B cB;

        i = i.length;  // LENGTH_ON_NON_ARRAY
        //i = ia.length;  // OK!
        i = l.length;  // LENGTH_ON_NON_ARRAY
        //i = la.length;  // OK!
        i = b.length;  // LENGTH_ON_NON_ARRAY
        i = cA.length; // LENGTH_ON_NON_ARRAY
    }
}
class A {}
class B {}

Add comments about valid length usages.


package reborncore.mixin.client;

import net.minecraft.client.render.GameRenderer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import reborncore.RebornCoreClient;
import reborncore.client.ClientChunkManager;

@Mixin(GameRenderer.class)
public class MixinGameRenderer {

	@Inject(method = "renderCenter", at = @At(value = "INVOKE", target = "net/minecraft/util/profiler/Profiler.swap(Ljava/lang/String;)V", ordinal = 15))
	private void renderCenter(float float_1, long long_1, CallbackInfo info) {
		RebornCoreClient.multiblockRenderEvent.onWorldRenderLast(float_1);

	}

	@Inject(method = "renderCenter", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/debug/DebugRenderer;render(J)V", ordinal = 0))
	private void renderCenter_2(float float_1, long long_1, CallbackInfo info) {
		ClientChunkManager.render();
	}

}

package reborncore.mixin.client;

import net.minecraft.client.render.GameRenderer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import reborncore.RebornCoreClient;
import reborncore.client.ClientChunkManager;

@Mixin(GameRenderer.class)
public class MixinGameRenderer {

	//TODO 1.15 nope
//	@Inject(method = "renderCenter", at = @At(value = "INVOKE", target = "net/minecraft/util/profiler/Profiler.swap(Ljava/lang/String;)V", ordinal = 15))
//	private void renderCenter(float float_1, long long_1, CallbackInfo info) {
//		RebornCoreClient.multiblockRenderEvent.onWorldRenderLast(float_1);
//
//	}
//
//	@Inject(method = "renderCenter", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/debug/DebugRenderer;render(J)V", ordinal = 0))
//	private void renderCenter_2(float float_1, long long_1, CallbackInfo info) {
//		ClientChunkManager.render();
//	}

}

Comment out game render hooks


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

import java.util.Collections;
import java.util.Set;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import com.google.inject.Inject;

@Path("/selftest")
public class SelfTestResource {

    private Set<SelfTest> tests = Collections.emptySet();

    @Inject
    SelfTestResource() {
    }

    @Inject(optional=true)
    public void setSelfTests(Set<SelfTest> tests) {
        this.tests = tests;
    }

	/**
	 * On success, does nothing interesting.
	 * On failure, returns a 5xx response
	 */
	@GET
	@Produces(MediaType.APPLICATION_JSON)
	public boolean doSelfTest() {
		for (SelfTest test : tests) {
		    test.doSelfTest();
		}
		return true;
	}
}

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

import java.util.Collections;
import java.util.Set;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import com.google.inject.Inject;

@Path("/selftest")
public class SelfTestResource {

    private Set<SelfTest> tests = Collections.emptySet();

    @Inject
    SelfTestResource() {
    }

    @Inject(optional=true)
    public void setSelfTests(Set<SelfTest> tests) {
        this.tests = tests;
    }

	/**
	 * On success, does nothing interesting.
	 * On failure, returns a 5xx response
	 */
	@GET
	public void doSelfTest() {
		for (SelfTest test : tests) {
		    test.doSelfTest();
		}
	}
}

Change response from "true" to 204 no content


package io.github.jacobmarshall.meloooncensor.lang;

import io.github.jacobmarshall.meloooncensor.config.Configuration;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class Translation {

    public static final Translation DEFAULT_TRANSLATION = new Translation(Configuration.DEFAULT_LANGUAGE, false);

    private boolean allowFallback;
    protected String language;
    protected Properties translations;

    public Translation (String language) {
        this(language, true);
    }

    private Translation (String language, boolean allowFallback) {
        this.language = language;
        this.translations = getTranslations(language);
        this.allowFallback = allowFallback;
    }

    public String getText (String key) {
        return this.translations.getProperty(key, this.allowFallback ?
            DEFAULT_TRANSLATION.getText(key) : "i18n:" + key);
    }

    private static Properties getTranslations (String language) {
        Properties properties = new Properties();
        InputStream inputStream = Translation.class.getResourceAsStream("/lang/" + language + ".properties");

        try {
            properties.load(inputStream);
        } catch (IOException err) {
            // Ignore (load the defaults)
        }

        return properties;
    }

}

package io.github.jacobmarshall.meloooncensor.lang;

import io.github.jacobmarshall.meloooncensor.config.Configuration;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class Translation {

    public static final Translation DEFAULT_TRANSLATION = new Translation(Configuration.DEFAULT_LANGUAGE, false);

    private boolean allowFallback;
    protected String language;
    protected Properties translations;

    public Translation (String language) {
        this(language, true);
    }

    private Translation (String language, boolean allowFallback) {
        this.language = language;
        this.translations = getTranslations(language);
        this.allowFallback = allowFallback;
    }

    public String getText (String key) {
        String text = this.translations.getProperty(key, this.allowFallback ?
            DEFAULT_TRANSLATION.getText(key) : "i18n:" + key);

        try {
            text = new String(text.getBytes("ISO-8859-1"), "UTF-8");
        } catch(Exception e) {
            // Ignore, keep old encoding
        }

        return text;
    }

    private static Properties getTranslations (String language) {
        Properties properties = new Properties();
        InputStream inputStream = Translation.class.getResourceAsStream("/lang/" + language + ".properties");

        try {
            properties.load(inputStream);
        } catch (IOException err) {
            // Ignore (load the defaults)
        }

        return properties;
    }

}

Fix encoding issue with extended character set


package com.uwetrottmann.shopr.ui;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;

import com.uwetrottmann.shopr.R;

public class ResultsActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_results);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.results, menu);
        return true;
    }

}

package com.uwetrottmann.shopr.ui;

import android.app.Activity;
import android.database.Cursor;
import android.os.Bundle;
import android.view.Menu;
import android.widget.TextView;

import com.uwetrottmann.shopr.R;
import com.uwetrottmann.shopr.provider.ShoprContract.Stats;

/**
 * Displays the given stats and allows to start a new task.
 */
public class ResultsActivity extends Activity {

    public interface InitBundle {
        String STATS_ID = "stats_id";
    }

    private int mStatId;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_results);

        // extract stat id
        Bundle extras = getIntent().getExtras();
        if (extras == null) {
            finish();
            return;
        }
        mStatId = extras.getInt(InitBundle.STATS_ID);

        setupViews();
    }

    private void setupViews() {
        TextView textViewUserName = (TextView) findViewById(R.id.textViewResultsUsername);
        TextView textViewTaskType = (TextView) findViewById(R.id.textViewResultsTaskType);
        TextView textViewDuration = (TextView) findViewById(R.id.textViewResultsDuration);
        TextView textViewCycles = (TextView) findViewById(R.id.textViewResultsCycles);

        final Cursor query = getContentResolver().query(Stats.buildStatUri(mStatId), new String[] {
                Stats._ID, Stats.USERNAME, Stats.TASK_TYPE, Stats.DURATION, Stats.CYCLE_COUNT
        }, null, null, null);
        if (query != null) {
            if (query.moveToFirst()) {
                textViewUserName.setText(query.getString(1));
                textViewTaskType.setText(query.getString(2));
                textViewDuration.setText(query.getString(3));
                textViewCycles.setText(query.getString(4));
            }
            query.close();
        }
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.results, menu);
        return true;
    }

}

Load data when displaying results.


package com.elmakers.mine.bukkit.api.effect;

import org.bukkit.Color;
import org.bukkit.Effect;
import org.bukkit.Location;
import org.bukkit.Sound;
import org.bukkit.block.Block;

import com.elmakers.mine.bukkit.api.block.MaterialAndData;
import org.bukkit.entity.Entity;

import java.util.Collection;

public interface EffectPlayer {
    public void setEffectPlayList(Collection<EffectPlay> plays);
    public void setEffect(Effect effect);
    public void setEffectData(int data);
    public void setScale(float scale);

    public void setSound(Sound sound);
    public void setSound(Sound sound, float volume, float pitch);

    public void setDelayTicks(int ticks);

    public void setParticleOverride(String particleType);
    public void setMaterial(MaterialAndData material);
    public void setMaterial(Block block);
    public void setColor(Color color);
    public void setOffset(float x, float y, float z);
    public boolean shouldUseHitLocation();
    public boolean shouldUseWandLocation();

    public void start(Location origin, Location target);
    public void start(Entity origin, Entity target);
    public void start(Location origin, Entity originEntity, Location target, Entity targetEntity);
    public void start(Location origin, Entity originEntity, Location target, Entity targetEntity, Collection<Entity> targets);
}

package com.elmakers.mine.bukkit.api.effect;

import org.bukkit.Color;
import org.bukkit.Effect;
import org.bukkit.Location;
import org.bukkit.Sound;
import org.bukkit.block.Block;

import com.elmakers.mine.bukkit.api.block.MaterialAndData;
import org.bukkit.entity.Entity;

import java.util.Collection;

public interface EffectPlayer {
    public void setEffectPlayList(Collection<EffectPlay> plays);
    public void setEffect(Effect effect);
    public void setEffectData(int data);
    public void setScale(float scale);

    public void setSound(Sound sound);
    public void setSound(Sound sound, float volume, float pitch);

    public void setDelayTicks(int ticks);

    public void setParticleOverride(String particleType);
    public void setMaterial(MaterialAndData material);
    public void setMaterial(Block block);
    public void setColor(Color color);
    public void setOffset(float x, float y, float z);
    public boolean shouldUseHitLocation();
    public boolean shouldUseWandLocation();
    public boolean shouldUseEyeLocation();

    public void start(Location origin, Location target);
    public void start(Entity origin, Entity target);
    public void start(Location origin, Entity originEntity, Location target, Entity targetEntity);
    public void start(Location origin, Entity originEntity, Location target, Entity targetEntity, Collection<Entity> targets);
}

Add use_eye_location parameter to effects


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

import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;

public class MainActivity extends ActionBarActivity {

  @Override protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
  }
}

Add copyright to the first project java file


package de.errorcraftlp.cryingobsidian.config;

import java.util.Set;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraftforge.common.config.ConfigElement;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.fml.client.IModGuiFactory;
import net.minecraftforge.fml.client.config.GuiConfig;
import de.errorcraftlp.cryingobsidian.CryingObsidian;

public class ConfigGUI {

	public class Factory implements IModGuiFactory {

		@Override
		public void initialize(Minecraft mc) {}

		@Override
		public Class<? extends GuiScreen> mainConfigGuiClass() {

			return GUI.class;

		}

		@Override
		public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() {

			return null;

		}

		@Override
		public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element) {

			return null;

		}

	}

	public class GUI extends GuiConfig {

		public GUI(GuiScreen gui) {

			super(gui, new ConfigElement(CryingObsidian.configuration.getCategory(Configuration.CATEGORY_GENERAL)).getChildElements(), CryingObsidian.MOD_ID, false, false, GuiConfig.getAbridgedConfigPath(CryingObsidian.configuration.toString()));

		}

	}

}

package de.errorcraftlp.cryingobsidian.config;

import java.util.Set;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraftforge.common.config.ConfigElement;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.fml.client.IModGuiFactory;
import net.minecraftforge.fml.client.config.GuiConfig;
import de.errorcraftlp.cryingobsidian.CryingObsidian;

public class ConfigGUI {

	public static class Factory implements IModGuiFactory {

		@Override
		public void initialize(Minecraft mc) {}

		@Override
		public Class<? extends GuiScreen> mainConfigGuiClass() {

			return GUI.class;

		}

		@Override
		public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() {

			return null;

		}

		@Override
		public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element) {

			return null;

		}

	}

	public class GUI extends GuiConfig {

		public GUI(GuiScreen gui) {

			super(gui, new ConfigElement(CryingObsidian.configuration.getCategory(Configuration.CATEGORY_GENERAL)).getChildElements(), CryingObsidian.MOD_ID, false, false, GuiConfig.getAbridgedConfigPath(CryingObsidian.configuration.toString()));

		}

	}

}

Make GUI Factory class static


package squeek.applecore.example;

import net.minecraft.init.Items;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import squeek.applecore.api.food.FoodEvent;
import squeek.applecore.api.food.FoodValues;

public class FoodValuesModifier
{
	@SubscribeEvent
	public void getFoodValues(FoodEvent.GetFoodValues event)
	{
		if (event.food.getItem() == Items.APPLE)
			event.foodValues = new FoodValues(5, 1f);
	}

	@SubscribeEvent
	public void getPlayerSpecificFoodValues(FoodEvent.GetPlayerFoodValues event)
	{
		if (event.food.getItem() == Items.APPLE)
			event.foodValues = new FoodValues(19, 1f);
		else
			event.foodValues = new FoodValues((20 - event.player.getFoodStats().getFoodLevel()) / 8, 1);
	}
}

package squeek.applecore.example;

import net.minecraft.init.Items;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import squeek.applecore.api.food.FoodEvent;
import squeek.applecore.api.food.FoodValues;

public class FoodValuesModifier
{
	@SubscribeEvent
	public void getFoodValues(FoodEvent.GetFoodValues event)
	{
		if (event.food.getItem() == Items.APPLE)
			event.foodValues = new FoodValues(5, 1f);
	}

	@SubscribeEvent
	public void getPlayerSpecificFoodValues(FoodEvent.GetPlayerFoodValues event)
	{
		// Player can be null when, for example, Minecraft caches tooltips at startup,
		// and a tooltip handler forwards that null player to AppleCore
		if (event.player == null)
			return;

		if (event.food.getItem() == Items.APPLE)
			event.foodValues = new FoodValues(19, 1f);
		else
			event.foodValues = new FoodValues((20 - event.player.getFoodStats().getFoodLevel()) / 8, 1);
	}
}

Fix crash at startup due to null player when Minecraft caches tooltips


package com.pm.server.response;

import com.pm.server.datatype.Player;

public class PlayerNameAndPlayerStateResponse {

	public Player.Name name;

	public Player.State state;

	public PlayerNameAndPlayerStateResponse(
			Player.Name name, Player.State state) {
		this.name = name;
		this.state = state;
	}

}

package com.pm.server.response;

import com.pm.server.datatype.Player;

public class PlayerNameAndPlayerStateResponse {

	private Player.Name name;

	private Player.State state;

	public PlayerNameAndPlayerStateResponse(
			Player.Name name, Player.State state) {
		this.name = name;
		this.state = state;
	}

	public Player.Name getName() {
		return name;
	}

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

	public Player.State getState() {
		return state;
	}

	public void setState(Player.State state) {
		this.state = state;
	}
}

Change response object to have private fields


package net.minecraftforge.fml.common.launcher;

import net.minecraft.launchwrapper.LaunchClassLoader;
import net.minecraftforge.fml.relauncher.FMLLaunchHandler;

public class FMLServerTweaker extends FMLTweaker {
    @Override
    public String getLaunchTarget()
    {
        return "net.minecraft.server.MinecraftServer";
    }

    @Override
    public void injectIntoClassLoader(LaunchClassLoader classLoader)
    {
        // The mojang packages are excluded so the log4j2 queue is correctly visible from
        // the obfuscated and deobfuscated parts of the code. Without, the UI won't show anything
        classLoader.addClassLoaderExclusion("com.mojang.");
        classLoader.addTransformerExclusion("net.minecraftforge.fml.repackage.");
        classLoader.addTransformerExclusion("net.minecraftforge.fml.relauncher.");
        classLoader.addTransformerExclusion("net.minecraftforge.fml.common.asm.transformers.");
        classLoader.addClassLoaderExclusion("LZMA.");
        FMLLaunchHandler.configureForServerLaunch(classLoader, this);
        FMLLaunchHandler.appendCoreMods();
    }
}

package net.minecraftforge.fml.common.launcher;

import net.minecraft.launchwrapper.LaunchClassLoader;
import net.minecraftforge.fml.relauncher.FMLLaunchHandler;

public class FMLServerTweaker extends FMLTweaker {
    @Override
    public String getLaunchTarget()
    {
        return "net.minecraft.server.MinecraftServer";
    }

    @Override
    public void injectIntoClassLoader(LaunchClassLoader classLoader)
    {
        // The log4j2 queue is excluded so it is correctly visible from the obfuscated
        // and deobfuscated parts of the code. Without, the UI won't show anything
        classLoader.addClassLoaderExclusion("com.mojang.util.QueueLogAppender");
        classLoader.addTransformerExclusion("net.minecraftforge.fml.repackage.");
        classLoader.addTransformerExclusion("net.minecraftforge.fml.relauncher.");
        classLoader.addTransformerExclusion("net.minecraftforge.fml.common.asm.transformers.");
        classLoader.addClassLoaderExclusion("LZMA.");
        FMLLaunchHandler.configureForServerLaunch(classLoader, this);
        FMLLaunchHandler.appendCoreMods();
    }
}

Exclude only log4j2 queue from class loader


package org.osiam.addons.administration.config;

import org.osiam.client.OsiamConnector;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * This class is responsible for building an osiam-connector.
 */
@Configuration
public class ConnectorBuilder {

    @Value("${org.osiam.clientId}")
    private String clientId;

    @Value("${org.osiam.clientSecret}")
    private String clientSecret;

    @Value("${org.osiam.endpoint}")
    private String osiamEndpoint;

    @Value("${org.osiam.redirectUri}")
    private String redirectUri;

    @Bean
    public OsiamConnector build() {
        return new OsiamConnector.Builder()
                .setEndpoint(osiamEndpoint)
                .setClientRedirectUri(redirectUri)
                .setClientId(clientId)
                .setClientSecret(clientSecret)
                .build();
    }
}

package org.osiam.addons.administration.config;

import org.osiam.client.OsiamConnector;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * This class is responsible for building an osiam-connector.
 */
@Configuration
public class ConnectorBuilder {

    @Value("${org.osiam.clientId}")
    private String clientId;

    @Value("${org.osiam.clientSecret}")
    private String clientSecret;

    @Value("${org.osiam.endpoint}")
    private String osiamEndpoint;

    @Value("${org.osiam.redirectUri}")
    private String redirectUri;

    @Bean
    public OsiamConnector build() {
        return new OsiamConnector.Builder()
                .withEndpoint(osiamEndpoint)
                .setClientRedirectUri(redirectUri)
                .setClientId(clientId)
                .setClientSecret(clientSecret)
                .build();
    }
}

Adjust to new endpoint method in connector 1.8


/*
 * This file is released under terms of BSD license
 * See LICENSE file for more information
 */

package cx2x.xcodeml.xelement;

import helper.XmlHelper;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 * Test features of XvarDecl class
 *
 * @author clementval
 */
public class XvarDeclTest {

  private static final String xVarDecl1 =
      "<varDecl lineno=\"946\" file=\"./src/mymodule.f90\">" +
      "<name type=\"Ib3f750\">testvar</name>" +
      "<value>10.0</value>" +
      "</varDecl>";

  @Test
  public void simpleXvarDeclTest(){
    XvarDecl varDecl = XmlHelper.createXvarDecl(xVarDecl1);
    assertNotNull(varDecl);
    assertEquals(946, varDecl.getLineNo());
    assertEquals("./src/mymodule.f90", varDecl.getFile());
    assertNotNull(varDecl.getName());
    assertEquals("Ib3f750", varDecl.getName().getType());
    assertEquals("testvar", varDecl.getName().getValue());
    assertTrue(varDecl.hasValue());
    assertEquals("10.0", varDecl.getValue());
  }

}

/*
 * This file is released under terms of BSD license
 * See LICENSE file for more information
 */

package cx2x.xcodeml.xelement;

import helper.XmlHelper;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 * Test features of XvarDecl class
 *
 * @author clementval
 */
public class XvarDeclTest {

  private static final String varDecl1 =
      "<varDecl lineno=\"946\" file=\"./src/mymodule.f90\">" +
      "<name type=\"Ib3f750\">testvar</name>" +
      "<value>10.0</value>" +
      "</varDecl>";

  private static final String varDecl2 =
      "<varDecl lineno=\"946\" file=\"./src/mymodule.f90\">" +
      "<name type=\"Ib3f750\">testvar</name>" +
      "</varDecl>";

  @Test
  public void simpleXvarDeclWithValueTest(){
    XvarDecl varDecl = XmlHelper.createXvarDecl(varDecl1);
    assertNotNull(varDecl);
    assertEquals(946, varDecl.getLineNo());
    assertEquals("./src/mymodule.f90", varDecl.getFile());
    assertNotNull(varDecl.getName());
    assertEquals("Ib3f750", varDecl.getName().getType());
    assertEquals("testvar", varDecl.getName().getValue());
    assertTrue(varDecl.hasValue());
    assertEquals("10.0", varDecl.getValue());
  }

  @Test
  public void simpleXvarDeclWithoutValueTest(){
    XvarDecl varDecl = XmlHelper.createXvarDecl(varDecl2);
    assertNotNull(varDecl);
    assertEquals(946, varDecl.getLineNo());
    assertEquals("./src/mymodule.f90", varDecl.getFile());
    assertNotNull(varDecl.getName());
    assertEquals("Ib3f750", varDecl.getName().getType());
    assertEquals("testvar", varDecl.getName().getValue());
    assertFalse(varDecl.hasValue());
    assertNull(varDecl.getValue());
  }

}

Add test varDecl without value


/* Generated By:JJTree: Do not edit this line. ASTText.java */

package org.apache.velocity.runtime.parser.node;

import java.io.Writer;
import java.io.IOException;

import org.apache.velocity.Context;
import org.apache.velocity.runtime.parser.*;

public class ASTText extends SimpleNode
{
    private String text;

    public ASTText(int id)
    {
        super(id);
    }

    public ASTText(Parser p, int id)
    {
        super(p, id);
    }

    /** Accept the visitor. **/
    public Object jjtAccept(ParserVisitor visitor, Object data)
    {
        return visitor.visit(this, data);
    }

    public Object init(Context context, Object data) throws Exception
    {
        // text = NodeUtils.specialText(getFirstToken()) +
        //    getFirstToken().image;

        /*
         *  there is only one special case we care about now : if the specialToken leads with a $
         *  Everything else seems to be working right now
         */

        text =  getFirstToken().image;

        if (NodeUtils.specialText(getFirstToken()).startsWith("$") )
            text = "$" + text;

        return data;
    }

    public boolean render(Context context, Writer writer)
        throws IOException
    {
        writer.write(text);
        return true;
    }
}

/* Generated By:JJTree: Do not edit this line. ASTText.java */

package org.apache.velocity.runtime.parser.node;

import java.io.Writer;
import java.io.IOException;

import org.apache.velocity.Context;
import org.apache.velocity.runtime.parser.*;

public class ASTText extends SimpleNode
{
    private String text;

    public ASTText(int id)
    {
        super(id);
    }

    public ASTText(Parser p, int id)
    {
        super(p, id);
    }

    /** Accept the visitor. **/
    public Object jjtAccept(ParserVisitor visitor, Object data)
    {
        return visitor.visit(this, data);
    }

    public Object init(Context context, Object data) throws Exception
    {
        // text = NodeUtils.specialText(getFirstToken()) +
        //    getFirstToken().image;

        /*
         *  there is only one special case we care about now : if the specialToken leads with a $
         *  Everything else seems to be working right now
         */

        text =  getFirstToken().image;

        if (NodeUtils.specialText(getFirstToken()).startsWith("$"))
            text = "$" + text;
        else if ( NodeUtils.specialText(getFirstToken()).startsWith("#") )
            text = "#" + text;

        return data;
    }

    public boolean render(Context context, Writer writer)
        throws IOException
    {
        writer.write(text);
        return true;
    }
}

Support for symmetrization of DIRECTIVE and REFERENCE. See the 1.20 Parser.jjt


package org.liquibase.grails;

import liquibase.FileOpener;

import java.io.InputStream;
import java.io.IOException;
import java.net.URL;
import java.util.Enumeration;

public class GrailsFileOpener implements FileOpener {
    public InputStream getResourceAsStream(String file) throws IOException {
        return getClass().getClassLoader().getResourceAsStream("grails-app/migrations/"+file);
    }

    public Enumeration<URL> getResources(String packageName) throws IOException {
        return getClass().getClassLoader().getResources("grails-app/migrations/"+packageName);
    }
}

package org.liquibase.grails;

import liquibase.FileOpener;

import java.io.InputStream;
import java.io.IOException;
import java.net.URL;
import java.util.Enumeration;

public class GrailsFileOpener implements FileOpener {
    public InputStream getResourceAsStream(String file) throws IOException {
        return getClass().getClassLoader().getResourceAsStream("grails-app/migrations/"+file);
    }

    public Enumeration<URL> getResources(String packageName) throws IOException {
        return getClass().getClassLoader().getResources("grails-app/migrations/"+packageName);
    }

    public ClassLoader toClassLoader() {
        return getClass().getClassLoader();
    }
}

Load custom changes from custom classpath


/*
 * Copyright 2016, TeamDev Ltd. All rights reserved.
 *
 * Redistribution and use in source and/or binary forms, with or without
 * modification, must retain the above copyright notice and the following
 * disclaimer.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
package org.spine3.tools.codestyle;

import java.nio.file.Path;

/**
 * This is a string constants keeper class.
 *
 * @author Alexander Aleksandrov
 */
public final class JavaSources {
    private static final String JAVA_FILE_EXTENSION = ".java";

    private JavaSources() {
        // Prevent initialization of this utility class
    }

    /**
     * Returns the java file extension string constant.
     *
     * @return ".java" string
     */
    public static String javaExt() {
        return JAVA_FILE_EXTENSION;
    }

    public static boolean isJavaFile(Path path) {
        return path.toString()
                   .endsWith(javaExt());
    }
}

/*
 * Copyright 2016, TeamDev Ltd. All rights reserved.
 *
 * Redistribution and use in source and/or binary forms, with or without
 * modification, must retain the above copyright notice and the following
 * disclaimer.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
package org.spine3.tools.codestyle;

import java.nio.file.Path;

/**
 * Class that represent java file extension.
 *
 * @author Alexander Aleksandrov
 */
public final class JavaSources {
    private static final String JAVA_FILE_EXTENSION = ".java";

    private JavaSources() {
        // Prevent initialization of this utility class
    }

    /**
     * Returns the java file extension string constant.
     *
     * @return ".java" string
     */
    public static String javaExt() {
        return JAVA_FILE_EXTENSION;
    }

    public static boolean isJavaFile(Path path) {
        return path.toString()
                   .endsWith(javaExt());
    }
}

Add changes requested in PR.


/*
 * This file is part of AceQL HTTP.
 * AceQL HTTP: SQL Over HTTP
 * Copyright (C) 2021,  KawanSoft SAS
 * (http://www.kawansoft.com). All rights reserved.
 *
 * AceQL HTTP 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.
 *
 * AceQL HTTP 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 library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301  USA
 *
 * Any modifications to this file must keep this entire header
 * intact.
 */
package com.kawansoft.app.version;
/**
 * Contains the package Version info
 */

public class GuiVersionConstants {
    public static final String VERSION = "v8.0";
    public static final String DATE = "01-Sep-2021";
}

// End

Update to AceQL HTTP Main 8.0 - new try


package org.xdi.oxauth.client.uma;

import org.xdi.oxauth.model.uma.UmaConstants;
import org.xdi.oxauth.model.uma.UmaTokenResponse;

import javax.ws.rs.*;

/**
 * @author yuriyz on 06/21/2017.
 */
public interface UmaTokenService {

    @POST
    @Consumes({UmaConstants.JSON_MEDIA_TYPE})
    @Produces({UmaConstants.JSON_MEDIA_TYPE})
    UmaTokenResponse requestRpt(
            @HeaderParam("Authorization") String authorization,
            @FormParam("grant_type") String grantType,
            @FormParam("ticket") String ticket,
            @FormParam("claim_token") String claimToken,
            @FormParam("claim_token_format") String claimTokenFormat,
            @FormParam("pct") String pctCode,
            @FormParam("rpt") String rptCode,
            @FormParam("scope") String scope);
}

package org.xdi.oxauth.client.uma;

import org.xdi.oxauth.model.uma.UmaConstants;
import org.xdi.oxauth.model.uma.UmaTokenResponse;

import javax.ws.rs.*;

/**
 * @author yuriyz on 06/21/2017.
 */
public interface UmaTokenService {

    @POST
    @Consumes({UmaConstants.JSON_MEDIA_TYPE})
    @Produces({UmaConstants.JSON_MEDIA_TYPE})
    UmaTokenResponse requestRpt(
            @HeaderParam("Authorization") String authorization,
            @FormParam("grant_type") String grantType,
            @FormParam("ticket") String ticket,
            @FormParam("claim_token") String claimToken,
            @FormParam("claim_token_format") String claimTokenFormat,
            @FormParam("pct") String pctCode,
            @FormParam("rpt") String rptCode,
            @FormParam("scope") String scope);

    @POST
    @Consumes({UmaConstants.JSON_MEDIA_TYPE})
    @Produces({UmaConstants.JSON_MEDIA_TYPE})
    UmaTokenResponse requestJwtAuthorizationRpt(
            @FormParam("client_assertion_type") String clientAssertionType,
            @FormParam("client_assertion") String clientAssertion,
            @FormParam("grant_type") String grantType,
            @FormParam("ticket") String ticket,
            @FormParam("claim_token") String claimToken,
            @FormParam("claim_token_format") String claimTokenFormat,
            @FormParam("pct") String pctCode,
            @FormParam("rpt") String rptCode,
            @FormParam("scope") String scope);
}

Add method to use client_assertion in UMA 2.0 for authorization


package org.xblackcat.sjpu.storage.typemap;

import javassist.ClassPool;
import org.xblackcat.sjpu.storage.UriTypeMap;

/**
 * 25.04.2014 14:52
 *
 * @author xBlackCat
 */
public class TypeMapTest {
    public static final TypeMapper TEST_TYPE_MAPPER = new TypeMapper(
            new ClassPool(true),
            0,
            new DateMapper(),
            new EnumToStringMapper(),
            new UriTypeMap()
    );
}

package org.xblackcat.sjpu.storage.typemap;

import javassist.ClassPool;
import org.junit.Test;
import org.xblackcat.sjpu.storage.UriTypeMap;

/**
 * 25.04.2014 14:52
 *
 * @author xBlackCat
 */
public class TypeMapTest {
    public static final TypeMapper TEST_TYPE_MAPPER = new TypeMapper(
            new ClassPool(true),
            0,
            new DateMapper(),
            new EnumToStringMapper(),
            new UriTypeMap()
    );

    @Test
    public void blank() {
    }
}

Fix unit tests for build ant script


/*--------------------------------------------------------------------------
 *  Copyright 2011 Taro L. Saito
 *
 *  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.
 *--------------------------------------------------------------------------*/
//--------------------------------------
// XerialJ
//
// SnappyBundleActivator.java
// Since: 2011/06/22 10:01:46
//
// $URL$
// $Author$
//--------------------------------------
package org.xerial.snappy;

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;

public class SnappyBundleActivator implements BundleActivator
{
    @Override
    public void start(BundleContext context) throws Exception {

    }

    @Override
    public void stop(BundleContext context) throws Exception {

    }

}

/*--------------------------------------------------------------------------
 *  Copyright 2011 Taro L. Saito
 *
 *  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.
 *--------------------------------------------------------------------------*/
//--------------------------------------
// XerialJ
//
// SnappyBundleActivator.java
// Since: 2011/06/22 10:01:46
//
// $URL$
// $Author$
//--------------------------------------
package org.xerial.snappy;

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;

/**
 * OSGi bundle entry point
 *
 * @author leo
 *
 */
public class SnappyBundleActivator implements BundleActivator
{
    public void start(BundleContext context) throws Exception {

    }

    public void stop(BundleContext context) throws Exception {

    }

}

Remove @Override annotation for Java5 compatibility


/**
 *  Boundary classes which convert API, domain, and persistence entities as they traverse layer boundaries
 */
package org.coner.boundary;

Fix NewlineAtEndOfFile in boundary package info


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

import com.bladecoder.engine.model.VerbRunner;
import com.bladecoder.engine.model.World;

@ActionDescription("Sets a global game property. Properties are created by the user but the next ones always exists: SAVED_GAME_VERSION, PREVIOUS_SCENE, CURRENT_CHAPTER, PLATFORM")
public class PropertyAction implements Action {
	@ActionProperty(required = true)
	@ActionPropertyDescription("Property name")

	private String prop;

	@ActionProperty(required = true)
	@ActionPropertyDescription("Property value")

	private String value;

	private World w;

	@Override
	public void init(World w) {
		this.w = w;
	}

	@Override
	public boolean run(VerbRunner cb) {

		w.setCustomProperty(prop, value);

		return false;
	}

}

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

import com.bladecoder.engine.model.VerbRunner;
import com.bladecoder.engine.model.World;

@ActionDescription("Sets a global game property. Properties are created by the user but the next ones always exists: SAVED_GAME_VERSION, PREVIOUS_SCENE, CURRENT_CHAPTER, PLATFORM")
public class PropertyAction implements Action {
	@ActionProperty(required = true)
	@ActionPropertyDescription("Property name")
	private String prop;

	@ActionProperty
	@ActionPropertyDescription("Property value")
	private String value;

	private World w;

	@Override
	public void init(World w) {
		this.w = w;
	}

	@Override
	public boolean run(VerbRunner cb) {

		w.setCustomProperty(prop, value);

		return false;
	}

}

Allow empty properties in Property action.


package org.zstack.header.configuration;

import org.zstack.header.identity.rbac.RBACDescription;

public class RBACInfo implements RBACDescription {
    @Override
    public void permissions() {
        permissionBuilder()
                .name("configuration")
                .adminOnlyAPIs("org.zstack.header.configuration.**")
                .targetResources(InstanceOfferingVO.class, DiskOfferingVO.class)
                .normalAPIs(APIQueryDiskOfferingMsg.class, APIQueryInstanceOfferingMsg.class)
                .build();
    }

    @Override
    public void contributeToRoles() {

    }

    @Override
    public void roles() {
        roleBuilder()
                .name("configuration")
                .uuid("067c4dc358e847aba47903ca4fb1c41c")
                .permissionsByName("configuration")
                .build();
    }

    @Override
    public void globalReadableResources() {

    }
}

package org.zstack.header.configuration;

import org.zstack.header.identity.rbac.RBACDescription;

public class RBACInfo implements RBACDescription {
    @Override
    public void permissions() {
        permissionBuilder()
                .name("configuration")
                .adminOnlyAPIs("org.zstack.header.configuration.**")
                .targetResources(InstanceOfferingVO.class, DiskOfferingVO.class)
                .normalAPIs(APIQueryDiskOfferingMsg.class, APIQueryInstanceOfferingMsg.class, APICreateDiskOfferingMsg.class)
                .build();
    }

    @Override
    public void contributeToRoles() {

    }

    @Override
    public void roles() {
        roleBuilder()
                .name("configuration")
                .uuid("067c4dc358e847aba47903ca4fb1c41c")
                .permissionsByName("configuration")
                .build();
    }

    @Override
    public void globalReadableResources() {

    }
}

Allow normal user create disk offering. picked from Yaoning Li.


package se.ericthelin.fractions;

import org.junit.Test;

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;

public class InvalidFractionFormatExceptionTest {

	@Test(expected = NullPointerException.class)
	public void rejectsNullText() {
		new InvalidFractionFormatException(null);
	}

	@Test
	public void hasInformativeMessage() {
		// Given
		String text = "foo";

		// When
		InvalidFractionFormatException e = new InvalidFractionFormatException(text);

		// Then
		assertThat(
				e.getMessage(),
				is("Expected either a fraction or a whole number, but got \"foo\". " +
						"Valid examples: \"1/2\", \"3\", \"-4/5\", \"-6\", \"78/9\"."));
	}
}

package se.ericthelin.fractions;

import org.junit.Test;

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;

public class InvalidFractionFormatExceptionTest {

	@Test(expected = NullPointerException.class)
	public void rejectsNullText() {
		new InvalidFractionFormatException(null);
	}

	@Test
	public void remembersText() {
		assertThat(new InvalidFractionFormatException("foo").getText(), is("foo"));
	}

	@Test
	public void hasInformativeMessage() {
		// Given
		String text = "foo";

		// When
		InvalidFractionFormatException e = new InvalidFractionFormatException(text);

		// Then
		assertThat(
				e.getMessage(),
				is("Expected either a fraction or a whole number, but got \"foo\". " +
						"Valid examples: \"1/2\", \"3\", \"-4/5\", \"-6\", \"78/9\"."));
	}
}

Check that InvalidFractionFormatException remembers text