View | Details | Raw Unified | Return to bug 96646
Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/ClassFile.java (-13 / +7 lines)
Lines 1469-1479 Link Here
1469
	 */
1469
	 */
1470
	public void addSyntheticMethodAccessMethod(SyntheticMethodBinding methodBinding) {
1470
	public void addSyntheticMethodAccessMethod(SyntheticMethodBinding methodBinding) {
1471
		generateMethodInfoHeader(methodBinding);
1471
		generateMethodInfoHeader(methodBinding);
1472
		// We know that we won't get more than 2 attribute: the code attribute + synthetic attribute
1472
		int methodAttributeOffset = this.contentsOffset;
1473
		contents[contentsOffset++] = 0;
1473
		// this will add exception attribute, synthetic attribute, deprecated attribute,...
1474
		contents[contentsOffset++] = 2;
1474
		int attributeNumber = generateMethodInfoAttribute(methodBinding);
1475
		// Code attribute
1475
		// Code attribute
1476
		int codeAttributeOffset = contentsOffset;
1476
		int codeAttributeOffset = contentsOffset;
1477
		attributeNumber++; // add code attribute
1477
		generateCodeAttributeHeader();
1478
		generateCodeAttributeHeader();
1478
		codeStream.init(this);
1479
		codeStream.init(this);
1479
		codeStream.generateSyntheticBodyForMethodAccess(methodBinding);
1480
		codeStream.generateSyntheticBodyForMethodAccess(methodBinding);
Lines 1485-1500 Link Here
1485
				.referenceCompilationUnit()
1486
				.referenceCompilationUnit()
1486
				.compilationResult
1487
				.compilationResult
1487
				.lineSeparatorPositions);
1488
				.lineSeparatorPositions);
1488
		// add the synthetic attribute
1489
		// update the number of attributes
1489
		int syntheticAttributeNameIndex =
1490
		contents[methodAttributeOffset++] = (byte) (attributeNumber >> 8);
1490
			constantPool.literalIndex(AttributeNamesConstants.SyntheticName);
1491
		contents[methodAttributeOffset] = (byte) attributeNumber;
1491
		contents[contentsOffset++] = (byte) (syntheticAttributeNameIndex >> 8);
1492
		contents[contentsOffset++] = (byte) syntheticAttributeNameIndex;
1493
		// the length of a synthetic attribute is equals to 0
1494
		contents[contentsOffset++] = 0;
1495
		contents[contentsOffset++] = 0;
1496
		contents[contentsOffset++] = 0;
1497
		contents[contentsOffset++] = 0;
1498
	}
1492
	}
1499
1493
1500
	/**
1494
	/**
(-)compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java (+3 lines)
Lines 2134-2139 Link Here
2134
			}
2134
			}
2135
		}
2135
		}
2136
	}
2136
	}
2137
	if (!accessBinding.returnType.isBaseType()) {
2138
		this.checkcast(accessBinding.returnType);		
2139
	}
2137
	if ((type = methodBinding.returnType).isBaseType())
2140
	if ((type = methodBinding.returnType).isBaseType())
2138
		if (type == VoidBinding)
2141
		if (type == VoidBinding)
2139
			this.return_();
2142
			this.return_();

Return to bug 96646