File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
main/java/org/springframework/oxm/jaxb
test/java/org/springframework/oxm/jaxb Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -457,6 +457,7 @@ private JAXBContext createJaxbContextFromPackages() throws JAXBException {
457457 if (logger .isDebugEnabled ()) {
458458 logger .debug ("Found JAXB2 classes: [" + StringUtils .arrayToCommaDelimitedString (jaxb2Classes ) + "]" );
459459 }
460+ this .classesToBeBound = jaxb2Classes ;
460461 if (this .jaxbContextProperties != null ) {
461462 return JAXBContext .newInstance (jaxb2Classes , this .jaxbContextProperties );
462463 }
Original file line number Diff line number Diff line change @@ -163,6 +163,14 @@ public void supportsClassesToBeBound() throws Exception {
163163 marshaller .afterPropertiesSet ();
164164 testSupports ();
165165 }
166+
167+ @ Test
168+ public void supportsPackagesToScan () throws Exception {
169+ marshaller = new Jaxb2Marshaller ();
170+ marshaller .setPackagesToScan (new String [] {CONTEXT_PATH });
171+ marshaller .afterPropertiesSet ();
172+ testSupports ();
173+ }
166174
167175 private void testSupports () throws Exception {
168176 assertTrue ("Jaxb2Marshaller does not support Flights class" , marshaller .supports (Flights .class ));
@@ -279,13 +287,6 @@ public void marshalAttachments() throws Exception {
279287 assertTrue ("No XML written" , writer .toString ().length () > 0 );
280288 }
281289
282- @ Test
283- public void supportsPackagesToScan () throws Exception {
284- marshaller = new Jaxb2Marshaller ();
285- marshaller .setPackagesToScan (new String [] {CONTEXT_PATH });
286- marshaller .afterPropertiesSet ();
287- }
288-
289290 @ XmlRootElement
290291 public static class DummyRootElement {
291292
You can’t perform that action at this time.
0 commit comments