Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
knowledge-platform
Commits
b4513ac6
Commit
b4513ac6
authored
2 years ago
by
shishir suman
Browse files
Options
Download
Patches
Plain Diff
updating read schema validator
parent
739e4923
master
Gcloud_copy
Gcloud_fix
Remove_unwantedCode_Gcloud_fix
bulk-upload-test_excel
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
platform-core/schema-validator/src/main/java/org/sunbird/schema/impl/BaseSchemaValidator.java
+4
-2
...ain/java/org/sunbird/schema/impl/BaseSchemaValidator.java
with
4 additions
and
2 deletions
+4
-2
platform-core/schema-validator/src/main/java/org/sunbird/schema/impl/BaseSchemaValidator.java
+
4
−
2
View file @
b4513ac6
...
...
@@ -19,6 +19,7 @@ import org.sunbird.schema.dto.ValidationResult;
import
javax.json.JsonReader
;
import
javax.json.JsonReaderFactory
;
import
java.io.ByteArrayInputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
...
...
@@ -68,8 +69,9 @@ public abstract class BaseSchemaValidator implements ISchemaValidator {
* @param stream the InputStream for the schema.
* @return the read schema.
*/
protected
JsonSchema
readSchema
(
InputStream
stream
)
{
try
(
JsonSchemaReader
reader
=
schemaReaderFactory
.
createSchemaReader
(
stream
))
{
protected
JsonSchema
readSchema
(
InputStream
stream
)
throws
IOException
{
byte
[]
data
=
stream
.
readAllBytes
();
ByteArrayInputStream
bis
=
new
ByteArrayInputStream
(
data
);
try
(
JsonSchemaReader
reader
=
schemaReaderFactory
.
createSchemaReader
(
bis
))
{
return
reader
.
read
();
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets