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
1e40bff1
Commit
1e40bff1
authored
Jun 18, 2015
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
7d80f0ef
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
22 deletions
+22
-22
RepositoryConfigurationFactory.java
...ork/boot/cli/compiler/RepositoryConfigurationFactory.java
+1
-1
DefaultRepositorySystemSessionAutoConfiguration.java
...rape/DefaultRepositorySystemSessionAutoConfiguration.java
+1
-1
SettingsXmlRepositorySystemSessionAutoConfiguration.java
.../SettingsXmlRepositorySystemSessionAutoConfiguration.java
+1
-1
SettingsXmlRepositorySystemSessionAutoConfigurationTests.java
...ingsXmlRepositorySystemSessionAutoConfigurationTests.java
+1
-1
settings.xml
...es/maven-settings/property-interpolation/.m2/settings.xml
+2
-2
EnvironmentTestUtils.java
...a/org/springframework/boot/test/EnvironmentTestUtils.java
+3
-4
EnvironmentTestUtilsTests.java
.../springframework/boot/test/EnvironmentTestUtilsTests.java
+13
-12
No files found.
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/RepositoryConfigurationFactory.java
View file @
1e40bff1
/*
/*
* Copyright 2012-201
4
the original author or authors.
* Copyright 2012-201
5
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/DefaultRepositorySystemSessionAutoConfiguration.java
View file @
1e40bff1
/*
/*
* Copyright 2012-201
4
the original author or authors.
* Copyright 2012-201
5
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/SettingsXmlRepositorySystemSessionAutoConfiguration.java
View file @
1e40bff1
/*
/*
* Copyright 2012-201
4
the original author or authors.
* Copyright 2012-201
5
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/grape/SettingsXmlRepositorySystemSessionAutoConfigurationTests.java
View file @
1e40bff1
/*
/*
* Copyright 2012-201
4
the original author or authors.
* Copyright 2012-201
5
the original author or authors.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
...
spring-boot-cli/src/test/resources/maven-settings/property-interpolation/.m2/settings.xml
View file @
1e40bff1
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/SETTINGS/1.0.0
xsi:schemaLocation=
"http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd"
>
http://maven.apache.org/xsd/settings-1.0.0.xsd"
>
<localRepository>
${foo}/repository
</localRepository>
<localRepository>
${foo}/repository
</localRepository>
</settings>
</settings>
\ No newline at end of file
spring-boot/src/main/java/org/springframework/boot/test/EnvironmentTestUtils.java
View file @
1e40bff1
...
@@ -92,12 +92,11 @@ public abstract class EnvironmentTestUtils {
...
@@ -92,12 +92,11 @@ public abstract class EnvironmentTestUtils {
int
equalIndex
=
pair
.
indexOf
(
"="
);
int
equalIndex
=
pair
.
indexOf
(
"="
);
if
(
colonIndex
==
-
1
)
{
if
(
colonIndex
==
-
1
)
{
return
equalIndex
;
return
equalIndex
;
}
else
if
(
equalIndex
==
-
1
)
{
return
colonIndex
;
}
}
else
{
if
(
equalIndex
==
-
1
)
{
return
Math
.
min
(
colonIndex
,
equalIndex
)
;
return
colonIndex
;
}
}
return
Math
.
min
(
colonIndex
,
equalIndex
);
}
}
}
}
spring-boot/src/test/java/org/springframework/boot/test/EnvironmentTestUtilsTests.java
View file @
1e40bff1
...
@@ -20,7 +20,6 @@ import java.util.HashMap;
...
@@ -20,7 +20,6 @@ import java.util.HashMap;
import
java.util.Map
;
import
java.util.Map
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.springframework.core.env.ConfigurableEnvironment
;
import
org.springframework.core.env.ConfigurableEnvironment
;
import
org.springframework.core.env.MapPropertySource
;
import
org.springframework.core.env.MapPropertySource
;
import
org.springframework.core.env.StandardEnvironment
;
import
org.springframework.core.env.StandardEnvironment
;
...
@@ -71,16 +70,18 @@ public class EnvironmentTestUtilsTests {
...
@@ -71,16 +70,18 @@ public class EnvironmentTestUtilsTests {
@Test
@Test
public
void
addPairNoValue
()
{
public
void
addPairNoValue
()
{
String
propertyName
=
"my.foo+bar"
;
String
propertyName
=
"my.foo+bar"
;
assertFalse
(
environment
.
containsProperty
(
propertyName
));
assertFalse
(
this
.
environment
.
containsProperty
(
propertyName
));
EnvironmentTestUtils
.
addEnvironment
(
environment
,
propertyName
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
environment
,
propertyName
);
assertTrue
(
environment
.
containsProperty
(
propertyName
));
assertTrue
(
this
.
environment
.
containsProperty
(
propertyName
));
assertEquals
(
""
,
environment
.
getProperty
(
propertyName
));
assertEquals
(
""
,
this
.
environment
.
getProperty
(
propertyName
));
}
}
private
void
testAddSimplePair
(
String
key
,
String
value
,
String
delimiter
)
{
private
void
testAddSimplePair
(
String
key
,
String
value
,
String
delimiter
)
{
assertFalse
(
"Property '"
+
key
+
"' should not exist"
,
environment
.
containsProperty
(
key
));
assertFalse
(
"Property '"
+
key
+
"' should not exist"
,
EnvironmentTestUtils
.
addEnvironment
(
environment
,
key
+
delimiter
+
value
);
this
.
environment
.
containsProperty
(
key
));
assertEquals
(
"Wrong value for property '"
+
key
+
"'"
,
value
,
environment
.
getProperty
(
key
));
EnvironmentTestUtils
.
addEnvironment
(
this
.
environment
,
key
+
delimiter
+
value
);
assertEquals
(
"Wrong value for property '"
+
key
+
"'"
,
value
,
this
.
environment
.
getProperty
(
key
));
}
}
@Test
@Test
...
@@ -88,10 +89,10 @@ public class EnvironmentTestUtilsTests {
...
@@ -88,10 +89,10 @@ public class EnvironmentTestUtilsTests {
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"my.foo"
,
"bar"
);
map
.
put
(
"my.foo"
,
"bar"
);
MapPropertySource
source
=
new
MapPropertySource
(
"sample"
,
map
);
MapPropertySource
source
=
new
MapPropertySource
(
"sample"
,
map
);
environment
.
getPropertySources
().
addFirst
(
source
);
this
.
environment
.
getPropertySources
().
addFirst
(
source
);
assertEquals
(
"bar"
,
environment
.
getProperty
(
"my.foo"
));
assertEquals
(
"bar"
,
this
.
environment
.
getProperty
(
"my.foo"
));
EnvironmentTestUtils
.
addEnvironment
(
environment
,
"my.foo=bar2"
);
EnvironmentTestUtils
.
addEnvironment
(
this
.
environment
,
"my.foo=bar2"
);
assertEquals
(
"bar2"
,
environment
.
getProperty
(
"my.foo"
));
assertEquals
(
"bar2"
,
this
.
environment
.
getProperty
(
"my.foo"
));
}
}
}
}
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