summaryrefslogtreecommitdiff
path: root/src/reflect/scala/reflect/macros
diff options
context:
space:
mode:
authorJanek Bogucki <janekdb@gmail.com>2015-11-26 22:27:19 +0000
committerJanek Bogucki <janekdb@gmail.com>2015-11-26 22:27:19 +0000
commit9d6cdf0066716da71b3d668628a25859b353ee5e (patch)
treec5d6ca766a609ad60b5e08da5e680746d07b53d0 /src/reflect/scala/reflect/macros
parent2890f0b767948dd9a0953b1e669e85dbd45ec0a7 (diff)
downloadscala-9d6cdf0066716da71b3d668628a25859b353ee5e.tar.gz
scala-9d6cdf0066716da71b3d668628a25859b353ee5e.tar.bz2
scala-9d6cdf0066716da71b3d668628a25859b353ee5e.zip
Apply some static code analysis recommendations
Fix a batch of code inspection recommendations generated by IntelliJ 14.1.5. Categories of fix, Unnecessary public modifier in interface Replace filter+size with count Replace filter+nonEmpty with exists Replace filter+headOption with find Replace `if (x != null) Some(x) else None` with Option(x) Replace getOrElse null with orNull Drop redundant semicolons Replace anon fun with PF Replace anon fun with method
Diffstat (limited to 'src/reflect/scala/reflect/macros')
-rw-r--r--src/reflect/scala/reflect/macros/Attachments.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/reflect/scala/reflect/macros/Attachments.scala b/src/reflect/scala/reflect/macros/Attachments.scala
index b5c340645a..0b5360c004 100644
--- a/src/reflect/scala/reflect/macros/Attachments.scala
+++ b/src/reflect/scala/reflect/macros/Attachments.scala
@@ -39,7 +39,7 @@ abstract class Attachments { self =>
/** An underlying payload of the given class type `T`. */
def get[T: ClassTag]: Option[T] =
- (all filter matchesTag[T]).headOption.asInstanceOf[Option[T]]
+ (all find matchesTag[T]).asInstanceOf[Option[T]]
/** Check underlying payload contains an instance of type `T`. */
def contains[T: ClassTag]: Boolean =