Skip to content

Commit df3805c

Browse files
committed
#536 - Provide test for https xsd location
Signed-off-by: Aurélien Pupier <[email protected]>
1 parent 4418f0a commit df3805c

File tree

4 files changed

+54
-2
lines changed

4 files changed

+54
-2
lines changed

core/src/main/java/org/dozer/loader/xml/DozerResolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class DozerResolver implements EntityResolver {
4444

4545
private final Logger log = LoggerFactory.getLogger(DozerResolver.class);
4646
private static final String VERSION_5_XSD = "http://dozer.sourceforge.net/schema/beanmapping.xsd";
47-
private static final String VERSION_6_XSD = "http://dozermapper.github.io/schema/bean-mapping.xsd";
47+
private static final String VERSION_6_XSD = "https://dozermapper.github.io/schema/bean-mapping.xsd";
4848

4949
private final BeanContainer beanContainer;
5050

core/src/test/java/org/dozer/Version5XSDTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class Version5XSDTest {
2828
private String message = "Dozer >= v6.0.0 uses a new XSD location. " +
2929
"Your current config needs to be upgraded. " +
3030
"Found v5 XSD: 'http://dozer.sourceforge.net/schema/beanmapping.xsd'. " +
31-
"Expected v6 XSD: 'http://dozermapper.github.io/schema/bean-mapping.xsd'. " +
31+
"Expected v6 XSD: 'https://dozermapper.github.io/schema/bean-mapping.xsd'. " +
3232
"Please see migration guide @ https://dozermapper.github.io/gitbook";
3333

3434
@Test
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright 2005-2018 Dozer Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package org.dozer;
17+
18+
import org.junit.Test;
19+
20+
public class Version6XSDTest {
21+
22+
@Test
23+
public void testWithHttpsProtocol() throws Exception {
24+
Mapper mapper = DozerBeanMapperBuilder.create()
25+
.withMappingFiles("mappings/withHttpsXsdLocation.xml")
26+
.build();
27+
mapper.getMappingMetadata();
28+
}
29+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
Copyright 2005-2018 Dozer Project
5+
6+
Licensed under the Apache License, Version 2.0 (the "License");
7+
you may not use this file except in compliance with the License.
8+
You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
18+
-->
19+
<mappings xmlns="http://dozermapper.github.io/schema/bean-mapping"
20+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21+
xsi:schemaLocation="http://dozermapper.github.io/schema/bean-mapping https://dozermapper.github.io/schema/bean-mapping.xsd">
22+
23+
</mappings>

0 commit comments

Comments
 (0)