Skip to content
This repository was archived by the owner on Feb 23, 2022. It is now read-only.
This repository was archived by the owner on Feb 23, 2022. It is now read-only.

Crash when using non-empty input-renaming-map #124

@Yannic

Description

@Yannic

Closure Stylesheets crashes with the following exception when using an non-empty input-renaming-map. The format of the renaming map does not seem to matter, it only must not be empty.

Exception in thread "main" java.lang.ClassCastException: com.google.common.css.IdentitySubstitutionMap cannot be cast to com.google.common.css.SubstitutionMap$Initializable
	at com.google.common.css.RecordingSubstitutionMap.initializeWithMappings(RecordingSubstitutionMap.java:91)
	at com.google.common.css.compiler.passes.PassRunner.createSubstitutionMap(PassRunner.java:213)
	at com.google.common.css.compiler.passes.PassRunner.<init>(PassRunner.java:49)
	at com.google.common.css.compiler.commandline.DefaultCommandLineCompiler.<init>(DefaultCommandLineCompiler.java:76)
	at com.google.common.css.compiler.commandline.ClosureCommandLineCompiler.<init>(ClosureCommandLineCompiler.java:65)
	at com.google.common.css.compiler.commandline.ClosureCommandLineCompiler.executeJob(ClosureCommandLineCompiler.java:371)
	at com.google.common.css.compiler.commandline.ClosureCommandLineCompiler.main(ClosureCommandLineCompiler.java:440)

Repo:
java -jar closure-stylesheets-1.5.0-SNAPSHOT-jar-with-dependencies.jar --input-renaming-map renaming.json some.css

renaming.json

{
  "foo": "bar"
}

some.css
Content does not matter, can be empty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions