Skip to content

Commit 9bbdd46

Browse files
authored
Merge pull request #9 from oracle/develop
Release 5.1.4
2 parents b3c6c8c + 801b71f commit 9bbdd46

Some content is hidden

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

44 files changed

+605
-492
lines changed

.github/workflows/maven.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
# This workflow will build a Java project with Maven
3+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
4+
5+
name: OLCUT CI, OpenJDK 8, 11 and latest - Ubuntu x86_64
6+
7+
on:
8+
push:
9+
branches: [ main, develop ]
10+
pull_request:
11+
branches: [ main, develop ]
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
# test against supported LTS versions and latest
19+
java: [ 8, 11, 14 ]
20+
name: OLCUT - OpenJDK ${{ matrix.java }}
21+
steps:
22+
- uses: actions/checkout@v2
23+
- name: Setup OpenJDK
24+
uses: actions/setup-java@v1
25+
with:
26+
java-version: ${{ matrix.java }}
27+
- name: Build with Maven
28+
run: mvn -B package --file pom.xml

README-Configuration.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The configuration file defines an instance of a Pipeline that has two stages
4141
in it - a LowPassFilter and an EchoCanceller. Each of the stages has their own
4242
parameters specified as properties.
4343

44-
The Pipeline class that correspond to the component would look as follow:
44+
The Pipeline class that corresponds to the component would look as follow:
4545

