File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,8 @@ def read(location)
8787 body = if uri . scheme . nil? || uri . scheme == 'file'
8888 uri = JSON ::Util ::URI . file_uri ( uri )
8989 read_file ( Pathname . new ( uri . path ) . expand_path )
90+ elsif uri . scheme == 'uri' && uri . path . start_with? ( "classloader:" )
91+ read_file ( Pathname . new ( uri ) . expand_path )
9092 else
9193 read_uri ( uri )
9294 end
@@ -128,7 +130,11 @@ def read_uri(uri)
128130
129131 def read_file ( pathname )
130132 if accept_file? ( pathname )
131- File . read ( JSON ::Util ::URI . unescaped_path ( pathname . to_s ) )
133+ if pathname . to_s . start_with? ( "uri:classloader:" )
134+ File . read ( pathname . to_s )
135+ else
136+ File . read ( JSON ::Util ::URI . unescaped_path ( pathname . to_s ) )
137+ end
132138 else
133139 raise JSON ::Schema ::ReadRefused . new ( pathname . to_s , :file )
134140 end
You can’t perform that action at this time.
0 commit comments