Skip to content

Commit

Permalink
GEODE-7542: Remove dependency upon JavaWorkarounds. (apache#4556)
Browse files Browse the repository at this point in the history
* Moved JavaWorkarounds to a new package in geode-common module
* Cleaned up ArchUnit exceptions to be package based, when possible.
  • Loading branch information
Ernie Burghardt authored Jan 6, 2020
1 parent 505cdc8 commit b32ff42
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* the License.
*/

package org.apache.geode.internal.util;
package org.apache.geode.internal.lang;

import java.util.Map;
import java.util.function.Function;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import org.apache.geode.connectors.jdbc.JdbcConnectorException;
import org.apache.geode.connectors.jdbc.internal.TableMetaData.ColumnMetaData;
import org.apache.geode.connectors.jdbc.internal.configuration.RegionMapping;
import org.apache.geode.internal.util.JavaWorkarounds;
import org.apache.geode.internal.lang.JavaWorkarounds;

/**
* Given a tableName this manager will determine which column should correspond to the Geode Region
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;

import org.apache.geode.internal.lang.JavaWorkarounds;


/**
* Test spins up threads that constantly do computeIfAbsent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import org.apache.geode.cache.query.QueryInvocationTargetException;
import org.apache.geode.cache.query.QueryService;
import org.apache.geode.internal.cache.Token;
import org.apache.geode.internal.util.JavaWorkarounds;
import org.apache.geode.internal.lang.JavaWorkarounds;
import org.apache.geode.pdx.JSONFormatter;
import org.apache.geode.pdx.PdxSerializationException;
import org.apache.geode.pdx.internal.InternalPdxInstance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
import org.apache.geode.distributed.internal.membership.gms.messages.SuspectRequest;
import org.apache.geode.distributed.internal.tcpserver.ConnectionWatcher;
import org.apache.geode.distributed.internal.tcpserver.TcpSocketCreator;
import org.apache.geode.internal.lang.JavaWorkarounds;
import org.apache.geode.internal.serialization.Version;
import org.apache.geode.internal.util.JavaWorkarounds;
import org.apache.geode.logging.internal.executors.LoggingExecutors;
import org.apache.geode.util.internal.GeodeGlossary;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import org.apache.geode.distributed.internal.membership.gms.GMSMembershipView;
import org.apache.geode.distributed.internal.membership.gms.Services;
import org.apache.geode.distributed.internal.membership.gms.locator.GMSLocator;
import org.apache.geode.internal.util.JavaWorkarounds;
import org.apache.geode.internal.lang.JavaWorkarounds;

public final class GMSEncrypt<ID extends MemberIdentifier> {
// Parameters for the Diffie-Hellman key exchange
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.util.Set;

import org.apache.geode.cache.DiskStore;
import org.apache.geode.internal.util.JavaWorkarounds;
import org.apache.geode.internal.lang.JavaWorkarounds;

class BackupDefinition {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
package org.apache.geode.internal.cache.execute.metrics;

import static org.apache.geode.internal.util.JavaWorkarounds.computeIfAbsent;
import static org.apache.geode.internal.lang.JavaWorkarounds.computeIfAbsent;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
import org.apache.geode.internal.cache.TXManagerImpl;
import org.apache.geode.internal.cache.tier.Acceptor;
import org.apache.geode.internal.cache.tier.ServerSideHandshake;
import org.apache.geode.internal.lang.JavaWorkarounds;
import org.apache.geode.internal.serialization.Version;
import org.apache.geode.internal.util.JavaWorkarounds;
import org.apache.geode.logging.internal.executors.LoggingThread;
import org.apache.geode.logging.internal.log4j.api.LogService;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@
import org.apache.geode.distributed.internal.membership.api.Membership;
import org.apache.geode.internal.Assert;
import org.apache.geode.internal.SystemTimer;
import org.apache.geode.internal.lang.JavaWorkarounds;
import org.apache.geode.internal.logging.CoreLoggingExecutors;
import org.apache.geode.internal.net.BufferPool;
import org.apache.geode.internal.net.SocketCloser;
import org.apache.geode.internal.util.JavaWorkarounds;
import org.apache.geode.logging.internal.executors.LoggingExecutors;
import org.apache.geode.logging.internal.log4j.api.LogService;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@

import org.apache.geode.distributed.Locator;
import org.apache.geode.distributed.internal.LocatorStats;
import org.apache.geode.internal.inet.LocalHostUtil;
import org.apache.geode.internal.util.JavaWorkarounds;

@RunWith(ArchUnitRunner.class)
@AnalyzeClasses(packages = "org.apache.geode.distributed.internal.membership.gms..",
Expand Down Expand Up @@ -94,7 +92,8 @@ public class MembershipDependenciesJUnitTest {
.or(resideInAPackage("org.apache.geode.logging.internal.."))
.or(resideInAPackage("org.apache.geode.logging.internal.executors.."))
.or(resideInAPackage("org.apache.geode.distributed.internal.tcpserver.."))
.or(type(LocalHostUtil.class))
.or(resideInAPackage("org.apache.geode.internal.inet.."))
.or(resideInAPackage("org.apache.geode.internal.lang.."))

.or(not(resideInAPackage("org.apache.geode..")))

Expand All @@ -107,8 +106,5 @@ public class MembershipDependenciesJUnitTest {
// TODO: break dependencies on locator-related classes
.or(type(Locator.class))

// TODO:
.or(type(JavaWorkarounds.class))

);
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
import org.apache.geode.internal.cache.tier.sockets.CacheClientProxy;
import org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID;
import org.apache.geode.internal.cache.tier.sockets.Part;
import org.apache.geode.internal.util.JavaWorkarounds;
import org.apache.geode.internal.lang.JavaWorkarounds;
import org.apache.geode.logging.internal.log4j.api.LogService;
import org.apache.geode.util.internal.GeodeGlossary;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import org.apache.lucene.document.Document;

import org.apache.geode.cache.lucene.internal.repository.serializer.SerializerUtil;
import org.apache.geode.internal.util.JavaWorkarounds;
import org.apache.geode.internal.lang.JavaWorkarounds;
import org.apache.geode.logging.internal.log4j.api.LogService;
import org.apache.geode.pdx.PdxInstance;

Expand Down

0 comments on commit b32ff42

Please sign in to comment.