4646
```java
4747
public class Pipeline implements Configurable {
@@ -329,10 +329,16 @@ Documentation about how to start a class server, run a registry, specify an
329329
object as remote, provide `ConfigurationEntries`, deal with `RemoteComponentManager`
330330
and `RemoteMultiComponentManager`, etc will eventually be added here.
331331
332-
OLCUT in general works fine with Java 9, but we have experienced some weird class
332+
Remote loading in general works fine with Java 9+, but we have experienced some weird class
333333
loader issues when using serialization in RMI calls with Jini in another project.
334334
It's TBD on what the root cause is or how to fix it.
335335

336+
Note: remote components are currently deprecated as they depend on features
337+
deprecated by the integration of [JEP 385](https://openjdk.java.net/jeps/385)
338+
in Java 15. We are considering alternative approaches which will keep this
339+
functionality, though it will likely be structured differently to the current
340+
implementation.
341+
336342
## Other config formats
337343

338344
OLCUT 4.1 and above support json and edn (a Clojure based format) configuration files

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,27 @@ the needs of a varied user-base.
1616
# Quick Start
1717

1818
## Maven Coordinates
19-
Please check back soon as we are working out the logistics for publishing to Maven Central.
19+
OLCUT's main components (i.e. `olcut-core`, `olcut-config-json` and `olcut-config-edn`) are available on Maven Central.
2020

21-
[![wercker status](https://app.wercker.com/status/1615cf1d81ce750e730d50cec2309458/s/master "wercker status")](https://app.wercker.com/project/byKey/1615cf1d81ce750e730d50cec2309458)
21+
Maven:
22+
```xml
23+
<dependency>
24+
<groupId>com.oracle.labs.olcut</groupId>
25+
<artifactId>olcut-core</artifactId>
26+
<version>5.1.4</version>
27+
</dependency>
28+
```
29+
or from Gradle:
30+
```groovy
31+
implementation 'com.oracle.labs.olcut:olcut-core:5.1.4'
32+
```
33+
34+
The Jini-based remote configuration system in `olcut-config-jini` is deprecated as aspects of Jini are deprecated by
35+
[JEP 385](https://openjdk.java.net/jeps/385). At the moment we don't have
36+
a replacement approach which will function after the rmid tool is removed.
37+
38+
The `olcut-extras` artifact is designed as a small tool for developers, as such you should compile the appropriate
39+
version based on your needs.
2240

2341
## Configuration System
2442

@@ -208,7 +226,7 @@ Channel, File, & IO Utils | `ChannelUtil` has helpers for interacting with `java
208226
Log Formatter | There are two `java.util.logging log formatters` (`LabsLogFormatter` and `SimpleLabsLogFormatter` that have a nice single line logging output. They also have a static method that sets all the loggers to use the appropriate formatter, which makes integrating them simpler.
209227
LRA Cache | An extennsion of a LinkedHashMap that acts as a least recently accessed cache.
210228
Date Parser | The CDateParser can parse dates in almost 90 different formats that we've seen, returning a Java Date object without complaining.
211-
Getopt | Getopt is now deprecated. Use [Options Processing](README-Options.md) instead. This is still here if you need something small and stupid simple.
229+
Getopt | Getopt is now deprecated. Use [Options Processing](README-Options.md) instead. This is still here if you need something small and simple.
212230
Mutable Primitive Objects | Mutable types for Double, Long, and Number for use in, for example, Maps when you don't want to unbox and rebox the true primitives with every update.
213231
Pair | It's a pair class. The fields are final and it has equals and hash code so you can use it as a key in a map or store it in a set. Having Pair here greatly reduces the number of other places you have a Pair class defined.
214232
Timers | `StopWatch` and `NanoWatch` provide handy timers, at millisecond or nanosecond granularity.

SECURITY.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Reporting Security Vulnerabilities
2+
3+
Oracle values the independent security research community and believes that responsible disclosure of security vulnerabilities helps us ensure the security and privacy of all our users.
4+
5+
Please do NOT raise a GitHub Issue to report a security vulnerability. If you believe you have found a security vulnerability, please submit a report to [secalert\_us@oracle.com](mailto:secalert_us@oracle.com) preferably with a proof of concept. We provide additional information on [how to report security vulnerabilities to Oracle](https://www.oracle.com/corporate/security-practices/assurance/vulnerability/reporting.html) which includes public encryption keys for secure email.
6+
7+
We ask that you do not use other channels or contact project contributors directly.
8+
9+
Non-vulnerability related security issues such as new great new ideas for security features are welcome on GitHub Issues.
10+
11+
### Security Updates, Alerts and Bulletins
12+
13+
Security updates will be released on a regular cadence. Many of our projects will typically release security fixes in conjunction with the [Oracle Critical Patch Update](https://www.oracle.com/security-alerts/) program. Security updates are released on the Tuesday closest to the 17th day of January, April, July and October. A pre-release announcement will be published on the Thursday preceding each release. Additional information, including past advisories, is available on our [Security Alerts](https://www.oracle.com/security-alerts/) page.
14+
15+
### Security-Related Information
16+
17+
We will provide security related information such as a threat model, considerations for secure use, or any known security issues in our documentation. Please note that labs and sample code are intended to demonstrate a concept and may not be sufficiently hardened for production use.

olcut-config-edn/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3333
<modelVersion>4.0.0</modelVersion>
3434
<parent>
35-
<groupId>com.oracle.labs.mlrg.olcut</groupId>
35+
<groupId>com.oracle.labs.olcut</groupId>
3636
<artifactId>olcut</artifactId>
3737
<version>${revision}</version>
3838
<relativePath>..</relativePath>
@@ -58,7 +58,7 @@
5858
<dependency>
5959
<groupId>us.bpsm</groupId>
6060
<artifactId>edn-java</artifactId>
61-
<version>0.6.0</version>
61+
<version>0.7.1</version>
6262
</dependency>
6363
<dependency>
6464
<groupId>${project.groupId}</groupId>

olcut-config-edn/src/main/java/com/oracle/labs/mlrg/olcut/config/edn/EdnLoader.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
import com.oracle.labs.mlrg.olcut.config.SerializedObject;
4040
import com.oracle.labs.mlrg.olcut.config.property.SimpleProperty;
4141
import com.oracle.labs.mlrg.olcut.config.io.URLLoader;
42+
import com.oracle.labs.mlrg.olcut.util.IOUtil;
4243
import us.bpsm.edn.EdnException;
4344
import us.bpsm.edn.Keyword;
4445
import us.bpsm.edn.Symbol;
@@ -174,6 +175,8 @@ public final void load(URL url) throws ConfigLoaderException {
174175
() -> {
175176
if (url.getProtocol().equals("file")) {
176177
workingDir = new File(url.getFile()).getParent();
178+
} else if (IOUtil.isDisallowedProtocol(url)) {
179+
throw new ConfigLoaderException("Unable to load configurations from URLs with protocol: " + url.getProtocol());
177180
} else {
178181
workingDir = "";
179182
}

olcut-config-jini/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<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">
3131
<modelVersion>4.0.0</modelVersion>
3232
<parent>
33-
<groupId>com.oracle.labs.mlrg.olcut</groupId>
33+
<groupId>com.oracle.labs.olcut</groupId>
3434
<artifactId>olcut</artifactId>
3535
<version>${revision}</version>
3636
<relativePath>..</relativePath>

olcut-config-jini/src/main/java/com/oracle/labs/mlrg/olcut/config/remote/ComponentRegistry.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
* A configurable container that can be used to register object proxies with a Jini
9292
* registry.
9393
*/
94+
@Deprecated
9495
public class ComponentRegistry implements Closeable, Configurable, DiscoveryListener,
9596
ServiceDiscoveryListener, LeaseListener {
9697
private static final Logger logger = Logger.getLogger(ComponentRegistry.class.getName());

olcut-config-jini/src/main/java/com/oracle/labs/mlrg/olcut/config/remote/ConfigurationEntry.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
* A configurable entry type that we can pass to a service registrar to
3737
* enable service matching.
3838
*/
39+
@Deprecated
3940
public class ConfigurationEntry extends AbstractEntry implements Configurable {
4041

4142
@Config

olcut-config-jini/src/main/java/com/oracle/labs/mlrg/olcut/config/remote/JiniConfigurationManager.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
*
5656
* @see Configurable
5757
*/
58+
@Deprecated
5859
public class JiniConfigurationManager extends ConfigurationManager {
5960
private static final Logger logger = Logger.getLogger(JiniConfigurationManager.class.getName());
6061

@@ -471,6 +472,11 @@ public boolean equals(Object obj) {
471472
return cm.getImmutableGlobalProperties().equals(getImmutableGlobalProperties());
472473
}
473474

475+
@Override
476+
public int hashCode() {
477+
return super.hashCode();
478+
}
479+
474480
@Override
475481
protected <T extends Configurable> ServablePropertySheet<T> createPropertySheet(T conf, ConfigurationManager cm, ConfigurationData rpd) {
476482
return new ServablePropertySheet<>(conf,(JiniConfigurationManager)cm,rpd);

olcut-config-jini/src/main/java/com/oracle/labs/mlrg/olcut/config/remote/RemoteComponentManager.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/*
32
* Copyright (c) 2004-2020, Oracle and/or its affiliates.
43
*

olcut-config-jini/src/main/java/com/oracle/labs/mlrg/olcut/config/remote/RemoteMultiComponentManager.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/*
32
* Copyright (c) 2004-2020, Oracle and/or its affiliates.
43
*

olcut-config-jini/src/main/java/com/oracle/labs/mlrg/olcut/config/remote/ServablePropertySheet.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,16 @@ public ConfigurationEntry[] getEntries() {
111111
return entries;
112112
}
113113

114+
@Override
115+
public boolean equals(Object other) {
116+
return super.equals(other);
117+
}
118+
119+
@Override
120+
public int hashCode() {
121+
return super.hashCode();
122+
}
123+
114124
@Override
115125
public synchronized T getOwner(ComponentListener<T> cl, boolean reuseComponent) {
116126
if (!isInstantiated() || !reuseComponent) {

olcut-config-jini/src/main/java/com/oracle/labs/mlrg/olcut/config/remote/package-info.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,11 @@
2929
/**
3030
* Provides a configuration system which can lookup objects remotely
3131
* using Jini and RMI. Full of magic.
32+
* <p>
33+
* This package is currently deprecated as the integration of JEP 385
34+
* into Java 15 deprecated some RMI features we rely upon. We're
35+
* considering how to achieve similar functionality using different
36+
* technologies.
3237
*/
38+
@Deprecated
3339
package com.oracle.labs.mlrg.olcut.config.remote;

olcut-config-jini/src/main/java/com/oracle/labs/mlrg/olcut/jeri/DebugILFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
*
4545
* @author stgreen
4646
*/
47+
@Deprecated
4748
public class DebugILFactory extends BasicILFactory {
4849

4950
private static final Logger logger = Logger.getLogger(DebugILFactory.class.getName());

olcut-config-jini/src/main/java/com/oracle/labs/mlrg/olcut/jeri/DebugInvocationDispatcher.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
/**
4646
* An invocation dispatcher that will keep track of debugging information.
4747
*/
48+
@Deprecated
4849
public class DebugInvocationDispatcher extends BasicInvocationDispatcher {
4950

5051
Map<String, Integer> reportMap;

olcut-config-jini/src/main/java/com/oracle/labs/mlrg/olcut/jeri/DebugInvocationHandler.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
/**
4444
*
4545
*/
46+
@Deprecated
4647
public class DebugInvocationHandler extends BasicInvocationHandler {
4748

4849
private static final Logger logger = Logger.getLogger(DebugInvocationHandler.class.getName());

olcut-config-jini/src/main/java/com/oracle/labs/mlrg/olcut/service/ConfigurableService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/*
32
* Copyright (c) 2004-2020, Oracle and/or its affiliates.
43
*

olcut-config-jini/src/main/java/com/oracle/labs/mlrg/olcut/service/ConfigurableServiceStarter.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/*
32
* Copyright (c) 2004-2020, Oracle and/or its affiliates.
43
*

olcut-config-jini/src/main/java/com/oracle/labs/mlrg/olcut/service/sample/HelloClient.java

Lines changed: 0 additions & 76 deletions
This file was deleted.

0 commit comments

Comments
 (0)