Skip to content

Commit

Permalink
release: release 0.6.0 (#99)
Browse files Browse the repository at this point in the history
* release: 0.6.0

* refactor: re-order Java modifiers per conventions

* refactor: use Collections.emptyList() instead of Collections.EMPTY_LIST

* refactor: use the diamond operator ("<>") to reduce the verbosity of generics code (SonarLint java:S2293)

* refactor: lambdas should be replaced with method references (SonarLint java:S1612)

* refactor: chained AssertJ assertions should be simplified to the corresponding dedicated assertion (SonarLint java:S5838)

* refactor: consecutive AssertJ "assertThat" statements should be chained (SonarLint java:S5853)

* refactor: Strings should not be concatenated using '+' in a loop (SonarLint java:S1643)

* refactor: boxed "Boolean" should be avoided in boolean expressions (SonarLint java:S5411)

* refactor: "equals(Object obj)" should be overridden along with the "compareTo(T obj)" method (SonarLint java:S1210)

* refactor: boxing and unboxing should not be immediately reversed (SonarLint java:S2153)

* refactor: "equals(Object obj)" and "hashCode()" should be overridden in pairs (SonarLint java:S1206)

* refactor: deprecated code should be removed (java:S1133)

* refactor: utility classes should not have public constructors (SonarLint java:S1118)

* refactor: "@OverRide" should be used on overriding and implementing methods (SonarLint java:S1161)

* refactor: optional value should only be accessed after calling isPresent() (SonarLint java:S3655)

* fix: second class type in Pair not properly declared in getFirstGetter

* refactor: constructors of an "abstract" class should not be declared "public" (SonarLint java:S5993)

* docs: add Spring Data Redis dependent version to README

* ci: update wordlist for spellchecker action

* refactor: clean up the wording on metamodel generator messages

* fixing syntax

* ci: update maven commands in integration workflow

* test: skip test-containers-based tests if docker is not available

* ci: update targets in integration workflow

Co-authored-by: Chayim I. Kirshen <c@kirshen.com>
  • Loading branch information
bsbodden and chayim committed Sep 2, 2022
1 parent abd7b2e commit 617b93b
Show file tree
Hide file tree
Showing 54 changed files with 454 additions and 369 deletions.
2 changes: 2 additions & 0 deletions .github/wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ runtime
Redis
redis
Gradle
De
Lio
11 changes: 6 additions & 5 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
build:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}

steps:
Expand All @@ -19,17 +19,18 @@ jobs:
with:
path: |
~/.mv2/repository
key: om-${{hashFiles('**/pom.xml')}}
key: om-${{hashFiles('**/pom.xml')}}

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- run: mvn dependency:go-offline
- name: Build
run: mvn integration-test
- name: cobertura
run: mvn cobertura:cobertura
run: mvn clean process-test-classes verify
# TODO: needs to be replaced with Jacoco (Cobertura does not work with JDK 11+)
# - name: cobertura
# run: mvn cobertura:cobertura
- name: codecov
run: |
curl -s https://raw.githubusercontent.com/codecov/codecov-bash/master/codecov
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

