diff options
author | Sven Gothel <[email protected]> | 2012-04-16 00:50:14 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-04-16 00:50:14 +0200 |
commit | ffb47c6610fc742926abc946fc14d12ee9c65a9a (patch) | |
tree | 36b157a02c244375ec26658d0444bb8d3b0e3380 /src/jogl/classes/jogamp | |
parent | ace2daf725dfc1aa700338fae71fe93a9d0fd865 (diff) |
StringBuffer -> StringBuilder (Local objects, no concurrency) ; Impacts: Capabilities/GLContext API 'toString(StringBuilder)'
Diffstat (limited to 'src/jogl/classes/jogamp')
44 files changed, 72 insertions, 73 deletions
diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/Disassembler.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/Disassembler.java index 0ac5f0bda..b5535758d 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/Disassembler.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/Disassembler.java @@ -82,7 +82,7 @@ public class Disassembler { } public static String disassemble(short[] instructions, int leadingSpaces) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); int ip = 0; while (ip < instructions.length) { for (int i = 0; i < leadingSpaces; i++) { diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceType.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceType.java index 969aa9643..1c7e24c0f 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceType.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/mac/ResourceType.java @@ -60,7 +60,7 @@ public class ResourceType { } public String getTypeAsString() { - return new StringBuffer() + return new StringBuilder() .append((char)((type>>24)&0xff)) .append((char)((type>>16)&0xff)) .append((char)((type>>8)&0xff)) diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/BaseTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/BaseTable.java index 659b0cd38..ed615eb72 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/BaseTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/BaseTable.java @@ -212,7 +212,7 @@ public class BaseTable implements Table { } public String toString() { - StringBuffer sb = new StringBuffer() + StringBuilder sb = new StringBuilder() .append("\nBaseScript BaseScriptT").append(Integer.toHexString(_thisOffset)) .append("\nBaseValuesT").append(Integer.toHexString(_thisOffset + _baseValuesOffset)) .append("\nMinMaxT").append(Integer.toHexString(_thisOffset + _defaultMinMaxOffset)) @@ -274,7 +274,7 @@ public class BaseTable implements Table { } public String toString() { - StringBuffer sb = new StringBuffer() + StringBuilder sb = new StringBuilder() .append("\nBaseScriptList BaseScriptListT").append(Integer.toHexString(_thisOffset)) .append("\n").append(Integer.toHexString(_baseScriptCount)); for (int i = 0; i < _baseScriptCount; ++i) { @@ -306,7 +306,7 @@ public class BaseTable implements Table { } public String toString() { - StringBuffer sb = new StringBuffer() + StringBuilder sb = new StringBuilder() .append("\nBaseTagList BaseTagListT").append(Integer.toHexString(_thisOffset)) .append("\n").append(Integer.toHexString(_baseTagCount)); for (int i = 0; i < _baseTagCount; ++i) { @@ -339,7 +339,7 @@ public class BaseTable implements Table { } public String toString() { - return new StringBuffer() + return new StringBuilder() .append("\nAxis AxisT").append(Integer.toHexString(_thisOffset)) .append("\nBaseTagListT").append(Integer.toHexString(_thisOffset + _baseTagListOffset)) .append("\nBaseScriptListT").append(Integer.toHexString(_thisOffset + _baseScriptListOffset)) @@ -408,7 +408,7 @@ public class BaseTable implements Table { } public String toString() { - StringBuffer sb = new StringBuffer() + StringBuilder sb = new StringBuilder() .append("; 'BASE' Table - Baseline\n;-------------------------------------\n\n") .append("BASEHeader BASEHeaderT").append(Integer.toHexString(0)) .append("\n").append(Integer.toHexString(_version)) diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CffTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CffTable.java index 0c54c27d6..966f6e17b 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CffTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CffTable.java @@ -132,7 +132,7 @@ public class CffTable implements Table { } else if (b0 == 30) { // Real number - StringBuffer fString = new StringBuffer(); + StringBuilder fString = new StringBuilder(); int nibble1 = 0; int nibble2 = 0; ++_index; @@ -165,7 +165,7 @@ public class CffTable implements Table { } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); Enumeration<Integer> keys = _entries.keys(); while (keys.hasMoreElements()) { Integer key = keys.nextElement(); @@ -221,7 +221,7 @@ public class CffTable implements Table { } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("DICT\n"); sb.append("count: ").append(_count).append("\n"); sb.append("offSize: ").append(_offSize).append("\n"); @@ -255,7 +255,7 @@ public class CffTable implements Table { } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (int i = 0; i < getCount(); ++i) { sb.append(getTopDict(i).toString()).append("\n"); } @@ -276,7 +276,7 @@ public class CffTable implements Table { // Ensure the name hasn't been deleted if (getData()[offset] != 0) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (int i = offset; i < offset + len; ++i) { sb.append((char) getData()[i]); } @@ -288,7 +288,7 @@ public class CffTable implements Table { } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (int i = 0; i < getCount(); ++i) { sb.append(getName(i)).append("\n"); } @@ -313,7 +313,7 @@ public class CffTable implements Table { int offset = getOffset(index) - 1; int len = getOffset(index + 1) - offset - 1; - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (int i = offset; i < offset + len; ++i) { sb.append((char) getData()[i]); } @@ -323,7 +323,7 @@ public class CffTable implements Table { public String toString() { int nonStandardBase = CffStandardStrings.standardStrings.length; - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (int i = 0; i < getCount(); ++i) { sb.append(nonStandardBase + i).append(": "); sb.append(getString(nonStandardBase + i)).append("\n"); @@ -591,7 +591,7 @@ public class CffTable implements Table { } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("'CFF' Table - Compact Font Format\n---------------------------------\n"); sb.append("\nName INDEX\n"); sb.append(_nameIndex.toString()); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CharstringType2.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CharstringType2.java index bed0ba4b0..9c40a0e5e 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CharstringType2.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CharstringType2.java @@ -141,7 +141,7 @@ public class CharstringType2 extends Charstring { return _name; } - private void disassemble(StringBuffer sb) { + private void disassemble(StringBuilder sb) { Number operand = null; while (isOperandAtIndex()) { operand = nextOperand(); @@ -224,7 +224,7 @@ public class CharstringType2 extends Charstring { } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); resetIP(); while (moreBytes()) { disassemble(sb); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat.java index 45e21df07..7ce531cd9 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat.java @@ -123,7 +123,7 @@ public abstract class CmapFormat { public abstract int mapCharCode(int charCode); public String toString() { - return new StringBuffer() + return new StringBuilder() .append("format: ") .append(_format) .append(", length: ") diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat4.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat4.java index d2baf2b22..c09bdc8c3 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat4.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapFormat4.java @@ -143,7 +143,7 @@ public class CmapFormat4 extends CmapFormat { } public String toString() { - return new StringBuffer() + return new StringBuilder() .append(super.toString()) .append(", segCountX2: ") .append(_segCountX2) diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapIndexEntry.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapIndexEntry.java index df18a7fb0..85fdf7225 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapIndexEntry.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapIndexEntry.java @@ -91,7 +91,7 @@ public class CmapIndexEntry implements Comparable { } public String toString() { - return new StringBuffer() + return new StringBuilder() .append("platform id: ") .append(_platformId) .append(" (") diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapTable.java index b93de50d3..0050fdd8e 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CmapTable.java @@ -135,7 +135,7 @@ public class CmapTable implements Table { } public String toString() { - StringBuffer sb = new StringBuffer().append("cmap\n"); + StringBuilder sb = new StringBuilder().append("cmap\n"); // Get each of the index entries for (int i = 0; i < _numTables; i++) { diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CvtTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CvtTable.java index 189d0805c..963163584 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CvtTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/CvtTable.java @@ -38,7 +38,7 @@ public class CvtTable implements Table { } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("'cvt ' Table - Control Value Table\n----------------------------------\n"); sb.append("Size = ").append(0).append(" bytes, ").append(values.length).append(" entries\n"); sb.append(" Values\n ------\n"); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DirectoryEntry.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DirectoryEntry.java index d2f93ded1..c98f03fe9 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DirectoryEntry.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DirectoryEntry.java @@ -96,7 +96,7 @@ public class DirectoryEntry implements Cloneable { } public String getTagAsString() { - return new StringBuffer() + return new StringBuilder() .append((char)((_tag>>24)&0xff)) .append((char)((_tag>>16)&0xff)) .append((char)((_tag>>8)&0xff)) @@ -105,7 +105,7 @@ public class DirectoryEntry implements Cloneable { } public String toString() { - return new StringBuffer() + return new StringBuilder() .append("'").append(getTagAsString()) .append("' - chksm = 0x").append(Integer.toHexString(_checksum)) .append(", off = 0x").append(Integer.toHexString(_offset)) diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DsigTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DsigTable.java index 34f321e28..e2784f9e6 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DsigTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/DsigTable.java @@ -60,7 +60,7 @@ public class DsigTable implements Table { } public String toString() { - StringBuffer sb = new StringBuffer().append("DSIG\n"); + StringBuilder sb = new StringBuilder().append("DSIG\n"); for (int i = 0; i < numSigs; i++) { sb.append(sigBlocks[i].toString()); } diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FeatureRecord.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FeatureRecord.java index 49a8ef906..eb610814b 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FeatureRecord.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/FeatureRecord.java @@ -78,7 +78,7 @@ public class FeatureRecord { } public String getTagAsString() { - return new StringBuffer() + return new StringBuilder() .append((char)((_tag>>24)&0xff)) .append((char)((_tag>>16)&0xff)) .append((char)((_tag>>8)&0xff)) diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspRange.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspRange.java index fe7e9f665..2748406df 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspRange.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspRange.java @@ -31,7 +31,7 @@ public class GaspRange { } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(" rangeMaxPPEM: ").append(rangeMaxPPEM) .append("\n rangeGaspBehavior: 0x").append(rangeGaspBehavior); if ((rangeGaspBehavior & GASP_GRIDFIT) != 0) { diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspTable.java index 611ee16ff..a83db5bff 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GaspTable.java @@ -39,7 +39,7 @@ public class GaspTable implements Table { } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("'gasp' Table - Grid-fitting And Scan-conversion Procedure\n---------------------------------------------------------"); sb.append("\n 'gasp' version: ").append(version); sb.append("\n numRanges: ").append(numRanges); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfDescript.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfDescript.java index 3fc113f2e..a9342a434 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfDescript.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfDescript.java @@ -113,7 +113,7 @@ public abstract class GlyfDescript extends Program implements GlyphDescription { } public String toString() { - return new StringBuffer() + return new StringBuilder() .append(" numberOfContours: ").append(_numberOfContours) .append("\n xMin: ").append(_xMin) .append("\n yMin: ").append(_yMin) diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfSimpleDescript.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfSimpleDescript.java index c5c76712c..c11d2d8ff 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfSimpleDescript.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfSimpleDescript.java @@ -186,7 +186,7 @@ public class GlyfSimpleDescript extends GlyfDescript { } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(super.toString()); sb.append("\n\n EndPoints\n ---------"); for (int i = 0; i < _endPtsOfContours.length; i++) { diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HdmxTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HdmxTable.java index 64ac9d659..5b1fa2020 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HdmxTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HdmxTable.java @@ -98,7 +98,7 @@ public class HdmxTable implements Table { } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("'hdmx' Table - Horizontal Device Metrics\n----------------------------------------\n"); sb.append("Size = ").append(_de.getLength()).append(" bytes\n") .append("\t'hdmx' version: ").append(_version).append("\n") diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HeadTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HeadTable.java index 122a50faa..9d7fe4251 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HeadTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HeadTable.java @@ -171,7 +171,7 @@ public class HeadTable implements Table { } public String toString() { - return new StringBuffer() + return new StringBuilder() .append("'head' Table - Font Header\n--------------------------") .append("\n 'head' version: ").append(Fixed.floatValue(_versionNumber)) .append("\n fontRevision: ").append(Fixed.roundedFloatValue(_fontRevision, 8)) diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HheaTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HheaTable.java index 6cafab4e5..20a21e4d9 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HheaTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HheaTable.java @@ -101,7 +101,7 @@ public class HheaTable implements Table { } public String toString() { - return new StringBuffer() + return new StringBuilder() .append("'hhea' Table - Horizontal Header\n--------------------------------") .append("\n 'hhea' version: ").append(Fixed.floatValue(version)) .append("\n yAscender: ").append(ascender) diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HmtxTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HmtxTable.java index c2e892e34..dacd9e265 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HmtxTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/HmtxTable.java @@ -111,7 +111,7 @@ public class HmtxTable implements Table { } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("'hmtx' Table - Horizontal Metrics\n---------------------------------\n"); sb.append("Size = ").append(_de.getLength()).append(" bytes, ") .append(_hMetrics.length).append(" entries\n"); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LangSysRecord.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LangSysRecord.java index 5777bd642..9511f66ba 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LangSysRecord.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LangSysRecord.java @@ -78,7 +78,7 @@ public class LangSysRecord { } public String getTagAsString() { - return new StringBuffer() + return new StringBuilder() .append((char)((_tag>>24)&0xff)) .append((char)((_tag>>16)&0xff)) .append((char)((_tag>>8)&0xff)) diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LocaTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LocaTable.java index 8187708a3..5eb7c5856 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LocaTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LocaTable.java @@ -54,7 +54,7 @@ public class LocaTable implements Table { } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("'loca' Table - Index To Location Table\n--------------------------------------\n") .append("Size = ").append(_de.getLength()).append(" bytes, ") .append(_offsets.length).append(" entries\n"); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LtshTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LtshTable.java index 2cba7baf2..ace3d38b5 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LtshTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/LtshTable.java @@ -43,7 +43,7 @@ public class LtshTable implements Table { } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("'LTSH' Table - Linear Threshold Table\n-------------------------------------") .append("\n 'LTSH' Version: ").append(version) .append("\n Number of Glyphs: ").append(numGlyphs) diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/MaxpTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/MaxpTable.java index 16b9f827d..0e8ec44c7 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/MaxpTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/MaxpTable.java @@ -126,7 +126,7 @@ public class MaxpTable implements Table { } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("'maxp' Table - Maximum Profile\n------------------------------") .append("\n 'maxp' version: ").append(Fixed.floatValue(versionNumber)) .append("\n numGlyphs: ").append(numGlyphs); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameRecord.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameRecord.java index cd13e9b4a..268d6cfca 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameRecord.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameRecord.java @@ -98,7 +98,7 @@ public class NameRecord { } protected void loadString(DataInput di) throws IOException { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); di.skipBytes(_stringOffset); if (_platformId == ID.platformUnicode) { @@ -131,7 +131,7 @@ public class NameRecord { } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(" Platform ID: ").append(_platformId) .append("\n Specific ID: ").append(_encodingId) diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Os2Table.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Os2Table.java index f33dd2734..f4fa76e81 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Os2Table.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Os2Table.java @@ -298,7 +298,7 @@ public class Os2Table implements Table { } public String toString() { - return new StringBuffer() + return new StringBuilder() .append("'OS/2' Table - OS/2 and Windows Metrics\n---------------------------------------") .append("\n 'OS/2' version: ").append(_version) .append("\n xAvgCharWidth: ").append(_xAvgCharWidth) @@ -337,7 +337,7 @@ public class Os2Table implements Table { } private String getVendorIDAsString() { - return new StringBuffer() + return new StringBuilder() .append((char)((_achVendorID>>24)&0xff)) .append((char)((_achVendorID>>16)&0xff)) .append((char)((_achVendorID>>8)&0xff)) diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Panose.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Panose.java index 84e67078b..6127140d1 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Panose.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/Panose.java @@ -80,7 +80,7 @@ public class Panose { } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(String.valueOf(bFamilyType)).append(" ") .append(String.valueOf(bSerifStyle)).append(" ") .append(String.valueOf(bWeight)).append(" ") diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PcltTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PcltTable.java index 792b8a832..f9dcf2ce7 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PcltTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PcltTable.java @@ -70,7 +70,7 @@ public class PcltTable implements Table { } public String toString() { - return new StringBuffer() + return new StringBuilder() .append("'PCLT' Table - Printer Command Language Table\n---------------------------------------------") .append("\n version: 0x").append(Integer.toHexString(version).toUpperCase()) .append("\n fontNumber: ").append(fontNumber).append(" (0x").append(Long.toHexString(fontNumber).toUpperCase()) diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PostTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PostTable.java index 4804c35f2..c913b4c71 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PostTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/PostTable.java @@ -375,7 +375,7 @@ public class PostTable implements Table { } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("'post' Table - PostScript Metrics\n---------------------------------\n") .append("\n 'post' version: ").append(Fixed.floatValue(version)) .append("\n italicAngle: ").append(Fixed.floatValue(italicAngle)) diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ScriptRecord.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ScriptRecord.java index 34a43d254..5da0608dd 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ScriptRecord.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/ScriptRecord.java @@ -78,7 +78,7 @@ public class ScriptRecord { } public String getTagAsString() { - return new StringBuffer() + return new StringBuilder() .append((char)((_tag>>24)&0xff)) .append((char)((_tag>>16)&0xff)) .append((char)((_tag>>8)&0xff)) diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SignatureBlock.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SignatureBlock.java index 156d3fde6..5a5de119f 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SignatureBlock.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/SignatureBlock.java @@ -33,7 +33,7 @@ public class SignatureBlock { } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); for (int i = 0; i < signatureLen; i += 16) { if (signatureLen - i >= 16) { sb.append(new String(signature, i, 16)).append("\n"); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableDirectory.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableDirectory.java index cf9f1bda4..bacc26d30 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableDirectory.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/TableDirectory.java @@ -114,7 +114,7 @@ public class TableDirectory { } public String toString() { - StringBuffer sb = new StringBuffer() + StringBuilder sb = new StringBuilder() .append("Offset Table\n------ -----") .append("\n sfnt version: ").append(Fixed.floatValue(_version)) .append("\n numTables = ").append(_numTables) diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VdmxTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VdmxTable.java index 641f3eff8..80579f5cd 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VdmxTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VdmxTable.java @@ -153,7 +153,7 @@ public class VdmxTable implements Table { } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("'VDMX' Table - Precomputed Vertical Device Metrics\n") .append("--------------------------------------------------\n") .append(" Version: ").append(_version).append("\n") diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VheaTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VheaTable.java index 0fc8bea26..19c91765b 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VheaTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VheaTable.java @@ -114,7 +114,7 @@ public class VheaTable implements Table { } public String toString() { - return new StringBuffer() + return new StringBuilder() .append("'vhea' Table - Vertical Header\n------------------------------") .append("\n 'vhea' version: ").append(Fixed.floatValue(_version)) .append("\n xAscender: ").append(_ascent) diff --git a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VmtxTable.java b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VmtxTable.java index dcd1cd7c1..348405380 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VmtxTable.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/ot/table/VmtxTable.java @@ -82,7 +82,7 @@ public class VmtxTable implements Table { } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append("'vmtx' Table - Vertical Metrics\n-------------------------------\n"); sb.append("Size = ").append(_de.getLength()).append(" bytes, ") .append(_vMetrics.length).append(" entries\n"); diff --git a/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Parser.java b/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Parser.java index 71260b8f3..c5a2b6e87 100644 --- a/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Parser.java +++ b/src/jogl/classes/jogamp/graph/font/typecast/tt/engine/Parser.java @@ -149,7 +149,7 @@ public class Parser { } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); int ip = 0; while (ip < instructions[0].length) { sb.append(Mnemonic.getMnemonic(getOpcode(ip))); diff --git a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java index 6e2b7b744..d7958c7f1 100644 --- a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java +++ b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java @@ -40,9 +40,9 @@ public class GLGraphicsConfigurationUtil { public static final int PBUFFER_BIT = 1 << 2; public static final int ALL_BITS = WINDOW_BIT | BITMAP_BIT | PBUFFER_BIT ; - public static final StringBuffer winAttributeBits2String(StringBuffer sb, int winattrbits) { + public static final StringBuilder winAttributeBits2String(StringBuilder sb, int winattrbits) { if(null==sb) { - sb = new StringBuffer(); + sb = new StringBuilder(); } boolean seperator = false; if( 0 != ( WINDOW_BIT & winattrbits ) ) { diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGLCapabilities.java b/src/jogl/classes/jogamp/opengl/egl/EGLGLCapabilities.java index 0ae597938..f813edf86 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLGLCapabilities.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLGLCapabilities.java @@ -122,9 +122,9 @@ public class EGLGLCapabilities extends GLCapabilities { return null; } - public static StringBuffer renderableTypeToString(StringBuffer sink, int renderableType) { + public static StringBuilder renderableTypeToString(StringBuilder sink, int renderableType) { if(null == sink) { - sink = new StringBuffer(); + sink = new StringBuilder(); } boolean first=true; if(0 != (renderableType & EGL.EGL_OPENGL_BIT)) { @@ -142,9 +142,9 @@ public class EGLGLCapabilities extends GLCapabilities { return sink; } - public StringBuffer toString(StringBuffer sink) { + public StringBuilder toString(StringBuilder sink) { if(null == sink) { - sink = new StringBuffer(); + sink = new StringBuilder(); } sink.append("egl cfg 0x").append(Integer.toHexString(eglcfgid)); sink.append(", vid 0x").append(Integer.toHexString(nativeVisualID)).append(": "); diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java index 63d58f447..19a1469cb 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java @@ -382,7 +382,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); super.append(sb); diff --git a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncHook.java b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncHook.java index fe4db892f..897967f8b 100644 --- a/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncHook.java +++ b/src/jogl/classes/jogamp/opengl/util/glsl/fixedfunc/FixedFuncHook.java @@ -31,10 +31,9 @@ package jogamp.opengl.util.glsl.fixedfunc; import javax.media.opengl.*; import javax.media.opengl.fixedfunc.*; -import javax.media.opengl.glu.*; import com.jogamp.common.nio.Buffers; import com.jogamp.opengl.util.*; -import com.jogamp.opengl.util.glsl.*; + import java.nio.*; public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFunc { @@ -56,7 +55,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun } public FixedFuncHook(GL2ES2 gl, PMVMatrix matrix, - Class shaderRootClass, String shaderSrcRoot, String shaderBinRoot, + Class<?> shaderRootClass, String shaderSrcRoot, String shaderBinRoot, String vertexColorFile, String vertexColorLightFile, String fragmentColorFile, @@ -112,28 +111,28 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun } public void glGetFloatv(int pname, java.nio.FloatBuffer params) { - if(pmvMatrix.isMatrixGetName(pname)) { + if(PMVMatrix.isMatrixGetName(pname)) { pmvMatrix.glGetFloatv(pname, params); return; } gl.glGetFloatv(pname, params); } public void glGetFloatv(int pname, float[] params, int params_offset) { - if(pmvMatrix.isMatrixGetName(pname)) { + if(PMVMatrix.isMatrixGetName(pname)) { pmvMatrix.glGetFloatv(pname, params, params_offset); return; } gl.glGetFloatv(pname, params, params_offset); } public void glGetIntegerv(int pname, IntBuffer params) { - if(pmvMatrix.isMatrixGetName(pname)) { + if(PMVMatrix.isMatrixGetName(pname)) { pmvMatrix.glGetIntegerv(pname, params); return; } gl.glGetIntegerv(pname, params); } public void glGetIntegerv(int pname, int[] params, int params_offset) { - if(pmvMatrix.isMatrixGetName(pname)) { + if(PMVMatrix.isMatrixGetName(pname)) { pmvMatrix.glGetIntegerv(pname, params, params_offset); return; } @@ -339,7 +338,7 @@ public class FixedFuncHook implements GLLightingFunc, GLMatrixFunc, GLPointerFun } public final String toString() { - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); buf.append(getClass().getName()+" ("); if(null!=pmvMatrix) { buf.append(", matrixDirty: "+pmvMatrix.isDirty()); diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WGLGLCapabilities.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WGLGLCapabilities.java index 24bc5aea6..5ff63d93b 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WGLGLCapabilities.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WGLGLCapabilities.java @@ -208,9 +208,9 @@ public class WGLGLCapabilities extends GLCapabilities { } } - public StringBuffer toString(StringBuffer sink) { + public StringBuilder toString(StringBuilder sink) { if(null == sink) { - sink = new StringBuffer(); + sink = new StringBuilder(); } sink.append("wgl vid 0x").append(Integer.toHexString(pfdID)).append(" "); switch (arb_pixelformat) { diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLCapabilities.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLCapabilities.java index bb0673581..96d4c7713 100644 --- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLCapabilities.java +++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLCapabilities.java @@ -89,9 +89,9 @@ public class X11GLCapabilities extends GLCapabilities { } } - public StringBuffer toString(StringBuffer sink) { + public StringBuilder toString(StringBuilder sink) { if(null == sink) { - sink = new StringBuffer(); + sink = new StringBuilder(); } sink.append("glx vid "); if(hasXVisualInfo()) { diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java index 2de747136..2fd8cbcd9 100644 --- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java +++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java @@ -606,7 +606,7 @@ public abstract class X11GLXContext extends GLContextImpl { } public String toString() { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); super.append(sb); |