Skip to content
Permalink
Browse files

refactor: "build without waffle/osgi" PR

  • Loading branch information
vlsi committed May 10, 2016
1 parent 87489a9 commit 766f8069697f0ec2e4c932fdf86bc3bc8bd19312
@@ -122,7 +122,6 @@ matrix:
- PG_VERSION=9.4
- MVN_CUSTOM_ARGS='-DwaffleEnabled=false -DosgiEnabled=false -DexcludePackageNames=org.postgresql.osgi:org.postgresql.sspi'


# Deploy snapshots to Maven Central
after_success:
- "test $TRAVIS_PULL_REQUEST == 'false' && test $TRAVIS_BRANCH == 'master' && test $PG_VERSION == '9.4' && ./travis_deploy.sh"
@@ -1,6 +1,6 @@
/*-------------------------------------------------------------------------
*
* Copyright (c) 2003-2014, PostgreSQL Global Development Group
* Copyright (c) 2003-2016, PostgreSQL Global Development Group
* Copyright (c) 2004, Open Cloud Limited.
*
*
@@ -68,19 +68,19 @@
private static class UnsupportedProtocolException extends IOException {
}


private ISSPIClient createSSPI(PGStream pgStream,
String spnServiceClass,
boolean enableNegotiate,
Logger logger) {
Class[] cArg = new Class[]{PGStream.class, String.class, boolean.class, Logger.class};
Class c = null;
try {
c = Class.forName("org.postgresql.sspi.SSPIClient");
return (ISSPIClient) c.getDeclaredConstructor(cArg).newInstance(pgStream, spnServiceClass, enableNegotiate, logger);
Class c = Class.forName("org.postgresql.sspi.SSPIClient");
Class[] cArg = new Class[]{PGStream.class, String.class, boolean.class, Logger.class};
return (ISSPIClient) c.getDeclaredConstructor(cArg)
.newInstance(pgStream, spnServiceClass, enableNegotiate, logger);
} catch (Exception e) {
// This catched quite a lot exceptions, but until Java 7 there is no ReflectiveOperationException
throw new UnsupportedOperationException("You are using jar from Linux distribution or class SPPIClient cannot be loaded");
throw new IllegalStateException("Unable to load org.postgresql.sspi.SSPIClient."
+ " Please check that SSPIClient is included in your pgjdbc distribution.", e);
}
}

@@ -1,3 +1,12 @@
/*-------------------------------------------------------------------------
*
* Copyright (c) 2003-2016, PostgreSQL Global Development Group
* Copyright (c) 2004, Open Cloud Limited.
*
*
*-------------------------------------------------------------------------
*/

package org.postgresql.sspi;

import java.io.IOException;
@@ -8,17 +17,13 @@
* client and talking to a Windows server.
*
* SSPI is not supported on a non-Windows client.
*
*
* @author pkajaba
*
*/
public interface ISSPIClient {
public boolean isSSPISupported();
boolean isSSPISupported();

public void startSSPI() throws SQLException, IOException;
void startSSPI() throws SQLException, IOException;

public void continueSSPI(int msgLength) throws SQLException, IOException;
void continueSSPI(int msgLength) throws SQLException, IOException;

public void dispose();
void dispose();
}
@@ -1,3 +1,12 @@
/*-------------------------------------------------------------------------
*
* Copyright (c) 2003-2016, PostgreSQL Global Development Group
* Copyright (c) 2004, Open Cloud Limited.
*
*
*-------------------------------------------------------------------------
*/

package org.postgresql.sspi;

import org.postgresql.core.Logger;

0 comments on commit 766f806

Please sign in to comment.
You can’t perform that action at this time.