Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove unnecessary casts
  • Loading branch information
rhowe committed Jun 5, 2019
commit f16095f5863b7b31b346879cc6c216ae9fbfca1c
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ private String[] buildCompilerArguments( CompilerConfiguration config, String[]

if ( !StringUtils.isEmpty( resourcefile ) )
{
String resourceTarget = (String) compilerArguments.get( "-resourcetarget" );
String resourceTarget = compilerArguments.get( "-resourcetarget" );
args.add( "/res:" + new File( resourcefile ).getAbsolutePath() + "," + resourceTarget );
}

Expand Down Expand Up @@ -434,7 +434,7 @@ private File findResourceDir( CompilerConfiguration config )

Map<String, String> compilerArguments = getCompilerArguments( config );

String tempResourcesDirAsString = (String) compilerArguments.get( "-resourceDir" );
String tempResourcesDirAsString = compilerArguments.get( "-resourceDir" );
File filteredResourceDir = null;
if ( tempResourcesDirAsString != null )
{
Expand Down Expand Up @@ -628,7 +628,7 @@ protected static String[] getSourceFiles( CompilerConfiguration config )
}
else
{
result = (String[]) sources.toArray( new String[0] );
result = sources.toArray( new String[0] );
}

return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ public void testParserCscWin()
assertEquals( 24, messagesWinCsc.size() );

assertTrue( "Check that the line number is not -1",
( (CompilerMessage) messagesWinCsc.get( 0 ) ).getStartLine() != -1 );
messagesWinCsc.get( 0 ).getStartLine() != -1 );
assertTrue( "Check that the column number is not -1",
( (CompilerMessage) messagesWinCsc.get( 0 ) ).getStartColumn() != -1 );
messagesWinCsc.get( 0 ).getStartColumn() != -1 );

}

Expand Down Expand Up @@ -211,9 +211,9 @@ public void testParserMonoWin()
assertEquals( 5, messagesMonoWin.size() );

assertTrue( "Check that the line number is not -1",
( (CompilerMessage) messagesMonoWin.get( 0 ) ).getStartLine() != -1 );
messagesMonoWin.get( 0 ).getStartLine() != -1 );
assertTrue( "Check that the column number is not -1",
( (CompilerMessage) messagesMonoWin.get( 0 ) ).getStartColumn() != -1 );
messagesMonoWin.get( 0 ).getStartColumn() != -1 );

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public void testLocalizedWarningNotTreatedAsError()
JavacCompiler.parseModernStream( 0, new BufferedReader( new StringReader( errors ) ) );

assertEquals( 1, messages.size() );
assertFalse( ( (CompilerMessage) messages.get( 0 ) ).isError() );
assertFalse( messages.get( 0 ).isError() );
}

public void testUnixFileNames()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ public String[] createCommandLine( CompilerConfiguration config )

}

return (String[]) args.toArray( new String[0] );
return args.toArray( new String[0] );
}

// -----------------------------------------------------------------------
Expand Down