/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code 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 General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4274639 4305280
* @summary Tests PropertyDescriptor/PropertyEditorSupport improvements
* @author Mark Davidson
*/
public class Test4274639 {
boolean string = false;
boolean integer = false;
// This tests createPropertyEditor such that the PropertyEditor
// returned will have the bean as the source object.
throw new Error("property editor cannot be created");
string = true;
}
// This tests createPropertyEditor such that the PropertyEditor
// returned will be just a new instance
throw new Error("property editor cannot be created");
integer = true;
}
}
if (!string)
throw new Error("string property is not tested");
if (!integer)
throw new Error("integer property is not tested");
}
public static final class TestBean {
private int integer;
public TestBean() {
this.string = "default";
this.integer = 0;
}
}
return this.string;
}
}
public int getInteger() {
return this.integer;
}
}
}
try {
}
catch (IntrospectionException exception) {
}
return pds;
}
}
// Public constructor was added for 4305280
super(source);
}
}
}
// Will use the default public constructor
// that uses this property editor as the source.
return INTEGER_VALUE; // default value is hard coded
}
}
}