From a63e7301360d7ecd5d96031f517b18f777d16602 Mon Sep 17 00:00:00 2001 From: dreis2211 Date: Wed, 13 Apr 2022 20:02:05 +0200 Subject: [PATCH] Remove unused private methods See gh-30655 --- .../boot/devtools/restart/Restarter.java | 13 +------------ .../MetadataGenerationEnvironment.java | 4 ---- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java index 0981ce24a28..9f0f89e83f9 100644 --- a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java +++ b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2021 the original author or authors. + * Copyright 2012-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -350,17 +350,6 @@ public class Restarter { } } - private void clear(String className, String fieldName) { - try { - clear(Class.forName(className), fieldName); - } - catch (Exception ex) { - if (this.logger.isDebugEnabled()) { - this.logger.debug("Unable to clear field " + className + " " + fieldName, ex); - } - } - } - private void clear(Class type, String fieldName) throws Exception { try { Field field = type.getDeclaredField(fieldName); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/MetadataGenerationEnvironment.java b/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/MetadataGenerationEnvironment.java index fc0580285dd..12e74e47596 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/MetadataGenerationEnvironment.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/MetadataGenerationEnvironment.java @@ -221,10 +221,6 @@ class MetadataGenerationEnvironment { return Collections.unmodifiableList(stack); } - private boolean hasAnnotationRecursive(Element element, String type) { - return !getElementsAnnotatedOrMetaAnnotatedWith(element, this.elements.getTypeElement(type)).isEmpty(); - } - private boolean collectElementsAnnotatedOrMetaAnnotatedWith(TypeElement annotationType, LinkedList stack) { Element element = stack.peekLast(); for (AnnotationMirror annotation : this.elements.getAllAnnotationMirrors(element)) {