Author: fmui
Date: Mon Aug 14 14:04:41 2017
New Revision: 1804997
URL: http://svn.apache.org/viewvc?rev=1804997&view=rev
Log:
improvements for Java 9
Added:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/JavaDetector.java
(with props)
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-bridge/chemistry-opencmis-bridge/src/main/java/org/apache/chemistry/opencmis/bridge/httpsession/HttpSessionBridgeServiceFactory.java
chemistry/opencmis/trunk/chemistry-opencmis-bridge/chemistry-opencmis-bridge/src/main/java/org/apache/chemistry/opencmis/bridge/lrucache/LruCacheBridgeServiceFactory.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/SessionFactoryFinder.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/cache/impl/CacheImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/CmisBindingImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/CmisBindingsHelper.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/http/DelayingHttpInvoker.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/CmisLocalSpi.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/CmisWebServicesSpi.java
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLUtils.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/CmisRepositoryContextListener.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/AbstractCmisHttpServlet.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoreManagerFactory.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoreManagerImpl.java
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactory.java
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/runner/AbstractRunner.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/pom.xml
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientFrame.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ConsoleHelper.java
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/runscript.bat
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/runscript.sh
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/workbench.bat
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/workbench.sh
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-bridge/chemistry-opencmis-bridge/src/main/java/org/apache/chemistry/opencmis/bridge/httpsession/HttpSessionBridgeServiceFactory.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-bridge/chemistry-opencmis-bridge/src/main/java/org/apache/chemistry/opencmis/bridge/httpsession/HttpSessionBridgeServiceFactory.java?rev=1804997&r1=1804996&r2=1804997&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-bridge/chemistry-opencmis-bridge/src/main/java/org/apache/chemistry/opencmis/bridge/httpsession/HttpSessionBridgeServiceFactory.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-bridge/chemistry-opencmis-bridge/src/main/java/org/apache/chemistry/opencmis/bridge/httpsession/HttpSessionBridgeServiceFactory.java
Mon Aug 14 14:04:41 2017
@@ -33,7 +33,7 @@ public class HttpSessionBridgeServiceFac
protected FilterCmisService createService(CallContext context) {
HttpSessionCmisService service = null;
try {
- service = (HttpSessionCmisService) getServiceClass().newInstance();
+ service = (HttpSessionCmisService)
getServiceClass().getDeclaredConstructor().newInstance();
} catch (Exception e) {
throw new CmisRuntimeException("Could not create service instance:
" + e, e);
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-bridge/chemistry-opencmis-bridge/src/main/java/org/apache/chemistry/opencmis/bridge/lrucache/LruCacheBridgeServiceFactory.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-bridge/chemistry-opencmis-bridge/src/main/java/org/apache/chemistry/opencmis/bridge/lrucache/LruCacheBridgeServiceFactory.java?rev=1804997&r1=1804996&r2=1804997&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-bridge/chemistry-opencmis-bridge/src/main/java/org/apache/chemistry/opencmis/bridge/lrucache/LruCacheBridgeServiceFactory.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-bridge/chemistry-opencmis-bridge/src/main/java/org/apache/chemistry/opencmis/bridge/lrucache/LruCacheBridgeServiceFactory.java
Mon Aug 14 14:04:41 2017
@@ -40,8 +40,8 @@ public class LruCacheBridgeServiceFactor
int size = 0;
try {
String sizeStr = parameters.get(CACHE_SIZE);
- size = sizeStr == null || sizeStr.trim().length() == 0 ?
DEFAULT_CACHE_SIZE : Integer.parseInt(sizeStr
- .trim());
+ size = sizeStr == null || sizeStr.trim().length() == 0 ?
DEFAULT_CACHE_SIZE
+ : Integer.parseInt(sizeStr.trim());
} catch (NumberFormatException e) {
throw new RuntimeException("Could not parse cache configuration
values: " + e.getMessage(), e);
}
@@ -53,7 +53,7 @@ public class LruCacheBridgeServiceFactor
protected FilterCmisService createService(CallContext context) {
LruCacheCmisService service = null;
try {
- service = (LruCacheCmisService) getServiceClass().newInstance();
+ service = (LruCacheCmisService)
getServiceClass().getDeclaredConstructor().newInstance();
} catch (Exception e) {
throw new CmisRuntimeException("Could not create service instance:
" + e, e);
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/SessionFactoryFinder.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/SessionFactoryFinder.java?rev=1804997&r1=1804996&r2=1804997&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/SessionFactoryFinder.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-api/src/main/java/org/apache/chemistry/opencmis/client/SessionFactoryFinder.java
Mon Aug 14 14:04:41 2017
@@ -195,7 +195,7 @@ public final class SessionFactoryFinder
}
try {
- result = (SessionFactory) clazz.newInstance();
+ result = (SessionFactory)
clazz.getDeclaredConstructor().newInstance();
} catch (Exception e) {
throw new InstantiationException("Could not create
SessionFactory object!");
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/cache/impl/CacheImpl.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/cache/impl/CacheImpl.java?rev=1804997&r1=1804996&r2=1804997&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/cache/impl/CacheImpl.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/cache/impl/CacheImpl.java
Mon Aug 14 14:04:41 2017
@@ -308,7 +308,7 @@ public class CacheImpl implements Cache
Class<?> clazz = levels.get(level);
CacheLevel cacheLevel = null;
try {
- cacheLevel = (CacheLevel) clazz.newInstance();
+ cacheLevel = (CacheLevel)
clazz.getDeclaredConstructor().newInstance();
} catch (Exception e) {
throw new IllegalArgumentException("Cache level problem?!", e);
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/CmisBindingImpl.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/CmisBindingImpl.java?rev=1804997&r1=1804996&r2=1804997&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/CmisBindingImpl.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/CmisBindingImpl.java
Mon Aug 14 14:04:41 2017
@@ -95,7 +95,8 @@ public final class CmisBindingImpl imple
Object authProviderObj = null;
try {
- authProviderObj =
ClassLoaderUtil.loadClass(authProviderClassName).newInstance();
+ authProviderObj =
ClassLoaderUtil.loadClass(authProviderClassName).getDeclaredConstructor()
+ .newInstance();
} catch (Exception e) {
throw new IllegalArgumentException("Could not load
authentication provider: " + e, e);
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/CmisBindingsHelper.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/CmisBindingsHelper.java?rev=1804997&r1=1804996&r2=1804997&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/CmisBindingsHelper.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/impl/CmisBindingsHelper.java
Mon Aug 14 14:04:41 2017
@@ -126,7 +126,7 @@ public final class CmisBindingsHelper {
// ok, we have to create it...
try {
String invokerName = (String)
session.get(SessionParameter.HTTP_INVOKER_CLASS);
- invoker = (HttpInvoker)
ClassLoaderUtil.loadClass(invokerName).newInstance();
+ invoker = (HttpInvoker)
ClassLoaderUtil.loadClass(invokerName).getDeclaredConstructor().newInstance();
} catch (CmisBaseException e) {
throw e;
} catch (Exception e) {
@@ -195,7 +195,8 @@ public final class CmisBindingsHelper {
// ok, we have to create it...
try {
String cacheName = (String)
session.get(SessionParameter.TYPE_DEFINITION_CACHE_CLASS);
- cache = (TypeDefinitionCache)
ClassLoaderUtil.loadClass(cacheName).newInstance();
+ cache = (TypeDefinitionCache)
ClassLoaderUtil.loadClass(cacheName).getDeclaredConstructor()
+ .newInstance();
cache.initialize(session);
} catch (CmisBaseException e) {
throw e;
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/http/DelayingHttpInvoker.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/http/DelayingHttpInvoker.java?rev=1804997&r1=1804996&r2=1804997&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/http/DelayingHttpInvoker.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/http/DelayingHttpInvoker.java
Mon Aug 14 14:04:41 2017
@@ -143,7 +143,8 @@ public class DelayingHttpInvoker impleme
if (invokerName == null) {
invoker = new DefaultHttpInvoker();
} else {
- invoker = (HttpInvoker)
ClassLoaderUtil.loadClass(invokerName).newInstance();
+ invoker = (HttpInvoker)
ClassLoaderUtil.loadClass(invokerName).getDeclaredConstructor()
+ .newInstance();
}
} catch (CmisBaseException e) {
throw e;
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/CmisLocalSpi.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/CmisLocalSpi.java?rev=1804997&r1=1804996&r2=1804997&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/CmisLocalSpi.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/local/CmisLocalSpi.java
Mon Aug 14 14:04:41 2017
@@ -85,7 +85,8 @@ public class CmisLocalSpi implements Cmi
}
// create and initialize factory
- factory = (CmisServiceFactory)
ClassLoaderUtil.loadClass(serviceFactoryClassname).newInstance();
+ factory = (CmisServiceFactory)
ClassLoaderUtil.loadClass(serviceFactoryClassname).getDeclaredConstructor()
+ .newInstance();
factory.init(parameters);
} catch (Exception e) {
throw new CmisConnectionException("Factory cannot be created: " +
e.getMessage(), e);
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/CmisWebServicesSpi.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/CmisWebServicesSpi.java?rev=1804997&r1=1804996&r2=1804997&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/CmisWebServicesSpi.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/webservices/CmisWebServicesSpi.java
Mon Aug 14 14:04:41 2017
@@ -117,7 +117,7 @@ public class CmisWebServicesSpi implemen
Object portProviderObj = null;
try {
- portProviderObj =
ClassLoaderUtil.loadClass(portProviderClass).newInstance();
+ portProviderObj =
ClassLoaderUtil.loadClass(portProviderClass).getDeclaredConstructor().newInstance();
} catch (Exception e) {
throw new IllegalArgumentException("Could not load port
provider: " + e, e);
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java?rev=1804997&r1=1804996&r2=1804997&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/SessionImpl.java
Mon Aug 14 14:04:41 2017
@@ -231,7 +231,7 @@ public class SessionImpl implements Sess
objectFactoryClass = ClassLoaderUtil.loadClass(classname);
}
- Object of = objectFactoryClass.newInstance();
+ Object of =
objectFactoryClass.getDeclaredConstructor().newInstance();
if (!(of instanceof ObjectFactory)) {
throw new InstantiationException("Class does not implement
ObjectFactory!");
}
@@ -255,7 +255,7 @@ public class SessionImpl implements Sess
cacheClass = ClassLoaderUtil.loadClass(classname);
}
- Object of = cacheClass.newInstance();
+ Object of = cacheClass.getDeclaredConstructor().newInstance();
if (!(of instanceof Cache)) {
throw new InstantiationException("Class does not implement
Cache!");
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLUtils.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLUtils.java?rev=1804997&r1=1804996&r2=1804997&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLUtils.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLUtils.java
Mon Aug 14 14:04:41 2017
@@ -61,7 +61,7 @@ public final class XMLUtils {
try {
// Woodstox is the only supported and tested StAX implementation
WstxInputFactory wstxFactory = (WstxInputFactory)
ClassLoaderUtil.loadClass(
- "com.ctc.wstx.stax.WstxInputFactory").newInstance();
+
"com.ctc.wstx.stax.WstxInputFactory").getDeclaredConstructor().newInstance();
wstxFactory.configureForSpeed();
factory = wstxFactory;
@@ -93,7 +93,7 @@ public final class XMLUtils {
try {
// Woodstox is the only supported and tested StAX implementation
WstxOutputFactory wstxFactory = (WstxOutputFactory)
ClassLoaderUtil.loadClass(
- "com.ctc.wstx.stax.WstxOutputFactory").newInstance();
+
"com.ctc.wstx.stax.WstxOutputFactory").getDeclaredConstructor().newInstance();
wstxFactory.configureForSpeed();
wstxFactory.setProperty(WstxOutputProperties.P_OUTPUT_INVALID_CHAR_HANDLER,
new InvalidCharHandler.ReplacingHandler(' '));
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/CmisRepositoryContextListener.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/CmisRepositoryContextListener.java?rev=1804997&r1=1804996&r2=1804997&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/CmisRepositoryContextListener.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/CmisRepositoryContextListener.java
Mon Aug 14 14:04:41 2017
@@ -122,7 +122,7 @@ public class CmisRepositoryContextListen
// create a factory instance
Object object = null;
try {
- object = ClassLoaderUtil.loadClass(className).newInstance();
+ object =
ClassLoaderUtil.loadClass(className).getDeclaredConstructor().newInstance();
} catch (Exception e) {
LOG.warn("Could not create a services factory instance: {}",
e.toString(), e);
return null;
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/AbstractCmisHttpServlet.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/AbstractCmisHttpServlet.java?rev=1804997&r1=1804996&r2=1804997&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/AbstractCmisHttpServlet.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/AbstractCmisHttpServlet.java
Mon Aug 14 14:04:41 2017
@@ -76,7 +76,8 @@ public abstract class AbstractCmisHttpSe
String callContextHandlerClass =
config.getInitParameter(PARAM_CALL_CONTEXT_HANDLER);
if (callContextHandlerClass != null) {
try {
- return (CallContextHandler)
ClassLoaderUtil.loadClass(callContextHandlerClass).newInstance();
+ return (CallContextHandler)
ClassLoaderUtil.loadClass(callContextHandlerClass).getDeclaredConstructor()
+ .newInstance();
} catch (Exception e) {
throw new ServletException("Could not load call context
handler: " + e, e);
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoreManagerFactory.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoreManagerFactory.java?rev=1804997&r1=1804996&r2=1804997&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoreManagerFactory.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoreManagerFactory.java
Mon Aug 14 14:04:41 2017
@@ -46,10 +46,8 @@ public final class StoreManagerFactory {
Object obj = null;
try {
- obj = clazz.newInstance();
- } catch (InstantiationException e) {
- LOG.error("Failed to create StoredObjectCreator from class " +
className, e);
- } catch (IllegalAccessException e) {
+ obj = clazz.getDeclaredConstructor().newInstance();
+ } catch (Exception e) {
LOG.error("Failed to create StoredObjectCreator from class " +
className, e);
}
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoreManagerImpl.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoreManagerImpl.java?rev=1804997&r1=1804996&r2=1804997&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoreManagerImpl.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/storedobj/impl/StoreManagerImpl.java
Mon Aug 14 14:04:41 2017
@@ -109,9 +109,8 @@ public class StoreManagerImpl implements
* Map from repository id to a object store.
*/
private final Map<String, ObjectStore> fMapRepositoryToObjectStore = new
HashMap<String, ObjectStore>();
-
+
private boolean relaxedParserMode = false;
-
public ObjectStoreImpl getStore(String repositoryId) {
return (ObjectStoreImpl) fMapRepositoryToObjectStore.get(repositoryId);
@@ -139,8 +138,8 @@ public class StoreManagerImpl implements
public void createAndInitRepository(String repositoryId, String
typeCreatorClassName) {
if (fMapRepositoryToObjectStore.containsKey(repositoryId)
|| fMapRepositoryToTypeManager.containsKey(repositoryId)) {
- throw new CmisInvalidArgumentException("Cannot add repository,
repository " + repositoryId
- + " already exists.");
+ throw new CmisInvalidArgumentException(
+ "Cannot add repository, repository " + repositoryId + "
already exists.");
}
fMapRepositoryToObjectStore.put(repositoryId, new
ObjectStoreImpl(repositoryId));
@@ -152,11 +151,11 @@ public class StoreManagerImpl implements
@Override
public void addFlag(String flag) {
- if (flag.trim().equalsIgnoreCase("ParserModeRelaxed")) {
- relaxedParserMode = true;
- }
+ if (flag.trim().equalsIgnoreCase("ParserModeRelaxed")) {
+ relaxedParserMode = true;
+ }
}
-
+
@Override
public ObjectStore getObjectStore(String repositoryId) {
return fMapRepositoryToObjectStore.get(repositoryId);
@@ -187,7 +186,7 @@ public class StoreManagerImpl implements
|| td.getId().equals(BaseTypeId.CMIS_SECONDARY.value())) {
tdc = null; // filter new types for CMIS 1.0
} else {
- // remove type mutability information:
+ // remove type mutability information:
MutableTypeDefinition tdm = typeFactory.copy(td, true);
tdm.setTypeMutability(null);
tdc = new TypeDefinitionContainerImpl(tdm);
@@ -236,7 +235,8 @@ public class StoreManagerImpl implements
}
@Override
- public List<TypeDefinitionContainer> getRootTypes(String repositoryId,
boolean includePropertyDefinitions, boolean cmis11) {
+ public List<TypeDefinitionContainer> getRootTypes(String repositoryId,
boolean includePropertyDefinitions,
+ boolean cmis11) {
List<TypeDefinitionContainer> result;
TypeManager typeManager =
fMapRepositoryToTypeManager.get(repositoryId);
if (null == typeManager) {
@@ -271,21 +271,22 @@ public class StoreManagerImpl implements
}
return result;
}
-
- private List<TypeDefinitionContainer> cloneTypeDefinitionTree
(List<TypeDefinitionContainer> tdcList, boolean includePropertyDefinitions,
boolean cmis11) {
- List<TypeDefinitionContainer> result = new
ArrayList<TypeDefinitionContainer>(tdcList.size());
- for (TypeDefinitionContainer c : tdcList) {
- MutableTypeDefinition td =
typeFactory.copy(c.getTypeDefinition(), includePropertyDefinitions);
- if (!cmis11) {
- td.setTypeMutability(null);
- }
- TypeDefinitionContainerImpl tdc = new
TypeDefinitionContainerImpl(td);
-
tdc.setChildren(cloneTypeDefinitionTree(c.getChildren(),
includePropertyDefinitions, cmis11));
- result.add(tdc);
- }
- return result;
- }
-
+
+ private List<TypeDefinitionContainer>
cloneTypeDefinitionTree(List<TypeDefinitionContainer> tdcList,
+ boolean includePropertyDefinitions, boolean cmis11) {
+ List<TypeDefinitionContainer> result = new
ArrayList<TypeDefinitionContainer>(tdcList.size());
+ for (TypeDefinitionContainer c : tdcList) {
+ MutableTypeDefinition td = typeFactory.copy(c.getTypeDefinition(),
includePropertyDefinitions);
+ if (!cmis11) {
+ td.setTypeMutability(null);
+ }
+ TypeDefinitionContainerImpl tdc = new
TypeDefinitionContainerImpl(td);
+ tdc.setChildren(cloneTypeDefinitionTree(c.getChildren(),
includePropertyDefinitions, cmis11));
+ result.add(tdc);
+ }
+ return result;
+ }
+
@Override
public RepositoryInfo getRepositoryInfo(CallContext context, String
repositoryId) {
ObjectStore sm = fMapRepositoryToObjectStore.get(repositoryId);
@@ -316,12 +317,8 @@ public class StoreManagerImpl implements
final String message = "Illegal class to create type system, must
implement TypeCreator interface.";
try {
- obj = Class.forName(typeCreatorClassName).newInstance();
- } catch (InstantiationException e) {
- throw new CmisRuntimeException(message, e);
- } catch (IllegalAccessException e) {
- throw new CmisRuntimeException(message, e);
- } catch (ClassNotFoundException e) {
+ obj =
Class.forName(typeCreatorClassName).getDeclaredConstructor().newInstance();
+ } catch (Exception e) {
throw new CmisRuntimeException(message, e);
}
@@ -547,7 +544,7 @@ public class StoreManagerImpl implements
final TypeDefinitionFactory typeFactory =
TypeDefinitionFactory.newInstance();
MutableTypeDefinition tdClone =
typeFactory.copy(tdc.getTypeDefinition(), includePropertyDefinitions);
if (!cmis11) {
- tdClone.setTypeMutability(null);
+ tdClone.setTypeMutability(null);
}
TypeDefinitionContainerImpl tdcClone = new
TypeDefinitionContainerImpl(tdClone);
if (null != parent) {
@@ -580,13 +577,14 @@ public class StoreManagerImpl implements
}
@Override
- public ObjectList query(CallContext callContext, String user, String
repositoryId, String statement, Boolean searchAllVersions,
- Boolean includeAllowableActions, IncludeRelationships
includeRelationships, String renditionFilter,
- BigInteger maxItems, BigInteger skipCount) {
+ public ObjectList query(CallContext callContext, String user, String
repositoryId, String statement,
+ Boolean searchAllVersions, Boolean includeAllowableActions,
IncludeRelationships includeRelationships,
+ String renditionFilter, BigInteger maxItems, BigInteger skipCount)
{
TypeManager tm = getTypeManager(repositoryId);
ObjectStore objectStore = getObjectStore(repositoryId);
- InMemoryQueryProcessor queryProcessor = new
InMemoryQueryProcessor(getStore(repositoryId), callContext, relaxedParserMode);
+ InMemoryQueryProcessor queryProcessor = new
InMemoryQueryProcessor(getStore(repositoryId), callContext,
+ relaxedParserMode);
ObjectList objList = queryProcessor.query(tm, objectStore, user,
repositoryId, statement, searchAllVersions,
includeAllowableActions, includeRelationships,
renditionFilter, maxItems, skipCount);
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactory.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactory.java?rev=1804997&r1=1804996&r2=1804997&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactory.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactory.java
Mon Aug 14 14:04:41 2017
@@ -157,7 +157,7 @@ public final class TypeDefinitionFactory
protected MutableDocumentTypeDefinition
createDocumentTypeDefinitionObject() {
try {
- return documentTypeDefinitionClass.newInstance();
+ return
documentTypeDefinitionClass.getDeclaredConstructor().newInstance();
} catch (Exception e) {
throw new CmisRuntimeException("Cannot create type defintion
object: " + e.getMessage(), e);
}
@@ -174,7 +174,7 @@ public final class TypeDefinitionFactory
protected MutableFolderTypeDefinition createFolderTypeDefinitionObject() {
try {
- return folderTypeDefinitionClass.newInstance();
+ return
folderTypeDefinitionClass.getDeclaredConstructor().newInstance();
} catch (Exception e) {
throw new CmisRuntimeException("Cannot create type defintion
object: " + e.getMessage(), e);
}
@@ -191,7 +191,7 @@ public final class TypeDefinitionFactory
protected MutablePolicyTypeDefinition createPolicyTypeDefinitionObject() {
try {
- return policyTypeDefinitionClass.newInstance();
+ return
policyTypeDefinitionClass.getDeclaredConstructor().newInstance();
} catch (Exception e) {
throw new CmisRuntimeException("Cannot create type defintion
object: " + e.getMessage(), e);
}
@@ -209,7 +209,7 @@ public final class TypeDefinitionFactory
protected MutableRelationshipTypeDefinition
createRelationshipTypeDefinitionObject() {
try {
- return relationshipTypeDefinitionClass.newInstance();
+ return
relationshipTypeDefinitionClass.getDeclaredConstructor().newInstance();
} catch (Exception e) {
throw new CmisRuntimeException("Cannot create type defintion
object: " + e.getMessage(), e);
}
@@ -226,7 +226,7 @@ public final class TypeDefinitionFactory
protected MutableItemTypeDefinition createItemTypeDefinitionObject() {
try {
- return itemTypeDefinitionClass.newInstance();
+ return
itemTypeDefinitionClass.getDeclaredConstructor().newInstance();
} catch (Exception e) {
throw new CmisRuntimeException("Cannot create type defintion
object: " + e.getMessage(), e);
}
@@ -244,7 +244,7 @@ public final class TypeDefinitionFactory
protected MutableSecondaryTypeDefinition
createSecondaryTypeDefinitionObject() {
try {
- return secondaryTypeDefinitionClass.newInstance();
+ return
secondaryTypeDefinitionClass.getDeclaredConstructor().newInstance();
} catch (Exception e) {
throw new CmisRuntimeException("Cannot create type defintion
object: " + e.getMessage(), e);
}
@@ -468,7 +468,8 @@ public final class TypeDefinitionFactory
* Creates a new mutable relationship type definition including all base
* property definitions defined in the CMIS specification.
*/
- public MutableRelationshipTypeDefinition
createRelationshipTypeDefinition(CmisVersion cmisVersion, String parentId) {
+ public MutableRelationshipTypeDefinition
createRelationshipTypeDefinition(CmisVersion cmisVersion,
+ String parentId) {
MutableRelationshipTypeDefinition relationshipType =
createRelationshipTypeDefinitionObject();
relationshipType.setBaseTypeId(BaseTypeId.CMIS_RELATIONSHIP);
relationshipType.setParentTypeId(parentId);
@@ -982,15 +983,14 @@ public final class TypeDefinitionFactory
Map<String, Set<String>> typeDefChildren, String typeId, int
depth, boolean includePropertyDefinitions,
CmisVersion cmisVersion) {
TypeDefinitionContainerImpl result = new TypeDefinitionContainerImpl();
- result.setTypeDefinition(includePropertyDefinitions ?
copy(allTypes.get(typeId), true, cmisVersion) : copy(
- allTypes.get(typeId), false, cmisVersion));
+ result.setTypeDefinition(includePropertyDefinitions ?
copy(allTypes.get(typeId), true, cmisVersion)
+ : copy(allTypes.get(typeId), false, cmisVersion));
if (depth != 0) {
if (typeDefChildren.containsKey(typeId)) {
for (String child : typeDefChildren.get(typeId)) {
- result.getChildren().add(
- createTypeDefinitionContainer(allTypes,
typeDefChildren, child, depth < 0 ? -1 : depth - 1,
- includePropertyDefinitions, cmisVersion));
+
result.getChildren().add(createTypeDefinitionContainer(allTypes,
typeDefChildren, child,
+ depth < 0 ? -1 : depth - 1,
includePropertyDefinitions, cmisVersion));
}
}
}
@@ -1025,8 +1025,8 @@ public final class TypeDefinitionFactory
switch (sourceTypeDefintion.getBaseTypeId()) {
case CMIS_DOCUMENT:
result = createDocumentTypeDefinitionObject();
- ((MutableDocumentTypeDefinition)
result).setIsVersionable(((DocumentTypeDefinition) sourceTypeDefintion)
- .isVersionable());
+ ((MutableDocumentTypeDefinition) result)
+ .setIsVersionable(((DocumentTypeDefinition)
sourceTypeDefintion).isVersionable());
((MutableDocumentTypeDefinition) result)
.setContentStreamAllowed(((DocumentTypeDefinition)
sourceTypeDefintion).getContentStreamAllowed());
break;
@@ -1084,8 +1084,8 @@ public final class TypeDefinitionFactory
if (cmisVersion != CmisVersion.CMIS_1_0) {
if (sourceTypeDefintion.getTypeMutability() != null) {
result.setTypeMutability(createTypeMutability(sourceTypeDefintion.getTypeMutability().canCreate(),
- sourceTypeDefintion.getTypeMutability().canUpdate(),
sourceTypeDefintion.getTypeMutability()
- .canDelete()));
+ sourceTypeDefintion.getTypeMutability().canUpdate(),
+ sourceTypeDefintion.getTypeMutability().canDelete()));
}
}
@@ -1122,9 +1122,8 @@ public final class TypeDefinitionFactory
break;
case DATETIME:
result = new PropertyDateTimeDefinitionImpl();
- ((PropertyDateTimeDefinitionImpl) result)
- .setDateTimeResolution(((PropertyDateTimeDefinition)
sourcePropertyDefinition)
- .getDateTimeResolution());
+ ((PropertyDateTimeDefinitionImpl) result).setDateTimeResolution(
+ ((PropertyDateTimeDefinition)
sourcePropertyDefinition).getDateTimeResolution());
((PropertyDateTimeDefinitionImpl) result)
.setDefaultValue(copyDefaultValue((PropertyDateTimeDefinition)
sourcePropertyDefinition));
((PropertyDateTimeDefinitionImpl) result)
@@ -1132,10 +1131,10 @@ public final class TypeDefinitionFactory
break;
case DECIMAL:
result = new PropertyDecimalDefinitionImpl();
- ((PropertyDecimalDefinitionImpl)
result).setMinValue(((PropertyDecimalDefinition) sourcePropertyDefinition)
- .getMinValue());
- ((PropertyDecimalDefinitionImpl)
result).setMaxValue(((PropertyDecimalDefinition) sourcePropertyDefinition)
- .getMaxValue());
+ ((PropertyDecimalDefinitionImpl) result)
+ .setMinValue(((PropertyDecimalDefinition)
sourcePropertyDefinition).getMinValue());
+ ((PropertyDecimalDefinitionImpl) result)
+ .setMaxValue(((PropertyDecimalDefinition)
sourcePropertyDefinition).getMaxValue());
((PropertyDecimalDefinitionImpl) result)
.setPrecision(((PropertyDecimalDefinition)
sourcePropertyDefinition).getPrecision());
((PropertyDecimalDefinitionImpl) result)
@@ -1157,10 +1156,10 @@ public final class TypeDefinitionFactory
break;
case INTEGER:
result = new PropertyIntegerDefinitionImpl();
- ((PropertyIntegerDefinitionImpl)
result).setMinValue(((PropertyIntegerDefinition) sourcePropertyDefinition)
- .getMinValue());
- ((PropertyIntegerDefinitionImpl)
result).setMaxValue(((PropertyIntegerDefinition) sourcePropertyDefinition)
- .getMaxValue());
+ ((PropertyIntegerDefinitionImpl) result)
+ .setMinValue(((PropertyIntegerDefinition)
sourcePropertyDefinition).getMinValue());
+ ((PropertyIntegerDefinitionImpl) result)
+ .setMaxValue(((PropertyIntegerDefinition)
sourcePropertyDefinition).getMaxValue());
((PropertyIntegerDefinitionImpl) result)
.setDefaultValue(copyDefaultValue((PropertyIntegerDefinition)
sourcePropertyDefinition));
((PropertyIntegerDefinitionImpl) result)
@@ -1168,8 +1167,8 @@ public final class TypeDefinitionFactory
break;
case STRING:
result = new PropertyStringDefinitionImpl();
- ((PropertyStringDefinitionImpl)
result).setMaxLength((((PropertyStringDefinition) sourcePropertyDefinition)
- .getMaxLength()));
+ ((PropertyStringDefinitionImpl) result)
+ .setMaxLength((((PropertyStringDefinition)
sourcePropertyDefinition).getMaxLength()));
((PropertyStringDefinitionImpl) result)
.setDefaultValue(copyDefaultValue((PropertyStringDefinition)
sourcePropertyDefinition));
((PropertyStringDefinitionImpl) result)
@@ -1211,8 +1210,8 @@ public final class TypeDefinitionFactory
/**
* Copies the property definitions from a source type to a target type.
*/
- protected void copyPropertyDefinitions(TypeDefinition source,
MutableTypeDefinition target,
- CmisVersion cmisVersion, boolean markAsInherited) {
+ protected void copyPropertyDefinitions(TypeDefinition source,
MutableTypeDefinition target, CmisVersion cmisVersion,
+ boolean markAsInherited) {
assert source != null;
assert target != null;
@@ -1313,8 +1312,8 @@ public final class TypeDefinitionFactory
return null;
}
- Map<String, String> attrs = (element.getAttributes() != null ? new
HashMap<String, String>(
- element.getAttributes()) : null);
+ Map<String, String> attrs = (element.getAttributes() != null
+ ? new HashMap<String, String>(element.getAttributes()) : null);
List<CmisExtensionElement> children = element.getChildren();
if (isNotEmpty(children)) {
@@ -1348,9 +1347,9 @@ public final class TypeDefinitionFactory
type.addPropertyDefinition(createPropertyDefinition(PropertyIds.BASE_TYPE_ID,
"Base Type Id", "Base Type Id",
PropertyType.ID, Cardinality.SINGLE, Updatability.READONLY,
inherited, false, true, false));
-
type.addPropertyDefinition(createPropertyDefinition(PropertyIds.OBJECT_TYPE_ID,
"Object Type Id",
- "Object Type Id", PropertyType.ID, Cardinality.SINGLE,
Updatability.ONCREATE, inherited, true, true,
- false));
+ type.addPropertyDefinition(
+ createPropertyDefinition(PropertyIds.OBJECT_TYPE_ID, "Object
Type Id", "Object Type Id",
+ PropertyType.ID, Cardinality.SINGLE,
Updatability.ONCREATE, inherited, true, true, false));
if (cmisVersion != CmisVersion.CMIS_1_0) {
type.addPropertyDefinition(createPropertyDefinition(PropertyIds.SECONDARY_OBJECT_TYPE_IDS,
@@ -1361,13 +1360,12 @@ public final class TypeDefinitionFactory
type.addPropertyDefinition(createPropertyDefinition(PropertyIds.CREATED_BY,
"Created By", "Created By",
PropertyType.STRING, Cardinality.SINGLE,
Updatability.READONLY, inherited, false, true, true));
-
type.addPropertyDefinition(createPropertyDefinition(PropertyIds.CREATION_DATE,
"Creation Date",
- "Creation Date", PropertyType.DATETIME, Cardinality.SINGLE,
Updatability.READONLY, inherited, false,
- true, true));
-
-
type.addPropertyDefinition(createPropertyDefinition(PropertyIds.LAST_MODIFIED_BY,
"Last Modified By",
- "Last Modified By", PropertyType.STRING, Cardinality.SINGLE,
Updatability.READONLY, inherited, false,
- true, true));
+
type.addPropertyDefinition(createPropertyDefinition(PropertyIds.CREATION_DATE,
"Creation Date", "Creation Date",
+ PropertyType.DATETIME, Cardinality.SINGLE,
Updatability.READONLY, inherited, false, true, true));
+
+ type.addPropertyDefinition(
+ createPropertyDefinition(PropertyIds.LAST_MODIFIED_BY, "Last
Modified By", "Last Modified By",
+ PropertyType.STRING, Cardinality.SINGLE,
Updatability.READONLY, inherited, false, true, true));
type.addPropertyDefinition(createPropertyDefinition(PropertyIds.LAST_MODIFICATION_DATE,
"Last Modification Date", "Last Modification Date",
PropertyType.DATETIME, Cardinality.SINGLE,
@@ -1400,13 +1398,12 @@ public final class TypeDefinitionFactory
Updatability.READONLY, inherited, false, true, false));
}
-
type.addPropertyDefinition(createPropertyDefinition(PropertyIds.VERSION_LABEL,
"Version Label",
- "Version Label", PropertyType.STRING, Cardinality.SINGLE,
Updatability.READONLY, inherited, false,
- true, false));
-
-
type.addPropertyDefinition(createPropertyDefinition(PropertyIds.VERSION_SERIES_ID,
"Version Series Id",
- "Version Series Id", PropertyType.ID, Cardinality.SINGLE,
Updatability.READONLY, inherited, false,
- true, false));
+
type.addPropertyDefinition(createPropertyDefinition(PropertyIds.VERSION_LABEL,
"Version Label", "Version Label",
+ PropertyType.STRING, Cardinality.SINGLE,
Updatability.READONLY, inherited, false, true, false));
+
+ type.addPropertyDefinition(
+ createPropertyDefinition(PropertyIds.VERSION_SERIES_ID,
"Version Series Id", "Version Series Id",
+ PropertyType.ID, Cardinality.SINGLE,
Updatability.READONLY, inherited, false, true, false));
type.addPropertyDefinition(createPropertyDefinition(PropertyIds.IS_VERSION_SERIES_CHECKED_OUT,
"Is Verison Series Checked Out", "Is Verison Series Checked
Out", PropertyType.BOOLEAN,
@@ -1436,9 +1433,9 @@ public final class TypeDefinitionFactory
"Filename", PropertyType.STRING, Cardinality.SINGLE,
Updatability.READONLY, inherited, false, false,
false));
-
type.addPropertyDefinition(createPropertyDefinition(PropertyIds.CONTENT_STREAM_ID,
"Content Stream Id",
- "Content Stream Id", PropertyType.ID, Cardinality.SINGLE,
Updatability.READONLY, inherited, false,
- false, false));
+ type.addPropertyDefinition(
+ createPropertyDefinition(PropertyIds.CONTENT_STREAM_ID,
"Content Stream Id", "Content Stream Id",
+ PropertyType.ID, Cardinality.SINGLE,
Updatability.READONLY, inherited, false, false, false));
}
protected void addFolderPropertyDefinitions(MutableFolderTypeDefinition
type, CmisVersion cmisVersion,
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/runner/AbstractRunner.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/runner/AbstractRunner.java?rev=1804997&r1=1804996&r2=1804997&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/runner/AbstractRunner.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/runner/AbstractRunner.java
Mon Aug 14 14:04:41 2017
@@ -192,7 +192,7 @@ public abstract class AbstractRunner {
}
Class<?> clazz = ClassLoaderUtil.loadClass(groupClass);
- Object o = clazz.newInstance();
+ Object o = clazz.getDeclaredConstructor().newInstance();
CmisTestGroup group = null;
if (o instanceof CmisTestGroup) {
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/pom.xml
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/pom.xml?rev=1804997&r1=1804996&r2=1804997&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/pom.xml
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/pom.xml
Mon Aug 14 14:04:41 2017
@@ -189,7 +189,7 @@
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
- <version>2.4.12</version>
+ <version>2.5.0-beta-1</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientFrame.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientFrame.java?rev=1804997&r1=1804996&r2=1804997&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientFrame.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ClientFrame.java
Mon Aug 14 14:04:41 2017
@@ -30,7 +30,6 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
-import java.lang.reflect.Method;
import java.net.URI;
import java.util.prefs.Preferences;
@@ -124,18 +123,35 @@ public class ClientFrame extends JFrame
setIconImages(ClientHelper.getCmisIconImages());
+ ImageIcon icon = ClientHelper.getCmisIconImage();
+ boolean isDockImageSet = false;
+
+ // Java >= 9 goodies
+ try {
+ Class<?> taskbarClass = Class.forName("java.awt.Taskbar");
+ Object taskbar = taskbarClass.getMethod("getTaskbar").invoke(null);
+
+ if (icon != null) {
+ try {
+ taskbarClass.getMethod("setIconImageâ",
Image.class).invoke(taskbar, icon.getImage());
+ isDockImageSet = true;
+ } catch (Exception e) {
+ LOG.debug("Could not set taskbar icon!", e);
+ }
+ }
+ } catch (Exception e) {
+ // Java < 9
+ }
+
// Mac OS X goodies
if (ClientHelper.isMacOSX()) {
try {
- Class<?> macAppClass =
Class.forName("com.apple.eawt.Application");
- Method macAppGetApp = macAppClass.getMethod("getApplication",
(Class<?>[]) null);
- Object macApp = macAppGetApp.invoke(null, (Object[]) null);
+ if (!isDockImageSet && icon != null) {
+ Class<?> macAppClass =
Class.forName("com.apple.eawt.Application");
+ Object macApp =
macAppClass.getMethod("getApplication").invoke(null);
- ImageIcon icon = ClientHelper.getCmisIconImage();
- if (icon != null) {
try {
- macAppClass.getMethod("setDockIconImage", new
Class<?>[] { Image.class }).invoke(macApp,
- new Object[] { icon.getImage() });
+ macAppClass.getMethod("setDockIconImage",
Image.class).invoke(macApp, icon.getImage());
} catch (Exception e) {
LOG.debug("Could not set dock icon!", e);
}
@@ -143,7 +159,7 @@ public class ClientFrame extends JFrame
try {
Class<?> fullscreenClass =
Class.forName("com.apple.eawt.FullScreenUtilities");
- fullscreenClass.getMethod("setWindowCanFullScreen", new
Class<?>[] { Window.class, Boolean.TYPE })
+ fullscreenClass.getMethod("setWindowCanFullScreen",
Window.class, Boolean.TYPE)
.invoke(fullscreenClass, this, true);
} catch (Exception e) {
LOG.debug("Could not add fullscreen button!", e);
@@ -384,10 +400,14 @@ public class ClientFrame extends JFrame
addWindowListener(this);
+ setMinimumSize(new Dimension(300, 100));
+
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
- setPreferredSize(new Dimension(prefs.getInt(PREFS_WIDTH, (int)
(screenSize.getWidth() / 1.5)),
- prefs.getInt(PREFS_HEIGHT, (int) (screenSize.getHeight() /
1.5))));
- setMinimumSize(new Dimension(200, 60));
+ int frameWidth = Math.max(prefs.getInt(PREFS_WIDTH, (int)
(screenSize.getWidth() / 1.5)),
+ (int) getMinimumSize().getWidth());
+ int frameHeight = Math.max(prefs.getInt(PREFS_HEIGHT, (int)
(screenSize.getHeight() / 1.5)),
+ (int) getMinimumSize().getHeight());
+ setPreferredSize(new Dimension(frameWidth, frameHeight));
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
pack();
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ConsoleHelper.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ConsoleHelper.java?rev=1804997&r1=1804996&r2=1804997&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ConsoleHelper.java
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/ConsoleHelper.java
Mon Aug 14 14:04:41 2017
@@ -44,6 +44,7 @@ import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.swing.JFrame;
import javax.swing.JMenu;
+import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;
import javax.swing.text.AttributeSet;
@@ -113,98 +114,108 @@ public class ConsoleHelper {
console.run();
// add menu
- JMenu cmisMenu = new JMenu("CMIS");
- cmisMenu.setMnemonic(KeyEvent.VK_M);
- console.getFrame().getRootPane().getJMenuBar().add(cmisMenu);
-
- addConsoleMenu(cmisMenu, "CMIS 1.0 Specification",
- new
URI("https://docs.oasis-open.org/cmis/CMIS/v1.0/os/cmis-spec-v1.0.html"));
- addConsoleMenu(cmisMenu, "CMIS 1.1 Specification",
- new
URI("https://docs.oasis-open.org/cmis/CMIS/v1.1/CMIS-v1.1.html"));
- cmisMenu.addSeparator();
- addConsoleMenu(cmisMenu, "OpenCMIS Documentation",
- new
URI("https://chemistry.apache.org/java/opencmis.html"));
- addConsoleMenu(cmisMenu, "OpenCMIS Code Samples",
- new
URI("https://chemistry.apache.org/docs/cmis-samples/"));
- addConsoleMenu(cmisMenu, "OpenCMIS Client API JavaDoc",
- new URI("https://chemistry.apache.org/java/javadoc/"));
- cmisMenu.addSeparator();
- JMenuItem menuItem = new JMenuItem("CMIS Session Details");
- menuItem.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- AttributeSet style = console.getOutputStyle();
- console.clearOutput();
- console.appendOutputNl("Session ID: " +
groovySession.getBinding().getSessionId(), style);
- console.appendOutputNl("Repository ID: " +
groovySession.getRepositoryInfo().getId(), style);
- console.appendOutputNl("Repository name: " +
groovySession.getRepositoryInfo().getName(), style);
- console.appendOutputNl("Binding: " +
groovySession.getBinding().getBindingType(), style);
- console.appendOutputNl("User: " + user, style);
- }
- });
- cmisMenu.add(menuItem);
+ JMenuBar consoleMenuBar =
console.getFrame().getRootPane().getJMenuBar();
- JMenu snippetsMenu = new JMenu("Snippets");
- snippetsMenu.setMnemonic(KeyEvent.VK_N);
- console.getFrame().getRootPane().getJMenuBar().add(snippetsMenu);
-
- for (FileEntry entry : readSnippetLibrary()) {
- String snippet =
ClientHelper.readFileAndRemoveHeader(entry.getFile());
-
- JMenuItem snippetItem = new JMenuItem(entry.getName());
- snippetItem.addActionListener(new
ConsoleInsertActionListener(console, snippet));
- snippetsMenu.add(snippetItem);
- }
+ if (consoleMenuBar != null) { // workaround for a Java 9/Groovy
+ // issue (-> no menu bar)
+ // should be removed when the issue
is
+ // fixed
+
+ JMenu cmisMenu = new JMenu("CMIS");
+ cmisMenu.setMnemonic(KeyEvent.VK_M);
+ consoleMenuBar.add(cmisMenu);
+
+ addConsoleMenu(cmisMenu, "CMIS 1.0 Specification",
+ new
URI("https://docs.oasis-open.org/cmis/CMIS/v1.0/os/cmis-spec-v1.0.html"));
+ addConsoleMenu(cmisMenu, "CMIS 1.1 Specification",
+ new
URI("https://docs.oasis-open.org/cmis/CMIS/v1.1/CMIS-v1.1.html"));
+ cmisMenu.addSeparator();
+ addConsoleMenu(cmisMenu, "OpenCMIS Documentation",
+ new
URI("https://chemistry.apache.org/java/opencmis.html"));
+ addConsoleMenu(cmisMenu, "OpenCMIS Code Samples",
+ new
URI("https://chemistry.apache.org/docs/cmis-samples/"));
+ addConsoleMenu(cmisMenu, "OpenCMIS Client API JavaDoc",
+ new URI("https://chemistry.apache.org/java/javadoc/"));
+ cmisMenu.addSeparator();
+ JMenuItem menuItem = new JMenuItem("CMIS Session Details");
+ menuItem.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ AttributeSet style = console.getOutputStyle();
+ console.clearOutput();
+ console.appendOutputNl("Session ID: " +
groovySession.getBinding().getSessionId(), style);
+ console.appendOutputNl("Repository ID: " +
groovySession.getRepositoryInfo().getId(), style);
+ console.appendOutputNl("Repository name: " +
groovySession.getRepositoryInfo().getName(),
+ style);
+ console.appendOutputNl("Binding: " +
groovySession.getBinding().getBindingType(),
+ style);
+ console.appendOutputNl("User: " + user,
style);
+ }
+ });
+ cmisMenu.add(menuItem);
- // add popup menu
+ JMenu snippetsMenu = new JMenu("Snippets");
+ snippetsMenu.setMnemonic(KeyEvent.VK_N);
+ consoleMenuBar.add(snippetsMenu);
- final JPopupMenu popup = new JPopupMenu();
+ for (FileEntry entry : readSnippetLibrary()) {
+ String snippet =
ClientHelper.readFileAndRemoveHeader(entry.getFile());
- final JMenuItem cutItem = new JMenuItem(new
DefaultEditorKit.CutAction());
- cutItem.setText("Cut");
- popup.add(cutItem);
+ JMenuItem snippetItem = new JMenuItem(entry.getName());
+ snippetItem.addActionListener(new
ConsoleInsertActionListener(console, snippet));
+ snippetsMenu.add(snippetItem);
+ }
- final JMenuItem copyItem = new JMenuItem(new
DefaultEditorKit.CopyAction());
- copyItem.setText("Copy");
- popup.add(copyItem);
+ // add popup menu
- final JMenuItem pasteItem = new JMenuItem(new
DefaultEditorKit.PasteAction());
- pasteItem.setText("Paste");
- popup.add(pasteItem);
+ final JPopupMenu popup = new JPopupMenu();
- console.getInputArea().addMouseListener(new MouseAdapter() {
- @Override
- public void mouseClicked(MouseEvent e) {
- }
+ final JMenuItem cutItem = new JMenuItem(new
DefaultEditorKit.CutAction());
+ cutItem.setText("Cut");
+ popup.add(cutItem);
- @Override
- public void mousePressed(MouseEvent e) {
- maybeShowPopup(e);
- }
+ final JMenuItem copyItem = new JMenuItem(new
DefaultEditorKit.CopyAction());
+ copyItem.setText("Copy");
+ popup.add(copyItem);
- @Override
- public void mouseReleased(MouseEvent e) {
- maybeShowPopup(e);
- }
+ final JMenuItem pasteItem = new JMenuItem(new
DefaultEditorKit.PasteAction());
+ pasteItem.setText("Paste");
+ popup.add(pasteItem);
- private void maybeShowPopup(MouseEvent e) {
- if (e.isPopupTrigger()) {
- if (console.getInputArea().getSelectedText() != null) {
- cutItem.setEnabled(true);
- copyItem.setEnabled(true);
-
- } else {
- cutItem.setEnabled(false);
- copyItem.setEnabled(false);
- }
+ console.getInputArea().addMouseListener(new MouseAdapter() {
+ @Override
+ public void mouseClicked(MouseEvent e) {
+ }
- Clipboard clipboard =
Toolkit.getDefaultToolkit().getSystemClipboard();
-
pasteItem.setEnabled(clipboard.isDataFlavorAvailable(DataFlavor.stringFlavor));
+ @Override
+ public void mousePressed(MouseEvent e) {
+ maybeShowPopup(e);
+ }
- popup.show(e.getComponent(), e.getX(), e.getY());
+ @Override
+ public void mouseReleased(MouseEvent e) {
+ maybeShowPopup(e);
}
- }
- });
+
+ private void maybeShowPopup(MouseEvent e) {
+ if (e.isPopupTrigger()) {
+ if (console.getInputArea().getSelectedText() !=
null) {
+ cutItem.setEnabled(true);
+ copyItem.setEnabled(true);
+
+ } else {
+ cutItem.setEnabled(false);
+ copyItem.setEnabled(false);
+ }
+
+ Clipboard clipboard =
Toolkit.getDefaultToolkit().getSystemClipboard();
+
pasteItem.setEnabled(clipboard.isDataFlavorAvailable(DataFlavor.stringFlavor));
+
+ popup.show(e.getComponent(), e.getX(), e.getY());
+ }
+ }
+ });
+ }
// read source code
if (file != null) {
Added:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/JavaDetector.java
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/JavaDetector.java?rev=1804997&view=auto
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/JavaDetector.java
(added)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/JavaDetector.java
Mon Aug 14 14:04:41 2017
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.chemistry.opencmis.workbench;
+
+/**
+ * Returns command line parameters depending on the Java version.
+ */
+public class JavaDetector {
+
+ /**
+ * Main.
+ */
+ public static void main(String[] args) {
+ String javaVersion = System.getProperty("java.specification.version");
+
+ if ("9".equals(javaVersion)) {
+ // Java 9
+
+ // enables Java EE APIs for the Web Services binding
+ System.out.println("--add-modules java.se.ee");
+ }
+ }
+}
Propchange:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/JavaDetector.java
------------------------------------------------------------------------------
svn:eol-style = LF
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/runscript.bat
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/runscript.bat?rev=1804997&r1=1804996&r2=1804997&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/runscript.bat
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/runscript.bat
Mon Aug 14 14:04:41 2017
@@ -25,7 +25,8 @@ rem set https_proxy=https://<proxy>:<por
rem set no_proxy=localhost,127.0.0.0,.local
+for /F "delims=/" %%x in ('"java -classpath .;%~dp0\lib\*
org.apache.chemistry.opencmis.workbench.JavaDetector"') do set
"JAVA_VERSION_OPTS=%%x"
for /F "delims=/" %%x in ('"java -classpath .;%~dp0\lib\*
org.apache.chemistry.opencmis.workbench.ProxyDetector -j -s"') do set
"JAVA_PROXY_CONF=%%x"
-set JAVA_OPTS=%JAVA_PROXY_CONF%
+set JAVA_OPTS=%JAVA_VERSION_OPTS% %JAVA_PROXY_CONF%
java %JAVA_OPTS% %CUSTOM_JAVA_OPTS% -classpath ".;%~dp0\lib\*"
org.apache.chemistry.opencmis.script.ScriptExecutor %*
\ No newline at end of file
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/runscript.sh
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/runscript.sh?rev=1804997&r1=1804996&r2=1804997&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/runscript.sh
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/runscript.sh
Mon Aug 14 14:04:41 2017
@@ -52,7 +52,8 @@ popd > /dev/null
# export no_proxy=localhost,127.0.0.0,.local
+JAVA_VERSION_OPTS=$($JAVA -classpath $WCP
org.apache.chemistry.opencmis.workbench.JavaDetector)
JAVA_PROXY_CONF=$($JAVA -classpath $WCP
org.apache.chemistry.opencmis.workbench.ProxyDetector -j -s)
-JAVA_OPTS="$JAVA_PROXY_CONF"
+JAVA_OPTS="$JAVA_VERSION_OPTS $JAVA_PROXY_CONF"
exec $JAVA $JAVA_OPTS $CUSTOM_JAVA_OPTS -classpath $WCP
org.apache.chemistry.opencmis.script.ScriptExecutor "$@"
\ No newline at end of file
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/workbench.bat
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/workbench.bat?rev=1804997&r1=1804996&r2=1804997&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/workbench.bat
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/workbench.bat
Mon Aug 14 14:04:41 2017
@@ -25,7 +25,8 @@ rem set https_proxy=https://<proxy>:<por
rem set no_proxy=localhost,127.0.0.0,.local
+for /F "delims=/" %%x in ('"java -classpath .;%~dp0\lib\*
org.apache.chemistry.opencmis.workbench.JavaDetector"') do set
"JAVA_VERSION_OPTS=%%x"
for /F "delims=/" %%x in ('"java -classpath .;%~dp0\lib\*
org.apache.chemistry.opencmis.workbench.ProxyDetector -j -s"') do set
"JAVA_PROXY_CONF=%%x"
-set JAVA_OPTS=%JAVA_PROXY_CONF%
+set JAVA_OPTS=%JAVA_VERSION_OPTS% %JAVA_PROXY_CONF%
start /B javaw %JAVA_OPTS% %CUSTOM_JAVA_OPTS% -classpath ".;%~dp0\lib\*"
org.apache.chemistry.opencmis.workbench.Workbench
\ No newline at end of file
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/workbench.sh
URL:
http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/workbench.sh?rev=1804997&r1=1804996&r2=1804997&view=diff
==============================================================================
---
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/workbench.sh
(original)
+++
chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/start/workbench.sh
Mon Aug 14 14:04:41 2017
@@ -51,8 +51,8 @@ popd > /dev/null
# export https_proxy=https://<proxy>:<port>
# export no_proxy=localhost,127.0.0.0,.local
-
+JAVA_VERSION_OPTS=$($JAVA -classpath $WCP
org.apache.chemistry.opencmis.workbench.JavaDetector)
JAVA_PROXY_CONF=$($JAVA -classpath $WCP
org.apache.chemistry.opencmis.workbench.ProxyDetector -j -s)
-JAVA_OPTS="$JAVA_PROXY_CONF"
+JAVA_OPTS="$JAVA_VERSION_OPTS $JAVA_PROXY_CONF"
exec $JAVA $JAVA_OPTS $CUSTOM_JAVA_OPTS -classpath $WCP
org.apache.chemistry.opencmis.workbench.Workbench &
\ No newline at end of file