Advertisement
iBotPeaches

Bug587 - Patch

Jan 4th, 2014
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. Index: brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResPackage.java
  2. IDEA additional info:
  3. Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
  4. <+>UTF-8
  5. ===================================================================
  6. --- brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResPackage.java (date 1387379414000)
  7. +++ brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResPackage.java (revision )
  8. @@ -23,6 +23,7 @@
  9. import brut.androlib.res.xml.ResValuesXmlSerializable;
  10. import brut.util.Duo;
  11. import java.util.*;
  12. +import java.util.logging.Logger;
  13.  
  14. /**
  15. * @author Ryszard Wiśniewski <brut.alll@gmail.com>
  16. @@ -168,9 +169,11 @@
  17. }
  18.  
  19. public void addType(ResType type) throws AndrolibException {
  20. - if (mTypes.put(type.getName(), type) != null) {
  21. - throw new AndrolibException("Multiple types: " + type);
  22. + if (mTypes.containsKey(type.getName())) {
  23. + LOGGER.warning("Multiple types detected! " + type + " ignored!");
  24. + } else {
  25. + mTypes.put(type.getName(), type);
  26. - }
  27. + }
  28. }
  29.  
  30. public void addResource(ResResource res) {
  31. @@ -220,4 +223,7 @@
  32. }
  33. return mValueFactory;
  34. }
  35. +
  36. + private final static Logger LOGGER = Logger
  37. + .getLogger(ResPackage.class.getName());
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement