Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for disallowUnsafeRead (0.19 sec)

  1. platforms/core-configuration/model-core/src/main/java/org/gradle/api/internal/provider/ValueState.java

                }
                return finalizeOnNextGet || consumer == ValueSupplier.ValueConsumer.DisallowUnsafeRead;
            }
    
            @Override
            public ValueSupplier.ValueConsumer forUpstream(ValueSupplier.ValueConsumer consumer) {
                if (disallowUnsafeRead) {
                    return ValueSupplier.ValueConsumer.DisallowUnsafeRead;
                } else {
                    return consumer;
                }
            }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri May 17 11:41:55 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  2. platforms/core-configuration/file-collections/src/integTest/groovy/org/gradle/api/file/FilePropertyLifecycleIntegrationTest.groovy

            taskTypeWithOutputFileProperty()
            settingsFile << "rootProject.name = 'broken'"
            buildFile """
                task producer(type: FileProducer) {
                    output.disallowUnsafeRead()
                    output = layout.buildDir.file("text.out")
                    def other = file('ignore')
                    doFirst {
                        try {
                            output = other
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 22.6K bytes
    - Viewed (0)
  3. platforms/core-configuration/file-collections/src/integTest/groovy/org/gradle/api/file/FileCollectionLifecycleIntegrationTest.groovy

                interface ProjectModel {
                    ConfigurableFileCollection getProp()
                }
    
                project.extensions.create('thing', ProjectModel.class)
                thing.prop.disallowUnsafeRead()
                thing.prop.from(layout.buildDirectory)
    
                try {
                    thing.prop.files
                } catch(IllegalStateException e) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 10:55:07 UTC 2023
    - 11.4K bytes
    - Viewed (0)
  4. platforms/core-configuration/model-core/src/testFixtures/groovy/org/gradle/api/internal/provider/PropertySpec.groovy

            def property = propertyWithNoValue()
    
            property.set(b)
            property.disallowUnsafeRead()
    
            b.set(c)
            b.attachOwner(owner(), displayName("<b>"))
    
            c.set(someValue())
            c.attachOwner(owner(), displayName("<c>"))
            c.disallowUnsafeRead()
    
            given:
            property."$method"()
    
            when:
            b.set(someOtherValue())
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri May 17 11:41:55 UTC 2024
    - 87.8K bytes
    - Viewed (0)
  5. platforms/core-configuration/model-core/src/integTest/groovy/org/gradle/api/provider/PropertyLifecycleIntegrationTest.groovy

            buildFile """
                interface ProjectModel {
                    Property<String> getProp()
                }
    
                project.extensions.create('thing', ProjectModel.class)
                thing.prop.disallowUnsafeRead()
                thing.prop.set("value one")
    
                try {
                    thing.prop.get()
                } catch(IllegalStateException e) {
                    println("get failed with: " + e.message)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Jan 04 14:00:52 UTC 2024
    - 15K bytes
    - Viewed (0)
  6. subprojects/core-api/src/main/java/org/gradle/api/provider/HasConfigurableValue.java

         * the value may be read. The property is also finalized on read.
         *
         * @since 6.4
         */
        void disallowUnsafeRead();
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Jan 05 16:10:02 UTC 2021
    - 4.2K bytes
    - Viewed (0)
  7. platforms/core-configuration/model-core/src/main/java/org/gradle/api/internal/provider/AbstractProperty.java

        }
    
        @Override
        public void implicitFinalizeValue() {
            state.disallowChangesAndFinalizeOnNextGet();
        }
    
        @Override
        public void disallowUnsafeRead() {
            state.disallowUnsafeRead();
        }
    
        protected abstract S finalValue(EvaluationContext.ScopeContext context, S value, ValueConsumer consumer);
    
        protected void setSupplier(S supplier) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri May 17 11:41:54 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  8. platforms/core-configuration/file-collections/src/test/groovy/org/gradle/api/internal/file/FileSystemPropertySpec.groovy

            def task = Stub(Task)
            def prop = propertyWithNoValue()
            def location = prop.locationOnly
            prop.fileValue(file)
            prop.attachProducer(owner(task))
            prop.disallowUnsafeRead()
    
            when:
            def result = location.present
    
            then:
            result
            1 * host.beforeRead(null) >> null
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  9. platforms/core-configuration/configuration-cache/src/integTest/groovy/org/gradle/internal/cc/impl/ConfigurationCacheTaskWiringIntegrationTest.groovy

            where:
            description            | propertyConfig
            "default behaviour"    | ""
            "finalize on read"     | "it.finalizeValueOnRead()"
            "disallow unsafe read" | "it.disallowUnsafeRead()"
        }
    
        def "task input collection property can consume the mapped output of another task"() {
            taskTypeWithInputFileProperty()
            taskTypeWithInputListProperty()
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sat Jun 08 11:29:25 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  10. platforms/core-configuration/file-collections/src/test/groovy/org/gradle/api/internal/file/collections/DefaultConfigurableFileCollectionSpec.groovy

        }
    
        def "cannot query files when unsafe reads disallowed and host is not ready"() {
            given:
            def file = new File('one')
            collection.from('a')
            collection.disallowUnsafeRead()
    
            when:
            collection.files
    
            then:
            def e = thrown(IllegalStateException)
            e.message == "Cannot query the value of <display> because <reason>."
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Mar 18 17:09:50 UTC 2024
    - 53K bytes
    - Viewed (0)
Back to top