Skip to content

Commit

Permalink
trimming white spaces while checking for reserve words. fixes #163
Browse files Browse the repository at this point in the history
  • Loading branch information
eed3si9n committed Jun 27, 2012
1 parent e94f4c2 commit e3a80e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Expand Up @@ -509,13 +509,14 @@ trait ContextProcessor extends ScalaNames with PackageName {
case _ => false
}

def makeParamName(name: String, attribute: Boolean) = {
def makeParamName(name0: String, attribute: Boolean) = {
val prefix = (config.paramPrefix, config.attributePrefix) match {
case (p, _) if !attribute => p
case (None, None) => None
case (p, a) => Some(p.getOrElse("") + a.getOrElse(""))
}

val name = name0.trim
val base = prefix map { p =>
if (p.endsWith("_")) p + name
else p + name.capitalize
Expand Down
3 changes: 3 additions & 0 deletions notes/0.7.2.markdown
@@ -1,8 +1,11 @@
## bug fixes and minor enhancements
- Adds support for resolveing SOAP encoding hrefs. [#160][160]. reported by [@greenrd][@greenrd]
- Fixes xsi:type attribute wiping out other attributes due to SI-5843 [#159][159]. reported by [@psnively][@psnively]
- Fixes reserve word escaping when names contain trailing whitespaces. [#163][163]. reported by [@dohzya][@dohzya]

[159]: https://github.com/eed3si9n/scalaxb/issues/159
[160]: https://github.com/eed3si9n/scalaxb/issues/160
[163]: https://github.com/eed3si9n/scalaxb/issues/163
[@psnively]: https://github.com/psnively
[@greenrd]: https://github.com/greenrd
[@dohzya ]: https://github.com/dohzya

0 comments on commit e3a80e7

Please sign in to comment.