Fixes illegal processing of DUP2, DUP_X1, DUP_X2m, DUP2_X2 instructions.

Makes more fancy list of missing items
This commit is contained in:
konsoletyper 2014-02-18 12:52:29 +04:00
parent 253b882d3e
commit 6c903a916c
4 changed files with 513 additions and 403 deletions

View File

@ -22,6 +22,7 @@
</modules>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@ -33,6 +34,7 @@
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>

View File

@ -355,24 +355,19 @@ public class DependencyChecker implements DependencyInformation {
if (missingClasses.isEmpty() && missingMethods.isEmpty() && missingFields.isEmpty()) {
return;
}
StringBuilder sb = new StringBuilder();
if (!missingClasses.isEmpty()) {
sb.append("Missing classes:\n");
for (String cls : missingClasses) {
sb.append(" ").append(cls).append("\n");
}
}
if (!missingMethods.isEmpty()) {
sb.append("Missing methods:\n");
List<String> items = new ArrayList<>();
items.addAll(missingClasses);
for (MethodReference method : missingMethods) {
sb.append(" ").append(method).append("\n");
items.add(method.toString());
}
}
if (!missingMethods.isEmpty()) {
sb.append("Missing fields:\n");
for (FieldReference field : missingFields) {
sb.append(" ").append(field).append("\n");
items.add(field.toString());
}
Collections.sort(items);
StringBuilder sb = new StringBuilder();
sb.append("Can't compile due to the following items missing:\n");
for (String item : items) {
sb.append(" ").append(item).append("\n");
}
throw new IllegalStateException(sb.toString());
}

View File

@ -52,4 +52,9 @@ public class FieldReference {
FieldReference other = (FieldReference)obj;
return className.equals(other.className) && fieldName.equals(other.fieldName);
}
@Override
public String toString() {
return className + "." + fieldName;
}
}

File diff suppressed because it is too large Load Diff