summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDos Moonen <darsstar@gmail.com>2017-07-19 08:24:07 +0200
committerHenri Sara <henri.sara@gmail.com>2017-07-19 09:24:07 +0300
commitce566c57fa7a020d654b9bdc7c885f8874148aa1 (patch)
treee8d3fc73da3ebbb627343cc630e9896a95e907a7
parent7b288aeb663f89bdac8cbf7eb20877681b4b49a6 (diff)
downloadvaadin-framework-ce566c57fa7a020d654b9bdc7c885f8874148aa1.tar.gz
vaadin-framework-ce566c57fa7a020d654b9bdc7c885f8874148aa1.zip
More user friendly fail message (was NullPointerException) (#9665)
Yes, I should never have created "D:\eclipse workspaces" in the first place. No, I am not replacing "%20" with spaces, or creating an URI instance. "D:\eclipse%20workspaces" is a valid folder and I'm not willing to go down the rabbit hole and see what that turns into.
-rw-r--r--server/src/test/java/com/vaadin/tests/CompileTransitionPropertyTest.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/server/src/test/java/com/vaadin/tests/CompileTransitionPropertyTest.java b/server/src/test/java/com/vaadin/tests/CompileTransitionPropertyTest.java
index bcf9aa2c08..bdc8bc049b 100644
--- a/server/src/test/java/com/vaadin/tests/CompileTransitionPropertyTest.java
+++ b/server/src/test/java/com/vaadin/tests/CompileTransitionPropertyTest.java
@@ -16,6 +16,7 @@
package com.vaadin.tests;
import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -31,8 +32,12 @@ public class CompileTransitionPropertyTest {
@Test
public void testCompilation() throws Exception {
+ String file = getClass().getResource("styles.scss").getFile();
+ if (file.contains("%20")) {
+ fail("path contains spaces, please move the project");
+ }
ScssStylesheet ss = ScssStylesheet
- .get(getClass().getResource("styles.scss").getFile());
+ .get(file);
ss.compile();
// extract the style rules for .my-label
String compiled = ss.printState();