~ubuntu-branches/ubuntu/wily/apgdiff/wily

« back to all changes in this revision

Viewing changes to src/main/java/cz/startnet/utils/pgdiff/PgDiffArguments.java

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Berg
  • Date: 2009-12-02 11:11:33 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20091202111133-k5wrh3zb2pzmbv8c
Tags: 1.4-1
* New upstream version. (Without changelog, I am afraid.)
* Test suite still not enabled as it needs network access. (The junit
  version in Debian needs upgrading.)
* Optimize rules files a bit so debhelper doesn't clean twice, and quilt's
  patch target doesn't prevent build-stamp from working.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * $Id: PgDiffArguments.java 91 2008-08-01 17:35:19Z fordfrog $
3
 
 */
4
1
package cz.startnet.utils.pgdiff;
5
2
 
6
3
import java.io.BufferedReader;
12
9
 * Contains parsed command line arguments.
13
10
 *
14
11
 * @author fordfrog
15
 
 * @version $Id: PgDiffArguments.java 91 2008-08-01 17:35:19Z fordfrog $
16
12
 */
17
13
public class PgDiffArguments {
18
14
 
97
93
    /**
98
94
     * Setter for {@link #ignoreFunctionWhitespace}.
99
95
     *
100
 
     * @param ignoreStartWith {@link #ignoreFunctionWhitespace}
 
96
     * @param ignoreFunctionWhitespace {@link #ignoreFunctionWhitespace}
101
97
     */
102
98
    public void setIgnoreFunctionWhitespace(
103
 
        final boolean ignoreFunctionWhitespace) {
 
99
            final boolean ignoreFunctionWhitespace) {
104
100
        this.ignoreFunctionWhitespace = ignoreFunctionWhitespace;
105
101
    }
106
102
 
273
269
     */
274
270
    private void printUsage(final PrintWriter writer) {
275
271
        final BufferedReader reader =
276
 
            new BufferedReader(
277
 
            new InputStreamReader(
278
 
            getClass().getResourceAsStream("usage.txt")));
 
272
                new BufferedReader(
 
273
                new InputStreamReader(
 
274
                getClass().getResourceAsStream("usage.txt")));
279
275
 
280
276
        try {
281
277
            String line = reader.readLine();
286
282
            }
287
283
        } catch (final IOException ex) {
288
284
            throw new RuntimeException(
289
 
                "Problem occured while reading usage file",
290
 
                ex);
 
285
                    "Problem occured while reading usage file",
 
286
                    ex);
291
287
        } finally {
292
288
            try {
293
289
                reader.close();
294
290
            } catch (final IOException ex) {
295
291
                throw new RuntimeException(
296
 
                    "Problem occured while closing reader",
297
 
                    ex);
 
292
                        "Problem occured while closing reader",
 
293
                        ex);
298
294
            }
299
295
        }
300
296
    }
309
305
     */
310
306
    private void printVersion(final PrintWriter writer) {
311
307
        final BufferedReader reader =
312
 
            new BufferedReader(
313
 
            new InputStreamReader(
314
 
            getClass().getResourceAsStream("build_info")));
 
308
                new BufferedReader(
 
309
                new InputStreamReader(
 
310
                getClass().getResourceAsStream("build_info")));
315
311
        writer.print("Version: ");
316
312
 
317
313
        try {
323
319
                reader.close();
324
320
            } catch (final IOException ex) {
325
321
                throw new RuntimeException(
326
 
                    "Problem occured while closing reader",
327
 
                    ex);
 
322
                        "Problem occured while closing reader",
 
323
                        ex);
328
324
            }
329
325
        }
330
326
    }