Skip to content

Commit 3733e9d

Browse files
Knut Anders Hatlentrondn
authored andcommitted
Reformatted code that used tabs
1 parent a4a0e9e commit 3733e9d

19 files changed

+284
-267
lines changed

src/org/opensolaris/opengrok/Info.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public final class Info {
4040
private static final String REVISION;
4141

4242
static {
43-
InputStream in=null;
43+
InputStream in = null;
4444
try {
4545
in = Info.class.getResourceAsStream("info.properties");
4646
if (in != null) {
@@ -52,13 +52,13 @@ public final class Info {
5252
throw new RuntimeException(ioe);
5353
} finally {
5454
try {
55-
if (in != null) {
56-
in.close();
57-
}
58-
} catch (IOException ioe) {
59-
System.err.println(ioe.getMessage()); //NOPMD
55+
if (in != null) {
56+
in.close();
57+
}
58+
} catch (IOException ioe) {
59+
System.err.println(ioe.getMessage()); //NOPMD
6060
}
61-
}
61+
}
6262
}
6363

6464
public static String getVersion() {

src/org/opensolaris/opengrok/analysis/Hash2TokenStream.java

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -41,30 +41,30 @@ public Hash2TokenStream(Set<String> symbols){
4141

4242
@Override
4343
public boolean incrementToken() throws java.io.IOException {
44-
while(true) {
45-
if (i <= 0) {
46-
if (keys.hasNext()) {
47-
term = keys.next();
48-
terms = term.split("[^a-zA-Z_0-9]+");
49-
i = terms.length;
50-
if (i > 0) {
44+
while (true) {
45+
if (i <= 0) {
46+
if (keys.hasNext()) {
47+
term = keys.next();
48+
terms = term.split("[^a-zA-Z_0-9]+");
49+
i = terms.length;
50+
if (i > 0) {
5151
termAtt.setTermBuffer(terms[--i]);
52-
return true;
53-
} else {
52+
return true;
53+
} else {
5454
// no tokens found in this key, try next
5555
continue;
56-
}
57-
} else {
58-
return false;
59-
}
60-
} else {
61-
//System.out.println("Returning " + term + h.get(term));
56+
}
57+
} else {
58+
return false;
59+
}
60+
} else {
61+
//System.out.println("Returning " + term + h.get(term));
6262
termAtt.setTermBuffer(terms[--i]);
63-
return true;
64-
}
65-
}
63+
return true;
64+
}
65+
}
6666
}
67-
67+
6868
@Override
6969
public void close() {
7070
// Nothing to close

src/org/opensolaris/opengrok/analysis/JFlexXref.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class JFlexXref {
4343
protected Definitions defs;
4444

4545
public void setDefs(Definitions defs) {
46-
this.defs = defs;
46+
this.defs = defs;
4747
}
4848

4949
protected void appendProject() throws IOException {

src/org/opensolaris/opengrok/analysis/TextAnalyzer.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@
2828
import org.apache.lucene.document.Document;
2929

3030
public abstract class TextAnalyzer extends FileAnalyzer {
31-
public TextAnalyzer(FileAnalyzerFactory factory) {
32-
super(factory);
33-
}
31+
public TextAnalyzer(FileAnalyzerFactory factory) {
32+
super(factory);
33+
}
3434

3535
public final void analyze(Document doc, InputStream in) throws IOException {
36-
String charset = null;
37-
38-
in.mark(3);
39-
40-
byte[] head = new byte[3];
41-
int br = in.read(head, 0, 3);
36+
String charset = null;
37+
38+
in.mark(3);
39+
40+
byte[] head = new byte[3];
41+
int br = in.read(head, 0, 3);
4242

4343
if (br >= 2 &&
4444
(head[0] == (byte)0xFE && head[1] == (byte)0xFF) ||
@@ -52,11 +52,11 @@ public final void analyze(Document doc, InputStream in) throws IOException {
5252
charset = "UTF-8";
5353
}
5454

55-
if (charset == null) {
56-
in.reset();
57-
charset = Charset.defaultCharset().name();
58-
}
59-
55+
if (charset == null) {
56+
in.reset();
57+
charset = Charset.defaultCharset().name();
58+
}
59+
6060
analyze(doc, new InputStreamReader(in, charset));
6161
}
6262

src/org/opensolaris/opengrok/analysis/archive/BZip2Analyzer.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,20 @@
4545
*/
4646
public class BZip2Analyzer extends FileAnalyzer {
4747
private Genre g;
48-
48+
4949
public Genre getGenre() {
50-
if (g != null) {
50+
if (g != null) {
5151
return g;
5252
}
5353
return super.getGenre();
5454
}
5555

5656
protected BZip2Analyzer(FileAnalyzerFactory factory) {
57-
super(factory);
57+
super(factory);
5858
}
59-
59+
6060
private FileAnalyzer fa;
61-
61+
6262
@SuppressWarnings("PMD.ConfusingTernary")
6363
public void analyze(Document doc, InputStream in) throws IOException {
6464
if (in.read() != 'B') {
@@ -96,19 +96,19 @@ public void analyze(Document doc, InputStream in) throws IOException {
9696
}
9797

9898
public TokenStream tokenStream(String fieldName, Reader reader) {
99-
if(fa != null) {
100-
return fa.tokenStream(fieldName, reader);
101-
}
102-
return super.tokenStream(fieldName, reader);
99+
if (fa != null) {
100+
return fa.tokenStream(fieldName, reader);
101+
}
102+
return super.tokenStream(fieldName, reader);
103103
}
104-
104+
105105
/**
106106
* Write a cross referenced HTML file.
107107
* @param out Writer to store HTML cross-reference
108108
*/
109109
public void writeXref(Writer out) throws IOException {
110-
if ((fa != null) && (fa.getGenre() == Genre.PLAIN || fa.getGenre() == Genre.XREFABLE)) {
110+
if ((fa != null) && (fa.getGenre() == Genre.PLAIN || fa.getGenre() == Genre.XREFABLE)) {
111111
fa.writeXref(out);
112-
}
112+
}
113113
}
114114
}

src/org/opensolaris/opengrok/analysis/archive/GZIPAnalyzer.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@
4747
public class GZIPAnalyzer extends FileAnalyzer {
4848
private Genre g;
4949
public Genre getGenre() {
50-
if (g != null) {
50+
if (g != null) {
5151
return g;
5252
}
5353
return super.getGenre();
5454
}
5555

5656
protected GZIPAnalyzer(FileAnalyzerFactory factory) {
57-
super(factory);
57+
super(factory);
5858
}
5959

6060
private FileAnalyzer fa;
@@ -89,19 +89,19 @@ public void analyze(Document doc, InputStream in) throws IOException {
8989
}
9090

9191
public TokenStream tokenStream(String fieldName, Reader reader) {
92-
if (fa != null) {
93-
return fa.tokenStream(fieldName, reader);
94-
}
95-
return super.tokenStream(fieldName, reader);
92+
if (fa != null) {
93+
return fa.tokenStream(fieldName, reader);
94+
}
95+
return super.tokenStream(fieldName, reader);
9696
}
97-
97+
9898
/**
9999
* Write a cross referenced HTML file.
100100
* @param out Writer to store HTML cross-reference
101101
*/
102102
public void writeXref(Writer out) throws IOException {
103-
if ((fa != null) && (fa.getGenre() == Genre.PLAIN || fa.getGenre() == Genre.XREFABLE)) {
103+
if ((fa != null) && (fa.getGenre() == Genre.PLAIN || fa.getGenre() == Genre.XREFABLE)) {
104104
fa.writeXref(out);
105-
}
105+
}
106106
}
107107
}

src/org/opensolaris/opengrok/analysis/document/TroffAnalyzer.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ public class TroffAnalyzer extends FileAnalyzer {
5555
*/
5656
protected TroffAnalyzer(FileAnalyzerFactory factory) {
5757
super(factory);
58-
troffull = new TroffFullTokenizer(dummy);
59-
xref = new TroffXref(dummy);
60-
content = new char[12*1024];
58+
troffull = new TroffFullTokenizer(dummy);
59+
xref = new TroffXref(dummy);
60+
content = new char[12 * 1024];
6161
}
6262

6363
@Override
@@ -82,23 +82,23 @@ public void analyze(Document doc, InputStream in) throws IOException {
8282
}
8383

8484
public TokenStream tokenStream(String fieldName, Reader reader) {
85-
if("full".equals(fieldName)) {
86-
troffull.reInit(content, len);
87-
return troffull;
88-
}
89-
return super.tokenStream(fieldName, reader);
85+
if ("full".equals(fieldName)) {
86+
troffull.reInit(content, len);
87+
return troffull;
88+
}
89+
return super.tokenStream(fieldName, reader);
9090
}
9191

9292
/**
9393
* Write a cross referenced HTML file.
9494
* @param out Writer to write HTML cross-reference
9595
*/
9696
public void writeXref(Writer out) throws IOException {
97-
xref.reInit(content, len);
97+
xref.reInit(content, len);
9898
xref.project = project;
99-
out.write("</pre>");
100-
xref.write(out);
101-
out.write("<pre>");
99+
out.write("</pre>");
100+
xref.write(out);
101+
out.write("<pre>");
102102
}
103103

104104
/**
@@ -108,10 +108,10 @@ public void writeXref(Writer out) throws IOException {
108108
* @param annotation annotation for the file (could be null)
109109
*/
110110
static void writeXref(Reader in, Writer out, Annotation annotation, Project project) throws IOException {
111-
TroffXref xref = new TroffXref(in);
111+
TroffXref xref = new TroffXref(in);
112112
xref.project = project;
113-
out.write("</pre>");
114-
xref.write(out);
115-
out.write("<pre>");
113+
out.write("</pre>");
114+
xref.write(out);
115+
out.write("<pre>");
116116
}
117117
}

src/org/opensolaris/opengrok/analysis/document/TroffAnalyzerFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
public class TroffAnalyzerFactory extends FileAnalyzerFactory {
3737
private static final String[] MAGICS = {
38-
"'\\\"", ".so", ".\\\"", ".TH"
38+
"'\\\"", ".so", ".\\\"", ".TH"
3939
};
4040

4141
public TroffAnalyzerFactory() {

src/org/opensolaris/opengrok/analysis/executables/ELFAnalyzer.java

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -257,35 +257,35 @@ public String toString() {
257257
}
258258

259259
private static class ELFSection {
260-
public static final int SHT_NULL = 0; /* Section header table entry unused */
261-
public static final int SHT_PROGBITS = 1; /* Program data */
262-
public static final int SHT_SYMTAB = 2; /* Symbol table */
263-
public static final int SHT_STRTAB = 3; /* String table */
264-
public static final int SHT_RELA = 4; /* Relocation entries with addends */
265-
public static final int SHT_HASH = 5; /* Symbol hash table */
266-
public static final int SHT_DYNAMIC = 6; /* Dynamic linking information */
267-
public static final int SHT_NOTE = 7; /* Notes */
268-
public static final int SHT_NOBITS = 8; /* Program space with no data (bss) */
269-
public static final int SHT_REL = 9; /* Relocation entries, no addends */
270-
public static final int SHT_SHLIB = 10; /* Reserved */
271-
public static final int SHT_DYNSYM = 11; /* Dynamic linker symbol table */
272-
public static final int SHT_INIT_ARRAY = 14; /* Array of constructors */
273-
public static final int SHT_FINI_ARRAY = 15; /* Array of destructors */
274-
public static final int SHT_PREINIT_ARRAY = 16; /* Array of pre-constructors */
275-
public static final int SHT_GROUP = 17; /* Section group */
276-
public static final int SHT_SYMTAB_SHNDX = 18; /* Extended section indeces */
277-
public static final int SHT_NUM = 19; /* Number of defined types. */
278-
public static final int SHT_LOOS = 0x60000000; /* Start OS-specific */
279-
public static final int SHT_GNU_LIBLIST = 0x6ffffff7; /* Prelink library list */
280-
public static final int SHT_CHECKSUM = 0x6ffffff8; /* Checksum for DSO content. */
281-
public static final int SHT_LOSUNW = 0x6ffffffa; /* Sun-specific low bound. */
282-
public static final int SHT_SUNW_COMDAT = 0x6ffffffb;
283-
public static final int SHT_HISUNW = 0x6fffffff; /* Sun-specific high bound. */
284-
public static final int SHT_HIOS = 0x6fffffff; /* End OS-specific type */
285-
public static final int SHT_LOPROC = 0x70000000; /* Start of processor-specific */
286-
public static final int SHT_HIPROC = 0x7fffffff; /* End of processor-specific */
287-
public static final int SHT_LOUSER = 0x80000000; /* Start of application-specific */
288-
public static final int SHT_HIUSER = 0x8fffffff; /* End of application-specific */
260+
public static final int SHT_NULL = 0; /* Section header table entry unused */
261+
public static final int SHT_PROGBITS = 1; /* Program data */
262+
public static final int SHT_SYMTAB = 2; /* Symbol table */
263+
public static final int SHT_STRTAB = 3; /* String table */
264+
public static final int SHT_RELA = 4; /* Relocation entries with addends */
265+
public static final int SHT_HASH = 5; /* Symbol hash table */
266+
public static final int SHT_DYNAMIC = 6; /* Dynamic linking information */
267+
public static final int SHT_NOTE = 7; /* Notes */
268+
public static final int SHT_NOBITS = 8; /* Program space with no data (bss) */
269+
public static final int SHT_REL = 9; /* Relocation entries, no addends */
270+
public static final int SHT_SHLIB = 10; /* Reserved */
271+
public static final int SHT_DYNSYM = 11; /* Dynamic linker symbol table */
272+
public static final int SHT_INIT_ARRAY = 14; /* Array of constructors */
273+
public static final int SHT_FINI_ARRAY = 15; /* Array of destructors */
274+
public static final int SHT_PREINIT_ARRAY = 16; /* Array of pre-constructors */
275+
public static final int SHT_GROUP = 17; /* Section group */
276+
public static final int SHT_SYMTAB_SHNDX = 18; /* Extended section indeces */
277+
public static final int SHT_NUM = 19; /* Number of defined types. */
278+
public static final int SHT_LOOS = 0x60000000; /* Start OS-specific */
279+
public static final int SHT_GNU_LIBLIST = 0x6ffffff7; /* Prelink library list */
280+
public static final int SHT_CHECKSUM = 0x6ffffff8; /* Checksum for DSO content. */
281+
public static final int SHT_LOSUNW = 0x6ffffffa; /* Sun-specific low bound. */
282+
public static final int SHT_SUNW_COMDAT = 0x6ffffffb;
283+
public static final int SHT_HISUNW = 0x6fffffff; /* Sun-specific high bound. */
284+
public static final int SHT_HIOS = 0x6fffffff; /* End OS-specific type */
285+
public static final int SHT_LOPROC = 0x70000000; /* Start of processor-specific */
286+
public static final int SHT_HIPROC = 0x7fffffff; /* End of processor-specific */
287+
public static final int SHT_LOUSER = 0x80000000; /* Start of application-specific */
288+
public static final int SHT_HIUSER = 0x8fffffff; /* End of application-specific */
289289

290290
public int sh_name;
291291
public int sh_type;

0 commit comments

Comments
 (0)