summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRoman Shevchenko <roman.shevchenko@jetbrains.com>2014-05-21 12:38:35 +0400
committerRoman Shevchenko <roman.shevchenko@jetbrains.com>2014-05-21 12:38:35 +0400
commit290c3ae0663e018c796c5874a2145ddcc9df0bba (patch)
tree2aab65c8dbd1fa83c8293b5e510491242a914738 /src
parentc23845ae4ac961abb3948cb67a3cc648bd360345 (diff)
downloadfernflower-290c3ae0663e018c796c5874a2145ddcc9df0bba.tar
fernflower-290c3ae0663e018c796c5874a2145ddcc9df0bba.tar.gz
fernflower-290c3ae0663e018c796c5874a2145ddcc9df0bba.tar.lz
fernflower-290c3ae0663e018c796c5874a2145ddcc9df0bba.tar.xz
fernflower-290c3ae0663e018c796c5874a2145ddcc9df0bba.zip
leading "extends Object" omitted for type parameters
Diffstat (limited to 'src')
-rw-r--r--src/de/fernflower/main/ClassWriter.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/de/fernflower/main/ClassWriter.java b/src/de/fernflower/main/ClassWriter.java
index d05e494..68b4689 100644
--- a/src/de/fernflower/main/ClassWriter.java
+++ b/src/de/fernflower/main/ClassWriter.java
@@ -421,11 +421,11 @@ public class ClassWriter {
writer.write(descriptor.fparameters.get(i));
List<GenericType> lstBounds = descriptor.fbounds.get(i);
- if (lstBounds.size() > 1 || !"java/lang/Object".equals(lstBounds.get(0).value)) {
+ int skip = InterpreterUtil.equalObjects(VarType.VARTYPE_OBJECT.value, lstBounds.get(0).value) ? 1 : 0;
+ if(skip<lstBounds.size()) {
writer.write(" extends ");
- writer.write(GenericMain.getGenericCastTypeName(lstBounds.get(0)));
-
- for(int j=1;j<lstBounds.size();j++) {
+ writer.write(GenericMain.getGenericCastTypeName(lstBounds.get(skip)));
+ for(int j=skip+1;j<lstBounds.size();j++) {
writer.write(" & " + GenericMain.getGenericCastTypeName(lstBounds.get(j)));
}
}
@@ -825,11 +825,11 @@ public class ClassWriter {
bufstrwriter.write(descriptor.fparameters.get(i));
List<GenericType> lstBounds = descriptor.fbounds.get(i);
- if (lstBounds.size() > 1 || !"java/lang/Object".equals(lstBounds.get(0).value)) {
+ int skip = InterpreterUtil.equalObjects(VarType.VARTYPE_OBJECT.value, lstBounds.get(0).value) ? 1 : 0;
+ if(skip<lstBounds.size()) {
bufstrwriter.write(" extends ");
- bufstrwriter.write(GenericMain.getGenericCastTypeName(lstBounds.get(0)));
-
- for(int j=1;j<lstBounds.size();j++) {
+ bufstrwriter.write(GenericMain.getGenericCastTypeName(lstBounds.get(skip)));
+ for(int j=skip+1;j<lstBounds.size();j++) {
bufstrwriter.write(" & " + GenericMain.getGenericCastTypeName(lstBounds.get(j)));
}
}