BUG: Inner Compile-Time Constant String Members Not Permitted (325740)
The information in this article applies to:
- Microsoft Visual J++ 6.0
- Microsoft Visual J# .NET (2002)
This article was previously published under Q325740 SYMPTOMS When you define a static final string member in an inner
class, such as the following
public class Outer
{
private class Inner
{
static final String NAME = "Bob";
}
}
you may receive the following error messages in the Visual J# .NET
compiler: error VJS1176: Cannot declare field 'NAME'
static in an inner class -or- error VJS1175:
Inner class 'Inner' contains a static initializer RESOLUTION Future versions of the Visual J# .NET compiler are expected
to support static final string member types in inner classes. See the "More
Information" section for possible functional equivalent workarounds.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
REFERENCES See section 8.1.2 of the Java language specification for
more information about compile-time constants in inner classes.
Modification Type: | Major | Last Reviewed: | 1/19/2004 |
---|
Keywords: | kbbug kbnofix KB325740 |
---|
|