Skip to content

Commit 501e010

Browse files
committed
Remove jul part, move everything else to pl.morgwai.base.util package
Also bump major version up.
1 parent 36509f7 commit 501e010

20 files changed

+68
-918
lines changed

README.md

+6-14
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,18 @@ Some utility classes.<br/>
55
**latest release: [1.16](https://search.maven.org/artifact/pl.morgwai.base/java-utils/1.16/jar)**
66
([javadoc](https://javadoc.io/doc/pl.morgwai.base/java-utils/1.16))
77

8+
**Note:** from version 2.0, `java.util.logging` utilities have been moved to a separate [repo](https://github.com/morgwai/jul-utils).
89

910
## MAIN USER CLASSES
1011

11-
### [OrderedConcurrentOutputBuffer](src/main/java/pl/morgwai/base/concurrent/OrderedConcurrentOutputBuffer.java)
12+
### [OrderedConcurrentOutputBuffer](src/main/java/pl/morgwai/base/util/concurrent/OrderedConcurrentOutputBuffer.java)
1213
Buffers messages sent to some output stream until all of those that should be written before are available, so that they all can be written in the correct order. Useful for processing input streams in several concurrent threads when order of response messages must reflect the order of request messages. See a usage example [here](https://github.com/morgwai/grpc-utils/blob/v3.1/src/main/java/pl/morgwai/base/grpc/utils/OrderedConcurrentInboundObserver.java).
1314

14-
### [ConcurrentUtils](src/main/java/pl/morgwai/base/concurrent/ConcurrentUtils.java)
15-
Some helper functions.
16-
17-
### [Awaitable](src/main/java/pl/morgwai/base/concurrent/Awaitable.java)
15+
### [Awaitable](src/main/java/pl/morgwai/base/util/concurrent/Awaitable.java)
1816
Utilities to await for multiple timed blocking operations, such as `Thread.join(timeout)`, `ExecutorService.awaitTermination(...)` etc. See a usage example [here](https://github.com/morgwai/grpc-utils/blob/v3.1/sample/src/main/java/pl/morgwai/samples/grpc/utils/SqueezedServer.java#L502).
1917

20-
### [JulFormatter](src/main/java/pl/morgwai/base/logging/JulFormatter.java)
21-
A text log formatter similar to `SimpleFormatter` that additionally allows to format stack trace elements and to add log sequence id and thread id to log entries.
22-
23-
### [JulConfig](src/main/java/pl/morgwai/base/logging/JulConfig.java)
24-
Utilities to manipulate `java.util.logging` config, among others allows to override log levels of `Logger`s and `Handler`s with values from system properties at startup in existing java apps without rebuilding: just add java-utils.jar to command-line class-path and define desired system properties.
25-
26-
### [JulManualResetLogManager](src/main/java/pl/morgwai/base/logging/JulManualResetLogManager.java)
27-
A LogManager that does not get reset automatically at JVM shutdown. Useful if logs from user shutdown hooks are important. See a usage example [here](https://github.com/morgwai/grpc-scopes/blob/v9.0/sample/src/main/java/pl/morgwai/samples/grpc/scopes/grpc/RecordStorageServer.java#L90).
18+
### [ConcurrentUtils](src/main/java/pl/morgwai/base/util/concurrent/ConcurrentUtils.java)
19+
Some helper functions.
2820

29-
### [NoCopyByteArrayOutputStream](src/main/java/pl/morgwai/base/util/NoCopyByteArrayOutputStream.java)
21+
### [NoCopyByteArrayOutputStream](src/main/java/pl/morgwai/base/util/io/NoCopyByteArrayOutputStream.java)
3022
A `ByteArrayOutputStream` that allows to directly access its underlying buffer after the stream was closed.

build.gradle.header

-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ java {
99
targetCompatibility = JavaVersion.VERSION_11
1010
}
1111

12-
test {
13-
systemProperty "java.util.logging.manager", "pl.morgwai.base.logging.JulManualResetLogManager"
14-
}
15-
1612
repositories {
1713
mavenLocal()
1814
mavenCentral()

pom.xml

+2-10
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>pl.morgwai.base</groupId>
88
<artifactId>java-utils</artifactId>
9-
<version>1.17-SNAPSHOT</version>
9+
<version>2.0-SNAPSHOT</version>
1010

1111
<name>Java utils</name>
1212
<description>Some utility classes</description>
@@ -29,7 +29,7 @@
2929
<id>morgwai</id>
3030
<name>Piotr Morgwai Kotarbinski</name>
3131
<email>[email protected]</email>
32-
<url>http://morgwai.pl/</url>
32+
<url>https://morgwai.pl/</url>
3333
</developer>
3434
</developers>
3535

@@ -138,14 +138,6 @@
138138
</execution>
139139
</executions>
140140
</plugin>
141-
<plugin>
142-
<groupId>org.apache.maven.plugins</groupId>
143-
<artifactId>maven-surefire-plugin</artifactId>
144-
<configuration>
145-
<!-- TODO: ideally this should be set only for JulManualResetLogManagerTest -->
146-
<argLine>-Djava.util.logging.manager=pl.morgwai.base.logging.JulManualResetLogManager</argLine>
147-
</configuration>
148-
</plugin>
149141
</plugins>
150142
</build>
151143
</project>

src/main/java/pl/morgwai/base/logging/JulConfig.java

-213
This file was deleted.

0 commit comments

Comments
 (0)