This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
GIT_CONFIG=".git/config" | |
SVN_DIR=".git/svn" | |
OLD_URL=$1 | |
NEW_URL=$2 | |
if [ -z "$OLD_URL" -o -z "$NEW_URL" ]; then | |
echo "git-svn-relocate OLD_URL NEW_URL" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.mybatis.caches.ehcache; | |
import java.util.concurrent.TimeUnit; | |
import java.util.concurrent.locks.Condition; | |
import java.util.concurrent.locks.Lock; | |
import java.util.concurrent.locks.ReadWriteLock; | |
import net.sf.ehcache.CacheManager; | |
import net.sf.ehcache.Ehcache; | |
import net.sf.ehcache.Element; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2014 MyBatis.org. | |
* | |
* Licensed 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2009-2015 the original author or authors. | |
* | |
* Licensed 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/main/java/org/apache/ibatis/executor/resultset/DefaultResultSetHandler.java b/src/main/java/org/apache/ibatis/executor/resultset/DefaultResultSetHandler.java | |
index afcb1ff..bfbe785 100644 | |
--- a/src/main/java/org/apache/ibatis/executor/resultset/DefaultResultSetHandler.java | |
+++ b/src/main/java/org/apache/ibatis/executor/resultset/DefaultResultSetHandler.java | |
@@ -314,7 +314,7 @@ public class DefaultResultSetHandler implements ResultSetHandler { | |
throws SQLException { | |
DefaultResultContext<Object> resultContext = new DefaultResultContext<Object>(); | |
skipRows(rsw.getResultSet(), rowBounds); | |
- while (shouldProcessMoreRows(resultContext, rowBounds) && rsw.getResultSet().next()) { | |
+ while (shouldProcessMoreRows(resultContext, rowBounds) && !rsw.getResultSet().isClosed() && rsw.getResultSet().next()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.List; | |
import org.mybatis.generator.api.IntrospectedTable; | |
import org.mybatis.generator.api.PluginAdapter; | |
import org.mybatis.generator.api.dom.xml.TextElement; | |
import org.mybatis.generator.api.dom.xml.XmlElement; | |
public class AddAliasToBaseColumnListPlugin extends PluginAdapter { | |
public boolean validate(List<String> arg0) { | |
return true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ognl.*; | |
import java.util.*; | |
import java.util.concurrent.ConcurrentHashMap; | |
import java.lang.reflect.*; | |
public class ConcurrentGetValue { | |
public static void main(String[] args) { | |
int size = Integer.valueOf(args[0]); | |
final Person p = new Person(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.sql.*; | |
import java.util.*; | |
import java.nio.file.*; | |
public class SqlServerSelect { | |
public static void main(String[] args) throws Exception { | |
try { | |
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); | |
String url = "jdbc:sqlserver://192.168.227.139:1433;databaseName=ADMIOT_BI_1207"; | |
String username = "sa"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright 2009-2018 the original author or authors. | |
* | |
* Licensed 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.sql.*; | |
import java.time.*; | |
import java.util.*; | |
public class OffsetDateTimeTest { | |
public static void main(String[] args) throws Exception { | |
try (Connection con = new JdbcConnection(args[0]).getConnection()) { | |
try (Statement stmt = con.createStatement()) { | |
try { | |
stmt.execute("drop table test"); |
OlderNewer