Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for UnsupportedNotationException (0.81 sec)

  1. platforms/core-runtime/base-services/src/main/java/org/gradle/internal/typeconversion/UnsupportedNotationException.java

    import java.util.Collection;
    import java.util.Collections;
    import java.util.Formatter;
    
    public class UnsupportedNotationException extends TypeConversionException {
        private final Object notation;
        private final Collection<String> candidates;
    
        public UnsupportedNotationException(Object notation) {
            super("Could not convert " + notation);
            this.notation = notation;
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  2. platforms/software/dependency-management/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/dependencysubstitution/ModuleSelectorStringNotationConverterTest.groovy

            when: parser.parseNotation(notation)
            then: thrown(UnsupportedNotationException)
            where: notation << [null, "", ":", "foo", "foo:", "foo:bar:x:2", "  :", ":  ", "  :  "]
        }
    
        def "reports notation with invalid character for module"() {
            when: parser.parseNotation("group:module${character}")
            then: thrown(UnsupportedNotationException)
            where: character << ["+", "*", "[", "]", "(", ")", ","]
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Oct 10 21:10:11 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  3. platforms/software/dependency-management/src/test/groovy/org/gradle/api/internal/notations/ModuleIdentifierNotationConverterTest.groovy

            when: parser.parseNotation(notation)
            then: thrown(UnsupportedNotationException)
            where: notation << [null, "", ":", "foo:", "bar:", "foo:bar:baz", "  :", ":  ", "  :  "]
        }
    
        def "reports notation with invalid character"() {
            when: parser.parseNotation("group:module${character}")
            then: thrown(UnsupportedNotationException)
            where: character << ["*", "[", "]", "(", ")", ","]
        }
    
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Oct 10 21:10:11 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  4. platforms/software/dependency-management/src/main/java/org/gradle/api/internal/notations/ModuleNotationValidation.java

        public static String validate(String part, String notation) {
            if (!GUtil.isTrue(part)) {
                throw new UnsupportedNotationException(notation);
            }
            for (char c : INVALID_SPEC_CHARS) {
                if (part.indexOf(c) != -1) {
                    throw new UnsupportedNotationException(notation);
                }
            }
            return part;
        }
    
        public static String validate(String part) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Oct 10 21:10:11 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  5. subprojects/core/src/test/groovy/org/gradle/api/internal/file/FileOrUriNotationConverterTest.groovy

            then:
            parsed instanceof URI
        }
    
        @Issue("GRADLE-2072")
        def "parsing unknown types causes UnsupportedNotationException"() {
            when:
            parse(12)
    
            then:
            UnsupportedNotationException e = thrown()
            e.message == toPlatformLineSeparators("""Cannot convert the provided notation to a File or URI: 12.
    The following types/formats are supported:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Dec 19 16:59:26 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  6. platforms/software/dependency-management/src/main/java/org/gradle/api/internal/notations/ModuleIdentifierNotationConverter.java

    import org.gradle.internal.typeconversion.NotationConverter;
    import org.gradle.internal.typeconversion.TypeConversionException;
    import org.gradle.internal.typeconversion.UnsupportedNotationException;
    
    import static org.gradle.api.internal.notations.ModuleNotationValidation.validate;
    
    public class ModuleIdentifierNotationConverter implements NotationConverter<String, ModuleIdentifier> {
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Oct 10 21:10:11 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  7. platforms/software/dependency-management/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/dependencysubstitution/DefaultDependencySubstitutionSpec.groovy

        }
    
        def "does not allow null target"() {
            when:
            details.useTarget(null)
    
            then:
            thrown(UnsupportedNotationException)
    
            when:
            details.useTarget(null, SELECTED_BY_RULE)
    
            then:
            thrown(UnsupportedNotationException)
        }
    
        def "can specify target module"() {
            when:
            details.useTarget("org:bar:2.0")
    
            then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Oct 10 21:10:11 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  8. platforms/software/dependency-management/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/resolutionstrategy/DefaultComponentSelectionRulesTest.groovy

            def input = { ComponentSelection cs -> throw new UnsupportedNotationException(notation) }
    
            when:
            rules.withModule(notation, input)
    
            then:
            def e = thrown(InvalidUserCodeException)
            e.message == "Could not add a component selection rule for module '${notation}'."
            def cause = e.cause
            cause instanceof UnsupportedNotationException
            cause.notation == notation
    
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Oct 10 21:10:11 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  9. platforms/software/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/dependencysubstitution/ModuleSelectorStringNotationConverter.java

    import org.gradle.internal.exceptions.DiagnosticsVisitor;
    import org.gradle.internal.typeconversion.TypedNotationConverter;
    import org.gradle.internal.typeconversion.UnsupportedNotationException;
    import org.gradle.util.internal.GUtil;
    
    import static org.gradle.api.internal.notations.ModuleNotationValidation.*;
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Oct 10 21:10:11 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  10. platforms/software/dependency-management/src/test/groovy/org/gradle/api/internal/artifacts/dsl/ComponentSelectorParsersTest.groovy

        def "null is an invalid input"() {
            when:
            multiParser().parseNotation(null)
    
            then:
            thrown(UnsupportedNotationException)
    
            when:
            parser().parseNotation(null)
    
            then:
            thrown(UnsupportedNotationException)
        }
    
        def "single parser understands String notation"() {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Oct 10 21:10:11 UTC 2023
    - 6.7K bytes
    - Viewed (0)
Back to top