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