Mercurial > projects > dwt2
comparison org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/image/LEDataInputStream.d @ 21:9b96950f2c3c
the 'java' tree compiles on both D1-Tango and D2-Phobos
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 19 Mar 2009 20:38:55 +0100 |
parents | f36c67707cb3 |
children |
comparison
equal
deleted
inserted
replaced
20:dccb717aa902 | 21:9b96950f2c3c |
---|---|
121 */ | 121 */ |
122 private int readData(byte[] buffer, int offset, int len) { | 122 private int readData(byte[] buffer, int offset, int len) { |
123 if (buf is null) throw new IOException("buf is null"); | 123 if (buf is null) throw new IOException("buf is null"); |
124 if (offset < 0 || offset > buffer.length || | 124 if (offset < 0 || offset > buffer.length || |
125 len < 0 || (len > buffer.length - offset)) { | 125 len < 0 || (len > buffer.length - offset)) { |
126 throw new ArrayBoundsException(__FILE__,__LINE__); | 126 throw new ArrayIndexOutOfBoundsException(__FILE__,__LINE__); |
127 } | 127 } |
128 | 128 |
129 int cacheCopied = 0; | 129 int cacheCopied = 0; |
130 int newOffset = offset; | 130 int newOffset = offset; |
131 | 131 |