Skip to content

Commit

Permalink
Use my custom jmzReader to avoid muting the System.out.
Browse files Browse the repository at this point in the history
  • Loading branch information
fcyu committed Dec 23, 2017
1 parent ddd2c87 commit 4769cb3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<dependency>
<groupId>uk.ac.ebi.pride.tools</groupId>
<artifactId>jmzreader</artifactId>
<version>2.0.2</version>
<version>2.0.3-SNAPSHOT</version>
<type>jar</type>
</dependency>
<dependency>
Expand Down
9 changes: 0 additions & 9 deletions src/main/java/proteomics/Spectrum/PreSpectra.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@ public PreSpectra(JMzReader spectra_parser, BuildIndex build_index_obj, Map<Stri
}
}

PrintStream original_stream = System.out;
PrintStream null_stream = new PrintStream(new OutputStream() {
@Override
public void write(int b) throws IOException {}
});
System.setOut(null_stream);

Iterator<Spectrum> spectrumIterator = spectra_parser.getSpectrumIterator();
try {
while (spectrumIterator.hasNext()) {
Expand Down Expand Up @@ -145,8 +138,6 @@ public void write(int b) throws IOException {}
ex.printStackTrace();
System.exit(1);
}

System.setOut(original_stream);
}

public Map<Integer, SpectrumEntry> getNumSpectrumMap() {
Expand Down

0 comments on commit 4769cb3

Please sign in to comment.