Skip to content

Commit

Permalink
Merge pull request #329 from hazendaz/master
Browse files Browse the repository at this point in the history
[ci] Run Eclipse source cleanup
  • Loading branch information
hazendaz committed Sep 3, 2022
2 parents 24086b1 + d4e6dd5 commit a0c664a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/mybatis/cdi/Isolation.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public enum Isolation {

private final TransactionIsolationLevel transactionIsolationLevel;

private Isolation(TransactionIsolationLevel value) {
Isolation(TransactionIsolationLevel value) {
this.transactionIsolationLevel = value;
}

Expand Down
8 changes: 3 additions & 5 deletions src/main/java/org/mybatis/cdi/JtaTransactionInterceptor.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,10 @@ protected void endJta(boolean isExternaTransaction, boolean needsRollback)
if (needsRollback) {
this.userTransaction.get().setRollbackOnly();
}
} else if (needsRollback) {
this.userTransaction.get().rollback();
} else {
if (needsRollback) {
this.userTransaction.get().rollback();
} else {
this.userTransaction.get().commit();
}
this.userTransaction.get().commit();
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/mybatis/cdi/MyBatisBean.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public Object create(CreationalContext<Object> creationalContext) {
}
ErrorContext.instance().reset();
return Proxy.newProxyInstance(SqlSessionFactory.class.getClassLoader(), new Class[] { this.type },
new SerializableMapperProxy<Object>(this, creationalContext));
new SerializableMapperProxy<>(this, creationalContext));
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/mybatis/cdi/JtaDatasourceFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void setProperties(Properties props) {
props.remove("resourceName");
this.ds.setXaDataSourceClassName(props.getProperty("driver"));
props.remove("driver");
this.ds.setMaxPoolSize(Integer.valueOf(props.getProperty("maxPoolSize")));
this.ds.setMaxPoolSize(Integer.parseInt(props.getProperty("maxPoolSize")));
props.remove("maxPoolSize");
this.ds.setXaProperties(props);
}
Expand Down

0 comments on commit a0c664a

Please sign in to comment.