Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 156594 Details for
Bug 300133
[1.5][compiler] Local classes inside enum constants generate default constructor without implicit constructor call
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
An example program that demonstrates the bug
EnumLocalClassTest.java (text/plain), 1.00 KB, created by
Chris Jester-Young
on 2010-01-19 23:04:53 EST
(
hide
)
Description:
An example program that demonstrates the bug
Filename:
MIME Type:
Creator:
Chris Jester-Young
Created:
2010-01-19 23:04:53 EST
Size:
1.00 KB
patch
obsolete
>package com.hedgee.sandbox; > >import java.util.regex.Pattern; > >public enum EnumLocalClassTest { > FIND { > @Override > public Object createMatcher(final Pattern pattern) { > class Finder { > @Override > public boolean equals(Object obj) { > if (obj instanceof CharSequence) { > return pattern.matcher((CharSequence) obj).find(); > } > if (obj instanceof Finder) { > return pattern.equals(((Finder) obj).getPattern()); > } > return false; > } > > @Override public int hashCode() {return pattern.hashCode();} > private Pattern getPattern() {return pattern;} > } > return new Finder(); > } > }; > > public abstract Object createMatcher(Pattern pattern); > > public static void main(String... args) { > FIND.createMatcher(Pattern.compile("Hello, world!")); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 300133
: 156594 |
156823