**Redis OM Spring** extends [Spring Data Redis](https://spring.io/projects/spring-data-redis) to take full advantage of the power of Redis.

| Project Stage | Release | Snapshot | Issues | Resolution | Code QL | License |
| --- | --- | --- | --- | --- | --- | --- |
| [![Project stage][badge-Stage]][badge-stage-page] | [![Releases][badge-releases]][link-releases] | [![Snapshots][badge-snapshots]][link-snapshots] | [![Percentage of issues still open][badge-open-issues]][open-issues] | [![Average time to resolve an issue][badge-issue-resolution]][issue-resolution] | [![CodeQL][badge-codeql]][badge-codeql-page] | [![License][license-image]][license-url] |
| Project Stage | Release | Snapshot | Issues | Resolution | Code QL | License | SDR Version
| --- | --- | --- | --- | --- | --- | --- | --- |
| [![Project stage][badge-Stage]][badge-stage-page] | [![Releases][badge-releases]][link-releases] | [![Snapshots][badge-snapshots]][link-snapshots] | [![Percentage of issues still open][badge-open-issues]][open-issues] | [![Average time to resolve an issue][badge-issue-resolution]][issue-resolution] | [![CodeQL][badge-codeql]][badge-codeql-page] | [![License][license-image]][license-url] | [![SDR Version][sdr-badge-releases]][sdr-link-releases] |

<details>
<summary><strong>Table of contents</strong></summary>
Expand Down Expand Up @@ -400,6 +400,7 @@ Redis OM uses the [MIT license][license-url].
[badge-codeql-page]: https://github.com/redis/redis-om-spring/actions/workflows/codeql-analysis.yml
[license-image]: https://img.shields.io/github/license/redis/redis-om-spring
[license-url]: LICENSE
[sdr-badge-releases]: https://img.shields.io/maven-central/v/org.springframework.data/spring-data-redis/2.7.2

<!-- Links -->

Expand All @@ -416,6 +417,7 @@ Redis OM uses the [MIT license][license-url].
[open-issues]: http://isitmaintained.com/project/redis/redis-om-spring
[issue-resolution]: http://isitmaintained.com/project/redis/redis-om-spring
[redisearch-wjson]: https://github.com/redislabs-training/mod-devcap-redisjson-getting-started/blob/master/articles/QuickStart-RediSearchWithJSON.md
[sdr-link-releases]: https://repo1.maven.org/maven2/org/springframework/data/spring-data-redis/2.7.2/



Expand Down
2 changes: 1 addition & 1 deletion demos/roms-documents/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<dependency>
<groupId>com.redis.om</groupId>
<artifactId>redis-om-spring</artifactId>
<version>0.5.1</version>
<version>0.6.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
2 changes: 1 addition & 1 deletion demos/roms-hashes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<dependency>
<groupId>com.redis.om</groupId>
<artifactId>redis-om-spring</artifactId>
<version>0.5.1</version>
<version>0.6.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
2 changes: 1 addition & 1 deletion demos/roms-permits/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<dependency>
<groupId>com.redis.om</groupId>
<artifactId>redis-om-spring</artifactId>
<version>0.5.1</version>
<version>0.6.0</version>
</dependency>

<dependency>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.redis.om</groupId>
<artifactId>redis-om-spring-parent</artifactId>
<version>0.5.1</version>
<version>0.6.0</version>
<name>redis-om-spring-parent</name>
<packaging>pom</packaging>

Expand Down
2 changes: 1 addition & 1 deletion redis-om-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<groupId>com.redis.om</groupId>
<artifactId>redis-om-spring</artifactId>
<version>0.5.1</version>
<version>0.6.0</version>
<packaging>jar</packaging>

<name>redis-om-spring</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ public void deleteAllOf(String keyspace) {
* @return never {@literal null}.
* @since 2.5
*/
@Override
public <T> List<T> getAllOf(String keyspace, Class<T> type, long offset, int rows) {
byte[] binKeyspace = toBytes(keyspace);

Expand All @@ -282,6 +283,7 @@ public <T> List<T> getAllOf(String keyspace, Class<T> type, long offset, int row
return result;
}

@Override
public void update(PartialUpdate<?> update) {

RedisPersistentEntity<?> entity = this.converter.getMappingContext()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ private void createIndicesFor(Class<?> cls, ApplicationContext ac) {
RedisMappingContext mappingContext = (RedisMappingContext) ac.getBean("keyValueMappingContext");
KeyspaceToIndexMap keyspaceToIndexMap = (KeyspaceToIndexMap) ac.getBean("keyspaceToIndexMap");

Set<BeanDefinition> beanDefs = new HashSet<BeanDefinition>();
Set<BeanDefinition> beanDefs = new HashSet<>();
beanDefs.addAll(getBeanDefinitionsFor(ac, cls));

logger.info(String.format("Found %s @%s annotated Beans...", beanDefs.size(), cls.getSimpleName()));
Expand All @@ -205,7 +205,7 @@ private void createIndicesFor(Class<?> cls, ApplicationContext ac) {
indexName = cl.getName() + "Idx";
logger.info(String.format("Found @%s annotated class: %s", cls.getSimpleName(), cl.getName()));

List<Field> fields = new ArrayList<Field>();
List<Field> fields = new ArrayList<>();

for (java.lang.reflect.Field field : cl.getDeclaredFields()) {
fields.addAll(findIndexFields(field, null, cls == Document.class));
Expand Down Expand Up @@ -289,7 +289,7 @@ private void createIndicesFor(Class<?> cls, ApplicationContext ac) {
}

private List<Field> findIndexFields(java.lang.reflect.Field field, String prefix, boolean isDocument) {
List<Field> fields = new ArrayList<Field>();
List<Field> fields = new ArrayList<>();

if (field.isAnnotationPresent(Indexed.class)) {
logger.info(String.format("FOUND @Indexed annotation on field of type: %s", field.getType()));
Expand Down Expand Up @@ -600,8 +600,7 @@ private List<Field> getNestedField(String fieldPrefix, java.lang.reflect.Field f
continue;
}
}
fieldPrefix += tempPrefix;
getNestedField(fieldPrefix, subField, prefix, fieldList);
getNestedField(fieldPrefix+tempPrefix, subField, prefix, fieldList);
}
}
return fieldList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ private void processSuggestionsForEntity(Object entity) {
if (inPayload) {
try {
if (payload == null) {
payload = new HashMap<String,Object>();
payload = new HashMap<>();
}
PropertyDescriptor pd = new PropertyDescriptor(field2.getName(), entity.getClass());
payload.put(field2.getName(), pd.getReadMethod().invoke(entity));
Expand Down
Loading

0 comments on commit 617b93b

Please sign in to comment.