1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-20 23:45:23 +02:00

bug 454501: make replace private method with String.trim()

Change-Id: I5bb0fbc12ab70bdaa2b80c3367de92633834801e
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
This commit is contained in:
Matthew Khouzam 2014-12-08 21:56:25 -05:00 committed by Gerrit Code Review @ Eclipse.org
parent 315a204251
commit b67e0bcc56

View file

@ -68,15 +68,6 @@ public class AR {
// private long file_offset;
private long macho_offset;
/**
* Remove the padding from the archive header strings.
*/
private String removeBlanks(String str) {
while (str.charAt(str.length() - 1) == ' ')
str = str.substring(0, str.length() - 1);
return str;
}
/**
* Look up the name stored in the archive's string table based
* on the offset given.
@ -142,12 +133,12 @@ public class AR {
//
// Convert the raw bytes into strings and numbers.
//
this.object_name = removeBlanks(new String(object_name));
this.object_name = new String(object_name).trim();
// this.modification_time = new String(modification_time);
// this.uid = new String(uid);
// this.gid = new String(gid);
// this.mode = new String(mode);
this.size = Long.parseLong(removeBlanks(new String(size)));
this.size = Long.parseLong(new String(size).trim());
//
// If the name is of the format "#1/<number>", real name directly follows the