Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
dc5962d
Bumping to 5.1.4-SNAPSHOT.
Craigacp Jun 23, 2020
cdde14b
Bumping the version of maven-deploy-plugin to 3.0.0-M1.
Craigacp Jun 23, 2020
5d7114b
Adding methods for transforming provenance objects into more human re…
Craigacp Jul 20, 2020
f858c7f
correctness fix, was using digest instead of update in ProvenanceUtil…
Craigacp Jul 21, 2020
5291662
Fixing charset issues.
Craigacp Jul 21, 2020
a53f39b
Fixing multithreading issues.
Craigacp Jul 21, 2020
8e00cdb
Fixing an unnecessary unboxing and reboxing.
Craigacp Jul 21, 2020
ca417be
Fixed issues with switch fallthrough, not checking for possible null …
Craigacp Jul 21, 2020
3fb22e2
Fixing unintentionally exposed mutable arrays.
Craigacp Jul 21, 2020
d8bafbf
Fixing issues with missing equals or hashCode.
Craigacp Jul 21, 2020
b132ea5
Fixing the display of map and list provenances in the formattedProven…
Craigacp Jul 21, 2020
fe5cec0
Merge pull request #3 from oracle/spotbugs-fixes
jhalexand Jul 23, 2020
72df01a
Merge pull request #2 from oracle/provenance-transforms
jhalexand Jul 23, 2020
422e97e
Changing the maven co-ordinates so the groupId is com.oracle.labs.olcut.
Craigacp Jul 31, 2020
4f98d74
Updating the docs with the new co-ordinates.
Craigacp Jul 31, 2020
7d1931e
Adding project information to OLCUT's pom.
Craigacp Jul 31, 2020
8ac0618
Adding deprecation annotations to the Jini dependent classes.
Craigacp Jul 31, 2020
08a1cf9
Removing an unnecessary sample.
Craigacp Jul 31, 2020
478e14e
Merge pull request #4 from oracle/maven-coords
jhalexand Jul 31, 2020
ea9f682
Updated dependency versions
jhalexand Aug 7, 2020
121170b
Create maven.yml to add CI actions (#6)
Craigacp Aug 10, 2020
aaeedaf
Small fixes to readme.
Craigacp Jul 31, 2020
f991b22
Stopping the various methods that use URLs from reading things remotely.
Craigacp Aug 12, 2020
cdc18e1
Bumping to 5.1.4
Craigacp Aug 12, 2020
801b71f
Removed wercker build
jhalexand Aug 12, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: OLCUT CI, OpenJDK 8, 11 and latest - Ubuntu x86_64

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# test against supported LTS versions and latest
java: [ 8, 11, 14 ]
name: OLCUT - OpenJDK ${{ matrix.java }}
steps:
- uses: actions/checkout@v2
- name: Setup OpenJDK
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Build with Maven
run: mvn -B package --file pom.xml
10 changes: 8 additions & 2 deletions README-Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ The configuration file defines an instance of a Pipeline that has two stages
in it - a LowPassFilter and an EchoCanceller. Each of the stages has their own
parameters specified as properties.

The Pipeline class that correspond to the component would look as follow:
The Pipeline class that corresponds to the component would look as follow:

```java
public class Pipeline implements Configurable {
Expand Down Expand Up @@ -329,10 +329,16 @@ Documentation about how to start a class server, run a registry, specify an
object as remote, provide `ConfigurationEntries`, deal with `RemoteComponentManager`
and `RemoteMultiComponentManager`, etc will eventually be added here.

OLCUT in general works fine with Java 9, but we have experienced some weird class
Remote loading in general works fine with Java 9+, but we have experienced some weird class
loader issues when using serialization in RMI calls with Jini in another project.
It's TBD on what the root cause is or how to fix it.

Note: remote components are currently deprecated as they depend on features
deprecated by the integration of [JEP 385](https://openjdk.java.net/jeps/385)
in Java 15. We are considering alternative approaches which will keep this
functionality, though it will likely be structured differently to the current
implementation.

## Other config formats

OLCUT 4.1 and above support json and edn (a Clojure based format) configuration files
Expand Down
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,27 @@ the needs of a varied user-base.
# Quick Start

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

[![wercker status](https://app.wercker.com/status/1615cf1d81ce750e730d50cec2309458/s/master "wercker status")](https://app.wercker.com/project/byKey/1615cf1d81ce750e730d50cec2309458)
Maven:
```xml
<dependency>
<groupId>com.oracle.labs.olcut</groupId>
<artifactId>olcut-core</artifactId>
<version>5.1.4</version>
</dependency>
```
or from Gradle:
```groovy
implementation 'com.oracle.labs.olcut:olcut-core:5.1.4'
```

The Jini-based remote configuration system in `olcut-config-jini` is deprecated as aspects of Jini are deprecated by
[JEP 385](https://openjdk.java.net/jeps/385). At the moment we don't have
a replacement approach which will function after the rmid tool is removed.

The `olcut-extras` artifact is designed as a small tool for developers, as such you should compile the appropriate
version based on your needs.

## Configuration System

Expand Down Expand Up @@ -208,7 +226,7 @@ Channel, File, & IO Utils | `ChannelUtil` has helpers for interacting with `java
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.
LRA Cache | An extennsion of a LinkedHashMap that acts as a least recently accessed cache.
Date Parser | The CDateParser can parse dates in almost 90 different formats that we've seen, returning a Java Date object without complaining.
Getopt | Getopt is now deprecated. Use [Options Processing](README-Options.md) instead. This is still here if you need something small and stupid simple.
Getopt | Getopt is now deprecated. Use [Options Processing](README-Options.md) instead. This is still here if you need something small and simple.
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.
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.
Timers | `StopWatch` and `NanoWatch` provide handy timers, at millisecond or nanosecond granularity.
Expand Down
17 changes: 17 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Reporting Security Vulnerabilities

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.

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\[email protected]](mailto:[email protected]) 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.

