Permalink
Browse files

Fixed more checkstyle warnings.

  • Loading branch information...
1 parent c49a94a commit 8a5863856decc2f3e9d35cd93a9a8f5c2c88f18a @kayahr committed Jun 19, 2012
@@ -95,12 +95,6 @@ private void wrongUsage(final String message)
*/
private String[] processOptions(final String[] args) throws IOException
{
- int c;
- String[] params;
- Getopt getopt;
- int i, p;
- StringBuilder shortOpts;
-
// Setup long options
final LongOpt[] allLongOpts = new LongOpt[]
{
@@ -118,7 +112,7 @@ private void wrongUsage(final String message)
};
// Build the shortOpts
- shortOpts = new StringBuilder();
+ final StringBuilder shortOpts = new StringBuilder();
for (final LongOpt longOpt: allLongOpts)
{
shortOpts.append((char) longOpt.getVal());
@@ -129,9 +123,11 @@ private void wrongUsage(final String message)
}
// Setup short options
- getopt = new Getopt("jasdoc", args, shortOpts.toString(), allLongOpts);
+ final Getopt getopt = new Getopt("jasdoc", args, shortOpts.toString(),
+ allLongOpts);
// Process options
+ int c;
while ((c = getopt.getopt()) != -1)
{
switch (c)
@@ -178,9 +174,9 @@ private void wrongUsage(final String message)
}
// Generate and return parameters
- params = new String[args.length - getopt.getOptind()];
- p = 0;
- for (i = getopt.getOptind(); i < args.length; i++)
+ final String[] params = new String[args.length - getopt.getOptind()];
+ int p = 0;
+ for (int i = getopt.getOptind(); i < args.length; i++)
{
params[p] = args[i];
p++;
@@ -238,8 +238,8 @@ public final boolean isField()
*/
public final boolean isVariable()
{
- return (this.parentNode != null && this.parentNode.isNamespace()
- && !isFunction() && !isClass() && !isNamespace() && !isEnum());
+ return this.parentNode != null && this.parentNode.isNamespace()
+ && !isFunction() && !isClass() && !isNamespace() && !isEnum();
}
/**
@@ -291,13 +291,16 @@ public URL toURL() throws MalformedURLException
@Override
public URI toURI()
{
- if (isInJar()) try
- {
- return new URI("jar:file", null, getAbsolutePath(), null);
- }
- catch (final URISyntaxException e)
+ if (isInJar())
{
- throw new RuntimeException(e.toString(), e);
+ try
+ {
+ return new URI("jar:file", null, getAbsolutePath(), null);
+ }
+ catch (final URISyntaxException e)
+ {
+ throw new RuntimeException(e.toString(), e);
+ }
}
return super.toURI();
}
@@ -18,7 +18,6 @@
import java.io.Writer;
import java.net.URL;
-
/**
* IO utility methods.
*
@@ -118,9 +117,8 @@ public static String readTextResource(final Class<?> base,
* @throws IOException
* If reading the text failed.
*/
- public static String
- readText(final InputStream input, final String charset)
- throws IOException
+ public static String readText(final InputStream input, final String charset)
+ throws IOException
{
final ByteArrayOutputStream output = new ByteArrayOutputStream();
try
@@ -34,8 +34,7 @@ private JsTypeUtils()
* The separator character.
* @return The splitted expression parts.
*/
- public static String[]
- split(final String expression, final char separator)
+ public static String[] split(final String expression, final char separator)
{
final List<String> parts = new ArrayList<String>();
int start = 0;

0 comments on commit 8a58638

Please sign in to comment.