japi-cvs Mailing List for JAPI (Page 40)
Status: Beta
Brought to you by:
christianhujer
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
(115) |
May
(11) |
Jun
(5) |
Jul
(2) |
Aug
(10) |
Sep
(35) |
Oct
(14) |
Nov
(49) |
Dec
(27) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(57) |
Feb
(1) |
Mar
|
Apr
(2) |
May
(25) |
Jun
(134) |
Jul
(76) |
Aug
(34) |
Sep
(27) |
Oct
(5) |
Nov
|
Dec
(1) |
2008 |
Jan
(3) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(63) |
Nov
(30) |
Dec
(43) |
2009 |
Jan
(10) |
Feb
(420) |
Mar
(67) |
Apr
(3) |
May
(61) |
Jun
(21) |
Jul
(19) |
Aug
|
Sep
(6) |
Oct
(16) |
Nov
(1) |
Dec
|
2010 |
Jan
(1) |
Feb
|
Mar
|
Apr
(7) |
May
(3) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: <chr...@us...> - 2007-06-25 13:51:25
|
Revision: 433 http://svn.sourceforge.net/japi/?rev=433&view=rev Author: christianhujer Date: 2007-06-25 06:51:23 -0700 (Mon, 25 Jun 2007) Log Message: ----------- Cosmetic: reformatted code to use @NotNull in modifier annotation style always. Modified Paths: -------------- libs/argparser/trunk/src/net/sf/japi/io/args/converter/BooleanConverter.java libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/ConverterRegistryTest.java Modified: libs/argparser/trunk/src/net/sf/japi/io/args/converter/BooleanConverter.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/converter/BooleanConverter.java 2007-06-25 13:42:52 UTC (rev 432) +++ libs/argparser/trunk/src/net/sf/japi/io/args/converter/BooleanConverter.java 2007-06-25 13:51:23 UTC (rev 433) @@ -43,8 +43,7 @@ } /** {@inheritDoc} */ - @NotNull - public Boolean convert(@NotNull final Locale locale, @NotNull final String arg) throws Exception { + @NotNull public Boolean convert(@NotNull final Locale locale, @NotNull final String arg) throws Exception { for (final String s : TRUE_STRINGS) { if (s.equalsIgnoreCase(arg)) { return Boolean.TRUE; Modified: libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/ConverterRegistryTest.java =================================================================== --- libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/ConverterRegistryTest.java 2007-06-25 13:42:52 UTC (rev 432) +++ libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/ConverterRegistryTest.java 2007-06-25 13:51:23 UTC (rev 433) @@ -102,44 +102,37 @@ } /** {@inheritDoc} */ - @NotNull - public T convert(@NotNull final String arg) throws Exception { + @NotNull public T convert(@NotNull final String arg) throws Exception { return null; } /** {@inheritDoc} */ - @NotNull - public T convert(@NotNull final Locale locale, @NotNull final String arg) throws Exception { + @NotNull public T convert(@NotNull final Locale locale, @NotNull final String arg) throws Exception { return null; } /** {@inheritDoc} */ - @NotNull - public Class<T> getTargetClass() { + @NotNull public Class<T> getTargetClass() { return targetClass; } /** {@inheritDoc} */ - @NotNull - public String getDisplayName() { + @NotNull public String getDisplayName() { return null; } /** {@inheritDoc} */ - @NotNull - public String getDisplayName(@NotNull final Locale locale) { + @NotNull public String getDisplayName(@NotNull final Locale locale) { return null; } /** {@inheritDoc} */ - @NotNull - public String getDescription() { + @NotNull public String getDescription() { return null; } /** {@inheritDoc} */ - @NotNull - public String getDescription(@NotNull final Locale locale) { + @NotNull public String getDescription(@NotNull final Locale locale) { return null; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-06-25 13:42:55
|
Revision: 432 http://svn.sourceforge.net/japi/?rev=432&view=rev Author: christianhujer Date: 2007-06-25 06:42:52 -0700 (Mon, 25 Jun 2007) Log Message: ----------- Fixed all warnings that arise with our current checkstyle configuration. Modified Paths: -------------- libs/argparser/trunk/src/doc/examples/Cat.java libs/argparser/trunk/src/doc/examples/Head.java libs/argparser/trunk/src/doc/examples/Recode.java libs/argparser/trunk/src/doc/examples/Tail.java libs/argparser/trunk/src/doc/examples/Uniq.java libs/argparser/trunk/src/net/sf/japi/io/args/ArgParser.java libs/argparser/trunk/src/test/net/sf/japi/io/args/CommandDummy.java libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/AbstractConverterTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/BooleanConverterTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/ConverterRegistryTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/IntegerConverterTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/StringConverterTest.java Modified: libs/argparser/trunk/src/doc/examples/Cat.java =================================================================== --- libs/argparser/trunk/src/doc/examples/Cat.java 2007-06-25 13:42:15 UTC (rev 431) +++ libs/argparser/trunk/src/doc/examples/Cat.java 2007-06-25 13:42:52 UTC (rev 432) @@ -33,8 +33,11 @@ */ public class Cat extends BasicCommand { + /** Size of the internal buffer for performing the Cat. */ + private static final int BUF_SIZE = 4096; + /** {@inheritDoc} */ - @SuppressWarnings({"InstanceMethodNamingConvention"}) + @SuppressWarnings({ "InstanceMethodNamingConvention" }) public int run(@NotNull final List<String> args) throws Exception { int returnCode = 0; if (args.size() == 0) { @@ -63,7 +66,7 @@ * @throws IOException in case of I/O problems. */ private void copy(@NotNull final InputStream in, @NotNull final OutputStream out) throws IOException { - final byte[] buf = new byte[4096]; + final byte[] buf = new byte[BUF_SIZE]; for (int bytesRead; (bytesRead = in.read(buf)) != -1;) { out.write(buf, 0, bytesRead); } Modified: libs/argparser/trunk/src/doc/examples/Head.java =================================================================== --- libs/argparser/trunk/src/doc/examples/Head.java 2007-06-25 13:42:15 UTC (rev 431) +++ libs/argparser/trunk/src/doc/examples/Head.java 2007-06-25 13:42:52 UTC (rev 432) @@ -36,8 +36,11 @@ */ public class Head extends BasicCommand { + /** Default number of items to print. */ + private static final int DEFAULT_NUM_ITEMS = 10; + /** The number of items to print. */ - private int numItems = 10; + private int numItems = DEFAULT_NUM_ITEMS; /** The kind of items to print. * <code>false</code>: print lines. Modified: libs/argparser/trunk/src/doc/examples/Recode.java =================================================================== --- libs/argparser/trunk/src/doc/examples/Recode.java 2007-06-25 13:42:15 UTC (rev 431) +++ libs/argparser/trunk/src/doc/examples/Recode.java 2007-06-25 13:42:52 UTC (rev 432) @@ -45,6 +45,9 @@ */ public class Recode extends BasicCommand { + /** Size of the internal buffer for performing the Recode. */ + private static final int BUF_SIZE = 4096; + /** The InputEncoding to use. */ private String inputEncoding; @@ -73,7 +76,7 @@ /** {@inheritDoc} */ @SuppressWarnings({"InstanceMethodNamingConvention"}) - public int run(@NotNull List<String> args) throws Exception { + public int run(@NotNull final List<String> args) throws Exception { int returnCode = 0; if (args.size() == 0) { recode(System.in, System.out); @@ -125,9 +128,11 @@ public void recode(final InputStream in, final OutputStream out) throws IOException { final Reader cin = new InputStreamReader(in, inputEncoding); final Writer cout = new OutputStreamWriter(out, outputEncoding); - final char[] buf = new char[4096]; + final char[] buf = new char[BUF_SIZE]; //noinspection StatementWithEmptyBody - for (int charsRead; (charsRead = cin.read(buf)) != -1; cout.write(buf, 0, charsRead)); + for (int charsRead; (charsRead = cin.read(buf)) != -1;) { + cout.write(buf, 0, charsRead); + } cout.flush(); } Modified: libs/argparser/trunk/src/doc/examples/Tail.java =================================================================== --- libs/argparser/trunk/src/doc/examples/Tail.java 2007-06-25 13:42:15 UTC (rev 431) +++ libs/argparser/trunk/src/doc/examples/Tail.java 2007-06-25 13:42:52 UTC (rev 432) @@ -36,8 +36,11 @@ */ public class Tail extends BasicCommand { + /** Default number of items to print. */ + private static final int DEFAULT_NUM_ITEMS = 10; + /** The number of items to print. */ - private int numItems = 10; + private int numItems = DEFAULT_NUM_ITEMS; /** The kind of items to print. * <code>false</code>: print lines. @@ -150,7 +153,9 @@ final BufferedReader lin = new BufferedReader(new InputStreamReader(in)); int num = 0; //noinspection StatementWithEmptyBody - while ((buf[num++ % numItems] = lin.readLine()) != null); + while ((buf[num++ % numItems] = lin.readLine()) != null) { + // nothing to do, it's all in the condition. + } if (num >= numItems) { for (int i = num % numItems; i < numItems; i++) { System.out.println(buf[i]); Modified: libs/argparser/trunk/src/doc/examples/Uniq.java =================================================================== --- libs/argparser/trunk/src/doc/examples/Uniq.java 2007-06-25 13:42:15 UTC (rev 431) +++ libs/argparser/trunk/src/doc/examples/Uniq.java 2007-06-25 13:42:52 UTC (rev 432) @@ -66,7 +66,7 @@ /** {@inheritDoc} */ @SuppressWarnings({"InstanceMethodNamingConvention"}) - public int run(final @NotNull List<String> args) throws Exception { + public int run(@NotNull final List<String> args) throws Exception { int returnCode = 0; for (final String arg : args) { try { Modified: libs/argparser/trunk/src/net/sf/japi/io/args/ArgParser.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/ArgParser.java 2007-06-25 13:42:15 UTC (rev 431) +++ libs/argparser/trunk/src/net/sf/japi/io/args/ArgParser.java 2007-06-25 13:42:52 UTC (rev 432) @@ -39,7 +39,7 @@ * @todo Handling of - for STDIN as input argument filestream * @todo automatic printout of default values if property getter available. */ -public class ArgParser { +public final class ArgParser { /** The command to parse arguments to. */ private final Command command; Modified: libs/argparser/trunk/src/test/net/sf/japi/io/args/CommandDummy.java =================================================================== --- libs/argparser/trunk/src/test/net/sf/japi/io/args/CommandDummy.java 2007-06-25 13:42:15 UTC (rev 431) +++ libs/argparser/trunk/src/test/net/sf/japi/io/args/CommandDummy.java 2007-06-25 13:42:52 UTC (rev 432) @@ -31,7 +31,7 @@ /** {@inheritDoc} */ @SuppressWarnings({"InstanceMethodNamingConvention"}) - public int run(@NotNull List<String> args) throws Exception { + public int run(@NotNull final List<String> args) throws Exception { return 0; } Modified: libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/AbstractConverterTest.java =================================================================== --- libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/AbstractConverterTest.java 2007-06-25 13:42:15 UTC (rev 431) +++ libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/AbstractConverterTest.java 2007-06-25 13:42:52 UTC (rev 432) @@ -38,7 +38,7 @@ private Class<V> targetClass; /** The converter testling. */ - protected T converter; + private T converter; /** * Create an AbstractConverterTest. @@ -108,4 +108,11 @@ Assert.assertEquals(displayName, converter.getDisplayName(Locale.getDefault())); } + /** Returns the converter that's being tested. + * @return The converter that's being tested. + */ + protected T getConverter() { + return converter; + } + } // class AbstractConverterTest Modified: libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/BooleanConverterTest.java =================================================================== --- libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/BooleanConverterTest.java 2007-06-25 13:42:15 UTC (rev 431) +++ libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/BooleanConverterTest.java 2007-06-25 13:42:52 UTC (rev 432) @@ -52,10 +52,10 @@ */ @Test public void testConvertTrue() throws Exception { - Assert.assertTrue(converter.convert("true")); - Assert.assertTrue(converter.convert("TRUE")); - Assert.assertTrue(converter.convert("True")); - Assert.assertTrue(converter.convert("1")); + Assert.assertTrue(getConverter().convert("true")); + Assert.assertTrue(getConverter().convert("TRUE")); + Assert.assertTrue(getConverter().convert("True")); + Assert.assertTrue(getConverter().convert("1")); } /** @@ -64,10 +64,10 @@ */ @Test public void testConvertFalse() throws Exception { - Assert.assertFalse(converter.convert("false")); - Assert.assertFalse(converter.convert("FALSE")); - Assert.assertFalse(converter.convert("False")); - Assert.assertFalse(converter.convert("0")); + Assert.assertFalse(getConverter().convert("false")); + Assert.assertFalse(getConverter().convert("FALSE")); + Assert.assertFalse(getConverter().convert("False")); + Assert.assertFalse(getConverter().convert("0")); } /** @@ -75,9 +75,9 @@ * @throws IllegalArgumentException Expected exception that's thrown if the test case is successful. * @throws Exception In case of unexpected errors. */ - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testConvertOther() throws Exception { - converter.convert("foobarbuzz"); + getConverter().convert("foobarbuzz"); } } // class BooleanConverterTest Modified: libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/ConverterRegistryTest.java =================================================================== --- libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/ConverterRegistryTest.java 2007-06-25 13:42:15 UTC (rev 431) +++ libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/ConverterRegistryTest.java 2007-06-25 13:42:52 UTC (rev 432) @@ -88,7 +88,7 @@ * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ @SuppressWarnings({"ConstantConditions"}) - private static class DummyConverter<T> implements Converter<T> { + private static final class DummyConverter<T> implements Converter<T> { /** Class for this converter. */ private final Class<T> targetClass; @@ -103,13 +103,13 @@ /** {@inheritDoc} */ @NotNull - public T convert(@NotNull String arg) throws Exception { + public T convert(@NotNull final String arg) throws Exception { return null; } /** {@inheritDoc} */ @NotNull - public T convert(@NotNull Locale locale, @NotNull String arg) throws Exception { + public T convert(@NotNull final Locale locale, @NotNull final String arg) throws Exception { return null; } @@ -127,7 +127,7 @@ /** {@inheritDoc} */ @NotNull - public String getDisplayName(@NotNull Locale locale) { + public String getDisplayName(@NotNull final Locale locale) { return null; } @@ -139,7 +139,7 @@ /** {@inheritDoc} */ @NotNull - public String getDescription(@NotNull Locale locale) { + public String getDescription(@NotNull final Locale locale) { return null; } Modified: libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/IntegerConverterTest.java =================================================================== --- libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/IntegerConverterTest.java 2007-06-25 13:42:15 UTC (rev 431) +++ libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/IntegerConverterTest.java 2007-06-25 13:42:52 UTC (rev 432) @@ -51,9 +51,9 @@ * @throws NumberFormatException Expected exception that's thrown if the test case is successful. * @throws Exception In case of unexpected errors. */ - @Test(expected=NumberFormatException.class) + @Test(expected = NumberFormatException.class) public void testConvertWithText() throws Exception { - converter.convert("foo"); + getConverter().convert("foo"); } /** @@ -63,7 +63,7 @@ @Test public void testConvertDecimalNumbers() throws Exception { for (final int number : new int[] { Integer.MIN_VALUE, -100, -1, 0, 1, 100, Integer.MAX_VALUE }) { - Assert.assertEquals(number, converter.convert(Integer.toString(number))); + Assert.assertEquals(number, getConverter().convert(Integer.toString(number))); } } @@ -73,9 +73,9 @@ */ @Test public void testConvertHexadecimalNumbers() throws Exception { - Assert.assertEquals(0x50000, converter.convert("0x50000")); - Assert.assertEquals(0x50000, converter.convert("0X50000")); - Assert.assertEquals(0x50000, converter.convert("#50000")); + Assert.assertEquals(0x50000, getConverter().convert("0x50000")); + Assert.assertEquals(0x50000, getConverter().convert("0X50000")); + Assert.assertEquals(0x50000, getConverter().convert("#50000")); } /** @@ -84,7 +84,7 @@ */ @Test public void testConvertOctalNumbers() throws Exception { - Assert.assertEquals(0x1ff, converter.convert("0777")); + Assert.assertEquals(0x1ff, getConverter().convert("0777")); } } // class IntegerConverterTest Modified: libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/StringConverterTest.java =================================================================== --- libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/StringConverterTest.java 2007-06-25 13:42:15 UTC (rev 431) +++ libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/StringConverterTest.java 2007-06-25 13:42:52 UTC (rev 432) @@ -52,7 +52,7 @@ */ @Test public void testConvert() throws Exception { - final String foo = converter.convert("foo"); + final String foo = getConverter().convert("foo"); Assert.assertEquals("StringConverter.convert(\"foo\") must return \"foo\".", "foo", foo); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-06-25 13:42:17
|
Revision: 431 http://svn.sourceforge.net/japi/?rev=431&view=rev Author: christianhujer Date: 2007-06-25 06:42:15 -0700 (Mon, 25 Jun 2007) Log Message: ----------- Changed checkstyle configuration to match the current coding standards and workaround bugs and limitations of checkstyle. Modified Paths: -------------- common/trunk/sun_checks.xml Modified: common/trunk/sun_checks.xml =================================================================== --- common/trunk/sun_checks.xml 2007-06-25 13:41:54 UTC (rev 430) +++ common/trunk/sun_checks.xml 2007-06-25 13:42:15 UTC (rev 431) @@ -34,7 +34,10 @@ <!-- Checks that a package.html file exists for each package. --> <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml --> - <module name="PackageHtml"/> + <!-- Disabled because we use package-info.java that's not yet supported by checkstyle. + ~ See also http://sourceforge.net/tracker/index.php?func=detail&aid=1228207&group_id=29721&atid=397078 + --> + <!--module name="PackageHtml"/--> <!-- Checks whether files end with a new line. --> <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile --> @@ -49,10 +52,14 @@ <!-- Checks for Javadoc comments. --> <!-- See http://checkstyle.sf.net/config_javadoc.html --> - <module name="JavadocMethod"/> + <!-- Disabled because it throws an exception. + ~ TODO: report issue to checkstyle developers. + --> + <!--module name="JavadocMethod"/--> <module name="JavadocType"/> <module name="JavadocVariable"/> - <module name="JavadocStyle"/> + <!-- Disabled because it gets confused with type parameters in links, e.g. {@link #foo(Collection<String>)}. --> + <!--module name="JavadocStyle"/--> <!-- Checks for Naming Conventions. --> @@ -89,15 +96,18 @@ <!-- Checks for imports --> <!-- See http://checkstyle.sf.net/config_import.html --> <module name="AvoidStarImport"/> - <module name="IllegalImport"/> <!-- defaults to sun.* packages --> + <!-- Disabled because we currently use sun.misc.Service. Blame SUN. --> + <!--module name="IllegalImport"/--> <!-- defaults to sun.* packages --> <module name="RedundantImport"/> - <module name="UnusedImports"/> + <!-- Disabled because some Javadoc checks are disabled and thus checkstyle thinks some imports are unused while they are actually used in javadoc. --> + <!--module name="UnusedImports"/--> <!-- Checks for Size Violations. --> <!-- See http://checkstyle.sf.net/config_sizes.html --> <module name="FileLength"/> - <module name="LineLength"/> + <!-- Disabled because we use longer lines. --> + <!--module name="LineLength"/--> <module name="MethodLength"/> <module name="ParameterNumber"/> @@ -106,14 +116,20 @@ <!-- See http://checkstyle.sf.net/config_whitespace.html --> <module name="EmptyForIteratorPad"/> <module name="MethodParamPad"/> - <module name="NoWhitespaceAfter"/> + <!-- changed because we use less strict whitespace check for arrays and type params. --> + <module name="NoWhitespaceAfter"> + <property name="tokens" value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS" /> + </module> <module name="NoWhitespaceBefore"/> <module name="OperatorWrap"/> <module name="ParenPad"/> <module name="TypecastParenPad"/> <module name="TabCharacter"/> <module name="WhitespaceAfter"/> - <module name="WhitespaceAround"/> + <!-- changed because we use less strict whitespace check for arrays and type params. --> + <module name="WhitespaceAround"> + <property name="tokens" value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, EQUAL, GE, GT, LAND, LE, LITERAL_ASSERT, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN" /> + </module> <!-- Modifier Checks --> @@ -125,7 +141,10 @@ <!-- Checks for blocks. You know, those {}'s --> <!-- See http://checkstyle.sf.net/config_blocks.html --> <module name="AvoidNestedBlocks"/> - <module name="EmptyBlock"/> + <!-- Changed block policy because sometimes we must catch but ignore it with a comment. --> + <module name="EmptyBlock"> + <property name="option" value="text" /> + </module> <module name="LeftCurly"/> <module name="NeedBraces"/> <module name="RightCurly"/> @@ -133,22 +152,30 @@ <!-- Checks for common coding problems --> <!-- See http://checkstyle.sf.net/config_coding.html --> - <module name="AvoidInlineConditionals"/> + <!-- We allow ?:. --> + <!--module name="AvoidInlineConditionals"/--> <module name="DoubleCheckedLocking"/> <!-- MY FAVOURITE --> <module name="EmptyStatement"/> <module name="EqualsHashCode"/> - <module name="HiddenField"/> + <!-- Disabled, we allow field hiding. --> + <!--module name="HiddenField"/--> <module name="IllegalInstantiation"/> - <module name="InnerAssignment"/> - <module name="MagicNumber"/> + <!-- Disabled, we allow inner assignments in while and for conditions but there's no chance to explicitely allow these. --> + <!--module name="InnerAssignment"/--> + <!-- Disabled, we allow them in unit tests. + ~ TODO explicitely allow them in unit tests only (src/test/**/*.java). + --> + <!--module name="MagicNumber"/--> <module name="MissingSwitchDefault"/> - <module name="RedundantThrows"/> + <!-- Disabled, confusing with javadoc and trying to write really good documentation. --> + <!--module name="RedundantThrows"/--> <module name="SimplifyBooleanExpression"/> <module name="SimplifyBooleanReturn"/> <!-- Checks for class design --> <!-- See http://checkstyle.sf.net/config_design.html --> - <module name="DesignForExtension"/> + <!-- Disabled, this check is way too strict. --> + <!--module name="DesignForExtension"/--> <module name="FinalClass"/> <module name="HideUtilityClassConstructor"/> <module name="InterfaceIsType"/> @@ -163,7 +190,8 @@ <property name="format" value="\s+$"/> <property name="message" value="Line has trailing spaces."/> </module> - <module name="TodoComment"/> + <!-- Disabled because we use different means of filtering out todo comments. --> + <!--module name="TodoComment"/--> <module name="UpperEll"/> </module> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-06-25 13:41:55
|
Revision: 430 http://svn.sourceforge.net/japi/?rev=430&view=rev Author: christianhujer Date: 2007-06-25 06:41:54 -0700 (Mon, 25 Jun 2007) Log Message: ----------- Added properties files to the files that are checked with checkstyle. Modified Paths: -------------- common/trunk/commonBuild.xml Modified: common/trunk/commonBuild.xml =================================================================== --- common/trunk/commonBuild.xml 2007-06-25 12:46:45 UTC (rev 429) +++ common/trunk/commonBuild.xml 2007-06-25 13:41:54 UTC (rev 430) @@ -57,7 +57,7 @@ <checkstyle config="${commonPath}/sun_checks.xml" > - <fileset dir="src" includes="**/*.java" /> + <fileset dir="src" includes="**/*.java,**/*.properties" /> </checkstyle> </target> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-06-25 12:46:47
|
Revision: 429 http://svn.sourceforge.net/japi/?rev=429&view=rev Author: christianhujer Date: 2007-06-25 05:46:45 -0700 (Mon, 25 Jun 2007) Log Message: ----------- Fixed type javadoc issues. Modified Paths: -------------- libs/argparser/trunk/src/net/sf/japi/io/args/converter/AbstractConverter.java libs/argparser/trunk/src/net/sf/japi/io/args/converter/Converter.java libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/AbstractConverterTest.java Modified: libs/argparser/trunk/src/net/sf/japi/io/args/converter/AbstractConverter.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/converter/AbstractConverter.java 2007-06-25 12:44:40 UTC (rev 428) +++ libs/argparser/trunk/src/net/sf/japi/io/args/converter/AbstractConverter.java 2007-06-25 12:46:45 UTC (rev 429) @@ -25,6 +25,7 @@ /** * Base class for the default converters. + * @param <T> target type to convert to. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public abstract class AbstractConverter<T> implements Converter<T> { Modified: libs/argparser/trunk/src/net/sf/japi/io/args/converter/Converter.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/converter/Converter.java 2007-06-25 12:44:40 UTC (rev 428) +++ libs/argparser/trunk/src/net/sf/japi/io/args/converter/Converter.java 2007-06-25 12:46:45 UTC (rev 429) @@ -24,6 +24,7 @@ /** * The Converter interface is used for converters that convert Strings into other types. + * @param <T> target type to convert to. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public interface Converter<T> { Modified: libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/AbstractConverterTest.java =================================================================== --- libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/AbstractConverterTest.java 2007-06-25 12:44:40 UTC (rev 428) +++ libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/AbstractConverterTest.java 2007-06-25 12:46:45 UTC (rev 429) @@ -28,6 +28,8 @@ /** * Base class for tests for Converters. * Provides some basic testing methods. + * @param <V> target type to convert to. + * @param <T> converter type to test * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public abstract class AbstractConverterTest<V, T extends Converter<V>> { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-06-25 12:44:41
|
Revision: 428 http://svn.sourceforge.net/japi/?rev=428&view=rev Author: christianhujer Date: 2007-06-25 05:44:40 -0700 (Mon, 25 Jun 2007) Log Message: ----------- Fixed several javadoc issues. Modified Paths: -------------- libs/argparser/trunk/src/doc/examples/Head.java libs/argparser/trunk/src/doc/examples/Tail.java libs/argparser/trunk/src/net/sf/japi/io/args/RequiredOptionsMissingException.java libs/argparser/trunk/src/net/sf/japi/io/args/UnknownOptionException.java libs/argparser/trunk/src/net/sf/japi/io/args/converter/ConverterRegistry.java libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/BooleanConverterTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/IntegerConverterTest.java Modified: libs/argparser/trunk/src/doc/examples/Head.java =================================================================== --- libs/argparser/trunk/src/doc/examples/Head.java 2007-06-25 12:34:24 UTC (rev 427) +++ libs/argparser/trunk/src/doc/examples/Head.java 2007-06-25 12:44:40 UTC (rev 428) @@ -123,6 +123,10 @@ } } + /** Copies the first {@link #numItems} bytes from the supplied input stream to {@link System#out}. + * @param in InputStream to copy bytes from. + * @throws IOException in case of I/O errors. + */ private void copyBytes(@NotNull final InputStream in) throws IOException { final InputStream lin = in instanceof BufferedInputStream ? in : new BufferedInputStream(in); final byte[] buf = new byte[numItems]; @@ -130,6 +134,10 @@ System.out.write(buf, 0, bytesRead); } + /** Copies the first {@link #numItems} lines from the supplied input stream to {@link System#out}. + * @param in InputStream to copy lines from. + * @throws IOException in case of I/O errors. + */ private void copyLines(@NotNull final InputStream in) throws IOException { BufferedReader lin = new BufferedReader(new InputStreamReader(in)); String line; Modified: libs/argparser/trunk/src/doc/examples/Tail.java =================================================================== --- libs/argparser/trunk/src/doc/examples/Tail.java 2007-06-25 12:34:24 UTC (rev 427) +++ libs/argparser/trunk/src/doc/examples/Tail.java 2007-06-25 12:44:40 UTC (rev 428) @@ -123,6 +123,10 @@ } } + /** Copies the last {@link #numItems} bytes from the supplied input stream to {@link System#out}. + * @param in InputStream to copy bytes from. + * @throws IOException in case of I/O errors. + */ private void copyBytes(@NotNull final InputStream in) throws IOException { final InputStream lin = in instanceof BufferedInputStream ? in : new BufferedInputStream(in); final byte[] buf = new byte[numItems]; @@ -137,6 +141,10 @@ System.out.write(buf, 0, bytesRead); } + /** Copies the last {@link #numItems} lines from the supplied input stream to {@link System#out}. + * @param in InputStream to copy lines from. + * @throws IOException in case of I/O errors. + */ private void copyLines(@NotNull final InputStream in) throws IOException { final String[] buf = new String[numItems]; final BufferedReader lin = new BufferedReader(new InputStreamReader(in)); Modified: libs/argparser/trunk/src/net/sf/japi/io/args/RequiredOptionsMissingException.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/RequiredOptionsMissingException.java 2007-06-25 12:34:24 UTC (rev 427) +++ libs/argparser/trunk/src/net/sf/japi/io/args/RequiredOptionsMissingException.java 2007-06-25 12:44:40 UTC (rev 428) @@ -36,7 +36,7 @@ * @param missingOptions options that were missing. * @throws IllegalArgumentException in case <var>missingOptions</var> was null or of zero length */ - public RequiredOptionsMissingException(@NotNull final String... missingOptions) { + public RequiredOptionsMissingException(@NotNull final String... missingOptions) throws IllegalArgumentException { super(createMessage(missingOptions)); this.missingOptions = missingOptions.clone(); } @@ -47,7 +47,7 @@ * @return message string * @throws IllegalArgumentException in case <var>missingOptions</var> was null or of zero length */ - private static String createMessage(final String... missingOptions) { + private static String createMessage(final String... missingOptions) throws IllegalArgumentException { if (missingOptions == null || missingOptions.length < 1) { throw new IllegalArgumentException("RequiredOptionsMissingException created but no missing options given."); } Modified: libs/argparser/trunk/src/net/sf/japi/io/args/UnknownOptionException.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/UnknownOptionException.java 2007-06-25 12:34:24 UTC (rev 427) +++ libs/argparser/trunk/src/net/sf/japi/io/args/UnknownOptionException.java 2007-06-25 12:44:40 UTC (rev 428) @@ -36,7 +36,7 @@ * @param unknownOptions options that were missing. * @throws IllegalArgumentException in case <var>unknownOptions</var> was null or of zero length */ - public UnknownOptionException(@NotNull final String... unknownOptions) { + public UnknownOptionException(@NotNull final String... unknownOptions) throws IllegalArgumentException { super(createMessage(unknownOptions)); this.unknownOptions = unknownOptions.clone(); } @@ -47,7 +47,7 @@ * @return message string * @throws IllegalArgumentException in case <var>unknownOptions</var> was null or of zero length */ - private static String createMessage(final String... unknownOptions) { + private static String createMessage(final String... unknownOptions) throws IllegalArgumentException { if (unknownOptions == null || unknownOptions.length < 1) { throw new IllegalArgumentException("UnknownOptionException created but no unknown options given."); } Modified: libs/argparser/trunk/src/net/sf/japi/io/args/converter/ConverterRegistry.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/converter/ConverterRegistry.java 2007-06-25 12:34:24 UTC (rev 427) +++ libs/argparser/trunk/src/net/sf/japi/io/args/converter/ConverterRegistry.java 2007-06-25 12:44:40 UTC (rev 428) @@ -70,6 +70,7 @@ /** * Get the Converter for a specific class. + * @param <T> target type of the class to get a converter for. * @param clazz Class to get Converter for. * @return <code>null</code> if no suited converter was found. */ @@ -80,6 +81,7 @@ /** * Register a Converter for a specific class. + * @param <T> target type of the class to register a converter for. * @param converter Converter to register */ public <T> void register(@NotNull final Converter<T> converter) { @@ -98,6 +100,7 @@ /** * Convenience method to convert a String to the desired target type using the default ConverterRegistry. + * @param <T> target type of the class to converter to. * @param targetType target type to convert to. * @param s String to convert * @return Converted String in the desired target type. @@ -114,6 +117,7 @@ /** * Convenience method to convert a String to the desired target type using the default ConverterRegistry. + * @param <T> target type of the class to converter to. * @param targetType target type to convert to. * @param locale Locale to perform the conversion in. * @param s String to convert. Modified: libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/BooleanConverterTest.java =================================================================== --- libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/BooleanConverterTest.java 2007-06-25 12:34:24 UTC (rev 427) +++ libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/BooleanConverterTest.java 2007-06-25 12:44:40 UTC (rev 428) @@ -29,7 +29,7 @@ */ public class BooleanConverterTest extends AbstractConverterTest<Boolean, BooleanConverter> { - /* + /** * Create an BooleanConverterTest. * @throws Exception in case of setup problems. */ Modified: libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/IntegerConverterTest.java =================================================================== --- libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/IntegerConverterTest.java 2007-06-25 12:34:24 UTC (rev 427) +++ libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/IntegerConverterTest.java 2007-06-25 12:44:40 UTC (rev 428) @@ -49,6 +49,7 @@ /** * Tests whether converting an arbitrary text throws a NumberFormatException. * @throws NumberFormatException Expected exception that's thrown if the test case is successful. + * @throws Exception In case of unexpected errors. */ @Test(expected=NumberFormatException.class) public void testConvertWithText() throws Exception { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-06-25 12:34:25
|
Revision: 427 http://svn.sourceforge.net/japi/?rev=427&view=rev Author: christianhujer Date: 2007-06-25 05:34:24 -0700 (Mon, 25 Jun 2007) Log Message: ----------- Suppressed warning. Modified Paths: -------------- libs/argparser/trunk/src/doc/examples/Tail.java Modified: libs/argparser/trunk/src/doc/examples/Tail.java =================================================================== --- libs/argparser/trunk/src/doc/examples/Tail.java 2007-06-25 12:30:50 UTC (rev 426) +++ libs/argparser/trunk/src/doc/examples/Tail.java 2007-06-25 12:34:24 UTC (rev 427) @@ -141,6 +141,7 @@ final String[] buf = new String[numItems]; final BufferedReader lin = new BufferedReader(new InputStreamReader(in)); int num = 0; + //noinspection StatementWithEmptyBody while ((buf[num++ % numItems] = lin.readLine()) != null); if (num >= numItems) { for (int i = num % numItems; i < numItems; i++) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-06-25 12:30:51
|
Revision: 426 http://svn.sourceforge.net/japi/?rev=426&view=rev Author: christianhujer Date: 2007-06-25 05:30:50 -0700 (Mon, 25 Jun 2007) Log Message: ----------- Added missing property keys. Modified Paths: -------------- libs/argparser/trunk/src/net/sf/japi/io/args/converter/Converter_de.properties libs/argparser/trunk/src/net/sf/japi/io/args/messages_de.properties Modified: libs/argparser/trunk/src/net/sf/japi/io/args/converter/Converter_de.properties =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/converter/Converter_de.properties 2007-06-25 12:21:40 UTC (rev 425) +++ libs/argparser/trunk/src/net/sf/japi/io/args/converter/Converter_de.properties 2007-06-25 12:30:50 UTC (rev 426) @@ -17,10 +17,15 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # +java.io.InputStream.displayName=uri|filename|- java.io.InputStream.description=Eingabedatei (als URI, Dateiname oder - f\xFCr STDIN). +java.io.OutputStream.displayName=filename|- java.io.OutputStream.description=Ausgabedatei (Dateiname oder - f\xFCr STDOUT). +java.lang.Boolean.displayName=boolean java.lang.Boolean.description=G\xFCltige Werte: {0} f\xFCr wahr und {1} f\xFCr falsch. java.lang.Boolean.true=wahr ja an java.lang.Boolean.false=falsch nein aus +java.lang.Integer.displayName=integer java.lang.Integer.description=Ganzzahl (dezimal, 0... oktal, 0x... 0X... #... hexadezimal) +java.lang.String.displayName=string java.lang.String.description=Einfacher Text. Modified: libs/argparser/trunk/src/net/sf/japi/io/args/messages_de.properties =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/messages_de.properties 2007-06-25 12:21:40 UTC (rev 425) +++ libs/argparser/trunk/src/net/sf/japi/io/args/messages_de.properties 2007-06-25 12:30:50 UTC (rev 426) @@ -26,3 +26,5 @@ help=Diese Hilfe anzeigen und beenden. setExiting=Java VM mit Fehlercode beenden setNotExiting=Java VM nicht beenden (Voreinstellung). +helpHeader= +helpFooter= This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-06-25 12:21:41
|
Revision: 425 http://svn.sourceforge.net/japi/?rev=425&view=rev Author: christianhujer Date: 2007-06-25 05:21:40 -0700 (Mon, 25 Jun 2007) Log Message: ----------- Added missing newlines at end of files. Modified Paths: -------------- libs/argparser/trunk/src/net/sf/japi/io/args/converter/Converter.properties libs/argparser/trunk/src/test/net/sf/japi/io/args/BasicCommandTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/MissingArgumentExceptionTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/OptionTypeTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/RequiredOptionsMissingExceptionTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/TerminalExceptionTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/UnknownOptionExceptionTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/AbstractConverterTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/ConverterRegistryTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/IntegerConverterTest.java libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/NoConverterFoundExceptionTest.java Modified: libs/argparser/trunk/src/net/sf/japi/io/args/converter/Converter.properties =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/converter/Converter.properties 2007-06-25 12:07:16 UTC (rev 424) +++ libs/argparser/trunk/src/net/sf/japi/io/args/converter/Converter.properties 2007-06-25 12:21:40 UTC (rev 425) @@ -28,4 +28,4 @@ java.lang.Integer.displayName=integer java.lang.Integer.description=Integer number (decimal, 0... octal, 0x... 0X... #... hexadecimal) java.lang.String.displayName=string -java.lang.String.description=Simple text \ No newline at end of file +java.lang.String.description=Simple text Modified: libs/argparser/trunk/src/test/net/sf/japi/io/args/BasicCommandTest.java =================================================================== --- libs/argparser/trunk/src/test/net/sf/japi/io/args/BasicCommandTest.java 2007-06-25 12:07:16 UTC (rev 424) +++ libs/argparser/trunk/src/test/net/sf/japi/io/args/BasicCommandTest.java 2007-06-25 12:21:40 UTC (rev 425) @@ -85,4 +85,4 @@ Assert.assertNotNull(bundle); } -} // class BasicCommandTest \ No newline at end of file +} // class BasicCommandTest Modified: libs/argparser/trunk/src/test/net/sf/japi/io/args/MissingArgumentExceptionTest.java =================================================================== --- libs/argparser/trunk/src/test/net/sf/japi/io/args/MissingArgumentExceptionTest.java 2007-06-25 12:07:16 UTC (rev 424) +++ libs/argparser/trunk/src/test/net/sf/japi/io/args/MissingArgumentExceptionTest.java 2007-06-25 12:21:40 UTC (rev 425) @@ -49,4 +49,4 @@ testMissingArgumentException(); } -} // class MissingArgumentExceptionTest \ No newline at end of file +} // class MissingArgumentExceptionTest Modified: libs/argparser/trunk/src/test/net/sf/japi/io/args/OptionTypeTest.java =================================================================== --- libs/argparser/trunk/src/test/net/sf/japi/io/args/OptionTypeTest.java 2007-06-25 12:07:16 UTC (rev 424) +++ libs/argparser/trunk/src/test/net/sf/japi/io/args/OptionTypeTest.java 2007-06-25 12:21:40 UTC (rev 425) @@ -70,4 +70,4 @@ } } -} // class OptionTypeTest \ No newline at end of file +} // class OptionTypeTest Modified: libs/argparser/trunk/src/test/net/sf/japi/io/args/RequiredOptionsMissingExceptionTest.java =================================================================== --- libs/argparser/trunk/src/test/net/sf/japi/io/args/RequiredOptionsMissingExceptionTest.java 2007-06-25 12:07:16 UTC (rev 424) +++ libs/argparser/trunk/src/test/net/sf/japi/io/args/RequiredOptionsMissingExceptionTest.java 2007-06-25 12:21:40 UTC (rev 425) @@ -51,4 +51,4 @@ testRequiredOptionsMissingException(); } -} // class RequiredOptionsMissingExceptionTest \ No newline at end of file +} // class RequiredOptionsMissingExceptionTest Modified: libs/argparser/trunk/src/test/net/sf/japi/io/args/TerminalExceptionTest.java =================================================================== --- libs/argparser/trunk/src/test/net/sf/japi/io/args/TerminalExceptionTest.java 2007-06-25 12:07:16 UTC (rev 424) +++ libs/argparser/trunk/src/test/net/sf/japi/io/args/TerminalExceptionTest.java 2007-06-25 12:21:40 UTC (rev 425) @@ -50,4 +50,4 @@ Assert.assertEquals(exception.getReturnCode(), 1); } -} // class TerminalExceptionTest \ No newline at end of file +} // class TerminalExceptionTest Modified: libs/argparser/trunk/src/test/net/sf/japi/io/args/UnknownOptionExceptionTest.java =================================================================== --- libs/argparser/trunk/src/test/net/sf/japi/io/args/UnknownOptionExceptionTest.java 2007-06-25 12:07:16 UTC (rev 424) +++ libs/argparser/trunk/src/test/net/sf/japi/io/args/UnknownOptionExceptionTest.java 2007-06-25 12:21:40 UTC (rev 425) @@ -51,4 +51,4 @@ testUnknownOptionException(); } -} // class UnknownOptionExceptionTest \ No newline at end of file +} // class UnknownOptionExceptionTest Modified: libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/AbstractConverterTest.java =================================================================== --- libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/AbstractConverterTest.java 2007-06-25 12:07:16 UTC (rev 424) +++ libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/AbstractConverterTest.java 2007-06-25 12:21:40 UTC (rev 425) @@ -106,4 +106,4 @@ Assert.assertEquals(displayName, converter.getDisplayName(Locale.getDefault())); } -} // class AbstractConverterTest \ No newline at end of file +} // class AbstractConverterTest Modified: libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/ConverterRegistryTest.java =================================================================== --- libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/ConverterRegistryTest.java 2007-06-25 12:07:16 UTC (rev 424) +++ libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/ConverterRegistryTest.java 2007-06-25 12:21:40 UTC (rev 425) @@ -145,4 +145,4 @@ } // class DummyConverter -} // class ConverterRegistryTest \ No newline at end of file +} // class ConverterRegistryTest Modified: libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/IntegerConverterTest.java =================================================================== --- libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/IntegerConverterTest.java 2007-06-25 12:07:16 UTC (rev 424) +++ libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/IntegerConverterTest.java 2007-06-25 12:21:40 UTC (rev 425) @@ -86,4 +86,4 @@ Assert.assertEquals(0x1ff, converter.convert("0777")); } -} // class IntegerConverterTest \ No newline at end of file +} // class IntegerConverterTest Modified: libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/NoConverterFoundExceptionTest.java =================================================================== --- libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/NoConverterFoundExceptionTest.java 2007-06-25 12:07:16 UTC (rev 424) +++ libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/NoConverterFoundExceptionTest.java 2007-06-25 12:21:40 UTC (rev 425) @@ -48,4 +48,4 @@ testGetTargetType(); } -} // class NoConverterFoundExceptionTest \ No newline at end of file +} // class NoConverterFoundExceptionTest This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-06-25 12:07:17
|
Revision: 424 http://svn.sourceforge.net/japi/?rev=424&view=rev Author: christianhujer Date: 2007-06-25 05:07:16 -0700 (Mon, 25 Jun 2007) Log Message: ----------- Added checkstyle (untested). Modified Paths: -------------- common/trunk/commonBuild.xml Added Paths: ----------- common/trunk/antlib/LICENSE-checkstyle-all-4.3.jar common/trunk/antlib/LICENSE-checkstyle-all-4.3_tp1.jar common/trunk/antlib/LICENSE-checkstyle-all-4.3_tp2.jar common/trunk/antlib/checkstyle-all-4.3.jar common/trunk/sun_checks.xml Added: common/trunk/antlib/LICENSE-checkstyle-all-4.3.jar =================================================================== --- common/trunk/antlib/LICENSE-checkstyle-all-4.3.jar (rev 0) +++ common/trunk/antlib/LICENSE-checkstyle-all-4.3.jar 2007-06-25 12:07:16 UTC (rev 424) @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + <one line to give the library's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + <signature of Ty Coon>, 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + Property changes on: common/trunk/antlib/LICENSE-checkstyle-all-4.3.jar ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Added: common/trunk/antlib/LICENSE-checkstyle-all-4.3_tp1.jar =================================================================== --- common/trunk/antlib/LICENSE-checkstyle-all-4.3_tp1.jar (rev 0) +++ common/trunk/antlib/LICENSE-checkstyle-all-4.3_tp1.jar 2007-06-25 12:07:16 UTC (rev 424) @@ -0,0 +1,60 @@ +/* + * $Header: /cvsroot/checkstyle/checkstyle/LICENSE.apache,v 1.2 2002/02/04 12:40:53 oburn Exp $ + * $Revision: 1.2 $ + * $Date: 2002/02/04 12:40:53 $ + * + * ==================================================================== + * + * The Apache Software License, Version 1.1 + * + * Copyright (c) 1999 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, if + * any, must include the following acknowlegement: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowlegement may appear in the software itself, + * if and wherever such third-party acknowlegements normally appear. + * + * 4. The names "The Jakarta Project", "Jakarta-Regexp", and "Apache Software + * Foundation" must not be used to endorse or promote products derived + * from this software without prior written permission. For written + * permission, please contact ap...@ap.... + * + * 5. Products derived from this software may not be called "Apache" + * nor may "Apache" appear in their names without prior written + * permission of the Apache Group. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * <http://www.apache.org/>. + * + */ Property changes on: common/trunk/antlib/LICENSE-checkstyle-all-4.3_tp1.jar ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Added: common/trunk/antlib/LICENSE-checkstyle-all-4.3_tp2.jar =================================================================== --- common/trunk/antlib/LICENSE-checkstyle-all-4.3_tp2.jar (rev 0) +++ common/trunk/antlib/LICENSE-checkstyle-all-4.3_tp2.jar 2007-06-25 12:07:16 UTC (rev 424) @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. Property changes on: common/trunk/antlib/LICENSE-checkstyle-all-4.3_tp2.jar ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Added: common/trunk/antlib/checkstyle-all-4.3.jar =================================================================== (Binary files differ) Property changes on: common/trunk/antlib/checkstyle-all-4.3.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: common/trunk/commonBuild.xml =================================================================== --- common/trunk/commonBuild.xml 2007-06-25 11:56:31 UTC (rev 423) +++ common/trunk/commonBuild.xml 2007-06-25 12:07:16 UTC (rev 424) @@ -17,8 +17,9 @@ <fileset dir="${commonPath}" includes="lib/*.jar" excludes="lib/LICENSE-*.jar" /> </path> -<taskdef name="pack200" classpath="${commonPath}/antlib/Pack200Task.jar" classname="com.sun.tools.apache.ant.pack200.Pack200Task" /> -<taskdef name="freshmeat" classpath="${commonPath}/antlib/antmeat.jar" classname="de.frewert.ant.freshmeat.Announcement" /> +<taskdef name="pack200" classpath="${commonPath}/antlib/Pack200Task.jar" classname="com.sun.tools.apache.ant.pack200.Pack200Task" /> +<taskdef name="freshmeat" classpath="${commonPath}/antlib/antmeat.jar" classname="de.frewert.ant.freshmeat.Announcement" /> +<taskdef classpath="${commonPath}/antlib/checkstyle-all-4.3.jar" resource="checkstyletask.properties" /> <target name = "clean" @@ -52,7 +53,69 @@ </copy> </target> +<target name="checkstyle" description="Runs checkstyle over the source code."> + <checkstyle + config="${commonPath}/sun_checks.xml" + > + <fileset dir="src" includes="**/*.java" /> + </checkstyle> +</target> + <target + name = "doc" + description = "Creates public API documentation" +> + <mkdir dir="docs/api" /> + <javadoc + destdir = "docs/api" + access = "protected" + author = "yes" + version = "yes" + locale = "en_US" + use = "yes" + splitindex = "yes" + windowtitle = "JAPI Library ${module.title} ${module.version} API documentation" + doctitle = "JAPI<br />Yet another Java API<br />Library ${module.title} ${module.version} API documentation" + header = "JAPI Library ${module.title} ${module.version}<br />API Documentation" + footer = "JAPI<br />Yet another Java API<br />Library ${module.title} ${module.version} API documentation" + bottom = "<div style="text-align:center;">© 2005-2007 Christian Hujer. All rights reserved. See <a href="{@docRoot}/copyright.html">copyright</a></div>" + serialwarn = "yes" + charset = "utf-8" + docencoding = "utf-8" + encoding = "utf-8" + source = "1.5" + linksource = "yes" + link = "${user.javadoc.link}" + > + <!-- + overview = "src/overview.html" + --> + <classpath refid="class.path" /> + <sourcepath> + <pathelement path="${user.javadoc.javasrc}" /> + <pathelement path="src" /> + </sourcepath> + <packageset + dir="src" + defaultexcludes="yes" + > + <include name="net/**" /> + </packageset> + <tag enabled="true" name="retval" description="Return Values:" scope="methods" /> + <tag enabled="true" name="pre" description="Preconditions:" scope="methods,constructors" /> + <tag enabled="true" name="post" description="Postconditions:" scope="methods" /> + <tag enabled="true" name="invariant" description="Invariant:" scope="methods,fields" /> + <tag enabled="true" name="note" description="Notes:" /> + <tag enabled="true" name="warning" description="Warnings:" /> + <!--tag enabled="true" name="todo" + description="Todo:" /--> + <taglet name="com.sun.tools.doclets.ToDoTaglet" path="" /> + <tag enabled="true" name="fixme" description="Fixme:" /> + <tag enabled="true" name="xxx" description="XXX:" /> + </javadoc> +</target> + +<target name = "dist" description = "Creates and packs distribution archives." depends = "clean, compile, doc" @@ -127,60 +190,6 @@ </target> <target - name = "doc" - description = "Creates public API documentation" -> - <mkdir dir="docs/api" /> - <javadoc - destdir = "docs/api" - access = "protected" - author = "yes" - version = "yes" - locale = "en_US" - use = "yes" - splitindex = "yes" - windowtitle = "JAPI Library ${module.title} ${module.version} API documentation" - doctitle = "JAPI<br />Yet another Java API<br />Library ${module.title} ${module.version} API documentation" - header = "JAPI Library ${module.title} ${module.version}<br />API Documentation" - footer = "JAPI<br />Yet another Java API<br />Library ${module.title} ${module.version} API documentation" - bottom = "<div style="text-align:center;">© 2005-2007 Christian Hujer. All rights reserved. See <a href="{@docRoot}/copyright.html">copyright</a></div>" - serialwarn = "yes" - charset = "utf-8" - docencoding = "utf-8" - encoding = "utf-8" - source = "1.5" - linksource = "yes" - link = "${user.javadoc.link}" - > - <!-- - overview = "src/overview.html" - --> - <classpath refid="class.path" /> - <sourcepath> - <pathelement path="${user.javadoc.javasrc}" /> - <pathelement path="src" /> - </sourcepath> - <packageset - dir="src" - defaultexcludes="yes" - > - <include name="net/**" /> - </packageset> - <tag enabled="true" name="retval" description="Return Values:" scope="methods" /> - <tag enabled="true" name="pre" description="Preconditions:" scope="methods,constructors" /> - <tag enabled="true" name="post" description="Postconditions:" scope="methods" /> - <tag enabled="true" name="invariant" description="Invariant:" scope="methods,fields" /> - <tag enabled="true" name="note" description="Notes:" /> - <tag enabled="true" name="warning" description="Warnings:" /> - <!--tag enabled="true" name="todo" - description="Todo:" /--> - <taglet name="com.sun.tools.doclets.ToDoTaglet" path="" /> - <tag enabled="true" name="fixme" description="Fixme:" /> - <tag enabled="true" name="xxx" description="XXX:" /> - </javadoc> -</target> - -<target name = "announce" description = "announce new version on freshmeat.net" > Added: common/trunk/sun_checks.xml =================================================================== --- common/trunk/sun_checks.xml (rev 0) +++ common/trunk/sun_checks.xml 2007-06-25 12:07:16 UTC (rev 424) @@ -0,0 +1,171 @@ +<?xml version="1.0"?> +<!DOCTYPE module PUBLIC + "-//Puppy Crawl//DTD Check Configuration 1.2//EN" + "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> + +<!-- + + Checkstyle configuration that checks the sun coding conventions from: + + - the Java Language Specification at + http://java.sun.com/docs/books/jls/second_edition/html/index.html + + - the Sun Code Conventions at http://java.sun.com/docs/codeconv/ + + - the Javadoc guidelines at + http://java.sun.com/j2se/javadoc/writingdoccomments/index.html + + - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html + + - some best practices + + Checkstyle is very configurable. Be sure to read the documentation at + http://checkstyle.sf.net (or in your downloaded distribution). + + Most Checks are configurable, be sure to consult the documentation. + + To completely disable a check, just comment it out or delete it from the file. + + Finally, it is worth reading the documentation. + +--> + +<module name="Checker"> + + <!-- Checks that a package.html file exists for each package. --> + <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml --> + <module name="PackageHtml"/> + + <!-- Checks whether files end with a new line. --> + <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile --> + <module name="NewlineAtEndOfFile"/> + + <!-- Checks that property files contain the same keys. --> + <!-- See http://checkstyle.sf.net/config_misc.html#Translation --> + <module name="Translation"/> + + + <module name="TreeWalker"> + + <!-- Checks for Javadoc comments. --> + <!-- See http://checkstyle.sf.net/config_javadoc.html --> + <module name="JavadocMethod"/> + <module name="JavadocType"/> + <module name="JavadocVariable"/> + <module name="JavadocStyle"/> + + + <!-- Checks for Naming Conventions. --> + <!-- See http://checkstyle.sf.net/config_naming.html --> + <module name="ConstantName"/> + <module name="LocalFinalVariableName"/> + <module name="LocalVariableName"/> + <module name="MemberName"/> + <module name="MethodName"/> + <module name="PackageName"/> + <module name="ParameterName"/> + <module name="StaticVariableName"/> + <module name="TypeName"/> + + + <!-- Checks for Headers --> + <!-- See http://checkstyle.sf.net/config_header.html --> + <!-- <module name="Header"> --> + <!-- The follow property value demonstrates the ability --> + <!-- to have access to ANT properties. In this case it uses --> + <!-- the ${basedir} property to allow Checkstyle to be run --> + <!-- from any directory within a project. See property --> + <!-- expansion, --> + <!-- http://checkstyle.sf.net/config.html#properties --> + <!-- <property --> + <!-- name="headerFile" --> + <!-- value="${basedir}/java.header"/> --> + <!-- </module> --> + + <!-- Following interprets the header file as regular expressions. --> + <!-- <module name="RegexpHeader"/> --> + + + <!-- Checks for imports --> + <!-- See http://checkstyle.sf.net/config_import.html --> + <module name="AvoidStarImport"/> + <module name="IllegalImport"/> <!-- defaults to sun.* packages --> + <module name="RedundantImport"/> + <module name="UnusedImports"/> + + + <!-- Checks for Size Violations. --> + <!-- See http://checkstyle.sf.net/config_sizes.html --> + <module name="FileLength"/> + <module name="LineLength"/> + <module name="MethodLength"/> + <module name="ParameterNumber"/> + + + <!-- Checks for whitespace --> + <!-- See http://checkstyle.sf.net/config_whitespace.html --> + <module name="EmptyForIteratorPad"/> + <module name="MethodParamPad"/> + <module name="NoWhitespaceAfter"/> + <module name="NoWhitespaceBefore"/> + <module name="OperatorWrap"/> + <module name="ParenPad"/> + <module name="TypecastParenPad"/> + <module name="TabCharacter"/> + <module name="WhitespaceAfter"/> + <module name="WhitespaceAround"/> + + + <!-- Modifier Checks --> + <!-- See http://checkstyle.sf.net/config_modifiers.html --> + <module name="ModifierOrder"/> + <module name="RedundantModifier"/> + + + <!-- Checks for blocks. You know, those {}'s --> + <!-- See http://checkstyle.sf.net/config_blocks.html --> + <module name="AvoidNestedBlocks"/> + <module name="EmptyBlock"/> + <module name="LeftCurly"/> + <module name="NeedBraces"/> + <module name="RightCurly"/> + + + <!-- Checks for common coding problems --> + <!-- See http://checkstyle.sf.net/config_coding.html --> + <module name="AvoidInlineConditionals"/> + <module name="DoubleCheckedLocking"/> <!-- MY FAVOURITE --> + <module name="EmptyStatement"/> + <module name="EqualsHashCode"/> + <module name="HiddenField"/> + <module name="IllegalInstantiation"/> + <module name="InnerAssignment"/> + <module name="MagicNumber"/> + <module name="MissingSwitchDefault"/> + <module name="RedundantThrows"/> + <module name="SimplifyBooleanExpression"/> + <module name="SimplifyBooleanReturn"/> + + <!-- Checks for class design --> + <!-- See http://checkstyle.sf.net/config_design.html --> + <module name="DesignForExtension"/> + <module name="FinalClass"/> + <module name="HideUtilityClassConstructor"/> + <module name="InterfaceIsType"/> + <module name="VisibilityModifier"/> + + + <!-- Miscellaneous other checks. --> + <!-- See http://checkstyle.sf.net/config_misc.html --> + <module name="ArrayTypeStyle"/> + <module name="FinalParameters"/> + <module name="GenericIllegalRegexp"> + <property name="format" value="\s+$"/> + <property name="message" value="Line has trailing spaces."/> + </module> + <module name="TodoComment"/> + <module name="UpperEll"/> + + </module> + +</module> Property changes on: common/trunk/sun_checks.xml ___________________________________________________________________ Name: svn:mime-type + text/xml Name: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-06-25 11:56:32
|
Revision: 423 http://svn.sourceforge.net/japi/?rev=423&view=rev Author: christianhujer Date: 2007-06-25 04:56:31 -0700 (Mon, 25 Jun 2007) Log Message: ----------- Updated svn:ignore property. Property Changed: ---------------- libs/taglets/trunk/ Property changes on: libs/taglets/trunk ___________________________________________________________________ Name: svn:ignore - dest dist classes + classes dest developer.properties dist docs This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-06-25 11:48:18
|
Revision: 422 http://svn.sourceforge.net/japi/?rev=422&view=rev Author: christianhujer Date: 2007-06-25 04:48:17 -0700 (Mon, 25 Jun 2007) Log Message: ----------- Some code cleanup for the release of 0.1. Modified Paths: -------------- libs/argparser/trunk/src/net/sf/japi/io/args/ArgParser.java libs/argparser/trunk/src/net/sf/japi/io/args/BasicCommand.java Modified: libs/argparser/trunk/src/net/sf/japi/io/args/ArgParser.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/ArgParser.java 2007-06-18 21:51:01 UTC (rev 421) +++ libs/argparser/trunk/src/net/sf/japi/io/args/ArgParser.java 2007-06-25 11:48:17 UTC (rev 422) @@ -21,8 +21,15 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.util.*; -import java.io.Closeable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.ListIterator; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Set; import net.sf.japi.io.args.converter.ConverterRegistry; /** @@ -52,9 +59,6 @@ /** The currently used option. */ private String currentOption; - /** The list of opened streams. */ - private final List<Closeable> openedStreams = new ArrayList<Closeable>(); - /** * Create a new ArgParser. * This ArgParser uses {@link System#in}, {@link System#out} and {@link System#err}. @@ -156,7 +160,7 @@ */ private void parse() throws TerminalException, UnknownOptionException, MissingArgumentException { try { - for (; argIterator.hasNext(); ) { + while (argIterator.hasNext()) { final String arg = argIterator.next(); if (arg.length() > 1 && arg.charAt(0) == '-') { argIterator.remove(); Modified: libs/argparser/trunk/src/net/sf/japi/io/args/BasicCommand.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/BasicCommand.java 2007-06-18 21:51:01 UTC (rev 421) +++ libs/argparser/trunk/src/net/sf/japi/io/args/BasicCommand.java 2007-06-25 11:48:17 UTC (rev 422) @@ -22,7 +22,6 @@ import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Formatter; -import java.util.HashSet; import java.util.List; import java.util.MissingResourceException; import java.util.ResourceBundle; @@ -77,7 +76,6 @@ @Option(type = OptionType.TERMINAL, value = {"h", "help"}) public void help() { final Set<Method> optionMethods = ArgParser.getOptionMethods(this); - final Set<Class<?>> parameterTypes = new HashSet<Class<?>>(); int maxLong = 0; int maxShort = 0; for (final Method optionMethod : optionMethods) { @@ -94,9 +92,6 @@ } maxLong = Math.max(maxLong, currentLong - ", ".length()); maxShort = Math.max(maxShort, currentShort - ", ".length()); - for (final Class<?> parameterType : optionMethod.getParameterTypes()) { - parameterTypes.add(parameterType); - } } final String formatString = "%-" + maxShort + "s%s%-" + maxLong + "s: %s%s%n"; final Formatter format = new Formatter(System.err); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-06-18 21:51:05
|
Revision: 421 http://svn.sourceforge.net/japi/?rev=421&view=rev Author: christianhujer Date: 2007-06-18 14:51:01 -0700 (Mon, 18 Jun 2007) Log Message: ----------- Updated extlib. Modified Paths: -------------- libs/swing-prefs/trunk/lib/japi-lib-swing-extlib-0.1.jar Modified: libs/swing-prefs/trunk/lib/japi-lib-swing-extlib-0.1.jar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-06-18 21:50:49
|
Revision: 420 http://svn.sourceforge.net/japi/?rev=420&view=rev Author: christianhujer Date: 2007-06-18 14:50:46 -0700 (Mon, 18 Jun 2007) Log Message: ----------- Updated RowLayout to use whole width. Modified Paths: -------------- libs/swing-extlib/trunk/src/net/sf/japi/swing/RowLayout.java Modified: libs/swing-extlib/trunk/src/net/sf/japi/swing/RowLayout.java =================================================================== --- libs/swing-extlib/trunk/src/net/sf/japi/swing/RowLayout.java 2007-06-17 17:15:30 UTC (rev 419) +++ libs/swing-extlib/trunk/src/net/sf/japi/swing/RowLayout.java 2007-06-18 21:50:46 UTC (rev 420) @@ -114,7 +114,7 @@ final Component comp = parent.getComponent(i); if (comp.isVisible()) { final Dimension dim = comp.getPreferredSize(); - dim.setSize(dim.getWidth(), dim.getHeight()); + dim.setSize(width, dim.getHeight()); comp.setSize(dim); y += vgap; comp.setLocation(x, y); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-06-17 17:15:32
|
Revision: 419 http://svn.sourceforge.net/japi/?rev=419&view=rev Author: christianhujer Date: 2007-06-17 10:15:30 -0700 (Sun, 17 Jun 2007) Log Message: ----------- Changed @Option to be @Documented. Modified Paths: -------------- libs/argparser/trunk/src/net/sf/japi/io/args/Option.java Modified: libs/argparser/trunk/src/net/sf/japi/io/args/Option.java =================================================================== --- libs/argparser/trunk/src/net/sf/japi/io/args/Option.java 2007-06-16 16:36:50 UTC (rev 418) +++ libs/argparser/trunk/src/net/sf/japi/io/args/Option.java 2007-06-17 17:15:30 UTC (rev 419) @@ -19,6 +19,7 @@ package net.sf.japi.io.args; +import java.lang.annotation.Documented; import static java.lang.annotation.ElementType.METHOD; import java.lang.annotation.Retention; import static java.lang.annotation.RetentionPolicy.RUNTIME; @@ -28,6 +29,7 @@ * Annotation to mark a method as command argument method. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ +@Documented @Retention(RUNTIME) @Target(METHOD) public @interface Option { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-06-16 16:36:53
|
Revision: 418 http://svn.sourceforge.net/japi/?rev=418&view=rev Author: christianhujer Date: 2007-06-16 09:36:50 -0700 (Sat, 16 Jun 2007) Log Message: ----------- Updated build to use common build. Modified Paths: -------------- libs/taglets/trunk/build.xml Added Paths: ----------- libs/taglets/trunk/module.properties Modified: libs/taglets/trunk/build.xml =================================================================== --- libs/taglets/trunk/build.xml 2007-06-14 21:18:51 UTC (rev 417) +++ libs/taglets/trunk/build.xml 2007-06-16 16:36:50 UTC (rev 418) @@ -17,183 +17,11 @@ ~ License along with this library; if not, write to the Free Software ~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --> - +<!DOCTYPE project [ + <!ENTITY commonBuild SYSTEM "common/commonBuild.xml"> +]> <project name="japi lib taglets" default="compile"> - <property name="module.version" value="0.1" /> - <property name="module.name" value="japi-lib-taglets" /> - <property name="module.shortname" value="taglets" /> + &commonBuild; - <taskdef name="pack200" classpath="lib/Pack200Task.jar" classname="com.sun.tools.apache.ant.pack200.Pack200Task" /> - - <target - name = "clean" - description = "Cleans Sandbox" - > - <delete dir="classes" /> - <delete dir="dist" /> - <delete dir="docs" /> - </target> - - <target - name = "compile" - description = "Compiles production classes" - > - <mkdir dir="classes/production/${module.shortname}" /> - <mkdir dir="classes/test/${module.shortname}" /> - <javac - srcdir="src" - destdir="classes/production/${module.shortname}" - encoding="utf-8" - source="1.5" - target="1.5" - > - <classpath> - <fileset dir="lib" includes="*.jar" excludes="LICENSE-*.jar" /> - </classpath> - <exclude name="test/**/*.java" /> - </javac> - <copy - todir="classes/production/${module.shortname}" - > - <fileset dir="src" includes="**/*.properties" excludes="test/**/*.properties" /> - <fileset dir="src" includes="META-INF/services/**" /> - </copy> - </target> - - <target - name = "dist" - description = "Packs distribution archives." - depends = "clean, compile" - > - <!--depends = "clean, compile, doc" - --> - <delete dir="dist" /> - <mkdir dir="dist" /> - <property name="distName" value="dist/${module.name}-${module.version}" /> - <parallel> - <tar tarfile="${distName}.src.tar"> - <tarfileset dir="." prefix="${module.name}-${module.version}"> - <include name="src/**" /> - <include name="build.xml" /> - </tarfileset> - </tar> - <zip destfile="${distName}.src.zip"> - <zipfileset dir="." prefix="${module.name}-${module.version}"> - <include name="src/**" /> - <include name="build.xml" /> - </zipfileset> - </zip> - <jar destfile="${distName}.src.jar"> - <zipfileset dir="." prefix="${module.name}-${module.version}"> - <include name="src/**" /> - <include name="build.xml" /> - </zipfileset> - </jar> - <jar destfile="${distName}.jar"> - <zipfileset dir="classes/production/${module.shortname}" /> - <manifest> - <attribute name="Implementation-Title" value="${module.name}" /> - <attribute name="Implementation-Vendor" value="Christian Hujer + the JAPI Developers" /> - <attribute name="Implementation-Version" value="${module.version}" /> - <attribute name="Implementation-URL" value="http://sourceforge.net/projects/japi/" /> - </manifest> - </jar> - <tar tarfile="${distName}.doc.tar"> - <tarfileset dir="." prefix="${module.name}-${module.version}"> - <include name="docs/**" /> - <include name="build.xml" /> - </tarfileset> - </tar> - <zip destfile="${distName}.doc.zip"> - <zipfileset dir="." prefix="${module.name}-${module.version}"> - <include name="docs/**" /> - <include name="build.xml" /> - </zipfileset> - </zip> - <jar destfile="${distName}.doc.jar"> - <zipfileset dir="." prefix="${module.name}-${module.version}"> - <include name="docs/**" /> - </zipfileset> - </jar> - </parallel> - <parallel> - <gzip src="${distName}.src.tar" destfile="${distName}.src.tar.gz" /> - <bzip2 src="${distName}.src.tar" destfile="${distName}.src.tar.bz2" /> - <gzip src="${distName}.doc.tar" destfile="${distName}.doc.tar.gz" /> - <bzip2 src="${distName}.doc.tar" destfile="${distName}.doc.tar.bz2" /> - <pack200 - src="${distName}.jar" - destfile="${distName}.pack.gz" - gzipoutput="true" - stripdebug="true" - effort="9" - keepfileorder="false" - modificationtime="latest" - deflatehint="false" - /> - </parallel> - <delete file="${distName}.src.tar" /> - <delete file="${distName}.doc.tar" /> - </target> - - <target - name = "doc" - description = "Creates public javadoc documentation." - > - <mkdir dir="docs/api" /> - <!--copy todir="docs/api" file="src/doc/api/public/copyright.html" /> - <copy todir="docs/api" file="src/doc/api/public/.htaccess" /--> - <javadoc - destdir = "docs/api" - access = "protected" - author = "yes" - version = "yes" - locale = "en_US" - use = "yes" - splitindex = "yes" - windowtitle = "JAPI Library ${module.title} ${module.version} API documentation" - doctitle = "JAPI<br />Yet another Java API<br />Library ${module.title} ${module.version} API documentation" - header = "JAPI Library ${module.title} ${module.version}<br />API Documentation" - footer = "JAPI<br />Yet another Java API<br />Library ${module.title} ${module.version} API documentation" - bottom = "<div style=" text-align:center;">© 2005-2007 Christian Hujer. All rights reserved. See <a href="{@docRoot}/copyright.html">copyright</a></div>" - serialwarn = "yes" - charset = "utf-8" - docencoding = "utf-8" - encoding = "utf-8" - source = "1.5" - linksource = "yes" - link = "${user.javadoc.link}" - > - <!-- - overview = "src/overview.html" - --> - <classpath> - <fileset dir="lib" includes="*.jar" excludes="LICENSE-*.jar" /> - </classpath> - <sourcepath> - <pathelement path="${user.javadoc.javasrc}" /> - <pathelement path="src" /> - </sourcepath> - <packageset - dir="src" - defaultexcludes="yes" - > - <include name="net/**" /> - </packageset> - <tag enabled="true" name="retval" description="Return Values:" scope="methods" /> - <tag enabled="true" name="pre" description="Preconditions:" scope="methods,constructors" /> - <tag enabled="true" name="post" description="Postconditions:" scope="methods" /> - <tag enabled="true" name="invariant" description="Invariant:" scope="methods,fields" /> - <tag enabled="true" name="note" description="Notes:" /> - <tag enabled="true" name="warning" description="Warnings:" /> - <!--tag enabled="true" name="todo" description="Todo:" /--> - <taglet name="net.sf.japi.taglets.TodoTaglet" path="dist/japi-lib-taglets-0.1.jar" /> - <taglet name="net.sf.japi.taglets.XxxTaglet" path="dist/japi-lib-taglets-0.1.jar" /> - <taglet name="net.sf.japi.taglets.FixmeTaglet" path="dist/japi-lib-taglets-0.1.jar" /> - <!--tag enabled="true" name="fixme" description="Fixme:" /--> - <!--tag enabled="true" name="xxx" description="XXX:" /--> - </javadoc> - </target> - </project> Added: libs/taglets/trunk/module.properties =================================================================== --- libs/taglets/trunk/module.properties (rev 0) +++ libs/taglets/trunk/module.properties 2007-06-16 16:36:50 UTC (rev 418) @@ -0,0 +1,24 @@ +# +# JAPI libs-argparser is a library for parsing command line arguments. +# Copyright (C) 2007 Christian Hujer. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# + +update.focus=none +module.version=trunk +module.name=japi-lib-taglets +module.shortname=taglets +module.title=Taglets Property changes on: libs/taglets/trunk/module.properties ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-06-14 21:18:52
|
Revision: 417 http://svn.sourceforge.net/japi/?rev=417&view=rev Author: christianhujer Date: 2007-06-14 14:18:51 -0700 (Thu, 14 Jun 2007) Log Message: ----------- Updated IntelliJ IDEA module configuration. Modified Paths: -------------- libs/lang/trunk/libs-lang.iml Modified: libs/lang/trunk/libs-lang.iml =================================================================== --- libs/lang/trunk/libs-lang.iml 2007-06-14 21:18:29 UTC (rev 416) +++ libs/lang/trunk/libs-lang.iml 2007-06-14 21:18:51 UTC (rev 417) @@ -5,10 +5,20 @@ <exclude-output /> <content url="file://$MODULE_DIR$"> <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" packagePrefix="test" /> </content> <orderEntry type="inheritedJdk" /> <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="library" name="annotations" level="project" /> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/common/lib/junit.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> <orderEntryProperties /> </component> <component name="copyright"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-06-14 21:18:30
|
Revision: 416 http://svn.sourceforge.net/japi/?rev=416&view=rev Author: christianhujer Date: 2007-06-14 14:18:29 -0700 (Thu, 14 Jun 2007) Log Message: ----------- Added unit test. Added Paths: ----------- libs/lang/trunk/src/test/ libs/lang/trunk/src/test/net/ libs/lang/trunk/src/test/net/sf/ libs/lang/trunk/src/test/net/sf/japi/ libs/lang/trunk/src/test/net/sf/japi/lang/ libs/lang/trunk/src/test/net/sf/japi/lang/SuperClassIteratorTest.java Added: libs/lang/trunk/src/test/net/sf/japi/lang/SuperClassIteratorTest.java =================================================================== --- libs/lang/trunk/src/test/net/sf/japi/lang/SuperClassIteratorTest.java (rev 0) +++ libs/lang/trunk/src/test/net/sf/japi/lang/SuperClassIteratorTest.java 2007-06-14 21:18:29 UTC (rev 416) @@ -0,0 +1,56 @@ +/* + * JAPI libs-lang is a library that contains some useful classes regarding java.lang. + * Copyright (C) 2007 Christian Hujer. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +package test.net.sf.japi.lang; + +import net.sf.japi.lang.SuperClassIterator; +import org.junit.Test; +import org.junit.Assert; +import java.util.NoSuchElementException; + +/** Test for {@link SuperClassIterator}. + * Created by IntelliJ IDEA. + * + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public class SuperClassIteratorTest { + + /** Tests whether iterating the superclasses works. */ + @Test public void testIteration() { + final SuperClassIterator it = new SuperClassIterator(String.class); + Assert.assertTrue("Must have next.", it.hasNext()); + Assert.assertEquals("First class must be String.class.", String.class, it.next()); + Assert.assertTrue("Must have next.", it.hasNext()); + Assert.assertEquals("Second class must be Object.class.", Object.class, it.next()); + Assert.assertFalse("Must not have next now.", it.hasNext()); + } + + /** Tests whether iterating the superclasses works. */ + @Test(expected=NoSuchElementException.class) public void testException() { + final SuperClassIterator it = new SuperClassIterator(String.class); + try { + it.next(); + it.next(); + } catch (final NoSuchElementException e) { + Assert.fail("NoSuchElementException thrown too early."); + } + it.next(); + } + +} // class SuperClassIteratorTest Property changes on: libs/lang/trunk/src/test/net/sf/japi/lang/SuperClassIteratorTest.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-06-14 21:13:20
|
Revision: 415 http://svn.sourceforge.net/japi/?rev=415&view=rev Author: christianhujer Date: 2007-06-14 14:13:19 -0700 (Thu, 14 Jun 2007) Log Message: ----------- Removed redundant lib directory. Removed Paths: ------------- libs/lang/trunk/lib/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-06-14 21:11:15
|
Revision: 414 http://svn.sourceforge.net/japi/?rev=414&view=rev Author: christianhujer Date: 2007-06-14 14:11:14 -0700 (Thu, 14 Jun 2007) Log Message: ----------- Added documentation. Added Paths: ----------- libs/lang/trunk/src/doc/ libs/lang/trunk/src/doc/start.xhtml Added: libs/lang/trunk/src/doc/start.xhtml =================================================================== --- libs/lang/trunk/src/doc/start.xhtml (rev 0) +++ libs/lang/trunk/src/doc/start.xhtml 2007-06-14 21:11:14 UTC (rev 414) @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> + <head> + <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> + <meta name="Date" content="$Date$" /> + <title>JAPI Lib Lang</title> + </head> + <body> + <h1>JAPI Lib Lang</h1> + <p> + <em>JAPI Lib Lang</em> is an extension to the java.lang packages of the Java API. + It supports the following features: + </p> + <ul> + <li>Iterator / Iterable for easy iteration of superclasses.</li> + </ul> + <h2>Target Audience</h2> + <ul> + <li>Developers</li> + </ul> + </body> +</html> Property changes on: libs/lang/trunk/src/doc/start.xhtml ___________________________________________________________________ Name: svn:mime-type + text/xml Name: svn:keywords + Date Name: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-06-14 21:06:56
|
Revision: 413 http://svn.sourceforge.net/japi/?rev=413&view=rev Author: christianhujer Date: 2007-06-14 14:06:53 -0700 (Thu, 14 Jun 2007) Log Message: ----------- Added / Updated project documentation files. Modified Paths: -------------- libs/lang/trunk/README Added Paths: ----------- libs/lang/trunk/CHANGES libs/lang/trunk/COPYING libs/lang/trunk/CREDITS libs/lang/trunk/INSTALL libs/lang/trunk/LICENSE libs/lang/trunk/MAINTAINERS libs/lang/trunk/NEWS Added: libs/lang/trunk/CHANGES =================================================================== --- libs/lang/trunk/CHANGES (rev 0) +++ libs/lang/trunk/CHANGES 2007-06-14 21:06:53 UTC (rev 413) @@ -0,0 +1,6 @@ +JAPI LIB LANG CHANGLOG +---------------------- + +2007 + Christian Hujer: + * Creation Property changes on: libs/lang/trunk/CHANGES ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Added: libs/lang/trunk/COPYING =================================================================== --- libs/lang/trunk/COPYING (rev 0) +++ libs/lang/trunk/COPYING 2007-06-14 21:06:53 UTC (rev 413) @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. Property changes on: libs/lang/trunk/COPYING ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Added: libs/lang/trunk/CREDITS =================================================================== --- libs/lang/trunk/CREDITS (rev 0) +++ libs/lang/trunk/CREDITS 2007-06-14 21:06:53 UTC (rev 413) @@ -0,0 +1,4 @@ +The following people have contributed to JAPI Lib Lang: + +* Christian Hujer <ch...@ri...> + Inventor, creator, maintainer Property changes on: libs/lang/trunk/CREDITS ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Added: libs/lang/trunk/INSTALL =================================================================== --- libs/lang/trunk/INSTALL (rev 0) +++ libs/lang/trunk/INSTALL 2007-06-14 21:06:53 UTC (rev 413) @@ -0,0 +1,22 @@ +BUILDING / INSTALLING JAPI LIB LANG +----------------------------------- + + +Japi Lib Lang is a library for Java developers. Because of that, installation +is not applicable. The rest of the file is concerned with building it only. + +To build Japi Lib Lang, you need Java 5.0 and Ant 1.6.5. The applications you +build using Japi Lib Lang will need Java 5.0 or newer and of course Japi +Lib Lang. + + +To build Japi Lib Lang, just run ant in the project's root directory or +specifying the build.xml in the project's root directory. To find out, what +other options you have for building Japi Lib Lang, try "ant -projecthelp". + + +Usually, you'd just want to use Japi Lib Lang in your favorite IDE and include +all those Japi Lib Lang classes that you used directly or indirectly in your +build. To do so, the easiest way usually is this: +1. Create a .jar file with the Japi Lib Lang classes by running "ant dist". +2. Include that .jar file in the classpath of your IDE. Property changes on: libs/lang/trunk/INSTALL ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Added: libs/lang/trunk/LICENSE =================================================================== --- libs/lang/trunk/LICENSE (rev 0) +++ libs/lang/trunk/LICENSE 2007-06-14 21:06:53 UTC (rev 413) @@ -0,0 +1,9 @@ +JAPI LIB LANG LICENSE INFORMATION +--------------------------------- + +Japi Lib Lang is licensed under GPL. See file COPYING. + +Japi Lib Lang uses some third part libraries, especially for building. These +libraries are contained in the lib/ directory and have their own licenses. See +the corresponding LICENSE-*-files in the common/lib/ directory for the licenses +of third party libraries. Property changes on: libs/lang/trunk/LICENSE ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Added: libs/lang/trunk/MAINTAINERS =================================================================== --- libs/lang/trunk/MAINTAINERS (rev 0) +++ libs/lang/trunk/MAINTAINERS 2007-06-14 21:06:53 UTC (rev 413) @@ -0,0 +1,7 @@ +JAPI LIB LANG MAINTAINERS +------------------------- + +2007 + Christian Hujer <ch...@ri...> + * Creation + * Maintenance Property changes on: libs/lang/trunk/MAINTAINERS ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Added: libs/lang/trunk/NEWS =================================================================== --- libs/lang/trunk/NEWS (rev 0) +++ libs/lang/trunk/NEWS 2007-06-14 21:06:53 UTC (rev 413) @@ -0,0 +1,4 @@ +JAPI LIB LANG NEWS +------------------ + +No news yet. Property changes on: libs/lang/trunk/NEWS ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Modified: libs/lang/trunk/README =================================================================== --- libs/lang/trunk/README 2007-06-14 20:45:19 UTC (rev 412) +++ libs/lang/trunk/README 2007-06-14 21:06:53 UTC (rev 413) @@ -1,7 +1,7 @@ -JAPI COMMON README -================== +JAPI LIB LANG README +==================== -This file contains some important information about Japi Common. You should +This file contains some important information about Japi Lib Lang. You should read it first. @@ -20,8 +20,9 @@ PROJECT DESCRIPTION ------------------- -Japi Common is a set of libraries and build modules useful for Java projects. -It is part of the Japi project. +Japi Lib Lang is a subproject of Japi. +Japi Lib Lang is an extension to the java.lang packages of the Java API. +Japi is a set of APIs for various purposes. PROJECT WEBSITE @@ -29,13 +30,13 @@ Project homepage: http://japi.sourceforge.net/ Project website: http://sourceforge.net/projects/japi/ Project statistics: http://cia.navi.cx/projects/japi -Subproject homepage: http://japi.sourceforge.net/common/ +Subproject homepage: http://japi.sourceforge.net/libs/lang/ SYSTEM REQUIREMENTS ------------------- Java 5.0 - Previous versions of Java will not work. Gridarta uses Generics, autoboxing, + Previous versions of Java will not work. Japi uses Generics, autoboxing, static imports, foreach loops, assertions, covariant return types and varargs quite a lot. @@ -48,22 +49,23 @@ build.xml The build file to build the project with Ant. +common/ + Directory with libraries and other files that are common to all or most + Japi projects / modules. + +CHANGES + Changelog with significant changes. + COPYING - Japi Common license conditions. Note: applies to Japi Common only, not - third party libraries. + Japi Lib Lang license conditions. Note: applies to Japi Lib Lang only, + not third party libraries. CREDITS List of project contributors. See also MAINTAINERS. INSTALL - Description of how to build and install Japi Common. + Description of how to build and install Japi Lib Lang. -lib/ - Directory containing third party libraries used to build Japi Common. - Please note that these thrid party libraries have their own license - conditions. The licenses of the third party libraries are included in the - lib/ directory. - LICENSE File with license information. @@ -73,8 +75,8 @@ NEWS Project News. -project.properties - File with automatically changed settings for Ant. +module.properties + File with module-specific settings for common/commonBuild.xml. README This file. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-06-14 20:45:20
|
Revision: 412 http://svn.sourceforge.net/japi/?rev=412&view=rev Author: christianhujer Date: 2007-06-14 13:45:19 -0700 (Thu, 14 Jun 2007) Log Message: ----------- Updated svn:ignore. Property Changed: ---------------- libs/lang/trunk/ Property changes on: libs/lang/trunk ___________________________________________________________________ Name: svn:ignore - dest dist classes + classes dest developer.properties dist docs This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-06-14 20:44:50
|
Revision: 411 http://svn.sourceforge.net/japi/?rev=411&view=rev Author: christianhujer Date: 2007-06-14 13:44:48 -0700 (Thu, 14 Jun 2007) Log Message: ----------- Updated lang build to use new common build. Modified Paths: -------------- libs/lang/trunk/build.xml Added Paths: ----------- libs/lang/trunk/module.properties Modified: libs/lang/trunk/build.xml =================================================================== --- libs/lang/trunk/build.xml 2007-06-14 20:36:33 UTC (rev 410) +++ libs/lang/trunk/build.xml 2007-06-14 20:44:48 UTC (rev 411) @@ -17,182 +17,11 @@ ~ License along with this library; if not, write to the Free Software ~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA --> - +<!DOCTYPE project [ + <!ENTITY commonBuild SYSTEM "common/commonBuild.xml"> +]> <project name="japi lib lang" default="compile"> - <property name="module.version" value="0.1" /> - <property name="module.name" value="japi-lib-lang" /> - <property name="module.shortname" value="lang" /> - <property name="module.title" value="Lang Extensions" /> + &commonBuild; - <taskdef name="pack200" classpath="lib/Pack200Task.jar" classname="com.sun.tools.apache.ant.pack200.Pack200Task" /> - - <target - name = "clean" - description = "Cleans Sandbox" - > - <delete dir="classes" /> - <delete dir="dist" /> - <delete dir="docs" /> - </target> - - <target - name = "compile" - description = "Compiles production classes" - > - <mkdir dir="classes/production/${module.shortname}" /> - <mkdir dir="classes/test/${module.shortname}" /> - <javac - srcdir="src" - destdir="classes/production/${module.shortname}" - encoding="utf-8" - source="1.5" - target="1.5" - > - <classpath> - <fileset dir="lib" includes="*.jar" excludes="LICENSE-*.jar" /> - </classpath> - <exclude name="test/**/*.java" /> - </javac> - <copy - todir="classes/production/${module.shortname}" - > - <fileset dir="src" includes="**/*.properties" excludes="test/**/*.properties" /> - <fileset dir="src" includes="META-INF/services/**" /> - </copy> - </target> - - <target - name = "dist" - description = "Packs distribution archives." - depends = "clean, compile" - > - <!--depends = "clean, compile, doc" - --> - <delete dir="dist" /> - <mkdir dir="dist" /> - <property name="distName" value="dist/${module.name}-${module.version}" /> - <parallel> - <tar tarfile="${distName}.src.tar"> - <tarfileset dir="." prefix="${module.name}-${module.version}"> - <include name="src/**" /> - <include name="build.xml" /> - </tarfileset> - </tar> - <zip destfile="${distName}.src.zip"> - <zipfileset dir="." prefix="${module.name}-${module.version}"> - <include name="src/**" /> - <include name="build.xml" /> - </zipfileset> - </zip> - <jar destfile="${distName}.src.jar"> - <zipfileset dir="." prefix="${module.name}-${module.version}"> - <include name="src/**" /> - <include name="build.xml" /> - </zipfileset> - </jar> - <jar destfile="${distName}.jar"> - <zipfileset dir="classes/production/${module.shortname}" /> - <manifest> - <attribute name="Implementation-Title" value="${module.name}" /> - <attribute name="Implementation-Vendor" value="Christian Hujer + the JAPI Developers" /> - <attribute name="Implementation-Version" value="${module.version}" /> - <attribute name="Implementation-URL" value="http://sourceforge.net/projects/japi/" /> - </manifest> - </jar> - <tar tarfile="${distName}.doc.tar"> - <tarfileset dir="." prefix="${module.name}-${module.version}"> - <include name="docs/**" /> - <include name="build.xml" /> - </tarfileset> - </tar> - <zip destfile="${distName}.doc.zip"> - <zipfileset dir="." prefix="${module.name}-${module.version}"> - <include name="docs/**" /> - <include name="build.xml" /> - </zipfileset> - </zip> - <jar destfile="${distName}.doc.jar"> - <zipfileset dir="." prefix="${module.name}-${module.version}"> - <include name="docs/**" /> - </zipfileset> - </jar> - </parallel> - <parallel> - <gzip src="${distName}.src.tar" destfile="${distName}.src.tar.gz" /> - <bzip2 src="${distName}.src.tar" destfile="${distName}.src.tar.bz2" /> - <gzip src="${distName}.doc.tar" destfile="${distName}.doc.tar.gz" /> - <bzip2 src="${distName}.doc.tar" destfile="${distName}.doc.tar.bz2" /> - <pack200 - src="${distName}.jar" - destfile="${distName}.pack.gz" - gzipoutput="true" - stripdebug="true" - effort="9" - keepfileorder="false" - modificationtime="latest" - deflatehint="false" - /> - </parallel> - <delete file="${distName}.src.tar" /> - <delete file="${distName}.doc.tar" /> - </target> - - <target - name = "doc" - description = "Creates public javadoc documentation." - > - <mkdir dir="docs/api" /> - <!--copy todir="docs/api" file="src/doc/api/public/copyright.html" /> - <copy todir="docs/api" file="src/doc/api/public/.htaccess" /--> - <javadoc - destdir = "docs/api" - access = "protected" - author = "yes" - version = "yes" - locale = "en_US" - use = "yes" - splitindex = "yes" - windowtitle = "JAPI Library ${module.title} ${module.version} API documentation" - doctitle = "JAPI<br />Yet another Java API<br />Library ${module.title} ${module.version} API documentation" - header = "JAPI Library ${module.title} ${module.version}<br />API Documentation" - footer = "JAPI<br />Yet another Java API<br />Library ${module.title} ${module.version} API documentation" - bottom = "<div style=" text-align:center;">© 2005-2007 Christian Hujer. All rights reserved. See <a href="{@docRoot}/copyright.html">copyright</a></div>" - serialwarn = "yes" - charset = "utf-8" - docencoding = "utf-8" - encoding = "utf-8" - source = "1.5" - linksource = "yes" - link = "${user.javadoc.link}" - > - <!-- - overview = "src/overview.html" - --> - <classpath> - <fileset dir="lib" includes="annotations.jar" /> - </classpath> - <sourcepath> - <pathelement path="${user.javadoc.javasrc}" /> - <pathelement path="src" /> - </sourcepath> - <packageset - dir="src" - defaultexcludes="yes" - > - <include name="net/**" /> - </packageset> - <tag enabled="true" name="retval" description="Return Values:" scope="methods" /> - <tag enabled="true" name="pre" description="Preconditions:" scope="methods,constructors" /> - <tag enabled="true" name="post" description="Postconditions:" scope="methods" /> - <tag enabled="true" name="invariant" description="Invariant:" scope="methods,fields" /> - <tag enabled="true" name="note" description="Notes:" /> - <tag enabled="true" name="warning" description="Warnings:" /> - <!--tag enabled="true" name="todo" description="Todo:" /--> - <taglet name="com.sun.tools.doclets.ToDoTaglet" path="" /> - <tag enabled="true" name="fixme" description="Fixme:" /> - <tag enabled="true" name="xxx" description="XXX:" /> - </javadoc> - </target> - </project> Added: libs/lang/trunk/module.properties =================================================================== --- libs/lang/trunk/module.properties (rev 0) +++ libs/lang/trunk/module.properties 2007-06-14 20:44:48 UTC (rev 411) @@ -0,0 +1,24 @@ +# +# JAPI libs-lang is a library that contains some useful classes regarding java.lang. +# Copyright (C) 2007 Christian Hujer. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# + +update.focus=none +module.version=trunk +module.name=japi-lib-lang +module.shortname=lang +module.title=Lang Property changes on: libs/lang/trunk/module.properties ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-06-14 20:36:34
|
Revision: 410 http://svn.sourceforge.net/japi/?rev=410&view=rev Author: christianhujer Date: 2007-06-14 13:36:33 -0700 (Thu, 14 Jun 2007) Log Message: ----------- Improved documentation.Improved and unified examples. Modified Paths: -------------- libs/argparser/trunk/src/doc/examples/Cat.java libs/argparser/trunk/src/doc/examples/Head.java libs/argparser/trunk/src/doc/examples/Tail.java libs/argparser/trunk/src/doc/examples/Uniq.java libs/argparser/trunk/src/doc/start.xhtml Modified: libs/argparser/trunk/src/doc/examples/Cat.java =================================================================== --- libs/argparser/trunk/src/doc/examples/Cat.java 2007-06-14 20:05:36 UTC (rev 409) +++ libs/argparser/trunk/src/doc/examples/Cat.java 2007-06-14 20:36:33 UTC (rev 410) @@ -28,8 +28,7 @@ import net.sf.japi.io.args.BasicCommand; import org.jetbrains.annotations.NotNull; -/** - * Java implementation of the UNIX command <q>cat</q> to demonstrate how to use the argparser library. +/** Java implementation of the UNIX command <q>cat</q> to demonstrate how to use the argparser library. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class Cat extends BasicCommand { @@ -58,25 +57,23 @@ return returnCode; } - /** - * Copies data from one input stream to another. + /** Copies data from one input stream to another. * @param in InputStream to read from. * @param out InputStream to write to. * @throws IOException in case of I/O problems. */ - private void copy(final InputStream in, final OutputStream out) throws IOException { + private void copy(@NotNull final InputStream in, @NotNull final OutputStream out) throws IOException { final byte[] buf = new byte[4096]; for (int bytesRead; (bytesRead = in.read(buf)) != -1;) { out.write(buf, 0, bytesRead); } } - /** - * Main method. + /** Main method. * @param args Command line arguments */ public static void main(final String... args) { - ArgParser.simpleParseAndRun(new Head(), args); + ArgParser.simpleParseAndRun(new Cat(), args); } } // class Cat Modified: libs/argparser/trunk/src/doc/examples/Head.java =================================================================== --- libs/argparser/trunk/src/doc/examples/Head.java 2007-06-14 20:05:36 UTC (rev 409) +++ libs/argparser/trunk/src/doc/examples/Head.java 2007-06-14 20:36:33 UTC (rev 410) @@ -19,6 +19,7 @@ package examples; +import java.io.BufferedInputStream; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.IOException; @@ -30,8 +31,7 @@ import net.sf.japi.io.args.Option; import org.jetbrains.annotations.NotNull; -/** - * Java implementation of the UNIX command <q>head</q> to demonstrate how to use the argparser library. +/** Java implementation of the UNIX command <q>head</q> to demonstrate how to use the argparser library. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class Head extends BasicCommand { @@ -39,23 +39,20 @@ /** The number of items to print. */ private int numItems = 10; - /** - * The kind of items to print. + /** The kind of items to print. * <code>false</code>: print lines. * <code>true</code>: print bytes. */ private boolean printBytes; - /** - * Quiety / Verbosity. + /** Quiety / Verbosity. * 0 = never print filenames. * 1 = print filenames if more than one file. * 2 = always print filenames. */ private int verbose = 1; - /** - * Sets the number of lines to print. + /** Sets the number of lines to print. * @param lines number of lines to print */ @Option({"n", "lines"}) @@ -64,8 +61,7 @@ printBytes = false; } - /** - * Sets the number of bytes to print. + /** Sets the number of bytes to print. * @param bytes number of bytes to print. */ @Option({"c", "bytes"}) @@ -74,25 +70,19 @@ printBytes = true; } - /** - * Sets the command to be quiet. - */ + /** Sets the command to be quiet. */ @Option({"q", "quiet", "silent"}) public void setQuiet() { verbose = 0; } - /** - * Sets the command to be verbose. - */ + /** Sets the command to be verbose. */ @Option({"v", "verbose"}) public void setVerbose() { verbose = 2; } - /** - * {@inheritDoc} - */ + /** {@inheritDoc} */ public int run(@NotNull final List<String> args) throws IOException { int returnCode = 0; if (args.size() == 0) { @@ -106,42 +96,49 @@ System.out.println("==> " + arg + " <=="); } try { - final InputStream in = new FileInputStream(arg); + final InputStream in = new BufferedInputStream(new FileInputStream(arg)); try { copyItems(in); } finally { in.close(); } } catch (final IOException e) { - System.err.println(e); returnCode = 1; + System.err.println(e); } } } return returnCode; } - /** - * Copies the configured number of items from the specified InputStream to System.out. + /** Copies the configured number of items from the specified InputStream to System.out. * @param in InputStream to run on * @throws IOException In case of I/O problems. */ - private void copyItems(final InputStream in) throws IOException { + private void copyItems(@NotNull final InputStream in) throws IOException { if (printBytes) { - for (int i = 0, b; i < numItems && (b = in.read()) != -1; i++) { - System.out.write(b); - } + copyBytes(in); } else { - BufferedReader lin = new BufferedReader(new InputStreamReader(in)); - String line; - for (int i = 0; i < numItems && (line = lin.readLine()) != null; i++) { - System.out.println(line); - } + copyLines(in); } } - /** - * Main method. + private void copyBytes(@NotNull final InputStream in) throws IOException { + final InputStream lin = in instanceof BufferedInputStream ? in : new BufferedInputStream(in); + final byte[] buf = new byte[numItems]; + final int bytesRead = lin.read(buf, 0, numItems); + System.out.write(buf, 0, bytesRead); + } + + private void copyLines(@NotNull final InputStream in) throws IOException { + BufferedReader lin = new BufferedReader(new InputStreamReader(in)); + String line; + for (int i = 0; i < numItems && (line = lin.readLine()) != null; i++) { + System.out.println(line); + } + } + + /** Main method. * @param args Command line arguments */ public static void main(final String... args) { Modified: libs/argparser/trunk/src/doc/examples/Tail.java =================================================================== --- libs/argparser/trunk/src/doc/examples/Tail.java 2007-06-14 20:05:36 UTC (rev 409) +++ libs/argparser/trunk/src/doc/examples/Tail.java 2007-06-14 20:36:33 UTC (rev 410) @@ -31,8 +31,7 @@ import net.sf.japi.io.args.Option; import org.jetbrains.annotations.NotNull; -/** - * Java implementation of the UNIX command <q>tail</q> to demonstrate how to use the argparser library. +/** Java implementation of the UNIX command <q>tail</q> to demonstrate how to use the argparser library. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class Tail extends BasicCommand { @@ -40,23 +39,20 @@ /** The number of items to print. */ private int numItems = 10; - /** - * The kind of items to print. + /** The kind of items to print. * <code>false</code>: print lines. * <code>true</code>: print bytes. */ private boolean printBytes; - /** - * Quiety / Verbosity. + /** Quiety / Verbosity. * 0 = never print filenames. * 1 = print filenames if more than one file. * 2 = always print filenames. */ private int verbose = 1; - /** - * Sets the number of lines to print. + /** Sets the number of lines to print. * @param lines number of lines to print */ @Option({"n", "lines"}) @@ -65,8 +61,7 @@ printBytes = false; } - /** - * Sets the number of bytes to print. + /** Sets the number of bytes to print. * @param bytes number of bytes to print. */ @Option({"c", "bytes"}) @@ -75,50 +70,60 @@ printBytes = true; } - /** - * Sets the command to be quiet. - */ + /** Sets the command to be quiet. */ @Option({"q", "quiet", "silent"}) public void setQuiet() { verbose = 0; } - /** - * Sets the command to be verbose. - */ + /** Sets the command to be verbose. */ @Option({"v", "verbose"}) public void setVerbose() { verbose = 2; } /** {@inheritDoc} */ - @SuppressWarnings({"InstanceMethodNamingConvention"}) - public int run(@NotNull List<String> args) throws Exception { + public int run(@NotNull final List<String> args) throws IOException { int returnCode = 0; - for (final String arg : args) { - try { - final InputStream in = new BufferedInputStream(new FileInputStream(arg)); + if (args.size() == 0) { + if (verbose == 2) { + System.out.println("==> STDIN <=="); + } + copyItems(System.in); + } else { + for (final String arg : args) { + if (verbose == 2 || verbose == 1 && args.size() > 1) { + System.out.println("==> " + arg + " <=="); + } try { - copy(in); - } finally { - in.close(); + final InputStream in = new BufferedInputStream(new FileInputStream(arg)); + try { + copyItems(in); + } finally { + in.close(); + } + } catch (final IOException e) { + returnCode = 1; + System.err.println(e); } - } catch (final IOException e) { - returnCode = 1; - System.err.println(e); } } return returnCode; } - private void copy(final InputStream in) throws IOException { + /** Copies the configured number of items from the specified InputStream to System.out. + * @param in InputStream to run on + * @throws IOException In case of I/O problems. + */ + private void copyItems(@NotNull final InputStream in) throws IOException { if (printBytes) { copyBytes(in); } else { copyLines(in); } } - private void copyBytes(final InputStream in) throws IOException { + + private void copyBytes(@NotNull final InputStream in) throws IOException { final InputStream lin = in instanceof BufferedInputStream ? in : new BufferedInputStream(in); final byte[] buf = new byte[numItems]; int bytesRead; @@ -132,7 +137,7 @@ System.out.write(buf, 0, bytesRead); } - private void copyLines(final InputStream in) throws IOException { + private void copyLines(@NotNull final InputStream in) throws IOException { final String[] buf = new String[numItems]; final BufferedReader lin = new BufferedReader(new InputStreamReader(in)); int num = 0; @@ -147,12 +152,11 @@ } } - /** - * Main method. + /** Main method. * @param args Command line arguments */ public static void main(final String... args) { - ArgParser.simpleParseAndRun(new Head(), args); + ArgParser.simpleParseAndRun(new Tail(), args); } } // class Tail Modified: libs/argparser/trunk/src/doc/examples/Uniq.java =================================================================== --- libs/argparser/trunk/src/doc/examples/Uniq.java 2007-06-14 20:05:36 UTC (rev 409) +++ libs/argparser/trunk/src/doc/examples/Uniq.java 2007-06-14 20:36:33 UTC (rev 410) @@ -21,6 +21,7 @@ import net.sf.japi.io.args.BasicCommand; import net.sf.japi.io.args.Option; +import net.sf.japi.io.args.ArgParser; import org.jetbrains.annotations.NotNull; import java.util.List; import java.io.InputStream; @@ -31,8 +32,7 @@ import java.io.Reader; import java.io.BufferedReader; -/** - * Java implementation of the UNIX command <q>uniq</q> to demonstrate how to use the argparser library. +/** Java implementation of the UNIX command <q>uniq</q> to demonstrate how to use the argparser library. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class Uniq extends BasicCommand { @@ -46,25 +46,19 @@ /** Whether to ignore case. */ private boolean ignoreCase; - /** - * Sets that lines should prefixed with the count of their occurrence. - */ + /** Sets that lines should prefixed with the count of their occurrence. */ @Option({"c", "count"}) public void setCount() { count = true; } - /** - * Sets that only lines that occurred more than once will be printed. - */ + /** Sets that only lines that occurred more than once will be printed. */ @Option({"d", "repeated"}) public void setRepeated() { repeated = true; } - /** - * Sets that the case should be ignored. - */ + /** Sets that the case should be ignored. */ @Option({"i", "ignore-case"}) public void setIgnoreCase() { ignoreCase = true; @@ -90,8 +84,7 @@ return returnCode; } - /** - * Prints unique lines from the specified InputStream. + /** Prints unique lines from the specified InputStream. * @param in InputStream to print unique lines from. * @throws IOException In case of I/O problems. */ @@ -99,8 +92,7 @@ uniq(new InputStreamReader(in)); } - /** - * Prints unique lines from the specified Reader. + /** Prints unique lines from the specified Reader. * @param in Reader to print unique lines from. * @throws IOException In case of I/O problems. */ @@ -126,4 +118,11 @@ } } + /** Main method. + * @param args Command line arguments + */ + public static void main(final String... args) { + ArgParser.simpleParseAndRun(new Uniq(), args); + } + } // class Uniq Modified: libs/argparser/trunk/src/doc/start.xhtml =================================================================== --- libs/argparser/trunk/src/doc/start.xhtml 2007-06-14 20:05:36 UTC (rev 409) +++ libs/argparser/trunk/src/doc/start.xhtml 2007-06-14 20:36:33 UTC (rev 410) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> -<html> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> <meta name="Date" content="$Date: 2006-11-26 16:38:11 +0100 (So, 26 Nov 2006) $" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-06-14 20:05:37
|
Revision: 409 http://svn.sourceforge.net/japi/?rev=409&view=rev Author: christianhujer Date: 2007-06-14 13:05:36 -0700 (Thu, 14 Jun 2007) Log Message: ----------- Added developer.properties to ignored files. Property Changed: ---------------- libs/argparser/trunk/ Property changes on: libs/argparser/trunk ___________________________________________________________________ Name: svn:ignore - classes dest dist docs + classes dest developer.properties dist docs This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |