Skip to content

Instantly share code, notes, and snippets.

@electrotype
electrotype / gist:5105100
Last active December 14, 2015 15:08
Bug Guice - ConstructorInjector
import static org.junit.Assert.*;
import java.util.UUID;
import org.junit.Test;
import com.google.inject.AbstractModule;
import com.google.inject.Guice;
import com.google.inject.Inject;
import com.google.inject.Injector;
@electrotype
electrotype / gist:5108107
Last active December 14, 2015 15:29
Bug Guice - ConstructorInjector. Now using ProvisionListener.
import static org.junit.Assert.*;
import java.util.UUID;
import org.junit.Test;
import com.google.inject.AbstractModule;
import com.google.inject.Binding;
import com.google.inject.Guice;
import com.google.inject.Inject;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import com.google.inject.AbstractModule;
import com.google.inject.Binding;
import com.google.inject.Guice;
import com.google.inject.Injector;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import com.google.inject.AbstractModule;
import com.google.inject.Binding;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.assistedinject.FactoryModuleBuilder;

Fix for FOUC :

At the top of your HTML:

<!doctype html>
<html>
<head>
    <style>html{visibility: hidden;opacity:0;}</style>