Merge branch '1.3.x'
This commit is contained in:
commit
644ae2c21a
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2015 the original author or authors.
|
||||
* Copyright 2012-2016 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.
|
||||
|
@ -57,14 +57,11 @@ public abstract class AnnotatedNodeASTTransformation implements ASTTransformatio
|
|||
public void visit(ASTNode[] nodes, SourceUnit source) {
|
||||
this.sourceUnit = source;
|
||||
List<AnnotationNode> annotationNodes = new ArrayList<AnnotationNode>();
|
||||
|
||||
ClassVisitor classVisitor = new ClassVisitor(source, annotationNodes);
|
||||
for (ASTNode node : nodes) {
|
||||
if (node instanceof ModuleNode) {
|
||||
ModuleNode module = (ModuleNode) node;
|
||||
|
||||
visitAnnotatedNode(module.getPackage(), annotationNodes);
|
||||
|
||||
for (ImportNode importNode : module.getImports()) {
|
||||
visitAnnotatedNode(importNode, annotationNodes);
|
||||
}
|
||||
|
@ -79,14 +76,12 @@ public abstract class AnnotatedNodeASTTransformation implements ASTTransformatio
|
|||
.entrySet()) {
|
||||
visitAnnotatedNode(entry.getValue(), annotationNodes);
|
||||
}
|
||||
|
||||
for (ClassNode classNode : module.getClasses()) {
|
||||
visitAnnotatedNode(classNode, annotationNodes);
|
||||
classNode.visitContents(classVisitor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
processAnnotationNodes(annotationNodes);
|
||||
}
|
||||
|
||||
|
@ -117,6 +112,7 @@ public abstract class AnnotatedNodeASTTransformation implements ASTTransformatio
|
|||
private class ClassVisitor extends ClassCodeVisitorSupport {
|
||||
|
||||
private final SourceUnit source;
|
||||
|
||||
private List<AnnotationNode> annotationNodes;
|
||||
|
||||
ClassVisitor(SourceUnit source, List<AnnotationNode> annotationNodes) {
|
||||
|
|
|
@ -192,6 +192,7 @@ public class DevToolsDataSourceAutoConfigurationTests {
|
|||
public EntityManagerFactory entityManagerFactory() {
|
||||
return mock(EntityManagerFactory.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -87,8 +87,8 @@ class RawConfigurationMetadata {
|
|||
}
|
||||
}
|
||||
|
||||
private static boolean hasLength(String s) {
|
||||
return (s != null && s.length() > 0);
|
||||
private static boolean hasLength(String string) {
|
||||
return (string != null && string.length() > 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -263,8 +263,7 @@ public class ConfigurationMetadataRepositoryJsonBuilderTests
|
|||
ConfigurationMetadataSource source = group.getSources().get("org.acme.Foo");
|
||||
contains(source.getProperties(), "name");
|
||||
assertThat(source.getProperties()).hasSize(1);
|
||||
ConfigurationMetadataSource source2 = group.getSources()
|
||||
.get("org.acme.Bar");
|
||||
ConfigurationMetadataSource source2 = group.getSources().get("org.acme.Bar");
|
||||
contains(source2.getProperties(), "title");
|
||||
assertThat(source2.getProperties()).hasSize(1);
|
||||
validatePropertyHints(repo.getAllProperties().get("name"), 0, 0);
|
||||
|
|
Loading…
Reference in New Issue