From 060c976e2ea8fa0aee2c3105570297b2f465edba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Westk=C3=A4mper?= Date: Tue, 7 Sep 2010 13:35:31 +0000 Subject: [PATCH] --- .../query/scala/ScalaBeanSerializer.scala | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/querydsl-scala/src/main/scala/com/mysema/query/scala/ScalaBeanSerializer.scala b/querydsl-scala/src/main/scala/com/mysema/query/scala/ScalaBeanSerializer.scala index a596d55ea..e023ba056 100644 --- a/querydsl-scala/src/main/scala/com/mysema/query/scala/ScalaBeanSerializer.scala +++ b/querydsl-scala/src/main/scala/com/mysema/query/scala/ScalaBeanSerializer.scala @@ -43,8 +43,7 @@ class ScalaBeanSerializer extends Serializer { importedClasses.add(classOf[Map[_,_]].getName); } -// writer.importClasses(importedClasses.toArray(new Array[String](0))); - importedClasses.foreach({ writer.importClasses(_)}) + importedClasses.foreach( { writer.importClasses(_)} ) // javadoc writer.javadoc(simpleName + javadocSuffix); @@ -57,9 +56,7 @@ class ScalaBeanSerializer extends Serializer { // properties for (property <- model.getProperties()){ - for (annotation <- property.getAnnotations){ - writer.annotation(annotation); - } + property.getAnnotations.foreach( {writer.annotation(_);} ) if (javaBeanSupport){ //writer.annotation(classOf[BeanProperty]); writer.line("@BeanProperty"); @@ -72,13 +69,13 @@ class ScalaBeanSerializer extends Serializer { def getAnnotationTypes(model: EntityType): Set[String] = { var imports = new HashSet[String](); - for (annotation <- model.getAnnotations()){ + for (annotation <- model.getAnnotations){ imports.add(annotation.annotationType.getName); } - for (property <- model.getProperties()){ - for (annotation <- property.getAnnotations()){ - imports.add(annotation.annotationType.getName); - } + for (property <- model.getProperties){ + for (annotation <- property.getAnnotations){ + imports.add(annotation.annotationType.getName); + } } imports; }