File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
ng-appserver/src/main/java/ng/appserver Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,22 @@ private static void validateKeyPath( final String keyPath ) {
3939 throw new NGAssociationConstructionException ( "[keyPath] doesn't support operators (keys prefixed with '@')" );
4040 }
4141
42+ if ( keyPath .contains ( ". " ) ) {
43+ throw new NGAssociationConstructionException ( "[keyPath] has an element that starts with a space" );
44+ }
45+
46+ if ( keyPath .contains ( " ." ) ) {
47+ throw new NGAssociationConstructionException ( "[keyPath] has an element that ends with a space" );
48+ }
49+
50+ if ( keyPath .startsWith ( " " ) ) {
51+ throw new NGAssociationConstructionException ( "[keyPath] can't start with a space." );
52+ }
53+
54+ if ( keyPath .endsWith ( " " ) ) {
55+ throw new NGAssociationConstructionException ( "[keyPath] can't end with a space." );
56+ }
57+
4258 if ( keyPath .contains ( ".." ) ) {
4359 throw new NGAssociationConstructionException ( "[keyPath] can't contain two (or more) consecutive periods" );
4460 }
You can’t perform that action at this time.
0 commit comments