Skip to content

Commit

Permalink
[CONJ-281] GAE support - ManagementFactory restricted class
Browse files Browse the repository at this point in the history
  • Loading branch information
rusher committed Apr 22, 2016
1 parent b65cfea commit 4cacd1d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions documentation/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Not released
* [CONJ-284] Cannot read autoincremented IDs bigger than Short.MAX_VALUE
* [CONJ-283] Parsing correction on MariaDbClientPreparedStatement - syntax error on insert values
* [CONJ-282] Handling YEARs with binary prepareStatement
* [CONJ-281] Connector/J is incompatible with Google App Engine correction
* [CONJ-278] Improve prepared statement on failover

## 1.4.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,9 @@ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWIS

package org.mariadb.jdbc.internal.packet.send;

import org.mariadb.jdbc.Driver;
import org.mariadb.jdbc.MariaDbDatabaseMetaData;
import org.mariadb.jdbc.internal.MariaDbServerCapabilities;
import org.mariadb.jdbc.internal.protocol.authentication.DefaultAuthenticationProvider;
import org.mariadb.jdbc.internal.util.Options;
import org.mariadb.jdbc.internal.util.Utils;
import org.mariadb.jdbc.internal.stream.PacketOutputStream;
import org.mariadb.jdbc.internal.util.constant.Version;
Expand All @@ -62,7 +60,6 @@ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWIS
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.lang.management.ManagementFactory;
import java.nio.ByteBuffer;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
import java.util.StringTokenizer;
Expand Down Expand Up @@ -202,7 +199,11 @@ private void writeConnectAttributes(PacketOutputStream writeBuffer) {
writeStringLength("_client_name", MariaDbDatabaseMetaData.DRIVER_NAME);
writeStringLength("_client_version", Version.version);
writeStringLength("_os", System.getProperty("os.name"));
writeStringLength("_pid", ManagementFactory.getRuntimeMXBean().getName());
try {
writeStringLength("_pid", ManagementFactory.getRuntimeMXBean().getName());
} catch (NoClassDefFoundError e) {
/* [CONJ-281] GAE support */
}
writeStringLength("_thread", Long.toString(serverThreadId));
writeStringLength("_java_vendor", System.getProperty("java.vendor"));
writeStringLength("_java_version", System.getProperty("java.version"));
Expand Down

0 comments on commit 4cacd1d

Please sign in to comment.