@@ -584,11 +584,11 @@ public Dialect getDialect(String dialectId) {
584584 return dialectRegistry .getDialect (key , this );
585585 }
586586
587- JsonNode readTree (String content , InputFormat inputFormat ) throws IOException {
587+ JsonNode readTree (String content , InputFormat inputFormat ) {
588588 return this .nodeReader .readTree (content , inputFormat );
589589 }
590590
591- JsonNode readTree (InputStream content , InputFormat inputFormat ) throws IOException {
591+ JsonNode readTree (InputStream content , InputFormat inputFormat ) {
592592 return this .nodeReader .readTree (content , inputFormat );
593593 }
594594
@@ -616,13 +616,8 @@ public Schema getSchema(final String schema) {
616616 * @return the schema
617617 */
618618 public Schema getSchema (final String schema , InputFormat inputFormat ) {
619- try {
620- final JsonNode schemaNode = readTree (schema , inputFormat );
621- return newSchema (null , schemaNode );
622- } catch (IOException ioe ) {
623- logger .error ("Failed to load json schema!" , ioe );
624- throw new SchemaException (ioe );
625- }
619+ final JsonNode schemaNode = readTree (schema , inputFormat );
620+ return newSchema (null , schemaNode );
626621 }
627622
628623 /**
@@ -649,13 +644,8 @@ public Schema getSchema(final InputStream schemaStream) {
649644 * @return the schema
650645 */
651646 public Schema getSchema (final InputStream schemaStream , InputFormat inputFormat ) {
652- try {
653- final JsonNode schemaNode = readTree (schemaStream , inputFormat );
654- return newSchema (null , schemaNode );
655- } catch (IOException ioe ) {
656- logger .error ("Failed to load json schema!" , ioe );
657- throw new SchemaException (ioe );
658- }
647+ final JsonNode schemaNode = readTree (schemaStream , inputFormat );
648+ return newSchema (null , schemaNode );
659649 }
660650
661651 /**
@@ -691,13 +681,8 @@ public Schema getSchema(final SchemaLocation schemaUri, final JsonNode jsonNode)
691681 * @return the schema
692682 */
693683 public Schema getSchema (final SchemaLocation schemaUri , final String schema , InputFormat inputFormat ) {
694- try {
695- final JsonNode schemaNode = readTree (schema , inputFormat );
696- return newSchema (schemaUri , schemaNode );
697- } catch (IOException ioe ) {
698- logger .error ("Failed to load json schema!" , ioe );
699- throw new SchemaException (ioe );
700- }
684+ final JsonNode schemaNode = readTree (schema , inputFormat );
685+ return newSchema (schemaUri , schemaNode );
701686 }
702687
703688 /**
@@ -709,13 +694,8 @@ public Schema getSchema(final SchemaLocation schemaUri, final String schema, Inp
709694 * @return the schema
710695 */
711696 public Schema getSchema (final SchemaLocation schemaUri , final InputStream schemaStream , InputFormat inputFormat ) {
712- try {
713- final JsonNode schemaNode = readTree (schemaStream , inputFormat );
714- return newSchema (schemaUri , schemaNode );
715- } catch (IOException ioe ) {
716- logger .error ("Failed to load json schema!" , ioe );
717- throw new SchemaException (ioe );
718- }
697+ final JsonNode schemaNode = readTree (schemaStream , inputFormat );
698+ return newSchema (schemaUri , schemaNode );
719699 }
720700
721701 /**
0 commit comments