]> source.dussan.org Git - vaadin-framework.git/commitdiff
URI to cval file was wrong in Windows (#14629)
authorManolo Carrasco <manolo@vaadin.com>
Tue, 9 Sep 2014 15:51:24 +0000 (17:51 +0200)
committerSauli Tähkäpää <sauli@vaadin.com>
Fri, 12 Sep 2014 14:00:13 +0000 (17:00 +0300)
Change-Id: Ifdcf8bcaf6f613660b185501be92eec0b43700b5

client-compiler/src/com/vaadin/tools/CvalChecker.java

index e426c5c4e6cfddc0eb60975c95a3db93539d8a3c..3ecb2c432da9409523524471b5b4e03470cb4803 100644 (file)
@@ -18,6 +18,7 @@ package com.vaadin.tools;
 
 import static java.lang.Integer.parseInt;
 
+import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.net.MalformedURLException;
@@ -458,12 +459,12 @@ public final class CvalChecker {
 
         try {
             String dotLicenseName = "." + licenseName;
-            String userHome = "file://" + System.getProperty("user.home") + "/";
-            for (URL url : new URL[] { new URL(userHome + dotLicenseName),
-                    new URL(userHome + licenseName),
+            String userHome = System.getProperty("user.home");
+            for (URL url : new URL[] {
+                    new File(userHome, dotLicenseName).toURI().toURL(),
+                    new File(userHome, licenseName).toURI().toURL(),
                     URL.class.getResource("/" + dotLicenseName),
                     URL.class.getResource("/" + licenseName) }) {
-
                 if (url != null) {
                     try {
                         key = readKeyFromFile(url,