Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup deprecated unused code #251

Merged
merged 1 commit into from
Dec 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,6 @@ public CompilerResult performCompile(CompilerConfiguration configuration)
throw new CompilerNotImplementedException("The performCompile method has not been implemented.");
}

@Deprecated
public List<CompilerError> compile(CompilerConfiguration configuration)
throws CompilerException
{
throw new CompilerNotImplementedException("The compile method has not been implemented.");
}

public CompilerOutputStyle getCompilerOutputStyle()
{
return compilerOutputStyle;
Expand Down Expand Up @@ -285,23 +278,6 @@ private static String getCanonicalPath( File origFile )
}
}

/**
* @deprecated use (String[]) arguments.toArray( new String[ arguments.size() ] ); instead
*/
protected static String[] toStringArray( List<String> arguments )
{
String[] args = new String[arguments.size()];

int argLength = arguments.size();

for ( int i = 0; i < argLength; i++ )
{
args[i] = arguments.get( i );
}

return args;
}

protected void logCompiling( String[] sourceFiles, CompilerConfiguration config )
{
if ( ( getLogger() != null ) && getLogger().isInfoEnabled() )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,6 @@ boolean canUpdateTarget( CompilerConfiguration configuration )
CompilerResult performCompile( CompilerConfiguration configuration )
throws CompilerException;

/**
* This method is provided for backwards compatibility only. Clients should
* use {@link #performCompile(CompilerConfiguration)} instead.
*
* @param configuration the configuration description of the compilation
* to perform
* @return the result of the compilation returned by the language processor
* @throws CompilerException
*/
@Deprecated
List<CompilerError> compile( CompilerConfiguration configuration )
throws CompilerException;

/**
* Create the command line that would be executed using this configuration.
* If this particular compiler has no concept of a command line then returns
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,31 +472,6 @@ public void addCompilerCustomArgument( String customArgument, String value )
customCompilerArguments.add( new AbstractMap.SimpleImmutableEntry<>( customArgument, value ) );
}

/**
* @deprecated will be removed in 2.X use #getCustomCompilerArgumentsAsMap
* @return
*/
@Deprecated
public LinkedHashMap<String, String> getCustomCompilerArguments()
{
LinkedHashMap<String, String> arguments = new LinkedHashMap<>( customCompilerArguments.size() );
for ( Map.Entry<String, String> entry : customCompilerArguments )
{
arguments.put( entry.getKey(), entry.getValue() );
}
return arguments;
}

/**
* @deprecated will be removed in 2.X use #setCustomCompilerArgumentsAsMap
* @param customCompilerArguments
*/
@Deprecated
public void setCustomCompilerArguments( LinkedHashMap<String, String> customCompilerArguments )
{
setCustomCompilerArgumentsAsMap( customCompilerArguments );
}

/**
* Get all unique argument keys and their value. In case of duplicate keys, last one added wins.
*
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -645,18 +645,6 @@ protected static String[] getSourceFiles( CompilerConfiguration config )
return result;
}

/**
* This method is just here to maintain the public api. This is now handled in the parse
* compiler output function.
*
* @author Chris Stevenson
* @deprecated
*/
public static CompilerMessage parseLine( String line )
{
return DefaultCSharpCompilerParser.parseLine( line );
}

protected static Set<String> getSourceFilesForSourceRoot( CompilerConfiguration config, String sourceLocation )
{
DirectoryScanner scanner = new DirectoryScanner();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,6 @@ public void report( Diagnostic<? extends JavaFileObject> diagnostic )
args.add( errorF.toString() );
args.addAll( allSources );

String to = ( config.getWorkingDirectory() == null ) ? config.getOutputLocation() :
config.getWorkingDirectory().toPath().relativize( new File( config.getOutputLocation() ).toPath() ).toString();
getLogger().info( "Compiling with " + config.describe( "eclipse" ) +
" to " + to );
getLogger().debug( "ecj command line: " + args );

success = BatchCompiler.compile( args.toArray( new String[args.size()] ), devNull, devNull,
Expand Down