Skip to content

Commit 6bc8d84

Browse files
committed
Mention PR66376.
2015-06-19 Andrew John Hughes <[email protected]> * NEWS: Mention PR66376.
1 parent 591da8d commit 6bc8d84

19 files changed

+356
-165
lines changed

ChangeLog

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2015-06-19 Andrew John Hughes <[email protected]>
2+
3+
* NEWS: Mention PR66376.
4+
15
2015-04-18 Andrew John Hughes <[email protected]>
26

37
* gnu/xml/stream/SAXParser.java:

NEWS

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ New in release 0.99.1 (XXX XX, 2012)
3434
- PR64881: KeyPairGenerator.genKeyPair() ends up calling the default generateKeyPair method which returns a DSA generator
3535
- PR64902: Keys returned by KeyPairGenerator don't use standardised algorithm names
3636
- PR64904: KeyPairGenerator.genKeyPair() fails if not explicitly initialised
37+
- PR66376: Lack of method stringPropertyNames
3738

3839
New in release 0.99 (Feb 15, 2012)
3940

gnu/java/awt/peer/ClasspathFontPeer.java

+62-61
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* ClasspathFontPeer.java -- Font peer used by GNU Classpath.
2-
Copyright (C) 2003, 2004 Free Software Foundation, Inc.
2+
Copyright (C) 2003, 2004, 2014 Free Software Foundation, Inc.
33
44
This file is part of GNU Classpath.
55
@@ -129,7 +129,8 @@ public LRUCache(int max)
129129
super(max, 0.75f, true);
130130
max_entries = max;
131131
}
132-
protected boolean removeEldestEntry(Map.Entry eldest)
132+
@Override
133+
protected boolean removeEldestEntry(Map.Entry<K,V> eldest)
133134
{
134135
return size() > max_entries;
135136
}
@@ -191,7 +192,7 @@ protected static String faceNameToFamilyName (String name)
191192
return name;
192193
}
193194

194-
public static void copyStyleToAttrs (int style, Map attrs)
195+
public static void copyStyleToAttrs (int style, Map<TextAttribute,Object> attrs)
195196
{
196197
if ((style & Font.BOLD) == Font.BOLD)
197198
attrs.put (TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD);
@@ -204,18 +205,18 @@ public static void copyStyleToAttrs (int style, Map attrs)
204205
attrs.put (TextAttribute.POSTURE, TextAttribute.POSTURE_REGULAR);
205206
}
206207

207-
protected static void copyFamilyToAttrs (String fam, Map attrs)
208+
protected static void copyFamilyToAttrs (String fam, Map<TextAttribute,Object> attrs)
208209
{
209210
if (fam != null)
210211
attrs.put (TextAttribute.FAMILY, fam);
211212
}
212213

213-
public static void copySizeToAttrs (float size, Map attrs)
214+
public static void copySizeToAttrs (float size, Map<TextAttribute,Object> attrs)
214215
{
215216
attrs.put (TextAttribute.SIZE, new Float (size));
216217
}
217218

