Skip to content

Commit

Permalink
Release 4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
technicalguru committed Feb 22, 2023
2 parents 5299162 + a852bed commit bfcab3e
Show file tree
Hide file tree
Showing 31 changed files with 6,629 additions and 20 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Most of this code was created when I faced specific problems in my professional
RS Library modules are maintained in the same Maven project and, hence, follow the same release cycle. That means that each modules will have the same version numbers and are published at the same time.

## Latest Version
Latest version is 4.0.6.
Latest version is 4.1.0.

## Upgrading v3 to v4
V4 is a major release that removes several deprecated or old classes. This includes the ``RsDate`` class and its descendants as well as some bean helper classes. They can be easily replaced nowadays with other standard libraries such as the Java Time API or commons-beans or alike.
Expand Down
5 changes: 5 additions & 0 deletions baselib/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
<attribute name="m2e-apt" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
<attributes>
<attribute name="optional" value="true"/>
Expand Down
1 change: 1 addition & 0 deletions baselib/.factorypath
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-core/2.19.0/log4j-core-2.19.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/apache/logging/log4j/log4j-slf4j-impl/2.19.0/log4j-slf4j-impl-2.19.0.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/jsoup/jsoup/1.15.3/jsoup-1.15.3.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="PLUGIN" id="org.eclipse.jst.ws.annotations.core" enabled="false" runInBatchMode="false"/>
</factorypath>
8 changes: 7 additions & 1 deletion baselib/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>eu.ralph-schuster</groupId>
<artifactId>libs</artifactId>
<version>4.0.6</version>
<version>4.1.0</version>
</parent>

<properties>
Expand Down Expand Up @@ -77,6 +77,12 @@
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.19.0</version>
</dependency>
<!-- HTML cleaning -->
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.15.3</version>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* License along with RS Library. If not, see
* <http://www.gnu.org/licenses/lgpl-3.0.html>.
*/
package rs.baselib.util;
package rs.baselib.cache;

import java.util.Collection;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* License along with RS Library. If not, see
* <http://www.gnu.org/licenses/lgpl-3.0.html>.
*/
package rs.baselib.util;
package rs.baselib.cache;

import java.lang.ref.Reference;
import java.lang.ref.ReferenceQueue;
Expand All @@ -27,6 +27,8 @@
import java.util.Map;
import java.util.Set;

import rs.baselib.util.CommonUtils;

/**
* A cache implementation using a {@link HashMap} with {@link SoftReference}s.
* @author ralph
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* License along with RS Library. If not, see
* <http://www.gnu.org/licenses/lgpl-3.0.html>.
*/
package rs.baselib.util;
package rs.baselib.cache;

import java.lang.ref.Reference;
import java.lang.ref.ReferenceQueue;
Expand All @@ -27,6 +27,8 @@
import java.util.Map;
import java.util.Set;

import rs.baselib.util.CommonUtils;

/**
* A cache implementation using a {@link HashMap} with {@link WeakReference}s.
* @author ralph
Expand Down
1 change: 1 addition & 0 deletions baselib/src/main/java/rs/baselib/cache/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package rs.baselib.cache;
24 changes: 24 additions & 0 deletions baselib/src/main/java/rs/baselib/test/BuilderUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,22 @@ public static <T> List<T> listOf(int count, Builder<T> builder) {
return rc;
}

/**
* Returns an array of objects.
* @param count the number of objects to create
* @param builder the builder to be used
* @param <T> type of objects to be built
* @return the array of objects built
*/
@SuppressWarnings("unchecked")
public static <T> T[] arrayOf(int count, Builder<T> builder) {
List<T> rc = new ArrayList<>();
for (int i=0; i<count; i++) {
rc.add(builder.build());
}
return (T[])listOf(count, builder).toArray();
}

/**
* Returns the String Builder factory.
* @return the builder for strings.
Expand All @@ -77,5 +93,13 @@ public static <T> List<T> listOf(int count, Builder<T> builder) {
return new LongBuilder();
}

/**
* Returns the Person Builder factory.
* @return the builder for Persons.
*/
public static PersonBuilder $Person() {
return new PersonBuilder();
}


}
Loading

0 comments on commit bfcab3e

Please sign in to comment.