Skip to content

Commit

Permalink
JDBC-482 Fix database connection in NetBeans 8.2 fails
Browse files Browse the repository at this point in the history
  • Loading branch information
mrotteveel committed Mar 13, 2017
1 parent fb35941 commit 1204a26
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/documentation/release_notes.md
Expand Up @@ -237,6 +237,7 @@ The following has been changed or fixed since Jaybird 3.0.0-beta-3
This restores the behavior of Jaybird 2.2 and should result in a minor
performance improvement when (fully) reading result sets or using
`execute` instead of `executeUpdate` and **not** obtaining update counts.
- Fixed: Database connection in NetBeans 8.2 fails ([JDBC-483](http://tracker.firebirdsql.org/browse/JDBC-483))

Changes in Jaybird 3.0.0-beta-3
-------------------------------
Expand Down
8 changes: 4 additions & 4 deletions src/main/org/firebirdsql/encodings/DefaultEncodingSet.java
@@ -1,6 +1,4 @@
/*
* $Id$
*
* Firebird Open Source JavaEE Connector - JDBC Driver
*
* Distributable under LGPL license.
Expand All @@ -22,6 +20,7 @@

import org.firebirdsql.encodings.xml.EncodingDefinitionType;
import org.firebirdsql.encodings.xml.Encodings;
import org.firebirdsql.encodings.xml.ObjectFactory;
import org.firebirdsql.logging.Logger;
import org.firebirdsql.logging.LoggerFactory;

Expand Down Expand Up @@ -97,7 +96,8 @@ protected String getXmlResourceName() {
protected final Encodings loadEncodingsFromXml(String xmlFileResource) throws JAXBException {
InputStream inputStream = null;
try {
JAXBContext ctx = JAXBContext.newInstance(Encodings.class);
JAXBContext ctx = JAXBContext.newInstance(ObjectFactory.class.getPackage().getName(),
ObjectFactory.class.getClassLoader());
Unmarshaller unmarshaller = ctx.createUnmarshaller();
inputStream = getClass().getResourceAsStream(xmlFileResource);
if (inputStream == null) {
Expand Down Expand Up @@ -130,7 +130,7 @@ protected final List<EncodingDefinition> createEncodingDefinitions(String xmlFil
if (encodings == null) {
return Collections.emptyList();
}
List<EncodingDefinition> encodingSet = new ArrayList<EncodingDefinition>();
List<EncodingDefinition> encodingSet = new ArrayList<>();
for (EncodingDefinitionType definition : encodings.getEncodingDefinition()) {
final EncodingDefinition encoding = createEncodingDefinition(definition);
if (encoding != null) {
Expand Down

0 comments on commit 1204a26

Please sign in to comment.