Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ static private void addSubprojects( Project project, List<Project> result ) {
return;
}

for( Iterator/*<Project>*/ it = spp.getSubprojects().iterator(); it.hasNext(); ) {
for( Iterator<? extends Project> it = spp.getSubprojects().iterator(); it.hasNext(); ) {
Project sp = (Project) it.next();
if (ProjectUtils.hasSubprojectCycles(project, sp)) {
Logger.getLogger("global").log(Level.WARNING, "There would be cyclic " + // NOI18N
Expand Down
2 changes: 1 addition & 1 deletion enterprise/j2ee.genericserver/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
# specific language governing permissions and limitations
# under the License.
javac.compilerargs=-Xlint:unchecked
javac.source=1.6
javac.source=1.8
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ public boolean isAddBeanToConfig() {
}
return component.isAddBeanToConfig();
}
private final Set/*<ChangeListener>*/ listeners = new HashSet(1);

private final Set<ChangeListener> listeners = new HashSet<>(1);

@Override
public final void addChangeListener(ChangeListener l) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public boolean isValid() {
return component.valid(wizardDescriptor);
}

private final Set/*<ChangeListener>*/ listeners = new HashSet(1);
private final Set<ChangeListener> listeners = new HashSet<>(1);

public final void addChangeListener(ChangeListener l) {
synchronized (listeners) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public class TemplateClientPanelVisual extends javax.swing.JPanel implements Hel

private WizardDescriptor wizardDescriptor;

private final Set/*<ChangeListener>*/ listeners = new HashSet(1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HashSet of size 1 is probably a non-sense. By default it has 75% fill ratio and then it is rehashed.E.g. as soon as first item is added, the set is probably rehashed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HashSet of size 1 is probably a non-sense.

Just a follow-up comment in case someone comes across this bug report in the future.. I completely agree with your comment! My goal is simply to try and stay away from any "potential" source changes that could be behavioral. Even ones as small as this. Hope that explains why I do what I do..

private final Set<ChangeListener> listeners = new HashSet<>(1);

private final static String VALUE_NAME = "name"; //NOI18N

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public Throwable fillInStackTrace() {
private class EntityResolverWrapper implements EntityResolver {

private EntityResolver resolver;
private ArrayList/*<String>*/ resolvedSystemIds = new ArrayList(3);
private ArrayList<String> resolvedSystemIds = new ArrayList(3);

public EntityResolverWrapper(EntityResolver resolver) {
this.resolver = resolver;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ private void generateDocumentElements(DocumentModel.DocumentModelModificationTra
}


private List/*<DocumentElement>*/ getDescendantsOfNotSkippedElements(DocumentElement de, List/*<DocumentElement>*/ skippedElements) {
private List<DocumentElement> getDescendantsOfNotSkippedElements(DocumentElement de, List<DocumentElement> skippedElements) {
ArrayList desc = new ArrayList();
Iterator children = de.getChildren().iterator();
while(children.hasNext()) {
Expand Down
2 changes: 1 addition & 1 deletion java/i18n.form/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# under the License.

is.eager=true
javac.source=1.6
javac.source=1.8
spec.version.base=1.61.0

test.config.stableBTD.includes=**/*Test.class
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public boolean isValid() {
return component.valid(wizardDescriptor);
}

private final Set/*<ChangeListener>*/ listeners = new HashSet(1);
private final Set<ChangeListener> listeners = new HashSet(1);

public final void addChangeListener(ChangeListener l) {
synchronized (listeners) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ private void implTestConversions (FileObject fo) {
assertNotNull(urlFromMapper);

FileObject[] all = URLMapper.findFileObjects(urlFromMapper);
List/*<FileObject>*/ allList = Arrays.asList(all);
List<FileObject> allList = Arrays.asList(all);
assertTrue("found " + fo + " in " + allList + " from " + urlFromMapper, allList.contains(fo));
assertEquals("findFileObject works too", fo, URLMapper.findFileObject(urlFromMapper));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class ClassDumpSegment extends TagBounds {
final int superClassIDOffset;
ClassDump java_lang_Class;
boolean newSize;
Map /*<JavaClass,List<Field>>*/ fieldsCache;
Map<JavaClass,List<Field>> fieldsCache;
private List<JavaClass> classes;
private Map /*<Byte,JavaClass>*/ primitiveArrayMap;

Expand Down Expand Up @@ -202,12 +202,12 @@ void addInstanceSize(ClassDump cls, int tag, long instanceOffset) {
}
}

synchronized List /*<JavaClass>*/ createClassCollection() {
synchronized List<JavaClass> createClassCollection() {
if (classes != null) {
return classes;
}

List cls = new ArrayList /*<JavaClass>*/(1000);
List<JavaClass> cls = new ArrayList<>(1000);

long[] offset = new long[] { startOffset };

Expand Down