Skip to content

Commit

Permalink
Schema.getType() refactored.
Browse files Browse the repository at this point in the history
  • Loading branch information
keshavarzi committed Sep 6, 2013
1 parent 026054a commit 87cc162
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/src/main/groovy/com/predic8/schema/Schema.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ class Schema extends SchemaComponent{
* @return TypeDefinition
*/
TypeDefinition getType(QName type){
if(!type) return
if(type.namespaceURI == Consts.SCHEMA_NS) return new BuiltInSchemaType(qname: type)
(allSchemas.complexTypes + allSchemas.simpleTypes + allSchemas.groups).flatten().find{
it.qname == type
Expand Down

0 comments on commit 87cc162

Please sign in to comment.