File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed
src/NHibernate/Hql/Ast/ANTLR Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -30,20 +30,18 @@ private IASTNode[] Process()
30
30
// Find all the polymorphic query sources
31
31
_nodeMapping = new PolymorphicQuerySourceDetector ( _factory ) . Process ( _ast ) ;
32
32
33
- if ( _nodeMapping . Count > 0 )
34
- {
35
- if ( _nodeMapping . All ( x => x . Value . Length == 0 ) )
36
- throw new QuerySyntaxException (
37
- _nodeMapping . Keys . Count == 1
38
- ? _nodeMapping . First ( ) . Key + " is not mapped"
39
- : string . Join ( ", " , _nodeMapping . Keys ) + " are not mapped" ) ;
33
+ if ( _nodeMapping . Count == 0 )
34
+ return new [ ] { _ast } ;
40
35
41
- return DuplicateTree ( ) ;
42
- }
43
- else
44
- {
45
- return new [ ] { _ast } ;
46
- }
36
+ var parsers = DuplicateTree ( ) ;
37
+
38
+ if ( parsers . Length == 0 )
39
+ throw new QuerySyntaxException (
40
+ _nodeMapping . Keys . Count == 1
41
+ ? _nodeMapping . First ( ) . Key + " is not mapped"
42
+ : string . Join ( ", " , _nodeMapping . Keys ) + " are not mapped" ) ;
43
+
44
+ return parsers ;
47
45
}
48
46
49
47
private IASTNode [ ] DuplicateTree ( )
You can’t perform that action at this time.
0 commit comments