218-
protected static void copyTransformToAttrs (AffineTransform trans, Map attrs)
219+
protected static void copyTransformToAttrs (AffineTransform trans, Map<TextAttribute,Object> attrs)
219220
{
220221
if (trans != null)
221222
{
@@ -255,12 +256,12 @@ protected void setStandardAttributes (String name, String family, int style,
255256
}
256257

257258

258-
protected void setStandardAttributes (String name, Map attribs)
259+
protected void setStandardAttributes (String name, Map<TextAttribute,Object> attribs)
259260
{
260261
String family = this.familyName;
261262
AffineTransform trans = this.transform;
262-
float size = this.size;
263-
int style = this.style;
263+
float setSize = this.size;
264+
int setStyle = this.style;
264265

265266
if (attribs.containsKey (TextAttribute.FAMILY))
266267
family = (String) attribs.get (TextAttribute.FAMILY);
@@ -272,27 +273,27 @@ protected void setStandardAttributes (String name, Map attribs)
272273
{
273274
Float weight = (Float) attribs.get (TextAttribute.WEIGHT);
274275
if (weight.floatValue () >= TextAttribute.WEIGHT_BOLD.floatValue ())
275-
style += Font.BOLD;
276+
setStyle += Font.BOLD;
276277
}
277278

278279
if (attribs.containsKey (TextAttribute.POSTURE))
279280
{
280281
Float posture = (Float) attribs.get (TextAttribute.POSTURE);
281282
if (posture.floatValue () >= TextAttribute.POSTURE_OBLIQUE.floatValue ())
282-
style += Font.ITALIC;
283+
setStyle += Font.ITALIC;
283284
}
284285

285286
if (attribs.containsKey (TextAttribute.SIZE))
286287
{
287288
Float sz = (Float) attribs.get (TextAttribute.SIZE);
288-
size = sz.floatValue ();
289+
setSize = sz.floatValue ();
289290

290291
// Pango doesn't accept 0 as a font size.
291-
if (size < 1)
292-
size = 1;
292+
if (setSize < 1)
293+
setSize = 1;
293294
}
294295
else
295-
size = 12;
296+
setSize = 12;
296297

297298
if (attribs.containsKey (TextAttribute.TRANSFORM))
298299
{
@@ -301,10 +302,10 @@ protected void setStandardAttributes (String name, Map attribs)
301302
trans = ta.getTransform ();
302303
}
303304

304-
setStandardAttributes (name, family, style, size, trans);
305+
setStandardAttributes (name, family, setStyle, setSize, trans);
305306
}
306307

307-
protected void getStandardAttributes (Map attrs)
308+
protected void getStandardAttributes (Map<TextAttribute,Object> attrs)
308309
{
309310
copyFamilyToAttrs (this.familyName, attrs);
310311
copySizeToAttrs (this.size, attrs);
@@ -315,15 +316,15 @@ protected void getStandardAttributes (Map attrs)
315316

316317
/* Begin public API */
317318

318-
public ClasspathFontPeer (String name, Map attrs)
319+
public ClasspathFontPeer (String name, Map<TextAttribute,Object> attrs)
319320
{
320321
setStandardAttributes (name, attrs);
321322
}
322323

323324
public ClasspathFontPeer (String name, int style, int size)
324325
{
325-
setStandardAttributes (name, (String)null, style,
326-
(float)size, (AffineTransform)null);
326+
setStandardAttributes (name, (String)null, style, size,
327+
(AffineTransform)null);
327328
}
328329

329330
/**
@@ -333,7 +334,7 @@ public ClasspathFontPeer (String name, int style, int size)
333334
* useful if you are sharing peers between Font objects. Otherwise it may
334335
* be ignored.
335336
*/
336-
337+
@SuppressWarnings("unused")
337338
public String getName (Font font)
338339
{
339340
return logicalName;
@@ -346,7 +347,7 @@ public String getName (Font font)
346347
* useful if you are sharing peers between Font objects. Otherwise it may
347348
* be ignored.
348349
*/
349-
350+
@SuppressWarnings("unused")
350351
public String getFamily (Font font)
351352
{
352353
return familyName;
@@ -359,7 +360,7 @@ public String getFamily (Font font)
359360
* useful if you are sharing peers between Font objects. Otherwise it may
360361
* be ignored.
361362
*/
362-
363+
@SuppressWarnings("unused")
363364
public String getFamily (Font font, Locale lc)
364365
{
365366
return familyName;
@@ -372,7 +373,7 @@ public String getFamily (Font font, Locale lc)
372373
* useful if you are sharing peers between Font objects. Otherwise it may
373374
* be ignored.
374375
*/
375-
376+
@SuppressWarnings("unused")
376377
public String getFontName (Font font)
377378
{
378379
return faceName;
@@ -385,7 +386,7 @@ public String getFontName (Font font)
385386
* useful if you are sharing peers between Font objects. Otherwise it may
386387
* be ignored.
387388
*/
388-
389+
@SuppressWarnings("unused")
389390
public String getFontName (Font font, Locale lc)
390391
{
391392
return faceName;
@@ -398,7 +399,7 @@ public String getFontName (Font font, Locale lc)
398399
* useful if you are sharing peers between Font objects. Otherwise it may
399400
* be ignored.
400401
*/
401-
402+
@SuppressWarnings("unused")
402403
public float getSize (Font font)
403404
{
404405
return size;
@@ -411,7 +412,7 @@ public float getSize (Font font)
411412
* useful if you are sharing peers between Font objects. Otherwise it may
412413
* be ignored.
413414
*/
414-
415+
@SuppressWarnings("unused")
415416
public boolean isPlain (Font font)
416417
{
417418
return style == Font.PLAIN;
@@ -424,7 +425,7 @@ public boolean isPlain (Font font)
424425
* useful if you are sharing peers between Font objects. Otherwise it may
425426
* be ignored.
426427
*/
427-
428+
@SuppressWarnings("unused")
428429
public boolean isBold (Font font)
429430
{
430431
return ((style & Font.BOLD) == Font.BOLD);
@@ -437,7 +438,7 @@ public boolean isBold (Font font)
437438
* useful if you are sharing peers between Font objects. Otherwise it may
438439
* be ignored.
439440
*/
440-
441+
@SuppressWarnings("unused")
441442
public boolean isItalic (Font font)
442443
{
443444
return ((style & Font.ITALIC) == Font.ITALIC);
@@ -450,13 +451,13 @@ public boolean isItalic (Font font)
450451
* useful if you are sharing peers between Font objects. Otherwise it may
451452
* be ignored.
452453
*/
453-
454-
public Font deriveFont (Font font, int style, float size)
454+
@SuppressWarnings("unused")
455+
public Font deriveFont (Font font, int newStyle, float newSize)
455456
{
456-
Map attrs = new HashMap ();
457+
Map<TextAttribute,Object> attrs = new HashMap<TextAttribute,Object>();
457458
getStandardAttributes (attrs);
458-
copyStyleToAttrs (style, attrs);
459-
copySizeToAttrs (size, attrs);
459+
copyStyleToAttrs (newStyle, attrs);
460+
copySizeToAttrs (newSize, attrs);
460461
return tk().getFont (logicalName, attrs);
461462
}
462463

@@ -467,12 +468,12 @@ public Font deriveFont (Font font, int style, float size)
467468
* useful if you are sharing peers between Font objects. Otherwise it may
468469
* be ignored.
469470
*/
470-
471-
public Font deriveFont (Font font, float size)
471+
@SuppressWarnings("unused")
472+
public Font deriveFont (Font font, float newSize)
472473
{
473-
Map attrs = new HashMap ();
474+
Map<TextAttribute,Object> attrs = new HashMap<TextAttribute,Object>();
474475
getStandardAttributes (attrs);
475-
copySizeToAttrs (size, attrs);
476+
copySizeToAttrs (newSize, attrs);
476477
return tk().getFont (logicalName, attrs);
477478
}
478479

@@ -483,12 +484,12 @@ public Font deriveFont (Font font, float size)
483484
* useful if you are sharing peers between Font objects. Otherwise it may
484485
* be ignored.
485486
*/
486-
487-
public Font deriveFont (Font font, int style)
487+
@SuppressWarnings("unused")
488+
public Font deriveFont (Font font, int newStyle)
488489
{
489-
Map attrs = new HashMap ();
490+
Map<TextAttribute,Object> attrs = new HashMap<TextAttribute,Object>();
490491
getStandardAttributes (attrs);
491-
copyStyleToAttrs (style, attrs);
492+
copyStyleToAttrs (newStyle, attrs);
492493
return tk().getFont (logicalName, attrs);
493494
}
494495

@@ -499,12 +500,12 @@ public Font deriveFont (Font font, int style)
499500
* useful if you are sharing peers between Font objects. Otherwise it may
500501
* be ignored.
501502
*/
502-
503-
public Font deriveFont (Font font, int style, AffineTransform t)
503+
@SuppressWarnings("unused")
504+
public Font deriveFont (Font font, int newStyle, AffineTransform t)
504505
{
505-
Map attrs = new HashMap ();
506+
Map<TextAttribute,Object> attrs = new HashMap<TextAttribute,Object>();
506507
getStandardAttributes (attrs);
507-
copyStyleToAttrs (style, attrs);
508+
copyStyleToAttrs (newStyle, attrs);
508509
copyTransformToAttrs (t, attrs);
509510
return tk().getFont (logicalName, attrs);
510511
}
@@ -516,10 +517,10 @@ public Font deriveFont (Font font, int style, AffineTransform t)
516517
* useful if you are sharing peers between Font objects. Otherwise it may
517518
* be ignored.
518519
*/
519-
520+
@SuppressWarnings("unused")
520521
public Font deriveFont (Font font, AffineTransform t)
521522
{
522-
Map attrs = new HashMap ();
523+
Map<TextAttribute,Object> attrs = new HashMap<TextAttribute,Object>();
523524
getStandardAttributes (attrs);
524525
copyTransformToAttrs (t, attrs);
525526
return tk().getFont (logicalName, attrs);
@@ -532,8 +533,9 @@ public Font deriveFont (Font font, AffineTransform t)
532533
* useful if you are sharing peers between Font objects. Otherwise it may
533534
* be ignored.
534535
*/
535-
536-
public Font deriveFont (Font font, Map attrs)
536+
@SuppressWarnings("unused")
537+
public Font deriveFont (Font font,
538+
Map<? extends AttributedCharacterIterator.Attribute,?> attrs)
537539
{
538540
return tk().getFont (logicalName, attrs);
539541
}
@@ -545,10 +547,10 @@ public Font deriveFont (Font font, Map attrs)
545547
* useful if you are sharing peers between Font objects. Otherwise it may
546548
* be ignored.
547549
*/
548-
549-
public Map getAttributes (Font font)
550+
@SuppressWarnings("unused")
551+
public Map<TextAttribute,?> getAttributes (Font font)
550552
{
551-
HashMap h = new HashMap ();
553+
HashMap<TextAttribute,Object> h = new HashMap<TextAttribute,Object>();
552554
getStandardAttributes (h);
553555
return h;
554556
}
@@ -560,8 +562,8 @@ public Map getAttributes (Font font)
560562
* useful if you are sharing peers between Font objects. Otherwise it may
561563
* be ignored.
562564
*/
563-
564-
public AttributedCharacterIterator.Attribute[] getAvailableAttributes(Font font)
565+
@SuppressWarnings("unused")
566+
public static AttributedCharacterIterator.Attribute[] getAvailableAttributes(Font font)
565567
{
566568
AttributedCharacterIterator.Attribute a[] =
567569
new AttributedCharacterIterator.Attribute[5];
@@ -580,7 +582,7 @@ public AttributedCharacterIterator.Attribute[] getAvailableAttributes(Font font)
580582
* useful if you are sharing peers between Font objects. Otherwise it may
581583
* be ignored.
582584
*/
583-
585+
@SuppressWarnings("unused")
584586
public AffineTransform getTransform (Font font)
585587
{
586588
if (transform == null)
@@ -595,7 +597,7 @@ public AffineTransform getTransform (Font font)
595597
* useful if you are sharing peers between Font objects. Otherwise it may
596598
* be ignored.
597599
*/
598-
600+
@SuppressWarnings("unused")
599601
public boolean isTransformed (Font font)
600602
{
601603
return ! transform.isIdentity ();
@@ -608,13 +610,12 @@ public boolean isTransformed (Font font)
608610
* useful if you are sharing peers between Font objects. Otherwise it may
609611
* be ignored.
610612
*/
611-
613+
@SuppressWarnings("unused")
612614
public float getItalicAngle (Font font)
613615
{
614616
if ((style & Font.ITALIC) == Font.ITALIC)
615617
return TextAttribute.POSTURE_OBLIQUE.floatValue ();
616-
else
617-
return TextAttribute.POSTURE_REGULAR.floatValue ();
618+
return TextAttribute.POSTURE_REGULAR.floatValue ();
618619
}
619620

620621

@@ -625,7 +626,7 @@ public float getItalicAngle (Font font)
625626
* useful if you are sharing peers between Font objects. Otherwise it may
626627
* be ignored.
627628
*/
628-
629+
@SuppressWarnings("unused")
629630
public int getStyle (Font font)
630631
{
631632
return style;

gnu/java/awt/peer/qt/QtFontPeer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* QtFontPeer.java --
2-
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
2+
Copyright (C) 2005, 2006, 2014 Free Software Foundation, Inc.
33
44
This file is part of GNU Classpath.
55

0 commit comments

Comments
 (0)