File tree 2 files changed +3
-5
lines changed
src/main/java/graphql/scalars/url
2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ repositories {
46
46
47
47
dependencies {
48
48
compile " com.graphql-java:graphql-java:16.1"
49
- compile " com.squareup.okhttp3:okhttp:3.14.9"
50
49
51
50
testCompile ' org.spockframework:spock-core:1.1-groovy-2.4'
52
51
testCompile ' org.codehaus.groovy:groovy-all:2.4.13'
Original file line number Diff line number Diff line change 7
7
import graphql .schema .CoercingParseValueException ;
8
8
import graphql .schema .CoercingSerializeException ;
9
9
import graphql .schema .GraphQLScalarType ;
10
- import okhttp3 .HttpUrl ;
11
10
12
11
import java .io .File ;
13
12
import java .net .MalformedURLException ;
@@ -67,11 +66,11 @@ public URL parseLiteral(Object input) throws CoercingParseLiteralException {
67
66
}
68
67
69
68
private URL parseURL (String input , Function <String , RuntimeException > exceptionMaker ) {
70
- HttpUrl httpUrl = HttpUrl .parse (input );
71
- if (httpUrl == null ) {
69
+ try {
70
+ return new URL (input );
71
+ } catch (MalformedURLException e ){
72
72
throw exceptionMaker .apply ("Invalid URL value : '" + input + "'." );
73
73
}
74
- return httpUrl .url ();
75
74
}
76
75
});
77
76
}
You can’t perform that action at this time.
0 commit comments