mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 18:15:55 +00:00
Updated to helios. A few new warnings popped up; handled those.
This commit is contained in:
1 parent
d5ba04ca59
commit
bc8d7d131e
4 files changed
+7
-6
No files matched your search
@@ -147,7 +147,7 @@ public abstract class AST<A extends AST<A, L, N>, L extends LombokNode<A, L, N>,
|
||||
return nodeMap.get(node);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
L replaceNewWithExistingOld(Map<N, L> oldNodes, L newNode) {
|
||||
L oldNode = oldNodes.get(newNode.get());
|
||||
L targetNode = oldNode == null ? newNode : oldNode;
|
||||
@@ -317,7 +317,7 @@ public abstract class AST<A extends AST<A, L, N>, L extends LombokNode<A, L, N>,
|
||||
*
|
||||
* @throws IllegalAccessException This exception won't happen, but we allow you to throw it so you can avoid having to catch it.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
protected void setElementInASTCollection(Field field, Object fieldRef, List<Collection<?>> chain, Collection<?> collection, int idx, N newN) throws IllegalAccessException {
|
||||
if (collection instanceof List<?>) {
|
||||
((List)collection).set(idx, newN);
|
||||
|
||||
@@ -124,7 +124,7 @@ public abstract class LombokNode<A extends AST<A, L, N>, L extends LombokNode<A,
|
||||
*
|
||||
* Also affects the underlying (Eclipse/javac) AST.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
public L replaceWith(N newN, Kind newNodeKind) {
|
||||
ast.setChanged();
|
||||
L newNode = ast.buildTree(newN, newNodeKind);
|
||||
@@ -228,7 +228,7 @@ public abstract class LombokNode<A extends AST<A, L, N>, L extends LombokNode<A,
|
||||
*
|
||||
* Does not change the underlying (javac/Eclipse) AST, only the wrapped view.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
public L add(N newChild, Kind newChildKind) {
|
||||
ast.setChanged();
|
||||
L n = ast.buildTree(newChild, newChildKind);
|
||||
|
||||
@@ -94,7 +94,8 @@ public class HandlerLibrary {
|
||||
}
|
||||
|
||||
/** Uses SPI Discovery to find implementations of {@link EclipseAnnotationHandler}. */
|
||||
@SuppressWarnings("unchecked") private static void loadAnnotationHandlers(HandlerLibrary lib) {
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
private static void loadAnnotationHandlers(HandlerLibrary lib) {
|
||||
try {
|
||||
for (EclipseAnnotationHandler<?> handler : SpiLoadUtil.findServices(EclipseAnnotationHandler.class, EclipseAnnotationHandler.class.getClassLoader())) {
|
||||
try {
|
||||
|
||||
@@ -94,7 +94,7 @@ public class HandlerLibrary {
|
||||
}
|
||||
|
||||
/** Uses SPI Discovery to find implementations of {@link JavacAnnotationHandler}. */
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
private static void loadAnnotationHandlers(HandlerLibrary lib) throws IOException {
|
||||
//No, that seemingly superfluous reference to JavacAnnotationHandler's classloader is not in fact superfluous!
|
||||
for (JavacAnnotationHandler handler : SpiLoadUtil.findServices(JavacAnnotationHandler.class, JavacAnnotationHandler.class.getClassLoader())) {
|
||||
|
||||
Reference in new issue
Block a user