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

24
pom.xml
View File

@ -22,17 +22,19 @@
</modules>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</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;
}
List<String> items = new ArrayList<>();
items.addAll(missingClasses);
for (MethodReference method : missingMethods) {
items.add(method.toString());
}
for (FieldReference field : missingFields) {
items.add(field.toString());
}
Collections.sort(items);
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");
for (MethodReference method : missingMethods) {
sb.append(" ").append(method).append("\n");
}
}
if (!missingMethods.isEmpty()) {
sb.append("Missing fields:\n");
for (FieldReference field : missingFields) {
sb.append(" ").append(field).append("\n");
}
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