aboutsummaryrefslogtreecommitdiff
path: root/src/utils/lombok/javac/java8/CommentCollectingTokenizer.java
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2020-06-25 23:01:06 +0200
committerRoel Spilker <r.spilker@gmail.com>2020-06-25 23:01:06 +0200
commite75517d561790bf8ee01763a1c75e091d03132e9 (patch)
tree6d351aa8988156311a1595bf0069c212a546c61c /src/utils/lombok/javac/java8/CommentCollectingTokenizer.java
parent3ffef5d23be17e9bffca30936d43bca852feaa93 (diff)
downloadlombok-e75517d561790bf8ee01763a1c75e091d03132e9.tar.gz
lombok-e75517d561790bf8ee01763a1c75e091d03132e9.tar.bz2
lombok-e75517d561790bf8ee01763a1c75e091d03132e9.zip
Avoid class.getSimpleName except in static initializers or error messages
Diffstat (limited to 'src/utils/lombok/javac/java8/CommentCollectingTokenizer.java')
-rw-r--r--src/utils/lombok/javac/java8/CommentCollectingTokenizer.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/lombok/javac/java8/CommentCollectingTokenizer.java b/src/utils/lombok/javac/java8/CommentCollectingTokenizer.java
index 08477e61..d7b1d569 100644
--- a/src/utils/lombok/javac/java8/CommentCollectingTokenizer.java
+++ b/src/utils/lombok/javac/java8/CommentCollectingTokenizer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013-2019 The Project Lombok Authors.
+ * Copyright (C) 2013-2020 The Project Lombok Authors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -59,7 +59,7 @@ class CommentCollectingTokenizer extends JavaTokenizer {
@Override public Token readToken() {
Token token = super.readToken();
prevEndPosition = pos();
- if (textBlockStarts != null && (prevEndPosition - token.pos > 5) && token.getClass().getSimpleName().equals("StringToken")) {
+ if (textBlockStarts != null && (prevEndPosition - token.pos > 5) && token.getClass().getName().endsWith("$StringToken")) {
char[] start = reader.getRawCharacters(token.pos, token.pos + 3);
if (start[0] == '"' && start[1] == '"' && start[2] == '"') textBlockStarts.add(token.pos);
}