提交 ecbc84d5 authored 作者: Thomas Mueller's avatar Thomas Mueller

Fix a compile-time ambiguity when compiling with JDK7, thanks to a patch from Lukas Eder.

上级 07f89352
...@@ -46,7 +46,7 @@ Change Log ...@@ -46,7 +46,7 @@ Change Log
</ul><li>Support ALTER TABLE ADD ... AFTER. Patch from Andrew Gaul (argaul at gmail.com). Fixes issue 401. </ul><li>Support ALTER TABLE ADD ... AFTER. Patch from Andrew Gaul (argaul at gmail.com). Fixes issue 401.
</ul><li>Improved OSGi support. H2 now registers itself as a DataSourceFactory service. Fixes issue 365. </ul><li>Improved OSGi support. H2 now registers itself as a DataSourceFactory service. Fixes issue 365.
</ul><li>Add a DISK_SPACE_USED system function. Fixes issue 270. </ul><li>Add a DISK_SPACE_USED system function. Fixes issue 270.
</ul><li>Fix a compile-time ambiguity when compiling with JDK7. </ul><li>Fix a compile-time ambiguity when compiling with JDK7, thanks to a patch from Lukas Eder.
</li></ul> </li></ul>
<h2>Version 1.3.170 (2012-11-30)</h2> <h2>Version 1.3.170 (2012-11-30)</h2>
......
...@@ -295,7 +295,8 @@ class FileMem extends FileBase { ...@@ -295,7 +295,8 @@ class FileMem extends FileBase {
return null; return null;
} }
} }
// Cast null to FileChannel to avoid JDK 1.7 ambiguity
// cast to FileChannel to avoid JDK 1.7 ambiguity
FileLock lock = new FileLock((FileChannel) null, position, size, shared) { FileLock lock = new FileLock((FileChannel) null, position, size, shared) {
@Override @Override
......
...@@ -317,7 +317,7 @@ class FileZip extends FileBase { ...@@ -317,7 +317,7 @@ class FileZip extends FileBase {
public synchronized FileLock tryLock(long position, long size, boolean shared) throws IOException { public synchronized FileLock tryLock(long position, long size, boolean shared) throws IOException {
if (shared) { if (shared) {
// Cast null to FileChannel to avoid JDK 1.7 ambiguity // cast to FileChannel to avoid JDK 1.7 ambiguity
return new FileLock((FileChannel) null, position, size, shared) { return new FileLock((FileChannel) null, position, size, shared) {
@Override @Override
......
...@@ -398,7 +398,8 @@ class FileZip2 extends FileBase { ...@@ -398,7 +398,8 @@ class FileZip2 extends FileBase {
public synchronized FileLock tryLock(long position, long size, boolean shared) throws IOException { public synchronized FileLock tryLock(long position, long size, boolean shared) throws IOException {
if (shared) { if (shared) {
// Cast null to FileChannel to avoid JDK 1.7 ambiguity
// cast to FileChannel to avoid JDK 1.7 ambiguity
return new FileLock((FileChannel) null, position, size, shared) { return new FileLock((FileChannel) null, position, size, shared) {
@Override @Override
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论