You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by be...@apache.org on 2023/06/29 09:52:28 UTC

[tapestry-5] branch master updated (0124d8c04 -> 14864a28b)

This is an automated email from the ASF dual-hosted git repository.

benw pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tapestry-5.git


    from 0124d8c04 Merge branch 'TAP5-2745'
     new d9ceb10d2 TAP5-2730: Contribution id 'ComnpressedModules' fixed
     new 14864a28b TAP5-2739: tapestry-ioc JDKUtils and DummyLock removed

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/tapestry5/modules/JavaScriptModule.java |  2 +-
 .../tapestry5/ioc/internal/RegistryImpl.java       |  5 --
 .../tapestry5/ioc/internal/util/DummyLock.java     | 65 ----------------------
 .../tapestry5/ioc/internal/util/JDKUtils.java      | 48 ----------------
 .../src/test/groovy/ioc/specs/DummyLockSpec.groovy | 28 ----------
 5 files changed, 1 insertion(+), 147 deletions(-)
 delete mode 100644 tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/DummyLock.java
 delete mode 100644 tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/JDKUtils.java
 delete mode 100644 tapestry-ioc/src/test/groovy/ioc/specs/DummyLockSpec.groovy


[tapestry-5] 02/02: TAP5-2739: tapestry-ioc JDKUtils and DummyLock removed

Posted by be...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

benw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tapestry-5.git

commit 14864a28b20542e2b57d74e226919a0f66ed3092
Author: Ben Weidig <be...@netzgut.net>
AuthorDate: Thu Jun 29 11:01:29 2023 +0200

    TAP5-2739: tapestry-ioc JDKUtils and DummyLock removed
    
    Both classes are special considerations for Java 1.5 which isn't supported since Tapestry 5.3+.
    Even if someone still uses the internal JDKUtils to create a lock for ThreadLocal creation, it makes sense to remove it as the DummyLock does actually nothing.
---
 .../tapestry5/ioc/internal/RegistryImpl.java       |  5 --
 .../tapestry5/ioc/internal/util/DummyLock.java     | 65 ----------------------
 .../tapestry5/ioc/internal/util/JDKUtils.java      | 48 ----------------
 .../src/test/groovy/ioc/specs/DummyLockSpec.groovy | 28 ----------
 4 files changed, 146 deletions(-)

diff --git a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/RegistryImpl.java b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/RegistryImpl.java
index c28e0f062..4767be852 100644
--- a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/RegistryImpl.java
+++ b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/RegistryImpl.java
@@ -371,11 +371,6 @@ public class RegistryImpl implements Registry, InternalRegistry, ServiceProxyPro
     @Override
     public void performRegistryStartup()
     {
-        if (JDKUtils.JDK_1_5)
-        {
-            throw new RuntimeException("Your JDK version is too old."
-                    + " Tapestry requires Java 1.6 or newer since version 5.4.");
-        }
         eagerLoadLock.lock();
 
         List<EagerLoadServiceProxy> proxies = CollectionFactory.newList();
diff --git a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/DummyLock.java b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/DummyLock.java
deleted file mode 100644
index 67d5b74ef..000000000
--- a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/DummyLock.java
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright 2009 The Apache Software Foundation
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package org.apache.tapestry5.ioc.internal.util;
-
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.locks.Condition;
-import java.util.concurrent.locks.Lock;
-
-/**
- * Acts like a Lock but all operations are no-ops.
- * @deprecated Deprecated in 5.4 with no replacement.
- */
-public class DummyLock implements Lock
-{
-    @Override
-    public void lock()
-    {
-    }
-
-    @Override
-    public void lockInterruptibly() throws InterruptedException
-    {
-    }
-
-    /**
-     * Returns null.
-     */
-    @Override
-    public Condition newCondition()
-    {
-        return null;
-    }
-
-    /** @return true */
-    @Override
-    public boolean tryLock()
-    {
-        return true;
-    }
-
-    /** @return true */
-    @Override
-    public boolean tryLock(long time, TimeUnit unit) throws InterruptedException
-    {
-        return true;
-    }
-
-    @Override
-    public void unlock()
-    {
-    }
-
-}
diff --git a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/JDKUtils.java b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/JDKUtils.java
deleted file mode 100644
index 4eb233f42..000000000
--- a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/JDKUtils.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2009, 2011 The Apache Software Foundation
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package org.apache.tapestry5.ioc.internal.util;
-
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
-
-/**
- * Internal utilities for identifying the JDK version, used in the rare cases
- * that we are patching around JDK bugs.
- */
-public class JDKUtils
-{
-    /**
-     * Is the running JVM JDK 1.5?
-     */
-    public static final boolean JDK_1_5 = isVersion("1.5");
-
-    private static boolean isVersion(String versionId)
-    {
-        return System.getProperty("java.specification.version").equals(versionId);
-    }
-
-    /**
-     * Returns a {@link ReentrantLock} used to serialize access to the construction of a thread local; this is only needed under JDK 1.5 (due to a bug in the JDK);
-     * for other JDKs, a {@link DummyLock} is returned.
-     *
-     * @return lock to use when creating
-     * @since 5.3
-     * @deprecated Deprecated in 5.4 with no replacement.
-     */
-    public static Lock createLockForThreadLocalCreation()
-    {
-        return JDK_1_5 ? new ReentrantLock() : new DummyLock();
-    }
-}
diff --git a/tapestry-ioc/src/test/groovy/ioc/specs/DummyLockSpec.groovy b/tapestry-ioc/src/test/groovy/ioc/specs/DummyLockSpec.groovy
deleted file mode 100644
index 8e6daddb0..000000000
--- a/tapestry-ioc/src/test/groovy/ioc/specs/DummyLockSpec.groovy
+++ /dev/null
@@ -1,28 +0,0 @@
-package ioc.specs
-
-import org.apache.tapestry5.ioc.internal.util.DummyLock
-import spock.lang.Specification
-
-import java.util.concurrent.locks.Lock
-
-class DummyLockSpec extends Specification {
-
-  def "all methods are no-ops"() {
-    Lock lock = new DummyLock()
-
-    when:
-
-    lock.lock()
-    lock.unlock()
-    lock.lockInterruptibly()
-
-    then:
-
-    noExceptionThrown()
-
-    expect:
-    lock.newCondition() == null
-    lock.tryLock()
-    lock.tryLock(0, null)
-  }
-}


[tapestry-5] 01/02: TAP5-2730: Contribution id 'ComnpressedModules' fixed

Posted by be...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

benw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tapestry-5.git

commit d9ceb10d2f0618d818831a5d220a777d91939059
Author: Ben Weidig <be...@netzgut.net>
AuthorDate: Thu Jun 29 10:55:30 2023 +0200

    TAP5-2730: Contribution id 'ComnpressedModules' fixed
---
 .../src/main/java/org/apache/tapestry5/modules/JavaScriptModule.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/modules/JavaScriptModule.java b/tapestry-core/src/main/java/org/apache/tapestry5/modules/JavaScriptModule.java
index 63dfc5fcc..5842bd9a1 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/modules/JavaScriptModule.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/modules/JavaScriptModule.java
@@ -286,7 +286,7 @@ public class JavaScriptModule
                     assetPathPrefix, false),
                 "after:Asset", "before:ComponentEvent");
 
-        configuration.add("ComnpressedModules",
+        configuration.add("CompressedModules",
                 new ModuleDispatcher(moduleManager, resourceStreamer, tracker, pathConstructor,
                     javaScriptStackSource, javaScriptStackPathConstructor, localizationSetter, modulePathPrefix,
                     assetPathPrefix, true),