We ask that you do not use other channels or contact project contributors directly.

Non-vulnerability related security issues such as new great new ideas for security features are welcome on GitHub Issues.

### Security Updates, Alerts and Bulletins

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.

### Security-Related Information

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.
4 changes: 2 additions & 2 deletions olcut-config-edn/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.oracle.labs.mlrg.olcut</groupId>
<groupId>com.oracle.labs.olcut</groupId>
<artifactId>olcut</artifactId>
<version>${revision}</version>
<relativePath>..</relativePath>
Expand All @@ -58,7 +58,7 @@
<dependency>
<groupId>us.bpsm</groupId>
<artifactId>edn-java</artifactId>
<version>0.6.0</version>
<version>0.7.1</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import com.oracle.labs.mlrg.olcut.config.SerializedObject;
import com.oracle.labs.mlrg.olcut.config.property.SimpleProperty;
import com.oracle.labs.mlrg.olcut.config.io.URLLoader;
import com.oracle.labs.mlrg.olcut.util.IOUtil;
import us.bpsm.edn.EdnException;
import us.bpsm.edn.Keyword;
import us.bpsm.edn.Symbol;
Expand Down Expand Up @@ -174,6 +175,8 @@ public final void load(URL url) throws ConfigLoaderException {
() -> {
if (url.getProtocol().equals("file")) {
workingDir = new File(url.getFile()).getParent();
} else if (IOUtil.isDisallowedProtocol(url)) {
throw new ConfigLoaderException("Unable to load configurations from URLs with protocol: " + url.getProtocol());
} else {
workingDir = "";
}
Expand Down
2 changes: 1 addition & 1 deletion olcut-config-jini/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.oracle.labs.mlrg.olcut</groupId>
<groupId>com.oracle.labs.olcut</groupId>
<artifactId>olcut</artifactId>
<version>${revision}</version>
<relativePath>..</relativePath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
* A configurable container that can be used to register object proxies with a Jini
* registry.
*/
@Deprecated
public class ComponentRegistry implements Closeable, Configurable, DiscoveryListener,
ServiceDiscoveryListener, LeaseListener {
private static final Logger logger = Logger.getLogger(ComponentRegistry.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
* A configurable entry type that we can pass to a service registrar to
* enable service matching.
*/
@Deprecated
public class ConfigurationEntry extends AbstractEntry implements Configurable {

@Config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
*
* @see Configurable
*/
@Deprecated
public class JiniConfigurationManager extends ConfigurationManager {
private static final Logger logger = Logger.getLogger(JiniConfigurationManager.class.getName());

Expand Down Expand Up @@ -471,6 +472,11 @@ public boolean equals(Object obj) {
return cm.getImmutableGlobalProperties().equals(getImmutableGlobalProperties());
}

@Override
public int hashCode() {
return super.hashCode();
}

@Override
protected <T extends Configurable> ServablePropertySheet<T> createPropertySheet(T conf, ConfigurationManager cm, ConfigurationData rpd) {
return new ServablePropertySheet<>(conf,(JiniConfigurationManager)cm,rpd);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/*
* Copyright (c) 2004-2020, Oracle and/or its affiliates.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/*
* Copyright (c) 2004-2020, Oracle and/or its affiliates.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,16 @@ public ConfigurationEntry[] getEntries() {
return entries;
}

@Override
public boolean equals(Object other) {
return super.equals(other);
}

@Override
public int hashCode() {
return super.hashCode();
}

@Override
public synchronized T getOwner(ComponentListener<T> cl, boolean reuseComponent) {
if (!isInstantiated() || !reuseComponent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,11 @@
/**
* Provides a configuration system which can lookup objects remotely
* using Jini and RMI. Full of magic.
* <p>
* This package is currently deprecated as the integration of JEP 385
* into Java 15 deprecated some RMI features we rely upon. We're
* considering how to achieve similar functionality using different
* technologies.
*/
@Deprecated
package com.oracle.labs.mlrg.olcut.config.remote;
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
*
* @author stgreen
*/
@Deprecated
public class DebugILFactory extends BasicILFactory {

private static final Logger logger = Logger.getLogger(DebugILFactory.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
/**
* An invocation dispatcher that will keep track of debugging information.
*/
@Deprecated
public class DebugInvocationDispatcher extends BasicInvocationDispatcher {

Map<String, Integer> reportMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
/**
*
*/
@Deprecated
public class DebugInvocationHandler extends BasicInvocationHandler {

private static final Logger logger = Logger.getLogger(DebugInvocationHandler.class.getName());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/*
* Copyright (c) 2004-2020, Oracle and/or its affiliates.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/*
* Copyright (c) 2004-2020, Oracle and/or its affiliates.
*
Expand Down

This file was deleted.

Loading