-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore (deps) : Directly rely on upstream zjsonpatch repository instea…
…d of fabric8io fork Add a new module zjsonpatch that would directly include `com.flipkart.zjsonpatch:zjsonpatch` dependency excluding `org.apache.commons:commons-collections4`. Port required method `ListUtils.longestCommonSubsequence` and related classes inside zjsonpatch module Signed-off-by: Rohan Kumar <[email protected]>
- Loading branch information
1 parent
08b0e9f
commit b157577
Showing
22 changed files
with
1,100 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (C) 2015 Red Hat, Inc. | ||
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. | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>io.fabric8</groupId> | ||
<artifactId>kubernetes-client-project</artifactId> | ||
<version>7.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<packaging>bundle</packaging> | ||
<artifactId>zjsonpatch</artifactId> | ||
|
||
<properties> | ||
<osgi.import> | ||
* | ||
</osgi.import> | ||
<osgi.export> | ||
com.flipkart.zjsonpatch, | ||
org.apache.commons.collections4* | ||
</osgi.export> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.flipkart.zjsonpatch</groupId> | ||
<artifactId>zjsonpatch</artifactId> | ||
<version>${zjsonpatch.version}</version> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>org.apache.commons</groupId> | ||
<artifactId>commons-collections4</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-engine</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.assertj</groupId> | ||
<artifactId>assertj-core</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.felix</groupId> | ||
<artifactId>maven-bundle-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>bundle</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>bundle</goal> | ||
</goals> | ||
<configuration> | ||
<instructions> | ||
<Bundle-Name>${project.name}</Bundle-Name> | ||
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName> | ||
<Export-Package>${osgi.export}</Export-Package> | ||
<Import-Package>${osgi.import}</Import-Package> | ||
<DynamicImport-Package>${osgi.dynamic.import}</DynamicImport-Package> | ||
<Private-Package>${osgi.private}</Private-Package> | ||
<Require-Bundle>${osgi.bundles}</Require-Bundle> | ||
<Bundle-Activator>${osgi.activator}</Bundle-Activator> | ||
<Export-Service>${osgi.export.service}</Export-Service> | ||
</instructions> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
80 changes: 80 additions & 0 deletions
80
zjsonpatch/src/main/java/org/apache/commons/collections4/DefaultEquator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* | ||
* Copyright (C) 2015 Red Hat, Inc. | ||
* | ||
* 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.commons.collections4; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* Ported from <a href= | ||
* "https://github.com/apache/commons-collections/blob/master/src/main/java/org/apache/commons/collections4/functors/DefaultEquator.java">Apache | ||
* Commons Collections</a> | ||
*/ | ||
public class DefaultEquator<T> implements Equator<T>, Serializable { | ||
|
||
/** | ||
* Static instance | ||
*/ | ||
@SuppressWarnings("rawtypes") // the static instance works for all types | ||
public static final DefaultEquator INSTANCE = new DefaultEquator<Object>(); | ||
/** | ||
* Hashcode used for <code>null</code> objects. | ||
*/ | ||
public static final int HASHCODE_NULL = -1; | ||
/** | ||
* Serial version UID | ||
*/ | ||
private static final long serialVersionUID = 825802648423525485L; | ||
|
||
/** | ||
* Restricted constructor. | ||
*/ | ||
private DefaultEquator() { | ||
super(); | ||
} | ||
|
||
/** | ||
* Factory returning the typed singleton instance. | ||
* | ||
* @param <T> the object type | ||
* @return the singleton instance | ||
*/ | ||
@SuppressWarnings("unchecked") // the static instance works for all types | ||
public static <T> DefaultEquator<T> defaultEquator() { | ||
return (DefaultEquator<T>) DefaultEquator.INSTANCE; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} Delegates to {@link Object#equals(Object)}. | ||
*/ | ||
public boolean equate(final T o1, final T o2) { | ||
return o1 == o2 || o1 != null && o1.equals(o2); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
* | ||
* @return <code>o.hashCode()</code> if <code>o</code> is non- | ||
* <code>null</code>, else {@link #HASHCODE_NULL}. | ||
*/ | ||
public int hash(final T o) { | ||
return o == null ? HASHCODE_NULL : o.hashCode(); | ||
} | ||
|
||
private Object readResolve() { | ||
return INSTANCE; | ||
} | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
zjsonpatch/src/main/java/org/apache/commons/collections4/Equator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright (C) 2015 Red Hat, Inc. | ||
* | ||
* 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.commons.collections4; | ||
|
||
/** | ||
* Ported from <a href= | ||
* "https://github.com/apache/commons-collections/blob/master/src/main/java/org/apache/commons/collections4/Equator.java">Apache | ||
* Commons Collections</a> | ||
*/ | ||
public interface Equator<T> { | ||
boolean equate(T o1, T o2); | ||
|
||
int hash(T o); | ||
} |
Oops, something went wrong.