Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
97acd20d
Commit
97acd20d
authored
May 30, 2014
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
a69f518c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
SmartImportCustomizer.java
...ingframework/boot/cli/compiler/SmartImportCustomizer.java
+5
-5
No files found.
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/SmartImportCustomizer.java
View file @
97acd20d
...
...
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
org
.
springframework
.
boot
.
cli
.
compiler
;
import
org.codehaus.groovy.ast.ClassHelper
;
...
...
@@ -26,7 +27,6 @@ import org.codehaus.groovy.control.customizers.ImportCustomizer;
* class with the same name is not already explicitly imported.
*
* @author Dave Syer
*
* @since 1.1
*/
class
SmartImportCustomizer
extends
ImportCustomizer
{
...
...
@@ -40,8 +40,8 @@ class SmartImportCustomizer extends ImportCustomizer {
@Override
public
ImportCustomizer
addImport
(
String
alias
,
String
className
)
{
if
(
source
.
getAST
()
.
getImport
(
ClassHelper
.
make
(
className
).
getNameWithoutPackage
())
==
null
)
{
if
(
this
.
source
.
getAST
().
getImport
(
ClassHelper
.
make
(
className
).
getNameWithoutPackage
())
==
null
)
{
super
.
addImport
(
alias
,
className
);
}
return
this
;
...
...
@@ -50,8 +50,8 @@ class SmartImportCustomizer extends ImportCustomizer {
@Override
public
ImportCustomizer
addImports
(
String
...
imports
)
{
for
(
String
alias
:
imports
)
{
if
(
source
.
getAST
()
.
getImport
(
ClassHelper
.
make
(
alias
).
getNameWithoutPackage
())
==
null
)
{
if
(
this
.
source
.
getAST
().
getImport
(
ClassHelper
.
make
(
alias
).
getNameWithoutPackage
())
==
null
)
{
super
.
addImports
(
alias
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment