diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-09-04 01:53:30 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2018-09-04 01:54:29 +0200 |
commit | af55bd0a328aa05f3ffb53a57a37306d1372a478 (patch) | |
tree | a2309f191d4041d0e14e4632e2103f47d3e3f84d /src/utils/lombok | |
parent | 92bc41ae6dce8e16fd9da64c08ad085822fd33ed (diff) | |
download | lombok-af55bd0a328aa05f3ffb53a57a37306d1372a478.tar.gz lombok-af55bd0a328aa05f3ffb53a57a37306d1372a478.tar.bz2 lombok-af55bd0a328aa05f3ffb53a57a37306d1372a478.zip |
[wip] Random fixes to various tests that are failing, especially against Java7.
Diffstat (limited to 'src/utils/lombok')
-rw-r--r-- | src/utils/lombok/core/ClassLiteral.java | 39 | ||||
-rw-r--r-- | src/utils/lombok/core/FieldSelect.java | 39 | ||||
-rw-r--r-- | src/utils/lombok/eclipse/Eclipse.java | 4 |
3 files changed, 62 insertions, 20 deletions
diff --git a/src/utils/lombok/core/ClassLiteral.java b/src/utils/lombok/core/ClassLiteral.java index 077ead31..2008484b 100644 --- a/src/utils/lombok/core/ClassLiteral.java +++ b/src/utils/lombok/core/ClassLiteral.java @@ -1,13 +1,34 @@ +/* + * Copyright (C) 2018 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 + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ package lombok.core; public class ClassLiteral { - private final String className; - - public ClassLiteral(String className) { - this.className = className; - } - - public String getClassName() { - return className; - } + private final String className; + + public ClassLiteral(String className) { + this.className = className; + } + + public String getClassName() { + return className; + } } diff --git a/src/utils/lombok/core/FieldSelect.java b/src/utils/lombok/core/FieldSelect.java index ab784401..4c055105 100644 --- a/src/utils/lombok/core/FieldSelect.java +++ b/src/utils/lombok/core/FieldSelect.java @@ -1,13 +1,34 @@ +/* + * Copyright (C) 2018 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 + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ package lombok.core; public class FieldSelect { - private final String finalPart; - - public FieldSelect(String finalPart) { - this.finalPart = finalPart; - } - - public String getFinalPart() { - return finalPart; - } + private final String finalPart; + + public FieldSelect(String finalPart) { + this.finalPart = finalPart; + } + + public String getFinalPart() { + return finalPart; + } } diff --git a/src/utils/lombok/eclipse/Eclipse.java b/src/utils/lombok/eclipse/Eclipse.java index 943a7a7a..5dbe3e2d 100644 --- a/src/utils/lombok/eclipse/Eclipse.java +++ b/src/utils/lombok/eclipse/Eclipse.java @@ -186,11 +186,11 @@ public class Eclipse { default: return null; } } else if (e instanceof ClassLiteralAccess) { - return new ClassLiteral(Eclipse.toQualifiedName(((ClassLiteralAccess)e).type.getTypeName())); + return new ClassLiteral(Eclipse.toQualifiedName(((ClassLiteralAccess) e).type.getTypeName())); } else if (e instanceof SingleNameReference) { return new FieldSelect(new String(((SingleNameReference)e).token)); } else if (e instanceof QualifiedNameReference) { - String qName = Eclipse.toQualifiedName(((QualifiedNameReference)e).tokens); + String qName = Eclipse.toQualifiedName(((QualifiedNameReference) e).tokens); int idx = qName.lastIndexOf('.'); return new FieldSelect(idx == -1 ? qName : qName.substring(idx+1)); } else if (e instanceof UnaryExpression) { |