Skip to content

Commit 617b93b

Browse files
bsboddenchayim
andauthored
release: release 0.6.0 (#99)
* 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 <[email protected]>
1 parent abd7b2e commit 617b93b

File tree

54 files changed

+454
-369
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+454
-369
lines changed

.github/wordlist.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ runtime
2323
Redis
2424
redis
2525
Gradle
26+
De
27+
Lio

.github/workflows/integration.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
build:
1010
strategy:
1111
matrix:
12-
platform: [ubuntu-latest, macos-latest, windows-latest]
12+
platform: [ubuntu-latest]
1313
runs-on: ${{ matrix.platform }}
1414

1515
steps:
@@ -19,17 +19,18 @@ jobs:
1919
with:
2020
path: |
2121
~/.mv2/repository
22-
key: om-${{hashFiles('**/pom.xml')}}
22+
key: om-${{hashFiles('**/pom.xml')}}
2323

2424
- name: Set up JDK 11
2525
uses: actions/setup-java@v1
2626
with:
2727
java-version: 11
2828
- run: mvn dependency:go-offline
2929
- name: Build
30-
run: mvn integration-test
31-
- name: cobertura
32-
run: mvn cobertura:cobertura
30+
run: mvn clean process-test-classes verify
31+
# TODO: needs to be replaced with Jacoco (Cobertura does not work with JDK 11+)
32+
# - name: cobertura
33+
# run: mvn cobertura:cobertura
3334
- name: codecov
3435
run: |
3536
curl -s https://raw.githubusercontent.com/codecov/codecov-bash/master/codecov

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

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

19-
| Project Stage | Release | Snapshot | Issues | Resolution | Code QL | License |
20-
| --- | --- | --- | --- | --- | --- | --- |
21-
| [![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] |
19+
| Project Stage | Release | Snapshot | Issues | Resolution | Code QL | License | SDR Version
20+
| --- | --- | --- | --- | --- | --- | --- | --- |
21+
| [![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] |
2222

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

404405
<!-- Links -->
405406

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

420422

421423

demos/roms-documents/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<dependency>
3232
<groupId>com.redis.om</groupId>
3333
<artifactId>redis-om-spring</artifactId>
34-
<version>0.5.1</version>
34+
<version>0.6.0</version>
3535
</dependency>
3636
<dependency>
3737
<groupId>org.springframework.boot</groupId>

demos/roms-hashes/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<dependency>
3030
<groupId>com.redis.om</groupId>
3131
<artifactId>redis-om-spring</artifactId>
32-
<version>0.5.1</version>
32+
<version>0.6.0</version>
3333
</dependency>
3434
<dependency>
3535
<groupId>org.springframework.boot</groupId>

demos/roms-permits/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<dependency>
3333
<groupId>com.redis.om</groupId>
3434
<artifactId>redis-om-spring</artifactId>
35-
<version>0.5.1</version>
35+
<version>0.6.0</version>
3636
</dependency>
3737

3838
<dependency>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>com.redis.om</groupId>
77
<artifactId>redis-om-spring-parent</artifactId>
8-
<version>0.5.1</version>
8+
<version>0.6.0</version>
99
<name>redis-om-spring-parent</name>
1010
<packaging>pom</packaging>
1111

redis-om-spring/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<groupId>com.redis.om</groupId>
99
<artifactId>redis-om-spring</artifactId>
10-
<version>0.5.1</version>
10+
<version>0.6.0</version>
1111
<packaging>jar</packaging>
1212

1313
<name>redis-om-spring</name>

redis-om-spring/src/main/java/com/redis/om/spring/RedisEnhancedKeyValueAdapter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ public void deleteAllOf(String keyspace) {
258258
* @return never {@literal null}.
259259
* @since 2.5
260260
*/
261+
@Override
261262
public <T> List<T> getAllOf(String keyspace, Class<T> type, long offset, int rows) {
262263
byte[] binKeyspace = toBytes(keyspace);
263264

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

286+
@Override
285287
public void update(PartialUpdate<?> update) {
286288

287289
RedisPersistentEntity<?> entity = this.converter.getMappingContext()

redis-om-spring/src/main/java/com/redis/om/spring/RedisModulesConfiguration.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ private void createIndicesFor(Class<?> cls, ApplicationContext ac) {
192192
RedisMappingContext mappingContext = (RedisMappingContext) ac.getBean("keyValueMappingContext");
193193
KeyspaceToIndexMap keyspaceToIndexMap = (KeyspaceToIndexMap) ac.getBean("keyspaceToIndexMap");
194194

195-
Set<BeanDefinition> beanDefs = new HashSet<BeanDefinition>();
195+
Set<BeanDefinition> beanDefs = new HashSet<>();
196196
beanDefs.addAll(getBeanDefinitionsFor(ac, cls));
197197

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

208-
List<Field> fields = new ArrayList<Field>();
208+
List<Field> fields = new ArrayList<>();
209209

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

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

294294
if (field.isAnnotationPresent(Indexed.class)) {
295295
logger.info(String.format("FOUND @Indexed annotation on field of type: %s", field.getType()));
@@ -600,8 +600,7 @@ private List<Field> getNestedField(String fieldPrefix, java.lang.reflect.Field f
600600
continue;
601601
}
602602
}
603-
fieldPrefix += tempPrefix;
604-
getNestedField(fieldPrefix, subField, prefix, fieldList);
603+
getNestedField(fieldPrefix+tempPrefix, subField, prefix, fieldList);
605604
}
606605
}
607606
return fieldList;

0 commit comments

Comments
 (0)