破解JIRA

来源:互联网 发布:2017年三季度经济数据 编辑:程序博客网 时间:2024/04/26 17:12

反编译License.class文件,做如下修改编译覆盖原文件就可以了!


package com.atlassian.jira.license;

import java.util.Calendar;
import java.util.Date;

// Referenced classes of package com.atlassian.jira.license:
//            LicenseType

public class License
{

    public License(Date dateCreated, Date datePurchased, String organisation, LicenseType licenseType)
    {
        this.dateCreated = dateCreated;
        this.datePurchased = datePurchased;
        this.organisation = organisation;
        this.licenseType = licenseType;
    }

    public Date getDateCreated()
    {
        return dateCreated;
    }

    public Date getDatePurchased()
    {
        return datePurchased;
    }

    public String getOrganisation()
    {
        return organisation;
    }

    public LicenseType getLicenseType()
    {
        return licenseType;
    }

    public boolean isExpired()
    {
        //始终返回false ,就是说永不过期!
        return false;
    }

    public Date getExpiryDate()
    {
       //设置系统显示过期时间为2099-12-27日
        Calendar cal = Calendar.getInstance();
        cal.set(2099, 11, 27);
        return cal.getTime();
    }

    public boolean isEnterprise()
    {
        return getLicenseType().getDescription().toLowerCase().indexOf("enterprise") != -1;
    }

    public boolean isProfessionalFeatureEnabled()
    {
        return isEnterprise() || isProfessionalLicenseType();
    }

    public boolean isProfessionalLicenseType()
    {
        return getLicenseType().getDescription().toLowerCase().indexOf("professional") != -1;
    }

    public boolean isStandardLicenseType()
    {
        return getLicenseType().getDescription().toLowerCase().indexOf("standard") != -1;
    }

    public String toString()
    {
        return licenseType.getNiceName() + " licensed to " + organisation;
    }

    public static long EVALUATION_PERIOD = 0x9fa52400L;
    private Date dateCreated;
    private Date datePurchased;
    private String organisation;
    private LicenseType licenseType;

}

原创粉丝点击