You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by rw...@apache.org on 2017/05/29 20:04:10 UTC

svn commit: r1796689 - /pivot/trunk/wtk/src/org/apache/pivot/wtk/Theme.java

Author: rwhitcomb
Date: Mon May 29 20:04:10 2017
New Revision: 1796689

URL: http://svn.apache.org/viewvc?rev=1796689&view=rev
Log:
Check for null font dictionary input to "deriveFont" in Theme.java;
Use class name to derive Theme PROVIDER_NAME.

Modified:
    pivot/trunk/wtk/src/org/apache/pivot/wtk/Theme.java

Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/Theme.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/Theme.java?rev=1796689&r1=1796688&r2=1796689&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/Theme.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/Theme.java Mon May 29 20:04:10 2017
@@ -67,7 +67,7 @@ public abstract class Theme {
     /**
      * The service provider name (see {@link Service#getProvider(String)}).
      */
-    public static final String PROVIDER_NAME = "org.apache.pivot.wtk.Theme";
+    public static final String PROVIDER_NAME = Theme.class.getName();
 
     static {
         theme = (Theme) Service.getProvider(PROVIDER_NAME);
@@ -265,8 +265,11 @@ public abstract class Theme {
      * {@value #ITALIC_KEY} - true/false</li> </ul> Omitted values are taken
      * from the theme's font.
      * @return The new font derived from the current font.
+     * @throws IllegalArgumentException if the supplied dictionary is <tt>null</tt>.
      */
     public static Font deriveFont(Dictionary<String, ?> dictionary) {
+        Utils.checkNull(dictionary, "dictionary");
+
         Font font = theme.getFont();
 
         String name = font.getName();