package org.jacorb.test.bugs.bug941; import org.jacorb.test.bugs.bug941.MyServerPackage.MyException; /* * JacORB - a free Java ORB * * Copyright (C) 1997-2014 Gerald Brose / The JacORB Team. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ public class TestObjectImpl extends MyServerPOA { protected short height = 31; protected short width = 14; protected java.math.BigDecimal[][] mygrid; public void setData(Data data) { } public void setBigData(Data data) { } public TestObjectImpl() { mygrid = new java.math.BigDecimal[height][width]; for( short h = 0; h < height; h++ ) { for( short w = 0; w < width; w++ ) { mygrid[h][w] = new java.math.BigDecimal("123.21"); } } } public java.math.BigDecimal get(short n, short m) { if( ( n <= height ) && ( m <= width ) ) { return mygrid[n][m]; } else { return new java.math.BigDecimal("123.01"); } } public short height() { return height; } public void set(short n, short m, java.math.BigDecimal value) { if( ( n <= height ) && ( m <= width ) ) { mygrid[n][m] = value; } } public short width() { return width; } public short opWithException() throws MyException { throw new MyException("This is only a test exception, no harm done :-)"); } }