1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.rice.vc.test;
18
19 import com.predic8.schema.ComplexType;
20 import com.predic8.schema.Sequence;
21 import com.predic8.soamodel.Difference;
22 import com.predic8.wsdl.Definitions;
23 import com.predic8.wsdl.Operation;
24 import com.predic8.wsdl.PortType;
25 import com.predic8.wsdl.WSDLParser;
26 import com.predic8.wsdl.diff.WsdlDiffGenerator;
27 import org.apache.commons.lang.StringUtils;
28 import org.apache.log4j.Logger;
29 import org.codehaus.jackson.JsonNode;
30 import org.codehaus.jackson.map.ObjectMapper;
31 import org.kuali.rice.core.api.config.property.Config;
32 import org.kuali.rice.core.api.config.property.ConfigContext;
33 import org.kuali.rice.core.api.lifecycle.BaseLifecycle;
34 import org.kuali.rice.core.api.lifecycle.Lifecycle;
35 import org.kuali.rice.core.framework.resourceloader.SpringResourceLoader;
36 import org.kuali.rice.test.BaselineTestCase;
37
38 import javax.xml.namespace.QName;
39 import java.io.BufferedReader;
40 import java.io.File;
41 import java.io.IOException;
42 import java.io.InputStreamReader;
43 import java.net.MalformedURLException;
44 import java.net.URL;
45 import java.util.*;
46 import java.util.regex.Pattern;
47
48 import static org.junit.Assert.assertTrue;
49 import static org.junit.Assert.fail;
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74 @BaselineTestCase.BaselineMode(BaselineTestCase.Mode.ROLLBACK)
75 public abstract class WsdlCompareTestCase extends BaselineTestCase {
76 private static final Logger LOG = Logger.getLogger(WsdlCompareTestCase.class);
77 private static final String WSDL_URL = "wsdl.test.previous.url";
78 private static final String WSDL_PREVIOUS_VERSION = "wsdl.test.previous.version";
79 private static final String LINE_SEPARATOR = System.getProperty("line.separator");
80
81 private String previousVersion;
82
83 private static final List<String> ignoreBreakageRegexps = Arrays.asList(
84 ".*Position of any changed from .*",
85 ".*Position of element null changed.$"
86 );
87
88 public WsdlCompareTestCase(String moduleName) {
89 super(moduleName);
90 }
91
92 protected List<String> verifyWsdlDifferences(Difference diff, String level) {
93 List<String> results = new ArrayList<String>();
94
95 if (diff.isBreaks()) {
96 boolean ignore = false;
97 for (String ignoreBreakageRegexp : ignoreBreakageRegexps) {
98 if (diff.getDescription().matches(ignoreBreakageRegexp)) {
99 ignore = true;
100 break;
101 }
102 }
103
104 if (ignore) {
105 LOG.info(level + "non-breaking change" + diff.getDescription());
106 } else {
107 LOG.error(level + "breaking change: " + diff.getType() + diff.getDescription());
108 results.add(level + diff.getDescription());
109 }
110 }
111
112
113
114 String opBreakageString = checkForOperationBasedChanges(diff);
115 if (opBreakageString != null) {
116 results.add(level + opBreakageString);
117 }
118
119 for (Difference moreDiff : diff.getDiffs()) {
120 List<String> childBreakages = verifyWsdlDifferences(moreDiff, level + " ");
121 for (String childBreakage : childBreakages) {
122 if (!diff.getDescription().trim().startsWith("Schema ")) {
123 results.add(level + diff.getDescription() + LINE_SEPARATOR + childBreakage);
124 } else {
125 results.add(childBreakage);
126 }
127 }
128 }
129
130 return results;
131 }
132
133
134
135
136
137
138
139
140
141
142
143
144 private String checkForOperationBasedChanges(Difference diff) {
145 if ("sequence".equals(diff.getType())
146 && diff.getA() != null
147 && diff.getB() != null) {
148 Sequence oldSequence = (Sequence)diff.getA();
149 Sequence newSequence = (Sequence)diff.getB();
150 if (newSequence.getParent() instanceof ComplexType) {
151 ComplexType parent = (ComplexType)newSequence.getParent();
152 String serviceName = newSequence.getSchema().getDefinitions().getName();
153 PortType portType = newSequence.getSchema().getDefinitions().getPortType(serviceName);
154 if (portType != null) {
155 Operation operation = portType.getOperation(parent.getName());
156
157 if (operation != null) {
158 return "Element cannot be added to a sequence if sequence is an Operation " +
159 diff.getDescription();
160 }
161
162
163 }
164 }
165 }
166 return null;
167 }
168
169 protected List<Difference> compareWsdlDefinitions(String oldWsdl, String newWsdl) {
170 WSDLParser parser = new WSDLParser();
171
172 Definitions wsdl1;
173 Definitions wsdl2;
174 try {
175 wsdl1 = parser.parse(oldWsdl);
176 } catch (com.predic8.xml.util.ResourceDownloadException e) {
177 LOG.info("Couldn't download " + oldWsdl + ", maybe the service didn't exist in this version?");
178 return Collections.emptyList();
179 }
180 try {
181 wsdl2 = parser.parse(newWsdl);
182 } catch (com.predic8.xml.util.ResourceDownloadException e) {
183 LOG.info("Couldn't download" + newWsdl + ", maybe the service didn't exist in this version?");
184 return Collections.emptyList();
185 }
186
187 WsdlDiffGenerator diffGen = new WsdlDiffGenerator(wsdl1, wsdl2);
188 return diffGen.compare();
189 }
190
191 protected String getPreviousVersionWsdlUrl(String wsdlFile, MavenVersion previousVersion) {
192
193 StringBuilder oldWsdl = new StringBuilder(buildWsdlUrlPrefix(previousVersion.getOriginalForm()));
194 oldWsdl.append("rice-");
195 oldWsdl.append(getModuleName());
196 oldWsdl.append("-api-");
197 oldWsdl.append(previousVersion.getOriginalForm());
198 oldWsdl.append("-");
199 oldWsdl.append(wsdlFile);
200
201 return oldWsdl.toString();
202 }
203
204
205 private String buildWsdlUrlPrefix(String previousVersion) {
206 String wsdlUrl = ConfigContext.getCurrentContextConfig().getProperty(WSDL_URL);
207
208 if (StringUtils.isNotBlank(wsdlUrl)
209 && StringUtils.isNotBlank(previousVersion)) {
210 StringBuilder urlBuilder = new StringBuilder(wsdlUrl);
211 if (!wsdlUrl.endsWith("/")) {
212 urlBuilder.append("/");
213 }
214 urlBuilder.append("rice-");
215 urlBuilder.append(getModuleName());
216 urlBuilder.append("-api/");
217 urlBuilder.append(previousVersion);
218 urlBuilder.append("/");
219
220 return urlBuilder.toString();
221
222 } else {
223 throw new RuntimeException("Couldn't build wsdl url prefix");
224 }
225 }
226
227
228
229
230
231
232
233
234 protected Map<String, List<VersionTransition>> getWsdlVersionTransitionBlacklists() {
235 return new HashMap<String, List<VersionTransition>>();
236 }
237
238 protected void compareWsdlFiles(File[] wsdlFiles) {
239 List<VersionCompatibilityBreakage> breakages = new ArrayList<VersionCompatibilityBreakage>();
240
241 assertTrue("There should be wsdls to compare", wsdlFiles != null && wsdlFiles.length > 0);
242
243 MavenVersion previousVersion = new MavenVersion(getPreviousVersion(),
244 "0" );
245 MavenVersion currentVersion = getCurrentMavenVersion();
246 List<MavenVersion> versions = getVersionRange(previousVersion, currentVersion);
247 List<VersionTransition> transitions = generateVersionTransitions(currentVersion, versions);
248
249 for (File wsdlFile : wsdlFiles) {
250 if (wsdlFile.getName().endsWith(".wsdl")) {
251 LOG.info("TESTING WSDL: " + wsdlFile.getAbsolutePath());
252 String newWsdl = wsdlFile.getAbsolutePath();
253
254
255 List<VersionTransition> wsdlTransitionBlacklist =
256 getWsdlVersionTransitionBlacklists().get(getServiceNameFromWsdlFile(wsdlFile));
257
258 if (wsdlTransitionBlacklist == null) { wsdlTransitionBlacklist = Collections.emptyList(); }
259
260 for (VersionTransition transition : transitions) if (!wsdlTransitionBlacklist.contains(transition)) {
261 breakages.addAll(testWsdlVersionTransition(currentVersion, wsdlFile, transition));
262 } else {
263 LOG.info("Ignoring blacklisted " + transition);
264 }
265 }
266 }
267
268 if (!breakages.isEmpty()) {
269 fail(buildBreakagesSummary(breakages));
270 }
271 }
272
273
274 String getServiceNameFromWsdlFile(File wsdlFile) {
275 String fileName = wsdlFile.getName();
276 int beginIndex = 1 + fileName.lastIndexOf('-');
277 int endIndex = fileName.lastIndexOf('.');
278
279 return fileName.substring(beginIndex, endIndex);
280 }
281
282
283
284
285
286
287
288
289 private List<VersionCompatibilityBreakage> testWsdlVersionTransition(MavenVersion currentVersion, File wsdlFile, VersionTransition transition) {
290 List<VersionCompatibilityBreakage> breakages = new ArrayList<VersionCompatibilityBreakage>();
291
292 String fromVersionWsdlUrl = getPreviousVersionWsdlUrl(wsdlFile.getName(), transition.getFromVersion());
293 String toVersionWsdlUrl = getPreviousVersionWsdlUrl(wsdlFile.getName(), transition.getToVersion());
294
295
296 if (transition.getToVersion().equals(currentVersion)) {
297 toVersionWsdlUrl = wsdlFile.getAbsolutePath();
298 }
299
300 getPreviousVersionWsdlUrl(wsdlFile.getName(), transition.getToVersion());
301
302 LOG.info("checking " + transition);
303
304 if (fromVersionWsdlUrl == null) {
305 LOG.warn("SKIPPING check, wsdl not found for " + fromVersionWsdlUrl);
306 } else if (toVersionWsdlUrl == null) {
307 LOG.warn("SKIPPING check, wsdl not found for " + toVersionWsdlUrl);
308 } else {
309 List<Difference> differences = compareWsdlDefinitions(fromVersionWsdlUrl, toVersionWsdlUrl);
310 for (Difference diff : differences) {
311 List<String> breakageStrings = verifyWsdlDifferences(diff, "");
312
313 for (String breakage : breakageStrings) {
314 breakages.add(new VersionCompatibilityBreakage(
315 transition.fromVersion, transition.toVersion,
316 fromVersionWsdlUrl, toVersionWsdlUrl, breakage));
317 }
318 }
319 }
320
321 return breakages;
322 }
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358 protected List<VersionTransition> generateVersionTransitions(MavenVersion currentVersion, List<MavenVersion> versions) {
359 List<VersionTransition> results = new ArrayList<VersionTransition>();
360
361 versions = new ArrayList<MavenVersion>(versions);
362 Collections.sort(versions, mavenVersionTimestampComparator);
363
364 Collections.reverse(versions);
365
366 final MavenVersion currentMinorVersion = trimToMinorVersion(currentVersion);
367 MavenVersion buildingTransitionsTo = currentVersion;
368
369
370
371 Set<MavenVersion> minorVersionsFrom = new HashSet<MavenVersion>();
372
373 for (MavenVersion version : versions) if (version.compareTo(buildingTransitionsTo) < 0) {
374 MavenVersion minorVersion = trimToMinorVersion(version);
375 if (minorVersion.equals(currentMinorVersion)) {
376
377 results.add(new VersionTransition(version, buildingTransitionsTo));
378 buildingTransitionsTo = version;
379
380 minorVersionsFrom.clear();
381 } else if (!minorVersionsFrom.contains(minorVersion)) {
382 results.add(new VersionTransition(version, buildingTransitionsTo));
383 minorVersionsFrom.add(minorVersion);
384 }
385 }
386
387
388 Collections.reverse(results);
389
390 return results;
391 }
392
393
394
395
396 private MavenVersion trimToMinorVersion(MavenVersion fullVersion) {
397 return new MavenVersion(""+fullVersion.getNumbers().get(0)+"."+fullVersion.getNumbers().get(1), "0");
398 }
399
400 protected String buildBreakagesSummary(List<VersionCompatibilityBreakage> breakages) {
401 StringBuilder errorsStringBuilder =
402 new StringBuilder(LINE_SEPARATOR + "!!!!! Detected " + breakages.size() + " VC Breakages !!!!!"
403 + LINE_SEPARATOR);
404
405 MavenVersion lastOldVersion = null;
406 String lastOldWsdlUrl = "";
407
408 for (VersionCompatibilityBreakage breakage : breakages) {
409
410 if (lastOldVersion != breakage.oldMavenVersion || lastOldWsdlUrl != breakage.oldWsdlUrl) {
411 lastOldVersion = breakage.oldMavenVersion;
412 lastOldWsdlUrl = breakage.oldWsdlUrl;
413
414 errorsStringBuilder.append(LINE_SEPARATOR + "Old Version: " + lastOldVersion.getOriginalForm()
415 +", wsdl: " + lastOldWsdlUrl);
416 errorsStringBuilder.append(LINE_SEPARATOR + "New Version: " + breakage.newMavenVersion.getOriginalForm()
417 +", wsdl: " + breakage.newWsdlUrl + LINE_SEPARATOR + LINE_SEPARATOR);
418 }
419 errorsStringBuilder.append(breakage.breakageMessage + LINE_SEPARATOR);
420 }
421 return errorsStringBuilder.toString();
422 }
423
424 public String getPreviousVersion() {
425 if (StringUtils.isEmpty(this.previousVersion)) {
426 this.previousVersion = ConfigContext.getCurrentContextConfig().getProperty(WSDL_PREVIOUS_VERSION);
427 }
428 return this.previousVersion;
429 }
430
431 public void setPreviousVersion(String previousVersion) {
432 this.previousVersion = previousVersion;
433 }
434
435 @Override
436 protected Lifecycle getLoadApplicationLifecycle() {
437 SpringResourceLoader springResourceLoader = new SpringResourceLoader(new QName("VCTestHarnessResourceLoader"), "classpath:VCTestHarnessSpringBeans.xml", null);
438 springResourceLoader.setParentSpringResourceLoader(getTestHarnessSpringResourceLoader());
439 return springResourceLoader;
440 }
441
442 @Override
443 protected List<Lifecycle> getPerTestLifecycles() {
444 return new ArrayList<Lifecycle>();
445 }
446
447 @Override
448 protected List<Lifecycle> getSuiteLifecycles() {
449 List<Lifecycle> lifecycles = new LinkedList<Lifecycle>();
450
451
452
453
454 lifecycles.add(new BaseLifecycle() {
455 @Override
456 public void start() throws Exception {
457 Config config = getTestHarnessConfig();
458 ConfigContext.init(config);
459 super.start();
460 }
461 });
462
463 return lifecycles;
464 }
465
466
467
468
469
470
471
472
473
474 protected List<MavenVersion> getVersionRange(MavenVersion lowestVersion, MavenVersion highestVersion) {
475 ArrayList<MavenVersion> results = new ArrayList<MavenVersion>();
476
477 if (highestVersion.compareTo(lowestVersion) <= 0) {
478 throw new IllegalStateException("currentVersion " + highestVersion +
479 " is <= previousVersion " + lowestVersion);
480 }
481 List<MavenVersion> riceVersions = getRiceMavenVersions();
482
483 for (MavenVersion riceVersion : riceVersions) {
484 if ( highestVersion.compareTo(riceVersion) > 0 &&
485 lowestVersion.compareTo(riceVersion) <= 0 &&
486 "".equals(riceVersion.getQualifier()) ) {
487 results.add(riceVersion);
488 }
489 }
490
491 return results;
492 }
493
494
495
496 private static List<MavenVersion> riceMavenVersions = null;
497
498 private static List<MavenVersion> getRiceMavenVersions() {
499 if (riceMavenVersions == null) {
500 String searchContent = getMavenSearchResults();
501 riceMavenVersions = parseSearchResults(searchContent);
502
503 Collections.sort(riceMavenVersions, mavenVersionTimestampComparator);
504
505 LOG.info("Published versions, sorted by timestamp:");
506 for (MavenVersion riceVersion : riceMavenVersions) {
507 LOG.info("" + riceVersion.getTimestamp() + " " + riceVersion.getOriginalForm());
508 }
509
510 }
511 return riceMavenVersions;
512 }
513
514
515
516
517 private MavenVersion getCurrentMavenVersion() {
518 return new MavenVersion(ConfigContext.getCurrentContextConfig().getProperty("rice.version"),
519 ""+System.currentTimeMillis());
520 }
521
522 private static List<MavenVersion> parseSearchResults(String searchContent) {
523 LinkedList<MavenVersion> riceVersions = new LinkedList<MavenVersion>();
524
525 ObjectMapper mapper = new ObjectMapper();
526 JsonNode rootNode;
527 try {
528 rootNode = mapper.readTree(searchContent);
529 } catch (IOException e) {
530 throw new RuntimeException("Can't parse maven search results", e);
531 }
532 JsonNode docsNode = rootNode.get("response").get("docs");
533
534 for (JsonNode node : docsNode) {
535 String versionStr = node.get("v").toString();
536 String timestampStr = node.get("timestamp").toString();
537
538 riceVersions.add(new MavenVersion(versionStr.replace( "\"",""), timestampStr));
539 }
540
541 Collections.sort(riceVersions);
542 return riceVersions;
543 }
544
545 private static String getMavenSearchResults() {
546
547
548 final String mavenSearchUrlString =
549 "http://search.maven.org/solrsearch/select?q=g:%22org.kuali.rice%22+AND+a:%22rice%22&core=gav&rows=20&wt=json";
550
551 URL mavenSearchUrl;
552
553 try {
554 mavenSearchUrl = new URL(mavenSearchUrlString);
555 } catch (MalformedURLException e) {
556 throw new RuntimeException("can't parse maven search url", e);
557 }
558
559 StringBuilder contentBuilder = new StringBuilder();
560 BufferedReader contentReader;
561 try {
562 contentReader = new BufferedReader(new InputStreamReader(mavenSearchUrl.openStream()));
563 String line;
564 while (null != (line = contentReader.readLine())) {
565 contentBuilder.append(line + LINE_SEPARATOR);
566 }
567 } catch (IOException e) {
568 throw new RuntimeException("Unable to read search results", e);
569 }
570 return contentBuilder.toString();
571 }
572
573
574
575
576 protected static class MavenVersion implements Comparable<MavenVersion> {
577 private static final Pattern PERIOD_PATTERN = Pattern.compile("\\.");
578 private final List<Integer> numbers;
579 private final String originalForm;
580 private final String qualifier;
581 private final Long timestamp;
582
583
584
585
586
587 public MavenVersion(String versionString) {
588 this(versionString, "0");
589 }
590
591 public MavenVersion(String versionString, String timestampString) {
592 originalForm = versionString;
593 if (versionString == null || "".equals(versionString.trim())) {
594 throw new IllegalArgumentException("empty or null version string");
595 }
596 String versionPart;
597 int dashIndex = versionString.indexOf('-');
598 if (dashIndex != -1 && versionString.length()-1 > dashIndex) {
599 qualifier = versionString.substring(dashIndex+1).trim();
600 versionPart = versionString.substring(0,dashIndex);
601 } else {
602 versionPart = versionString;
603 qualifier = "";
604 }
605 String [] versionArray = PERIOD_PATTERN.split(versionPart);
606
607 List<Integer> numbersBuilder = new ArrayList<Integer>(versionArray.length);
608
609 for (String versionParticle : versionArray) {
610 numbersBuilder.add(Integer.valueOf(versionParticle));
611 }
612
613 numbers = Collections.unmodifiableList(numbersBuilder);
614
615 timestamp = Long.valueOf(timestampString);
616 }
617
618 @Override
619 public int compareTo(MavenVersion that) {
620 Iterator<Integer> thisNumbersIter = this.numbers.iterator();
621 Iterator<Integer> thatNumbersIter = that.numbers.iterator();
622
623 while (thisNumbersIter.hasNext()) {
624
625 if (!thatNumbersIter.hasNext()) return 1;
626
627 int numberComparison = thisNumbersIter.next().compareTo(thatNumbersIter.next());
628
629
630 if (numberComparison != 0) return numberComparison;
631 }
632
633 if (thatNumbersIter.hasNext()) return -1;
634
635 return compareQualifiers(this.qualifier, that.qualifier);
636 }
637
638 private static int compareQualifiers(String thisQ, String thatQ) {
639
640 if ("".equals(thisQ)) {
641 if ("".equals(thatQ)) {
642 return 0;
643 }
644 return 1;
645 } else if ("".equals(thatQ)) {
646 return -1;
647 }
648
649 return thisQ.compareTo(thatQ);
650 }
651
652 public List<Integer> getNumbers() {
653 return Collections.unmodifiableList(numbers);
654 }
655
656 public String getQualifier() {
657 return qualifier;
658 }
659
660 public Long getTimestamp() {
661 return timestamp;
662 }
663
664 public String getOriginalForm() {
665 return originalForm;
666 }
667
668 @Override
669 public String toString() {
670 return "MavenVersion{" +
671 originalForm +
672 '}';
673 }
674
675 @Override
676 public boolean equals(Object o) {
677 if (this == o) {
678 return true;
679 }
680 if (o == null || getClass() != o.getClass()) {
681 return false;
682 }
683
684 final MavenVersion that = (MavenVersion) o;
685
686 if (!originalForm.equals(that.originalForm)) {
687 return false;
688 }
689
690 return true;
691 }
692
693 @Override
694 public int hashCode() {
695 return originalForm.hashCode();
696 }
697 }
698
699
700
701
702 private static final Comparator<MavenVersion> mavenVersionTimestampComparator = new Comparator<MavenVersion>() {
703 @Override
704 public int compare(MavenVersion o1, MavenVersion o2) {
705 return o1.getTimestamp().compareTo(o2.getTimestamp());
706 }
707 };
708
709
710
711
712 public static class VersionTransition {
713 private final MavenVersion fromVersion;
714 private final MavenVersion toVersion;
715
716 public VersionTransition(MavenVersion fromVersion, MavenVersion toVersion) {
717 this.fromVersion = fromVersion;
718 this.toVersion = toVersion;
719 if (fromVersion == null) throw new IllegalArgumentException("fromVersion must not be null");
720 if (toVersion == null) throw new IllegalArgumentException("toVersion must not be null");
721 }
722
723 public VersionTransition(String fromVersion, String toVersion) {
724 this(new MavenVersion(fromVersion), new MavenVersion(toVersion));
725 }
726
727 private MavenVersion getFromVersion() {
728 return fromVersion;
729 }
730
731 private MavenVersion getToVersion() {
732 return toVersion;
733 }
734
735 @Override
736 public boolean equals(Object o) {
737 if (this == o) return true;
738 if (o == null || getClass() != o.getClass()) return false;
739
740 VersionTransition that = (VersionTransition) o;
741
742 if (!fromVersion.equals(that.fromVersion)) return false;
743 if (!toVersion.equals(that.toVersion)) return false;
744
745 return true;
746 }
747
748 @Override
749 public int hashCode() {
750 int result = fromVersion.hashCode();
751 result = 31 * result + toVersion.hashCode();
752 return result;
753 }
754
755 @Override
756 public String toString() {
757 return "VersionTransition{" +
758 "fromVersion=" + fromVersion.getOriginalForm() +
759 "-> toVersion=" + toVersion.getOriginalForm() +
760 '}';
761 }
762 }
763
764
765
766
767 protected static class VersionCompatibilityBreakage {
768 private final MavenVersion oldMavenVersion;
769 private final MavenVersion newMavenVersion;
770 private final String oldWsdlUrl;
771 private final String newWsdlUrl;
772 private final String breakageMessage;
773
774 public VersionCompatibilityBreakage(MavenVersion oldMavenVersion, MavenVersion newMavenVersion, String oldWsdlUrl, String newWsdlUrl, String breakageMessage) {
775 if (oldMavenVersion == null) throw new IllegalArgumentException("oldMavenVersion must not be null");
776 if (newMavenVersion == null) throw new IllegalArgumentException("newMavenVersion must not be null");
777 if (StringUtils.isEmpty(oldWsdlUrl)) throw new IllegalArgumentException("oldWsdlUrl must not be empty/null");
778 if (StringUtils.isEmpty(newWsdlUrl)) throw new IllegalArgumentException("newWsdlUrl must not be empty/null");
779 if (StringUtils.isEmpty(breakageMessage)) throw new IllegalArgumentException("breakageMessage must not be empty/null");
780 this.oldWsdlUrl = oldWsdlUrl;
781 this.newWsdlUrl = newWsdlUrl;
782 this.oldMavenVersion = oldMavenVersion;
783 this.newMavenVersion = newMavenVersion;
784 this.breakageMessage = breakageMessage;
785 }
786
787 @Override
788 public String toString() {
789 return "VersionCompatibilityBreakage{" +
790 "oldMavenVersion=" + oldMavenVersion +
791 ", newMavenVersion=" + newMavenVersion +
792 ", oldWsdlUrl='" + oldWsdlUrl + '\'' +
793 ", newWsdlUrl='" + newWsdlUrl + '\'' +
794 ", breakageMessage='" + breakageMessage + '\'' +
795 '}';
796 }
797 }
798
799 }