#107 - Removed custom library with a fake Optional type.
Related ticket: DATACMNS-571.
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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>
|
||||
<artifactId>spring-data-java8-stub</artifactId>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.data.build</groupId>
|
||||
<artifactId>spring-data-build</artifactId>
|
||||
<version>1.5.0.BUILD-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<name>Spring Data Build - Java 8 Stubs</name>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.1</version>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -1,47 +0,0 @@
|
||||
/*
|
||||
* Copyright 2014 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package java.util;
|
||||
|
||||
/**
|
||||
* Stub implementation of JDK 8's {@link Optional}.
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public final class Optional<T> {
|
||||
|
||||
private static final Optional<?> EMPTY = new Optional<Object>(null);
|
||||
|
||||
private final T value;
|
||||
|
||||
private Optional(T value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static <T> Optional<T> of(T value) {
|
||||
return new Optional<T>(value);
|
||||
}
|
||||
|
||||
public static <T> Optional<T> ofNullable(T value) {
|
||||
return value == null ? Optional.<T> empty() : of(value);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> Optional<T> empty() {
|
||||
Optional<T> t = (Optional<T>) EMPTY;
|
||||
return t;
|
||||
}
|
||||
}
|
||||
19
pom.xml
19
pom.xml
@@ -10,7 +10,7 @@
|
||||
<name>Spring Data Build</name>
|
||||
<description>Modules to centralize common resources and configuration for Spring Data Maven builds.</description>
|
||||
<url>https://github.com/SpringData/spring-data-build</url>
|
||||
|
||||
|
||||
<organization>
|
||||
<name>Pivotal Software, Inc.</name>
|
||||
<url>http://www.spring.io</url>
|
||||
@@ -18,11 +18,10 @@
|
||||
|
||||
<modules>
|
||||
<module>resources</module>
|
||||
<module>java8</module>
|
||||
<module>parent</module>
|
||||
<module>bom</module>
|
||||
</modules>
|
||||
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<id>ogierke</id>
|
||||
@@ -36,20 +35,20 @@
|
||||
<timezone>+1</timezone>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>Apache License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
|
||||
<comments>
|
||||
Copyright 2010 the original author or authors.
|
||||
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
@@ -59,16 +58,16 @@
|
||||
</comments>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
|
||||
<scm>
|
||||
<url>https://github.com/SpringSource/spring-data-build</url>
|
||||
<connection>scm:git:git://github.com/SpringSource/spring-data-build.git</connection>
|
||||
<developerConnection>scm:git:ssh://git@github.com:SpringSource/spring-data-build.git</developerConnection>
|
||||
</scm>
|
||||
|
||||
|
||||
<issueManagement>
|
||||
<system>GitHub</system>
|
||||
<url>https://github.com/SpringSource/spring-data-build/issues</url>
|
||||
</issueManagement>
|
||||
|
||||
|
||||
</project>
|
||||
|
||||
Reference in New Issue
Block a user