java类javax.annotation.ParametersAreNonnullByDefault的实例源码

MethodParameterTest.java 文件源码 项目:traute 阅读 34 收藏 0 点赞 0 评论 0
@Test
public void notNullByDefault_package_qualifiedName() {
    String packageInfoSource = String.format(
            "@%s\n" +
            "package %s;\n",
            ParametersAreNonnullByDefault.class.getName(), PACKAGE);
    String testSource = String.format(
            "package %s;\n" +
            "" +
            "public class %s {\n" +
            "\n" +
            "  public %s(Integer intParam) {\n" +
            "  }\n" +
            "\n" +
            "  public static void main(String[] args) {\n" +
            "    new %s(null);\n" +
            "  }\n" +
            "}", PACKAGE, CLASS_NAME, CLASS_NAME, CLASS_NAME);
    expectNpeFromParameterCheck(testSource, "intParam", expectRunResult);
    doTest(new TestSourceImpl(testSource, PACKAGE + "." + CLASS_NAME),
           new TestSourceImpl(packageInfoSource, PACKAGE + "." + PACKAGE_INFO));
}
MethodParameterTest.java 文件源码 项目:traute 阅读 39 收藏 0 点赞 0 评论 0
@Test
public void notNullByDefault_class() {
    String testSource = String.format(
            "@%s\n" +
            "public class %s {\n" +
            "\n" +
            "  public %s(Integer intParam) {\n" +
            "  }\n" +
            "\n" +
            "  public static void main(String[] args) {\n" +
            "    new %s(null);\n" +
            "  }\n" +
            "}", ParametersAreNonnullByDefault.class.getName(), CLASS_NAME, CLASS_NAME, CLASS_NAME);
    expectNpeFromParameterCheck(testSource, "intParam", expectRunResult);
    doTest(CLASS_NAME, testSource);
}
MethodParameterTest.java 文件源码 项目:traute 阅读 35 收藏 0 点赞 0 评论 0
@Test
public void notNullByDefault_method() {
    String testSource = String.format(
            "public class %s {\n" +
            "\n" +
            "  @%s\n" +
            "  public %s(Integer intParam) {\n" +
            "  }\n" +
            "\n" +
            "  public static void main(String[] args) {\n" +
            "    new %s(null);\n" +
            "  }\n" +
            "}", CLASS_NAME, ParametersAreNonnullByDefault.class.getName(), CLASS_NAME, CLASS_NAME);
    expectNpeFromParameterCheck(testSource, "intParam", expectRunResult);
    doTest(CLASS_NAME, testSource);
}
MethodParameterTest.java 文件源码 项目:traute 阅读 36 收藏 0 点赞 0 评论 0
@Test
public void notNullByDefault_nullableArgument() {
    String testSource = String.format(
            "@%s\n" +
            "public class %s {\n" +
            "\n" +
            "  public %s(@%s Integer intParam) {\n" +
            "  }\n" +
            "\n" +
            "  public static void main(String[] args) {\n" +
            "    new %s(null);\n" +
            "  }\n" +
            "}", ParametersAreNonnullByDefault.class.getName(), CLASS_NAME, CLASS_NAME, Nullable.class.getName(),
            CLASS_NAME);
    doTest(CLASS_NAME, testSource);
}
MethodParameterTest.java 文件源码 项目:traute 阅读 33 收藏 0 点赞 0 评论 0
@Test
public void notNullByDefault_customNullableAnnotation() {
    String testSource = String.format(
            "@%s\n" +
            "public class %s {\n" +
            "\n" +
            "  public %s(@%s Integer intParam) {\n" +
            "  }\n" +
            "\n" +
            "  public static void main(String[] args) {\n" +
            "    new %s(null);\n" +
            "  }\n" +
            "}", ParametersAreNonnullByDefault.class.getName(), CLASS_NAME, CLASS_NAME, NN.class.getName(),
            CLASS_NAME);
    settingsBuilder.withNullableAnnotations(NN.class.getName());
    doTest(CLASS_NAME, testSource);
}
MethodParameterTest.java 文件源码 项目:traute 阅读 47 收藏 0 点赞 0 评论 0
@Test
public void booleanParameter() {
    String testSource = String.format(
            "package %s;\n" +
            "\n" +
            "@%s\n" +
            "public class %s {\n" +
            "\n" +
            "  public %s(boolean expression) {\n" +
            "  }\n" +
            "\n" +
            "  public static void main(String[] args) {\n" +
            "    new %s(true);\n" +
            "  }\n" +
            "}", PACKAGE, ParametersAreNonnullByDefault.class.getName(), CLASS_NAME, CLASS_NAME, CLASS_NAME);
    doTest(testSource);
}
AuthInterceptor.java 文件源码 项目:theskeleton-ui-android 阅读 42 收藏 0 点赞 0 评论 0
@Override
@ParametersAreNonnullByDefault
public Response intercept(Chain chain) throws IOException {
    Request original = chain.request();
    if (original.url().encodedPath().equals("/oauth/token")) {
        return chain.proceed(original.newBuilder()
                .header("Content-Type", "application/x-www-form-urlencoded")
                .header("Authorization", loginAuthorizationHeader)
                .build());
    } else if (tokenManager.getAccessToken() != null) {
        return chain.proceed(original.newBuilder()
            .header("Authorization", "Bearer " + tokenManager.getAccessToken())
            .build());
    } else {
        return chain.proceed(original);
    }
}
WindowsAuthenticator.java 文件源码 项目:sonar-activedirectory 阅读 37 收藏 0 点赞 0 评论 0
@Override
@ParametersAreNonnullByDefault
public boolean doAuthenticate(Context context) {
  boolean isUserAuthenticated = false;

  final String userName = context.getUsername();
  final String password = context.getPassword();

  // Cleanup basic auth windows principal from HttpSession
  windowsAuthenticationHelper.removeWindowsPrincipalForBasicAuth(context.getRequest());

  if (StringUtils.isNotBlank(userName) && StringUtils.isNotBlank(password)) {
    // Cleanup Windows Principal for sso only in case we are doing basic auth
    windowsAuthenticationHelper.removeWindowsPrincipalForSso(context.getRequest());
    WindowsPrincipal windowsPrincipal = windowsAuthenticationHelper.logonUser(userName, password);
    if (windowsPrincipal != null) {
      isUserAuthenticated = true;
      windowsAuthenticationHelper.setWindowsPrincipalForBasicAuth(context.getRequest(), windowsPrincipal);
    }
  } else {
    isUserAuthenticated = windowsAuthenticationHelper.isUserSsoAuthenticated(context.getRequest());
  }

  return isUserAuthenticated;
}
RenderEntitySmokeBomb.java 文件源码 项目:NinjaGear 阅读 26 收藏 0 点赞 0 评论 0
@Override
@ParametersAreNonnullByDefault
public void doRender(EntitySmokeBomb entity, double x, double y, double z, float entityYaw, float partialTicks) {
    GlStateManager.pushMatrix();
    GlStateManager.translate((float)x, (float)y, (float)z);
    GlStateManager.enableRescaleNormal();
    GlStateManager.rotate(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate((float)(this.renderManager.options.thirdPersonView == 2 ? -1 : 1) * this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
    GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F);
    this.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
    if (this.renderOutlines) {
        GlStateManager.enableColorMaterial();
        GlStateManager.enableOutlineMode(this.getTeamColor(entity));
    }
    this.renderItem.renderItem(this.item, ItemCameraTransforms.TransformType.GROUND);
    if (this.renderOutlines) {
        GlStateManager.disableOutlineMode();
        GlStateManager.disableColorMaterial();
    }
    GlStateManager.disableRescaleNormal();
    GlStateManager.popMatrix();
    super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
RenderEntityRopeCoil.java 文件源码 项目:NinjaGear 阅读 25 收藏 0 点赞 0 评论 0
@Override
@ParametersAreNonnullByDefault
public void doRender(EntityRopeCoil entity, double x, double y, double z, float entityYaw, float partialTicks) {
    GlStateManager.pushMatrix();
    GlStateManager.translate((float)x, (float)y, (float)z);
    GlStateManager.enableRescaleNormal();
    GlStateManager.rotate(-this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate((float)(this.renderManager.options.thirdPersonView == 2 ? -1 : 1) * this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
    GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F);
    this.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
    if (this.renderOutlines) {
        GlStateManager.enableColorMaterial();
        GlStateManager.enableOutlineMode(this.getTeamColor(entity));
    }
    this.renderItem.renderItem(this.item, ItemCameraTransforms.TransformType.GROUND);
    if (this.renderOutlines) {
        GlStateManager.disableOutlineMode();
        GlStateManager.disableColorMaterial();
    }
    GlStateManager.disableRescaleNormal();
    GlStateManager.popMatrix();
    super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
ItemManeuverGearHandle.java 文件源码 项目:3DManeuverGear 阅读 31 收藏 0 点赞 0 评论 0
@Override
@ParametersAreNonnullByDefault
public Multimap<String, AttributeModifier> getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack) {
    Multimap<String, AttributeModifier> multimap = super.getAttributeModifiers(slot, stack);
    if(slot == EntityEquipmentSlot.OFFHAND || slot == EntityEquipmentSlot.MAINHAND) {
        if (this.hasSwordBlade(stack)) {
            multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getName(),
                    new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", 3.0 + (ConfigurationHandler.getInstance().damage), 0));
        } else {
            multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getName(),
                    new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", 0, 0));
        }
        multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", 1.8, 0));
    }
    return multimap;
}
Cache.java 文件源码 项目:pravega 阅读 36 收藏 0 点赞 0 评论 0
public Cache(final Loader<T> loader) {
    cache = CacheBuilder.newBuilder()
            .maximumSize(10000)
            .expireAfterWrite(10, TimeUnit.MINUTES)
            .build(new CacheLoader<String, CompletableFuture<Data<T>>>() {
                @ParametersAreNonnullByDefault
                @Override
                public CompletableFuture<Data<T>> load(final String key) {
                    CompletableFuture<Data<T>> result = loader.get(key);
                    result.exceptionally(ex -> {
                        invalidateCache(key);
                        return null;
                    });
                    return result;
                }
            });
}
Skin.java 文件源码 项目:voxelwind 阅读 28 收藏 0 点赞 0 评论 0
@Nonnull
@ParametersAreNonnullByDefault
public static Skin create(BufferedImage image) {
    Preconditions.checkNotNull(image, "image");
    Preconditions.checkArgument(image.getHeight() == 32 && image.getWidth() == 64, "Image is not 32x64");

    byte[] mcpeTexture = new byte[32 * 64 * 4];

    int at = 0;
    for (int i = 0; i < image.getHeight(); i++) {
        for (int i1 = 0; i1 < image.getWidth(); i1++) {
            int rgb = image.getRGB(i, i1);
            mcpeTexture[at++] = (byte) ((rgb & 0x00ff0000) >> 16);
            mcpeTexture[at++] = (byte) ((rgb & 0x0000ff00) >> 8);
            mcpeTexture[at++] = (byte) (rgb & 0x000000ff);
            mcpeTexture[at++] = (byte) ((rgb >> 24) & 0xff);
        }
    }

    return new Skin("Standard_Custom", mcpeTexture);
}
CompositeParseTreeListener.java 文件源码 项目:protostuff-compiler 阅读 37 收藏 0 点赞 0 评论 0
/**
 * Create new composite listener for a collection of delegates.
 */
@SafeVarargs
public static <T extends ParseTreeListener> T create(Class<T> type, T... delegates) {
    ImmutableList<T> listeners = ImmutableList.copyOf(delegates);
    return Reflection.newProxy(type, new AbstractInvocationHandler() {

        @Override
        @ParametersAreNonnullByDefault
        protected Object handleInvocation(Object proxy, Method method, Object[] args) throws Throwable {
            for (T listener : listeners) {
                method.invoke(listener, args);
            }
            return null;
        }

        @Override
        public String toString() {
            return MoreObjects.toStringHelper("CompositeParseTreeListener")
                    .add("listeners", listeners)
                    .toString();
        }
    });

}
RolesCache.java 文件源码 项目:lightblue-rest 阅读 32 收藏 0 点赞 0 评论 0
public RolesCache(int expiryMS) {
    rolesCache = CacheBuilder.newBuilder()
            .concurrencyLevel(concurrencyLevel)
            .maximumSize(maximumSize)
            .expireAfterWrite(expiryMS, TimeUnit.MILLISECONDS)
            .removalListener(
                    new RemovalListener<String, Set<String>>() {
                {
                    LOGGER.debug("Removal Listener created");
                }

                @Override
                public void onRemoval(@ParametersAreNonnullByDefault RemovalNotification<String, Set<String>> notification) {
                    LOGGER.debug("This data from " + notification.getKey() + " evacuated due:" + notification.getCause());
                }
            }
            ).build();

    fallbackRolesCache = CacheBuilder.newBuilder()
            .concurrencyLevel(concurrencyLevel) // handle 10 concurrent request without a problem
            .maximumSize(maximumSize) // Hold 500 sessions before remove them
            .build();

    LOGGER.info("RolesCache initialized with expiry={}", expiryMS);
}
OfflineScribeLoggerTest.java 文件源码 项目:buck 阅读 26 收藏 0 点赞 0 评论 0
@Override
public ListenableFuture<Void> log(final String category, final Iterable<String> lines) {
  ListenableFuture<Void> upload = offlineScribeLogger.log(category, lines);
  Futures.addCallback(
      upload,
      new FutureCallback<Void>() {
        @Override
        public void onSuccess(Void result) {}

        @Override
        @ParametersAreNonnullByDefault
        public void onFailure(Throwable t) {
          if (!blacklistCategories.contains(category)) {
            storedCategoriesWithLines.incrementAndGet();
          }
        }
      },
      MoreExecutors.directExecutor());
  return upload;
}
MethodParameterTest.java 文件源码 项目:traute 阅读 31 收藏 0 点赞 0 评论 0
@Test
public void customNotBuiltinException() {
    String testClassSource = String.format(
            "package %s;\n" +
            "\n" +
            "@%s\n" +
            "public class %s {\n" +
            "\n" +
            "  public %s(Integer intParam) {\n" +
            "  }\n" +
            "\n" +
            "  public static void main(String[] args) {\n" +
            "    new %s(null);\n" +
            "  }\n" +
            "}", PACKAGE, ParametersAreNonnullByDefault.class.getName(), CLASS_NAME, CLASS_NAME, CLASS_NAME);

    String exceptionPackage = PACKAGE + ".util";
    String exceptionClass = "MyException";
    String qualifiedExceptionClass = exceptionPackage + "." + exceptionClass;
    String exceptionSource = String.format(
            "package %s;\n"+
            "\n" +
            "public class %s extends RuntimeException {\n" +
            "    public %s(String message) {\n" +
            "        super(message);\n" +
            "    }\n" +
            "}\n" +
            "\n",
            exceptionPackage, exceptionClass, exceptionClass);
    settingsBuilder.withExceptionToThrow(InstrumentationType.METHOD_PARAMETER, qualifiedExceptionClass);
    expectRunResult.withExceptionClass(qualifiedExceptionClass)
                   .withExceptionMessageSnippet("intParam")
                   .atLine(findLineNumber(testClassSource, "intParam"));
    doTest(new TestSourceImpl(testClassSource, PACKAGE + "." + CLASS_NAME),
           new TestSourceImpl(exceptionSource, qualifiedExceptionClass));
}
WindowsGroupsProvider.java 文件源码 项目:sonar-activedirectory 阅读 28 收藏 0 点赞 0 评论 0
/**
 * Retrieves the group information for the user.
 *
 * @return A {@link Collection} of groups the user is member of.
 */
@ParametersAreNonnullByDefault
@Override
public Collection<String> doGetGroups(Context context) {
  WindowsPrincipal windowsPrincipal = windowsAuthenticationHelper.getWindowsPrincipal(context.getRequest(),
    WindowsAuthenticationHelper.BASIC_AUTH_PRINCIPAL_KEY);
  if (windowsPrincipal == null) {
    windowsPrincipal = windowsAuthenticationHelper.getWindowsPrincipal(context.getRequest(),
      WindowsAuthenticationHelper.SSO_PRINCIPAL_KEY);
  }

  return windowsPrincipal != null ? windowsAuthenticationHelper.getUserGroups(windowsPrincipal) : null;
}
EntitySmokeBomb.java 文件源码 项目:NinjaGear 阅读 31 收藏 0 点赞 0 评论 0
@Override
@ParametersAreNonnullByDefault
protected void onImpact(RayTraceResult impact) {
    World world = this.getEntityWorld();
    BlockPos pos = this.getBlockPosFromImpact(impact);
    this.clearRevealedStatus(world, pos);
    this.createSmokeCloud(world, pos);
}
ItemRope.java 文件源码 项目:NinjaGear 阅读 25 收藏 0 点赞 0 评论 0
@Override
@ParametersAreNonnullByDefault
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand) {
    ItemStack stack = player.getHeldItem(hand);
    if(player.isSneaking()) {
        if(world.isRemote) {
            return new ActionResult<>(EnumActionResult.PASS, stack);
        } else {
            this.attemptToCreateRopeCoil(player);
            return new ActionResult<>(EnumActionResult.SUCCESS, stack);
        }
    }
    return new ActionResult<>(EnumActionResult.PASS, stack);
}
ItemShuriken.java 文件源码 项目:NinjaGear 阅读 22 收藏 0 点赞 0 评论 0
@Override
@ParametersAreNonnullByDefault
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand) {
    if(!world.isRemote) {
        boolean crit = player.isPotionActive(PotionRegistry.getInstance().potionNinjaHidden);
        EntityShuriken shuriken = new EntityShuriken(world, player, crit);
        world.spawnEntity(shuriken);
        if (!player.capabilities.isCreativeMode) {
            player.inventory.decrStackSize(player.inventory.currentItem, 1);
        }
        NinjaAuraHandler.getInstance().revealEntity(player, ConfigurationHandler.getInstance().hidingCoolDown);
    }
    return new ActionResult<>(EnumActionResult.PASS, player.getHeldItem(hand));
}
ItemRopeCoil.java 文件源码 项目:NinjaGear 阅读 28 收藏 0 点赞 0 评论 0
@Override
@ParametersAreNonnullByDefault
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand) {
    if(!world.isRemote) {
        EntityRopeCoil rope = new EntityRopeCoil(world, player);
        world.spawnEntity(rope);
        if (!player.capabilities.isCreativeMode) {
            player.inventory.decrStackSize(player.inventory.currentItem, 1);
        }
    }
    return new ActionResult<>(EnumActionResult.PASS, player.getHeldItem(hand));
}
RenderEntityShuriken.java 文件源码 项目:NinjaGear 阅读 34 收藏 0 点赞 0 评论 0
@Override
@ParametersAreNonnullByDefault
public void doRender(EntityShuriken entity, double x, double y, double z, float entityYaw, float partialTicks) {
    GlStateManager.pushMatrix();
    //translate and rotate according to throwing heading
    double vX = entity.getDirection().xCoord;
    double vY = entity.getDirection().yCoord;
    double vZ = entity.getDirection().zCoord;
    double alpha = 180*Math.atan2(vZ, vX)/Math.PI;
    double beta = 180*Math.atan2(vY, Math.sqrt(vX*vX + vZ*vZ))/Math.PI;
    GlStateManager.translate((float) x, (float) y, (float) z);
    GlStateManager.rotate((float) -alpha, 0, 1, 0);
    GlStateManager.rotate((float) beta, 0, 0, 1);

    //rotate around z-axis
    int period = 600;
    int time = (int) (System.currentTimeMillis() % period);
    float angle = -360 * ((float) time) / ((float) period);
    float dy = -0.125F;
    GL11.glRotatef(angle, 0, 0, 1);
    GL11.glTranslatef(0, dy, 0);

    GlStateManager.enableRescaleNormal();

    this.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
    if (this.renderOutlines) {
        GlStateManager.enableColorMaterial();
        GlStateManager.enableOutlineMode(this.getTeamColor(entity));
    }
    this.renderItem.renderItem(this.item, ItemCameraTransforms.TransformType.GROUND);
    if (this.renderOutlines) {
        GlStateManager.disableOutlineMode();
        GlStateManager.disableColorMaterial();
    }
    GlStateManager.disableRescaleNormal();
    GlStateManager.popMatrix();
    super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
BlockRope.java 文件源码 项目:NinjaGear 阅读 26 收藏 0 点赞 0 评论 0
@Override
@Deprecated
@SuppressWarnings("deprecation")
@ParametersAreNonnullByDefault
public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state) {
    return new ItemStack(ItemRegistry.getInstance().itemRope);
}
BlockSmoke.java 文件源码 项目:NinjaGear 阅读 27 收藏 0 点赞 0 评论 0
@Override
@ParametersAreNonnullByDefault
public void randomTick(World world, BlockPos pos, IBlockState state, Random random) {
    int meta = this.getMetaFromState(state);
    if (meta < 15) {
        world.setBlockState(pos, this.getStateFromMeta(Math.min(meta + 2 + random.nextInt(3), 15)), 6);
    } else {
        world.setBlockToAir(pos);
    }
}
EntityDart.java 文件源码 项目:3DManeuverGear 阅读 37 收藏 0 点赞 0 评论 0
@Override
@ParametersAreNonnullByDefault
protected void onImpact(RayTraceResult impact) {
    ManeuverGear.instance.getLogger().debug("impact " + (this.getEntityWorld().isRemote ? "client side" : "server side"));
    double yaw = -Math.atan2(motionZ, motionX);
    double pitch = Math.asin(motionY / Math.sqrt(motionX * motionX + motionZ * motionZ));
    DartHandler.instance.onDartAnchored(this, impact.hitVec.xCoord, impact.hitVec.yCoord, impact.hitVec.zCoord, (float) yaw, (float) pitch);
}
ItemManeuverGear.java 文件源码 项目:3DManeuverGear 阅读 25 收藏 0 点赞 0 评论 0
@Override
@ParametersAreNonnullByDefault
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand) {
    if(world.isRemote) {
        new MessageEquipManeuverGear(hand).sendToServer();
    }
    return new ActionResult<>(EnumActionResult.SUCCESS, player.getHeldItem(hand));
}
RenderEntityDart.java 文件源码 项目:3DManeuverGear 阅读 26 收藏 0 点赞 0 评论 0
@Override
@ParametersAreNonnullByDefault
public void doRender(EntityDart dart, double x, double y, double z, float float1, float partialTicks) {
    renderEntity(dart, x, y, z, partialTicks);
    EntityPlayer player = dart.getPlayer();
    if (player == null) {
        return;
    }
    if (this.renderManager.options.thirdPersonView > 0 || player != Minecraft.getMinecraft().player) {
        this.renderWireThirdPerson(dart, player, x, y, z, partialTicks);
    } else {
        renderWireFirstPerson(dart, player, x, y, z, partialTicks);
    }
}
EntityBoatChest.java 文件源码 项目:Boatifull 阅读 42 收藏 0 点赞 0 评论 0
@Override
@ParametersAreNonnullByDefault
public boolean processInitialInteract(EntityPlayer player, EnumHand hand) {
    if(!this.getEntityWorld().isRemote && !player.isSneaking()) {
        player.displayGUIChest(this);
        player.addStat(StatList.CHEST_OPENED);
    }
    return true;
}
Decompressor.java 文件源码 项目:boildown 阅读 26 收藏 0 点赞 0 评论 0
@ParametersAreNonnullByDefault
public Decompressor(final InputStream boiled,
                    final OutputStream out,
                    final int bufferSize) throws Exception {
    super("boildown-decompressor");
    setDaemon(true);
    boiled_ = checkNotNull(boiled, "Boiled input stream cannot be null.");
    out_ = checkNotNull(out, "Output stream cannot be null.");
    bufferSize_ = bufferSize;
}


问题


面经


文章

微信
公众号

扫码关注公众号