From 959cb5fd4f9586ec3bd265b452fe25fe1db82e3f Mon Sep 17 00:00:00 2001 From: jeff Date: Tue, 13 Jan 2015 23:25:04 -0500 Subject: source format change don't hate me too much if you were planning a big merge. =P --- src/cuchaz/enigma/mapping/MappingsReader.java | 218 ++++++++++---------------- 1 file changed, 83 insertions(+), 135 deletions(-) (limited to 'src/cuchaz/enigma/mapping/MappingsReader.java') diff --git a/src/cuchaz/enigma/mapping/MappingsReader.java b/src/cuchaz/enigma/mapping/MappingsReader.java index 4bd9f12..72e829d 100644 --- a/src/cuchaz/enigma/mapping/MappingsReader.java +++ b/src/cuchaz/enigma/mapping/MappingsReader.java @@ -20,209 +20,157 @@ import com.google.common.collect.Queues; import cuchaz.enigma.Constants; import cuchaz.enigma.mapping.SignatureUpdater.ClassNameUpdater; -public class MappingsReader -{ - public Mappings read( Reader in ) - throws IOException, MappingParseException - { - return read( new BufferedReader( in ) ); +public class MappingsReader { + + public Mappings read(Reader in) throws IOException, MappingParseException { + return read(new BufferedReader(in)); } - public Mappings read( BufferedReader in ) - throws IOException, MappingParseException - { + public Mappings read(BufferedReader in) throws IOException, MappingParseException { Mappings mappings = new Mappings(); Deque mappingStack = Queues.newArrayDeque(); int lineNumber = 0; String line = null; - while( ( line = in.readLine() ) != null ) - { + while ( (line = in.readLine()) != null) { lineNumber++; // strip comments - int commentPos = line.indexOf( '#' ); - if( commentPos >= 0 ) - { - line = line.substring( 0, commentPos ); + int commentPos = line.indexOf('#'); + if (commentPos >= 0) { + line = line.substring(0, commentPos); } // skip blank lines - if( line.trim().length() <= 0 ) - { + if (line.trim().length() <= 0) { continue; } // get the indent of this line int indent = 0; - for( int i=0; i